%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /var/www/html/hr/web/js/
Upload File :
Create Path :
Current File : /var/www/html/hr/web/js/chunk-7e6ed722.7932066a.js.map

{"version":3,"sources":["webpack:///./src/components/Pagination.vue?fb44","webpack:///src/components/Pagination.vue","webpack:///./src/components/Pagination.vue?b5ee","webpack:///./src/components/Pagination.vue","webpack:///./src/views/timecards/Timecard.vue?9b0f","webpack:///./src/components/timecards/TimecardTable.vue?eba3","webpack:///src/components/timecards/TimecardTable.vue","webpack:///./src/components/timecards/TimecardTable.vue?21dc","webpack:///./src/components/timecards/TimecardTable.vue","webpack:///src/views/timecards/Timecard.vue","webpack:///./src/views/timecards/Timecard.vue?7d63","webpack:///./src/views/timecards/Timecard.vue"],"names":["render","_vm","this","_h","$createElement","_c","_self","staticClass","_v","_s","$t","attrs","pagination","per_page","paginationOptions","on","$event","$emit","_e","max","total_pages","pageChange","model","value","callback","$$v","expression","staticRenderFns","component","openCreationForm","loadingTable","changeDay","goToDate","selectedDate","tableHeader","list","updatingTimecards","promptDeleteTimecard","openDetails","changePage","timecardList","scopedSlots","_u","key","fn","ref","data","_l","tr","indexTr","project","name","client","date","_f","start_time","end_time","notes","isUpdating","id","slot","title","i","class","selectedEntries","queryParams","include","from","to","page","loadingModalActions"],"mappings":"gHAAA,IAAIA,EAAS,WAAa,IAAIC,EAAIC,KAASC,EAAGF,EAAIG,eAAmBC,EAAGJ,EAAIK,MAAMD,IAAIF,EAAG,OAAOE,EAAG,MAAM,CAACE,YAAY,QAAQ,CAAEN,EAAiB,cAAEI,EAAG,MAAM,CAACE,YAAY,qBAAqB,CAACF,EAAG,OAAO,CAACE,YAAY,uBAAuB,CAACN,EAAIO,GAAGP,EAAIQ,GAAGR,EAAIS,GAAG,oBAAoB,OAAOL,EAAG,MAAM,CAACE,YAAY,cAAc,CAACF,EAAG,mBAAmB,CAACE,YAAY,QAAQI,MAAM,CAAC,MAAQV,EAAIW,WAAWC,SAAS,QAAUZ,EAAIa,k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R,wCACQ,OAAR,WACU,EAAV,sBAII,eArCJ,SAqCA,GAAM,IAAN,OACM,EAAN,mCACQ,EAAR,iDAEQ,EAAR,sHACA,mBACQ,EAAR,yCACA,oBACQ,EAAR,gEAGI,OAhDJ,WAiDM,KAAN,cAAQ,MAAR,yCAEM,KAAN,mBACM,KAAN,eAEI,aAtDJ,WAuDM,IAAN,OACA,yBACQ,EAAR,+CAGI,WA5DJ,SA4DA,GACM,KAAN,mBACM,KAAN,cAAQ,MAAR,yCAEM,KAAN,cAEI,iBAlEJ,SAkEA,GACM,OAAN,iCAAQ,OAAO,EAAf,WAEI,eArEJ,WAsEM,KAAN,uBACM,KAAN,cAGE,SAAF,CACI,YADJ,WAEM,MAAN,CACA,mCACA,gCACA,sCACA,oCACA,iCACA,sCAIE,QA3GF,WA2GI,IAAJ,OACI,KAAJ,eACI,KAAJ,SACI,EAAJ,oCAAM,OAAN,oBAEE,MAAF,CACI,aADJ,SACA,GACM,KAAN,2CACM,KAAN,4CC1JiW,ICO7V,EAAY,eACd,EACA9B,EACA2B,GACA,EACA,KACA,WACA,MAIa,e","file":"js/chunk-7e6ed722.7932066a.js","sourcesContent":["var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:\"flex\"},[(_vm.selectPerPage)?_c('div',{staticClass:\"flex items-center\"},[_c('span',{staticClass:\"mr-2 whitespace-pre\"},[_vm._v(_vm._s(_vm.$t('labels.per_page'))+\":\")]),_c('div',{staticClass:\"z-500 w-20\"},[_c('base-multiselect',{staticClass:\"-mt-4\",attrs:{\"value\":_vm.pagination.per_page,\"options\":_vm.paginationOptions,\"selectedLabel\":\"\",\"selectLabel\":\"\",\"deselectLabel\":\"\",\"allow-empty\":false},on:{\"input\":function($event){return _vm.$emit('selectedPerPage', $event)}}})],1)]):_vm._e(),_c('vs-pagination',{staticClass:\"mt-2\",attrs:{\"max\":_vm.max,\"total\":_vm.pagination.total_pages},on:{\"input\":_vm.pageChange},model:{value:(_vm.value),callback:function ($$v) {_vm.value=$$v},expression:\"value\"}})],1)}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","<template>\n  <div class=\"flex\">\n    <div v-if=\"selectPerPage\" class=\"flex items-center\">\n      <span class=\"mr-2 whitespace-pre\">{{ $t('labels.per_page') }}:</span>\n      <div class=\"z-500 w-20\">\n        <base-multiselect\n          :value=\"pagination.per_page\"\n          :options=\"paginationOptions\"\n          @input=\"$emit('selectedPerPage', $event)\"\n          selectedLabel=\"\"\n          selectLabel=\"\"\n          deselectLabel=\"\"\n          class=\"-mt-4\"\n          :allow-empty=\"false\"/>\n      </div>\n    </div>\n    <vs-pagination :max=\"max\" :total=\"pagination.total_pages\" @input=\"pageChange\" class=\"mt-2\"\n                   v-model=\"value\"></vs-pagination>\n  </div>\n</template>\n\n<script>\n  export default {\n    name:'Pagination',\n    props:{\n      pagination:{\n        type:Object,\n        required:true\n      },\n      max:{\n        type:Number,\n        default:7\n      },\n      selectPerPage: {\n        type:Boolean,\n        default:false\n      }\n    },\n    data:() => ({\n      paginationOptions:[5, 10, 15, 20, 30, 50, 100],\n      value:null\n    }),\n    methods:{\n      pageChange(val) {\n        this.$emit('input', val)\n      }\n    },\n    created() {\n      this.value = this.pagination.current_page\n    }\n  }\n</script>\n\n<style scoped>\n\n</style>\n","import mod from \"-!../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../node_modules/thread-loader/dist/cjs.js!../../node_modules/babel-loader/lib/index.js!../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Pagination.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../node_modules/thread-loader/dist/cjs.js!../../node_modules/babel-loader/lib/index.js!../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Pagination.vue?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./Pagination.vue?vue&type=template&id=cb826a88&scoped=true&\"\nimport script from \"./Pagination.vue?vue&type=script&lang=js&\"\nexport * from \"./Pagination.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n  script,\n  render,\n  staticRenderFns,\n  false,\n  null,\n  \"cb826a88\",\n  null\n  \n)\n\nexport default component.exports","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:\"view-container\"},[_c('vue-portal',{attrs:{\"to\":\"hrsys-navbar-actions\"}},[_c('vx-tooltip',{staticClass:\"ml-2\",attrs:{\"text\":_vm.$t('buttons.create'),\"position\":\"bottom\"}},[_c('base-button',{staticClass:\"self-end\",attrs:{\"icon\":\"plus\"},on:{\"click\":_vm.openCreationForm}})],1)],1),_c('div',{},[_c('base-loader',{attrs:{\"loading\":_vm.loadingTable}},[_c('div',{staticClass:\"flex justify-center mb-5\"},[_c('base-button',{staticClass:\"px-2 py-2 rounded-full self-end mb-1\",attrs:{\"button\":\"filled\",\"icon\":\"arrow-left\"},on:{\"click\":function($event){return _vm.changeDay(-1)}}}),_c('div',{staticClass:\"text-xl w-32 font-semibold mx-2 self-center\"},[_c('date-picker',{on:{\"input\":_vm.goToDate},model:{value:(_vm.selectedDate),callback:function ($$v) {_vm.selectedDate=$$v},expression:\"selectedDate\"}})],1),_c('base-button',{staticClass:\"px-2 py-2 rounded-full self-end mb-1\",attrs:{\"button\":\"filled\",\"icon\":\"arrow-right\"},on:{\"click\":function($event){return _vm.changeDay(+1)}}})],1),_c('timecard-table',{attrs:{\"header\":_vm.tableHeader,\"timecardList\":_vm.list,\"updatingTimecards\":_vm.updatingTimecards},on:{\"delete\":_vm.promptDeleteTimecard,\"details\":_vm.openDetails}}),(_vm.pagination.total)?_c('pagination',{attrs:{\"pagination\":_vm.pagination},on:{\"input\":_vm.changePage}}):_vm._e()],1)],1)],1)}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('vs-table',{attrs:{\"data\":_vm.timecardList},scopedSlots:_vm._u([{key:\"default\",fn:function(ref){\nvar data = ref.data;\nreturn _vm._l((data),function(tr,indexTr){return _c('vs-tr',{key:indexTr,attrs:{\"data\":tr}},[_c('vs-td',{attrs:{\"data\":tr.project.name}},[_vm._v(\" \"+_vm._s(tr.project.client.name)+\" - \"+_vm._s(tr.project.name)+\" \")]),_c('vs-td',{attrs:{\"data\":tr.date}},[_vm._v(\" \"+_vm._s(_vm._f(\"fromShortDate\")(tr.date,'MMM Do YYYY'))+\" \")]),_c('vs-td',{attrs:{\"data\":tr.start_time}},[_vm._v(\" \"+_vm._s(_vm._f(\"time\")(tr.start_time))+\" \")]),_c('vs-td',{attrs:{\"data\":tr.end_time}},[_vm._v(\" \"+_vm._s(_vm._f(\"time\")(tr.end_time))+\" \")]),_c('vs-td',{staticClass:\"max-w-xs truncate\",attrs:{\"data\":tr.notes}},[_vm._v(\" \"+_vm._s(tr.notes)+\" \")]),_c('vs-td',{staticClass:\"text-right w-16\"},[_c('div',{staticClass:\"flex justify-end\"},[_c('vx-tooltip',{attrs:{\"text\":_vm.$t('buttons.details'),\"position\":\"top\"}},[_c('base-button',{staticClass:\"self-end mx-px\",attrs:{\"icon\":\"info\"},on:{\"click\":function($event){return _vm.$emit('details', tr)}}})],1),_c('vx-tooltip',{attrs:{\"text\":_vm.$t('buttons.delete'),\"position\":\"top\"}},[_c('base-button',{staticClass:\"self-end mx-px\",attrs:{\"loading\":_vm.isUpdating(tr.id),\"color\":\"danger\",\"icon\":\"trash\"},on:{\"click\":function($event){return _vm.$emit('delete', tr)}}})],1)],1)])],1)})}}])},[_c('template',{slot:\"thead\"},_vm._l((_vm.header),function(title,i){return _c('vs-th',{key:i,staticClass:\"text-base\",class:{'float-right': title === _vm.$t('timecards.table.actions')}},[_vm._v(_vm._s(title)+\" \")])}),1)],2)}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","<template>\n\n  <vs-table :data=\"timecardList\">\n\n    <template slot=\"thead\">\n      <vs-th :key=\"i\" class=\"text-base\" v-for=\"(title, i) in header\"\n             :class=\"{'float-right': title === $t('timecards.table.actions')}\">{{ title }}\n      </vs-th>\n    </template>\n\n    <template slot-scope=\"{data}\">\n      <vs-tr :data=\"tr\" :key=\"indexTr\" v-for=\"(tr, indexTr) in data\">\n        <vs-td :data=\"tr.project.name\">\n          {{ tr.project.client.name }} - {{ tr.project.name }}\n        </vs-td>\n        <vs-td :data=\"tr.date\">\n          {{ tr.date | fromShortDate('MMM Do YYYY') }}\n        </vs-td>\n        <vs-td :data=\"tr.start_time\">\n          {{ tr.start_time | time }}\n        </vs-td>\n        <vs-td :data=\"tr.end_time\">\n          {{ tr.end_time | time}}\n        </vs-td>\n        <vs-td :data=\"tr.notes\" class=\"max-w-xs truncate\">\n          {{ tr.notes }}\n        </vs-td>\n        <vs-td class=\"text-right w-16\">\n          <div class=\"flex justify-end\">\n            <vx-tooltip :text=\"$t('buttons.details')\" position=\"top\">\n              <base-button @click=\"$emit('details', tr)\" class=\"self-end mx-px\" icon=\"info\"></base-button>\n            </vx-tooltip>\n            <vx-tooltip :text=\"$t('buttons.delete')\" position=\"top\">\n              <base-button :loading=\"isUpdating(tr.id)\" @click=\"$emit('delete', tr)\" class=\"self-end mx-px\"\n                           color=\"danger\" icon=\"trash\"></base-button>\n            </vx-tooltip>\n          </div>\n        </vs-td>\n      </vs-tr>\n    </template>\n  </vs-table>\n</template>\n\n<script>\n  export default {\n    name:\"TimeCardTable\",\n    props:{\n      header:{\n        type:Array,\n        required:true\n      },\n      timecardList:{\n        type:Array,\n        required:true\n      },\n      updatingTimecards:{\n        type:Array,\n        required:true\n      }\n    },\n    data:() => ({\n      selectedEntries:[]\n    }),\n    methods:{\n      isUpdating(id) {\n        return this.updatingTimecards.indexOf(id) > -1\n      },\n    },\n  }\n</script>\n\n<style scoped>\n\n</style>\n","import mod from \"-!../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../node_modules/thread-loader/dist/cjs.js!../../../node_modules/babel-loader/lib/index.js!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./TimecardTable.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../node_modules/thread-loader/dist/cjs.js!../../../node_modules/babel-loader/lib/index.js!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./TimecardTable.vue?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./TimecardTable.vue?vue&type=template&id=09efd1e8&scoped=true&\"\nimport script from \"./TimecardTable.vue?vue&type=script&lang=js&\"\nexport * from \"./TimecardTable.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n  script,\n  render,\n  staticRenderFns,\n  false,\n  null,\n  \"09efd1e8\",\n  null\n  \n)\n\nexport default component.exports","<template>\n  <div class=\"view-container\">\n    <vue-portal to=\"hrsys-navbar-actions\">\n      <vx-tooltip :text=\"$t('buttons.create')\" class=\"ml-2\" position=\"bottom\">\n        <base-button @click=\"openCreationForm\" class=\"self-end\" icon=\"plus\"></base-button>\n      </vx-tooltip>\n    </vue-portal>\n    <div class=\"\">\n      <base-loader :loading=\"loadingTable\">\n        <div class=\"flex justify-center mb-5\">\n          <base-button @click=\"changeDay(-1)\" button=\"filled\" class=\"px-2 py-2 rounded-full self-end mb-1\"\n                       icon=\"arrow-left\"></base-button>\n          <div class=\"text-xl w-32 font-semibold mx-2 self-center\">\n            <date-picker v-model=\"selectedDate\" @input=\"goToDate\"/>\n          </div>\n          <base-button @click=\"changeDay(+1)\" button=\"filled\" class=\"px-2 py-2 rounded-full self-end mb-1\"\n                       icon=\"arrow-right\"/>\n        </div>\n        <timecard-table\n          :header=\"tableHeader\"\n          :timecardList=\"list\"\n          :updatingTimecards=\"updatingTimecards\"\n          @delete=\"promptDeleteTimecard\"\n          @details=\"openDetails\"/>\n        <pagination :pagination=\"pagination\" @input=\"changePage\" v-if=\"pagination.total\"/>\n      </base-loader>\n    </div>\n  </div>\n\n</template>\n\n<script>\n  import * as moment from 'moment';\n  import TimecardTable from \"../../components/timecards/TimecardTable\";\n  import Pagination from \"../../components/Pagination\";\n  import Timecards from \"../../services/Timecards\";\n  import DatePicker from \"../../components/DatePicker\";\n  import EventBus from \"../../utilities/eventBus\";\n\n  export default {\n    name:\"Timecard\",\n    components:{\n      TimecardTable,\n      Pagination,\n      DatePicker\n    },\n    data:() => ({\n      list:[],\n      pagination:{},\n      queryParams:{\n        include:'project.client',\n        from:moment().format('YYYY-MM-DD'),\n        to:moment().format('YYYY-MM-DD'),\n        page:1,\n      },\n      selectedDate:moment().toDate(),\n      updatingTimecards:[],\n      loadingModalActions:false,\n      loadingTable:false,\n    }),\n    methods:{\n      changeDay(diff) {\n        this.selectedDate = moment(this.selectedDate).add(diff, 'days').toDate();\n        this.search();\n      },\n      goToDate(date) {\n        this.queryParams.from = moment(date).format('YYYY-MM-DD')\n        this.queryParams.to = moment(date).format('YYYY-MM-DD')\n        this.search()\n      },\n      getTimecard() {\n        this.loadingTable = true\n        Timecards.list(this.queryParams).then(res => {\n          this.list = res.data\n        }).catch(error => {\n          this.$notificationService.error(error.message)\n        }).finally(() => {\n          this.loadingTable = false\n        })\n      },\n      openDetails(timecard) {\n        EventBus.$emit('updateTimecard', timecard)\n      },\n      openCreationForm() {\n        EventBus.$emit('createTimecard', this.selectedDate)\n      },\n      promptDeleteTimecard(timecard) {\n        this.$vs.dialog({\n          type:'confirm',\n          color:'danger',\n          title:this.$t('timecards.prompts.deleteTitle'),\n          text:this.$t('timecards.prompts.deleteText'),\n          accept:() => {\n            this.deleteTimecard(timecard)\n          }\n        });\n      },\n      deleteTimecard(timecard) {\n        Timecards.delete(timecard.id).then(() => {\n          this.list.splice(this.getTimecardIndex(timecard.id), 1).join('')\n          // this.getTimecard()\n          this.$notificationService.success(`${this.$t('timecards.timecard')} ${this.$t('notification.successDelete')}`)\n        }).catch(error => {\n          this.$notificationService.error(error.message)\n        }).finally(() => {\n          this.updatingTimecards.splice(this.updatingTimecards.indexOf(timecard.id))\n        })\n      },\n      search() {\n        this.$router.push({query:this.queryParams}).catch(() => {\n        })\n        this.queryParams.page = 1\n        this.getTimecard()\n      },\n      getUrlParams() {\n        let vm = this;\n        if (this.$route.query.page) {\n          vm.queryParams = Object.assign({}, vm.$route.query);\n        }\n      },\n      changePage(newPage) {\n        this.queryParams.page = newPage\n        this.$router.push({query:this.queryParams}).catch(() => {\n        })\n        this.getClients()\n      },\n      getTimecardIndex(id) {\n        return this.list.findIndex((timecard) => timecard.id === id)\n      },\n      clearSelection() {\n        this.loadingModalActions = false\n        this.action = null\n      }\n    },\n    computed:{\n      tableHeader() {\n        return ([\n          this.$t('timecards.table.project'),\n          this.$t('timecards.table.date'),\n          this.$t('timecards.table.start_time'),\n          this.$t('timecards.table.end_time'),\n          this.$t('timecards.table.notes'),\n          this.$t('timecards.table.actions')\n        ])\n      }\n    },\n    mounted() {\n      this.getUrlParams()\n      this.search()\n      EventBus.$on('timecardDone', () => this.getTimecard())\n    },\n    watch:{\n      selectedDate(val) {\n        this.queryParams.from = moment(val).format(\"YYYY-MM-DD\")\n        this.queryParams.to = moment(val).format(\"YYYY-MM-DD\")\n      }\n    }\n  }\n</script>\n\n<style scoped>\n\n</style>\n","import mod from \"-!../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../node_modules/thread-loader/dist/cjs.js!../../../node_modules/babel-loader/lib/index.js!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Timecard.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../node_modules/thread-loader/dist/cjs.js!../../../node_modules/babel-loader/lib/index.js!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Timecard.vue?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./Timecard.vue?vue&type=template&id=8fb29048&scoped=true&\"\nimport script from \"./Timecard.vue?vue&type=script&lang=js&\"\nexport * from \"./Timecard.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n  script,\n  render,\n  staticRenderFns,\n  false,\n  null,\n  \"8fb29048\",\n  null\n  \n)\n\nexport default component.exports"],"sourceRoot":""}

Zerion Mini Shell 1.0