Ngiler SH3LL 360
Home
Information
Create File
Create Folder
:
/
home
/
tbf
/
curs.tbf.ro
/
src
/
components
/
Layouts
/
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 :
MainTemplate.vue
| Size :
14.29
KB
Copy
<template> <div class="template-tbfdigital"> <sidebar-tbf-digital v-if="$resize && $mq.above(780)" /> <div class="main-tbfdigital"> <navbar-tbf-digital/> <div class="page-content" :class="[$route.path.includes('master-goal/') ? 'full-width' : '']"> <slot></slot> </div> <sidebar-tbf-digital-mobile v-if="$resize && $mq.below(780)"/> </div> <div class="overflow-modal" @click="closeModals()" v-if="show_overflow"></div> <modal-key-result id="modal_key_result" v-if="show_modal.key_result" :model="modelId.key_result" :requiredData="requiredData.key_result" :userData="userData.key_result" :fromPage="modalFromPage" @toggle_modal="closeModal('key_result')"/> <modal-key-result-modals id="modal_key_result_modals" v-if="show_modal.key_result_modals" :keyResult="modelId.key_result_modals" :uuid="krUuid" :activeTab="modalKeyTab" :fromPage="modalFromPage" @toggle_modal="closeModal('key_result_modals')"/> <modal-update-key-result id="modal_update_key_result" v-if="show_modal.update_key_result" :requiredData="requiredData.update_key_result" :userData="userData.update_key_result" :fromPage="modalFromPage" @toggle_modal="closeModal('update_key_result')"/> <modal-objective id="modal_objective" v-if="show_modal.objective" :model="modelId.objective" :requiredData="requiredData.objective" @toggle_modal="closeModal('objective')" :fromPage="modalFromPage" canAddMasterGoalsInline="true" /> <modal-master-goal id="modal_master_goal" v-if="show_modal.master_goal" :model="modelId.master_goal" :userData="userData.master_goal" :requiredData="requiredData.master_goal" :fromPage="modalFromPage" @toggle_modal="closeModal('master_goal')"/> <modal-user id="modal_user" v-if="show_modal.user" :model="modelId.user" @toggle_modal="closeModal('user')" :fromPage="modalFromPage" /> <modal-tag id="modal_tag" v-if="show_modal.tag" :model="modelId.tag" @toggle_modal="closeModal('tag')" :fromPage="modalFromPage" /> <modal-profile-settings id="modal_profile_settings" v-if="show_modal.profile_settings" @close_modal="closeModal('profile_settings')" /> <modal-notitifications id="modal_notifications" v-if="show_modal.notifications" @close_modal="closeModal('notifications')"/> <modal-delete id="modal_delete" v-if="show_modal.delete" :model="model.delete" :type="typeDelete" :from="fromDelete" @close_modal="closeModal('delete')" /> <modal-add-promise id="modal_add_promise" v-if="show_modal.add_promise" @toggle_modal="closeModal('add_promise')"/> <modal-evaluate-promise id="modal_evaluate_promise" v-if="show_modal.evaluate_promise" @toggle_modal="closeModal('evaluate_promise')" :model="evaluate_promise" :fromPage="modalFromPage"/> <modal-cant-create-more id="modal_cant_create_more" v-if="show_modal.cant_create_more" :type="typeDelete" @close_modal="closeModal('cant_create_more')" /> <modal-cant-create-more-objective id="modal_cant_create_more_objective" v-if="show_modal.cant_create_more_objective" @close_modal="closeModal('cant_create_more_objective')" /> <modal-change-subscription id="modal_change_subscription" v-if="show_modal.change_subscription" @toggle_modal="closeModal('change_subscription')"/> <modal-payment-error id="modal_payment_error" v-if="show_modal.payment_error"/> <modal-tutorial-promise id="modal_tutorial_promise" v-if="show_modal.tutorial_promise" @close_modal="closeModal('tutorial_promise')"/> <modal-congratulations id="modal_congratulations" v-if="show_modal.congratulations" @close_modal="closeModal('congratulations')"/> <modal-share-master-goal id="modal_share_master_goal" v-if="show_modal.share_master_goal" :model="modelId.share_master_goal" @close_modal="closeModal('share_master_goal')"/> <modal-cant-add-more-updates id="modal_cant_add_more_updates" v-if="show_modal.cant_add_more_updates" @close_modal="closeModal('cant_add_more_updates')" /> <modal-prize id="modal_congratulations_prize" v-if="show_modal.congratulations_prize" :prize="prize" @close_modal="closeModal('congratulations_prize')"/> <modal-report-people id="modal_report_people" v-if="show_modal.report_people" :requiredData="requiredData.report_people" @toggle_modal="closeModal('report_people')"/> <modal-translate id="modal_translate" v-if="show_modal.translate" :component="componentTranslation" :translationData="arrayTranslationKeys" @close_modal="closeModal('translate')"/> </div> </template> <script> import NavbarTbfDigital from "../General/Navbar" import SidebarTbfDigital from "../General/Sidebar" import ModalKeyResult from "../Modals/KeyResult" import ModalKeyResultModals from "../Modals/KeyResultModals" import ModalObjective from "../Modals/Objective" import ModalMasterGoal from "../Modals/MasterGoal" import ModalProfileSettings from "../Modals/Settings" import ModalNotitifications from "../Modals/Notifications" import ModalUser from "../Modals/User" import ModalUpdateKeyResult from "../Modals/UpdateKeyResult" import ModalAddPromise from "../Modals/AddPromise" import ModalEvaluatePromise from "../Modals/EvaluatePromise" import ModalDelete from "../Modals/Delete" import ModalCantCreateMore from "../Modals/CantCreateMore" import ModalCantCreateMoreObjective from "../Modals/CantCreateMoreObjective" import ModalChangeSubscription from "../Modals/ChangeSubscription" import ModalPaymentError from "../Modals/PaymentError" import ModalTutorialPromise from "../Modals/TutorialPromise" import ModalCongratulations from "../Modals/Congratulations" import ModalShareMasterGoal from "../Modals/ShareMasterGoal" import ModalPrize from "../Modals/Prize" import ModalTag from "../Modals/Tag" import ModalCantAddMoreUpdates from "../Modals/CantAddMoreUpdates" import ModalReportPeople from "../Modals/ReportPeople" import SidebarTbfDigitalMobile from "../General/SidebarMobile" import ModalTranslate from "../General/ModalTranslate" export default { data() { return { main_path: '', show_overflow: false, show_overflow_profile: false, show_modal: { key_result: false, key_result_modals: false, profile_settings: false, notifications: false, add_promise: false, evaluate_promise: false, user: false, tag: false, objective: false, update_key_result: false, master_goal: false, change_subscription: false, payment_error: false, tutorial_promise: false, congratulations: false, congratulations_prize: false, cant_add_more_updates: false, translate: false, report_people: false }, modelId:{ user : '', tag : '', objective: '', master_goal: '', key_result: '', key_result_modals: '', add_promise: '' }, model: { delete: {} }, requiredData: { key_result: {}, update_key_result: {}, master_goal: {}, objective: {}, report_people: {} }, typeDelete: false, fromDelete: false, userData: { objective: {}, key_result: {}, update_key_result: {} }, active_modal: '', active_modal_list: [], modalFromPage: '', modalKeyTab: '', krUuid: '', prize: {}, evaluate_promise: {}, arrayTranslationKeys: [], componentTranslation: '' } }, components: { NavbarTbfDigital, SidebarTbfDigital, ModalKeyResult, ModalKeyResultModals, ModalObjective, ModalProfileSettings, ModalUser, ModalUpdateKeyResult, ModalNotitifications, ModalMasterGoal, ModalAddPromise, ModalEvaluatePromise, ModalDelete, ModalCantCreateMore, ModalCantCreateMoreObjective, ModalChangeSubscription, ModalPaymentError, ModalTutorialPromise, ModalCongratulations, ModalShareMasterGoal, SidebarTbfDigitalMobile, ModalCantAddMoreUpdates, ModalPrize, ModalTag, ModalReportPeople, ModalTranslate }, watch:{ $route (to, from){ this.closeModal() this.closeModalV2() } }, mounted(){ this.$root.$on('open_modal_translation', (component, arrayData) => { this.show_modal.translate = true this.arrayTranslationKeys = arrayData this.componentTranslation = component setTimeout(() => { $("#modal_translate").addClass("active"); }, 0); }) this.$root.$on("open_modal", (type, model = false, requiredData = false, userData = false, fromPage = false) => { this.active_modal = type this.active_modal_list.push(type); this.modalFromPage = fromPage this.modelId[type] = model ? model : '' this.requiredData[type] = requiredData ? requiredData : {} this.userData[type] = userData ? userData : {} setTimeout(() => { this.show_overflow = true this.show_modal[type] = true setTimeout(() => { $('.overflow-modal').addClass('show'); $("#modal_" + type).addClass("active"); if((fromPage == 'objective' || fromPage == 'keyresult') && type == 'user'){ $("#modal_" + type).addClass("smaller"); } if(fromPage == 'objective' && type == 'master_goal'){ $("#modal_" + type).addClass("smaller"); } }, 0); }, 0); }); this.$root.$on("evaluate_promise_modal", (promise = false, fromPage = false) => { this.active_modal = 'evaluate_promise'; this.active_modal_list.push('evaluate_promise'); this.modalFromPage = fromPage this.evaluate_promise = promise ? promise : null setTimeout(() => { this.show_overflow = true this.show_modal['evaluate_promise'] = true setTimeout(() => { $('.overflow-modal').addClass('show'); $("#modal_evaluate_promise").addClass("active"); }, 0); }, 0); }) this.$root.$on('open_key_result_modals', (model = false, uuid = false, activeTab, fromPage = false) => { this.active_modal = 'key_result_modals' this.active_modal_list.push('key_result_modals'); this.modalFromPage = fromPage this.modelId['key_result_modals'] = model ? model : '' this.krUuid = uuid ? uuid : '' this.modalKeyTab = activeTab setTimeout(() => { this.show_overflow = true; this.show_modal['key_result_modals'] = true setTimeout(() => { $('.overflow-modal').addClass('show'); $("#modal_key_result_modals").addClass("active"); }, 0); }, 0); }) this.$root.$on('open_modal_v2', (type, model = false, typeDelete = false, fromDelete = false) => { this.model[type] = model ? model : {} this.typeDelete = typeDelete ? typeDelete : false this.fromDelete = fromDelete ? fromDelete : false this.active_modal = type setTimeout(() => { this.show_overflow = true; this.show_modal[type] = true setTimeout(() => { $('.overflow-modal').addClass('show'); $("#modal_" + type).addClass("active"); }, 0); }, 0); }) this.$root.$on('change_modal', (type) => { $("#modal_" + this.active_modal).removeClass("active") setTimeout(() => { this.show_modal[this.active_modal] = false setTimeout(() => { this.show_modal[type] = true this.active_modal = type setTimeout(() => { $("#modal_" + type).addClass("active"); }, 0); }, 0); }, 200); }) this.$root.$on('won_prize', (prize) => { $("#modal_" + this.active_modal).removeClass("active") setTimeout(() => { this.show_modal[this.active_modal] = false setTimeout(() => { this.show_modal['congratulations_prize'] = true this.active_modal = 'congratulations_prize' this.prize = prize setTimeout(() => { $("#modal_congratulations_prize").addClass("active"); }, 0); }, 0); }, 200); }) if(this.$auth.user().status == 'grace_period'){ this.$root.$emit('open_modal', 'payment_error') } if(this.$auth.check()){ this.initItercom(); } this.checkLanguage(); document.addEventListener("keydown", (e) => { if (e.keyCode == 27) { this.closeModals(); } }); }, methods:{ closeModals(){ var arrayModalsNeedVerification = ['key_result', 'objective', 'master_goal', 'user', 'add_promise', 'evaluate_promise'] if(arrayModalsNeedVerification.includes(this.active_modal)){ this.$root.$emit('confirm_close') }else{ this.closeModal() } }, closeModal(type = false){ var target_modal = type ? type : this.active_modal $("#modal_" + target_modal).removeClass("active") this.active_modal_list = this.active_modal_list.filter(item => item !== target_modal) if(this.active_modal_list.length != 0) { this.active_modal = this.active_modal_list[this.active_modal_list.length - 1] } if(this.active_modal == 'user'){ this.$root.$emit('visibilityHiddenUser', false); } if(this.active_modal == 'objective'){ this.$root.$emit('visibilityHiddenObjective', false); } if(this.active_modal == 'key_result_modals'){ this.$root.$emit('visibilityHiddenKeyResultPromises', false); } setTimeout(() => { this.show_modal[target_modal] = false if(this.active_modal_list.length == 0) { $('.overflow-modal').removeClass('show') setTimeout(() => { this.show_overflow = false; }, 200); } }, 200); }, closeModalV2(type = false){ var target_modal = type ? type : this.active_modal $("#modal_" + target_modal).removeClass("active") setTimeout(() => { this.show_modal[target_modal] = false $('.overflow-modal-profile').removeClass('show') setTimeout(() => { this.show_overflow_profile = false; }, 200); }, 200); }, initItercom(){ Intercom('boot', { app_id: "tk8wk42t", name: this.$auth.user().first_name + ' ' + this.$auth.user().last_name, email: this.$auth.user().email, user_hash: this.$auth.user().intercom_token, created_at: null, }); }, checkLanguage(){ if(this.$auth.check()){ this.$i18n.locale = this.$auth.user().language this.$cookies.set('language', this.$auth.user().language, '1m') }else if(this.$cookies.get('language')){ this.$i18n.locale = this.$cookies.get('language') } } } } </script>
Back