Ngiler SH3LL 360
Home
Information
Create File
Create Folder
:
/
home
/
tbf
/
tbfguest.tbf.ro
/
src
/
views
/
public
/
company
/
Information Server
MySQL :
OFF
Perl :
OFF
CURL :
ON
WGET :
OFF
PKEXEC :
OFF
Directive
Local Value
IP Address
89.40.16.97
System
Linux server.atelieruldeit.ro 3.10.0-1160.el7.x86_64 #1 SMP Mon Oct 19 16:18:59 UTC 2020 x86_64
User
tbf
PHP Version
7.3.33
Software
Apache
Doc root
Writable
close
Edit File :
Index.vue
| Size :
12.51
KB
Copy
<!-- @format --> <template> <Transition enter-active-class="ease-out duration-500" enter-from-class="opacity-0" enter-to-class="opacity-100" leave-active-class="ease-in duration-200" leave-from-class="opacity-100" leave-to-class="opacity-0"> <div v-if="loaded"> <div class="px-16 pt-12 pb-10 border-b border-gray-200 flex items-center justify-between"> <div class="flex items-center gap-4"> <div> <svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor" class="w-14 h-14"> <path stroke-linecap="round" stroke-width="1.5" vector-effect="non-scaling-stroke" stroke-linejoin="round" d="M9 12.75L11.25 15 15 9.75m-3-7.036A11.959 11.959 0 013.598 6 11.99 11.99 0 003 9.749c0 5.592 3.824 10.29 9 11.623 5.176-1.332 9-6.03 9-11.622 0-1.31-.21-2.571-.598-3.751h-.152c-3.196 0-6.1-1.248-8.25-3.285z" /> </svg> </div> <div> <h2 class="text-base font-semibold leading-7 text-gray-900"> Descriere Companie <span class="text-gray-400">({{ completionPercentage == 99.99 ? 100 : completionPercentage }}%)</span> </h2> <p class="mt-1 text-sm leading-6 text-gray-600">Informațiile din această pagină sunt necesare pentru oricare dintre zilele TBF de implementare</p> </div> </div> <div class="relative"> <button @click="openTutorial" class="p-2 bg-blue-500 hover:bg-blue-400 rounded-full text-white"> <svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="w-6 h-6"> <path stroke-linecap="round" stroke-linejoin="round" d="M11.25 11.25l.041-.02a.75.75 0 011.063.852l-.708 2.836a.75.75 0 001.063.853l.041-.021M21 12a9 9 0 11-18 0 9 9 0 0118 0zm-9-3.75h.008v.008H12V8.25z" /> </svg> </button> <transition enter-active-class="transition-all ease-out duration-150 origin-top" enter-from-class="opacity-0 scale-75" enter-to-class="opacity-100 scale-105" leave-active-class="transition-all ease-in duration-75 origin-top" leave-from-class="opacity-100 scale-105" leave-to-class="opacity-0 scale-75"> <div v-if="tutorialPopover" class="absolute top-[100%] scal translate-y-3 -right-5 w-[15rem] p-4 rounded-lg text-sm text-center text-white bg-blue-400 shadow-sm transition-all duration-150"> <div class="relative"> <div class="w-3 h-3 bg-blue-400 absolute -top-5 right-[1.1rem] rotate-45"></div> </div> <div class="p-3 bg-white/20 text-white rounded-full inline-block"> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor" class="w-6 h-6"> <path fill-rule="evenodd" d="M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z" clip-rule="evenodd" /> </svg> </div> <h3 class="mt-2 font-semibold text-base text-center">Atenție</h3> <p class="mt-2 text-center">Urmărește acest video cu instrucțiuni înainte să completezi pagina</p> <button @click="openTutorial" type="button" class="mt-5 mb-0.5 w-full text-center rounded-full px-7 py-2 text-sm font-semibold focus-visible:outline-none bg-white text-blue-500 hover:text-blue-400"> Vezi video </button> </div> </transition> </div> </div> <div class="pb-20 pt-10 px-16 bg-gray-50 space-y-10 divide-y divide-gray-900/10"> <GeneralInformation :companyData="companyGeneralInfo" @updateProgress="updateGeneralProgress" /> <Branding :companyData="companyBrandInfo" @updateProgress="updateGeneralProgress" /> <TeamInformation :options="optionsTeam" :companyData="companyOptionsInfo" @updateProgress="updateGeneralProgress" /> <Parteners :companyData="companyPartners" @updateProgress="updateGeneralProgress" /> <MisionVision :companyData="companyMisionVision" @updateProgress="updateGeneralProgress" /> <BusinessModel :options="optionsBusinessModel" :companyData="companyOptionsInfo" @updateProgress="updateGeneralProgress" /> <Software :options="optionsSoftware" :companyData="companyOptionsInfo" @updateProgress="updateGeneralProgress" /> <ProductsServices :options="optionsProductsServices" :companyData="companyProductsServices" @updateProgress="updateGeneralProgress" /> <Differentiation :companyData="companyDifferentiation" @updateProgress="updateGeneralProgress" /> </div> </div> </Transition> <div class="p-16 flex items-center justify-center h-screen grow" v-if="!loaded"> <LoadingBigTBF /> </div> </template> <script> import GeneralInformation from "@/components/public/company/GeneralInformation.vue"; import Branding from "@/components/public/company/Branding.vue"; import TeamInformation from "@/components/public/company/TeamInformation.vue"; import Parteners from "@/components/public/company/Parteners.vue"; import MisionVision from "@/components/public/company/MisionVision.vue"; import BusinessModel from "@/components/public/company/BusinessModel.vue"; import Software from "@/components/public/company/Software.vue"; import ProductsServices from "@/components/public/company/ProductsServices.vue"; import Differentiation from "@/components/public/company/Differentiation.vue"; import LoadingBigTBF from "@/components/public/LoadingBigTBF.vue"; import { userNotificationsStore } from "@/stores/notifications.js"; import { useModalsStore } from "@/stores/modals.js"; import { useCookies } from "vue3-cookies"; export default { setup() { const { cookies } = useCookies(); return { cookies }; }, components: { GeneralInformation, Branding, TeamInformation, Parteners, MisionVision, BusinessModel, Software, ProductsServices, Differentiation, LoadingBigTBF, }, data() { return { tutorialPopover: false, realTimeModals: useModalsStore(), loaded: false, completionPercentage: 0, completedSections: [], companyGeneralInfo: {}, companyBrandInfo: {}, companyOptionsInfo: {}, companyPartners: {}, companyMisionVision: {}, companyProductsServices: {}, companyDifferentiation: {}, optionsTeam: [], optionsBusinessModel: [], optionsSoftware: [], optionsProductsServices: [], realTimeNotifications: userNotificationsStore(), }; }, async mounted() { await this.getOptionsChecks(); await this.getCompany(); var cookieModalVimeoData = this.cookies.get("modal_vimeo"); if (!(cookieModalVimeoData && JSON.parse(cookieModalVimeoData).includes("company_page"))) { setTimeout(() => { this.tutorialPopover = true; }, 1000); } }, methods: { async getOptionsChecks() { await axios .get(`options?type=company`) .then(({ data }) => { this.optionsTeam = data.data.filter((el) => el.category == "team"); this.optionsBusinessModel = data.data.filter((el) => el.category == "business_model"); this.optionsSoftware = data.data.filter((el) => el.category == "software"); this.optionsProductsServices = data.data.filter((el) => ["products_services_clients", "products_services_location", "products_services_methods"].includes(el.category)); }) .catch((error) => { var responseError = error.response.data; this.realTimeNotifications.addNotification({ type: "error", title: "TBF ERROR", description: `"${responseError.message}"<br>Vă rugăm să ne contactați și să ne transmiteți eroare. În interesul remedierii acestei probleme cât mai curând posibil.`, }); }); }, async getCompany() { await axios .get(`/instances/${this.$auth.user().instance.id}/edit`) .then(({ data }) => { this.companyGeneralInfo = this.extractGeneralInfo(data.data); this.companyBrandInfo = this.extractBrandInfo(data.data); this.companyOptionsInfo = this.extractOptionsInfo(data.data); this.companyPartners = this.extractPartnersInfo(data.data); this.companyMisionVision = this.extractMisionVision(data.data); this.companyProductsServices = this.extractProductsServices(data.data); this.companyDifferentiation = this.extractDifferentiation(data.data); }) .catch((error) => { var responseError = error.response.data; this.realTimeNotifications.addNotification({ type: "error", title: "TBF ERROR", description: `"${responseError.message}"<br>Vă rugăm să ne contactați și să ne transmiteți eroare. În interesul remedierii acestei probleme cât mai curând posibil.`, }); }) .finally(() => { this.loaded = true; }); }, extractGeneralInfo(data) { const { id, name, description, turnover, employee_number, director_number, experience, website, email, phone } = data; if ( name !== "" && name != null && website !== "" && website != null && email !== "" && email != null && phone !== "" && phone != null && description !== "" && description != null && experience !== "" && experience != null && employee_number !== "" && employee_number != null && director_number !== "" && director_number != null && turnover !== 0 && turnover != null ) { this.updateGeneralProgress("add", "general_info"); } return { id, name, description, turnover, employee_number, director_number, experience, website, email, phone }; }, extractBrandInfo(data) { const { id, logo, color } = data; if ( logo !== "" && logo != null && color !== "" && color != null ) { this.updateGeneralProgress("add", "brand_info"); } return { id, logo, color }; }, extractOptionsInfo(data) { const { id, options } = data; if (options.some((el) => el.category === "team")) { this.updateGeneralProgress("add", "team"); } if (options.some((el) => el.category === "business_model")) { this.updateGeneralProgress("add", "business_model"); } if (options.some((el) => el.category === "software")) { this.updateGeneralProgress("add", "software"); } return { id, options }; }, extractPartnersInfo(data) { const { id, important_partners, important_collaborators } = data; if (important_partners) { this.updateGeneralProgress("add", "partners"); } return { id, important_partners, important_collaborators }; }, extractMisionVision(data) { const { id, mission, vision, values } = data; if (mission && vision && values) { this.updateGeneralProgress("add", "mission"); } return { id, mission, vision, values }; }, extractProductsServices(data) { const { id, total_customers, options, products_and_services, customer_feedback_positive, customer_feedback_mixt, customer_feedback_negative } = data; if (total_customers && options && products_and_services && customer_feedback_positive && customer_feedback_mixt && customer_feedback_negative) { this.updateGeneralProgress("add", "products"); } return { id, total_customers, options, products_and_services, customer_feedback_positive, customer_feedback_mixt, customer_feedback_negative }; }, extractDifferentiation(data) { const { id, industry_innovations, certifications, awards, knowhow } = data; if (industry_innovations && certifications && awards && knowhow) { this.updateGeneralProgress("add", "innovations"); } return { id, industry_innovations, certifications, awards, knowhow }; }, updateGeneralProgress(type, section) { // verificam daca valoarea din variabila section exista in array let $alreadyExist = this.completedSections.indexOf(section) !== -1 ? true : false; if ($alreadyExist && type == "remove") { this.completedSections.splice(this.completedSections.indexOf(section), 1); } if (!$alreadyExist && type == "add") { this.completedSections.push(section); } // actualiazam completionPercentage in functie de numar de sectiuni this.completionPercentage = this.completedSections.length * 11.11; return true; }, openTutorial() { var arrayPages = this.cookies.get("modal_vimeo") ? JSON.parse(this.cookies.get("modal_vimeo")) : []; if (!arrayPages.includes("company_page")) { arrayPages.push("company_page"); this.cookies.set("modal_vimeo", JSON.stringify(arrayPages), "30d"); } this.tutorialPopover = false; this.realTimeModals.toggleShowModal("modal_video_vimeo", { videoId: "870578896" }); }, }, }; </script>
Back