{"version":3,"sources":["webpack:///./src/components/general/LoadingSpinner.vue?f586","webpack:///./src/components/dropdown/CurrenciesDropdown.vue?ae3e","webpack:///./src/components/general/LoadingSpinner.vue?a742","webpack:///./src/components/general/LoadingSpinner.vue","webpack:///./src/components/general/LoadingSpinner.vue?4fce","webpack:///./src/components/jobs/tabs/ClientRatesJob.vue?77db","webpack:///./src/components/jobs/Misc/JobClientRatesTable.vue?5ca7","webpack:///./src/components/clients/misc/types.ts","webpack:///./src/components/jobs/Misc/JobClientRatesTable.vue","webpack:///./src/components/jobs/Misc/JobClientRatesTable.vue?152b","webpack:///./src/components/jobs/tabs/ClientRatesJob.vue","webpack:///./src/components/jobs/tabs/ClientRatesJob.vue?f97e","webpack:///./src/components/jobs/Misc/JobClientRatesTable.vue?a831","webpack:///./src/components/dropdown/CurrenciesDropdown.vue","webpack:///./src/components/dropdown/CurrenciesDropdown.vue?8f90"],"names":["_hoisted_1","class","render","_ctx","_cache","$props","$setup","$data","$options","spinnerColor","role","name","props","type","String","default","__exports__","_hoisted_2","_hoisted_3","_hoisted_4","_hoisted_5","_hoisted_6","key","_hoisted_7","_component_LoadingSpinner","_component_JobClientRatesTable","containerKey","job","book_from_branches","branch","id","saveEvent","onAddToQueue","addToQueue","onRemoveFromQueue","removeFromQueue","disabled","isUpdating","onClick","triggerSaveEvent","args","_withScopeId","n","_hoisted_8","for","_hoisted_9","_hoisted_10","_hoisted_11","_hoisted_12","_hoisted_13","_hoisted_14","_hoisted_15","_hoisted_16","_hoisted_17","_hoisted_18","_hoisted_19","_hoisted_20","_hoisted_21","_hoisted_22","_hoisted_23","_hoisted_24","_hoisted_25","_hoisted_26","_hoisted_27","_hoisted_28","_hoisted_29","_hoisted_30","_hoisted_31","_hoisted_32","_hoisted_33","_hoisted_34","_hoisted_35","_hoisted_36","_component_CurrenciesDropdown","_component_el_switch","_component_el_tooltip","_component_el_checkbox","length","modelValue","companyRate","currency_id","$event","has_night_hours","effect","content","placement","_","inputmode","night_start","night_end","onChange","event","handleSelectAllRows","bulkEdit","base_rate","weekend_bonus","night_bonus","style","applyBulkEdit","tableKey","clientRates","skills","skill","index","handleBulkEditList","checked","bulkEditList","includes","min","value","model","standard_price","placeholder","placeholder_standard","target","weekend_price","placeholder_weekend","placeholder_night","night_price","initCompanyRate","branchID","companyID","jobID","branch_id","company_id","minimum_call","job_id","rates","Object","required","Boolean","components","CurrenciesDropdown","setup","emit","store","hasRate","getters","hasData","values","nonJobRate","non_job_rates","find","rate","skill_id","filter","e","push","payload","dispatch","then","keys","forEach","parseInt","buildModel","i","existingRateID","existingRate","skillRate","existing_rate_id","item","company","regex","mask","LoadingSpinner","JobClientRatesTable","isLoading","queue","splice","indexOf","catch","err","console","log","fire","position","toast","icon","title","showConfirmButton","timer","clearable","isDisabled","filterable","size","getCurrencies","currency","label","code","methods","this","fetchCurrencies","computed"],"mappings":"gHAAA,W,gFCAA,W,kDCGMA,EAAa,CAAEC,MAAO,iCAErB,SAASC,EAAOC,EAAUC,EAAYC,EAAYC,EAAYC,EAAWC,GAC9E,OAAQ,yBAAc,gCAAoB,MAAOR,EAAY,CAC3D,gCAAoB,MAAO,CACzBC,MAAO,4BAAgB,CAAC,4CAA6CE,EAAKM,eAC1EC,KAAM,UACL,KAAM,KCPE,mCAAgB,CAC7BC,KAAM,iBACNC,MAAO,CACLH,aAAc,CACZI,KAAMC,OACNC,QAAS,mB,iCCDf,MAAMC,EAA2B,IAAgB,EAAQ,CAAC,CAAC,SAASd,GAAQ,CAAC,YAAY,qBAE1E,U,gFCPTF,EAAa,CAAEC,MAAO,gCACtBgB,EAA0B,gCAAoB,MAAO,CAAEhB,MAAO,oBAAsB,CAC3E,gCAAoB,MAAO,CAAEA,MAAO,6BAA+B,CACjE,gCAAoB,KAAM,CAAEA,MAAO,kBAAoB,4BAEpE,GACEiB,EAAa,CAAEjB,MAAO,kBACtBkB,EAAa,CAAElB,MAAO,uCACtBmB,EAAa,CAAC,YACdC,EAAa,CACjBC,IAAK,EACLrB,MA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nH,QAAS,KAAM,IAGnB,OACE,MAAO,CACL8F,MAAO,GACP2E,KAAM,UAGVK,QAAS,IACJ,eAAW,cAAe,CAAC,qBAEhC,UACEC,KAAKC,mBAEPC,SAAU,IACL,eAAW,cAAe,CAAC,qB,iCCtClC,MAAMhL,EAA2B,IAAgB,EAAQ,CAAC,CAAC,SAASd,KAErD","file":"js/chunk-1bd00361.49ea0315.js","sourcesContent":["export * from \"-!../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--7-oneOf-1-0!../../../node_modules/@vue/cli-service/node_modules/css-loader/dist/cjs.js??ref--7-oneOf-1-1!../../../node_modules/vue-loader-v16/dist/stylePostLoader.js!../../../node_modules/postcss-loader/src/index.js??ref--7-oneOf-1-2!../../../node_modules/cache-loader/dist/cjs.js??ref--1-0!../../../node_modules/vue-loader-v16/dist/index.js??ref--1-1!./LoadingSpinner.vue?vue&type=style&index=0&id=7cf22dc6&scoped=true&lang=css\"","export * from \"-!../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--7-oneOf-1-0!../../../node_modules/@vue/cli-service/node_modules/css-loader/dist/cjs.js??ref--7-oneOf-1-1!../../../node_modules/vue-loader-v16/dist/stylePostLoader.js!../../../node_modules/postcss-loader/src/index.js??ref--7-oneOf-1-2!../../../node_modules/cache-loader/dist/cjs.js??ref--1-0!../../../node_modules/vue-loader-v16/dist/index.js??ref--1-1!./CurrenciesDropdown.vue?vue&type=style&index=0&id=797408d3&lang=css\"","import { normalizeClass as _normalizeClass, createElementVNode as _createElementVNode, openBlock as _openBlock, createElementBlock as _createElementBlock, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-7cf22dc6\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = { class: \"d-flex justify-content-center\" }\n\nexport function render(_ctx: any,_cache: any,$props: any,$setup: any,$data: any,$options: any) {\n return (_openBlock(), _createElementBlock(\"div\", _hoisted_1, [\n _createElementVNode(\"div\", {\n class: _normalizeClass([\"spinner-border m-20 spinner-size-increase\", _ctx.spinnerColor]),\n role: \"status\"\n }, null, 2)\n ]))\n}","\nimport { defineComponent, PropType } from \"vue\";\n\nexport default defineComponent({\n name: \"LoadingSpinner\",\n props: {\n spinnerColor: {\n type: String as PropType,\n default: \"text-primary\"\n }\n }\n});\n","import { render } from \"./LoadingSpinner.vue?vue&type=template&id=7cf22dc6&scoped=true&ts=true\"\nimport script from \"./LoadingSpinner.vue?vue&type=script&lang=ts\"\nexport * from \"./LoadingSpinner.vue?vue&type=script&lang=ts\"\n\nimport \"./LoadingSpinner.vue?vue&type=style&index=0&id=7cf22dc6&scoped=true&lang=css\"\n\nimport exportComponent from \"/codebuild/output/src1803551405/src/wci-front/node_modules/vue-loader-v16/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['render',render],['__scopeId',\"data-v-7cf22dc6\"]])\n\nexport default __exports__","import { createElementVNode as _createElementVNode, resolveComponent as _resolveComponent, openBlock as _openBlock, createBlock as _createBlock, createCommentVNode as _createCommentVNode, renderList as _renderList, Fragment as _Fragment, createElementBlock as _createElementBlock, createVNode as _createVNode, createTextVNode as _createTextVNode } from \"vue\"\n\nconst _hoisted_1 = { class: \"card card-flush mt-6 mt-xl-9\" }\nconst _hoisted_2 = /*#__PURE__*/_createElementVNode(\"div\", { class: \"card-header mt-5\" }, [\n /*#__PURE__*/_createElementVNode(\"div\", { class: \"d-flex align-items-center\" }, [\n /*#__PURE__*/_createElementVNode(\"h3\", { class: \"fw-bolder mb-1\" }, \" Job's client rates \")\n ])\n], -1)\nconst _hoisted_3 = { class: \"card-body pt-0\" }\nconst _hoisted_4 = { class: \"d-flex flex-row justify-content-end\" }\nconst _hoisted_5 = [\"disabled\"]\nconst _hoisted_6 = {\n key: 0,\n class: \"spinner-border spinner-border-sm me-1\"\n}\nconst _hoisted_7 = /*#__PURE__*/_createTextVNode(\" Save \")\n\nexport function render(_ctx: any,_cache: any,$props: any,$setup: any,$data: any,$options: any) {\n const _component_LoadingSpinner = _resolveComponent(\"LoadingSpinner\")!\n const _component_JobClientRatesTable = _resolveComponent(\"JobClientRatesTable\")!\n\n return (_openBlock(), _createElementBlock(\"div\", _hoisted_1, [\n _hoisted_2,\n _createElementVNode(\"div\", _hoisted_3, [\n (_ctx.isLoading)\n ? (_openBlock(), _createBlock(_component_LoadingSpinner, { key: 0 }))\n : (_openBlock(), _createElementBlock(\"div\", {\n class: \"d-flex flex-column\",\n key: _ctx.containerKey\n }, [\n (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(_ctx.job.book_from_branches, (branch) => {\n return (_openBlock(), _createElementBlock(\"div\", {\n key: branch.id\n }, [\n _createVNode(_component_JobClientRatesTable, {\n branch: branch,\n saveEvent: _ctx.saveEvent,\n onAddToQueue: _ctx.addToQueue,\n onRemoveFromQueue: _ctx.removeFromQueue\n }, null, 8, [\"branch\", \"saveEvent\", \"onAddToQueue\", \"onRemoveFromQueue\"])\n ]))\n }), 128)),\n _createElementVNode(\"div\", _hoisted_4, [\n _createElementVNode(\"button\", {\n class: \"btn btn-success btn-sm w-150px\",\n disabled: _ctx.isUpdating,\n onClick: _cache[0] || (_cache[0] = \n//@ts-ignore\n(...args) => (_ctx.triggerSaveEvent && _ctx.triggerSaveEvent(...args)))\n }, [\n (_ctx.isUpdating)\n ? (_openBlock(), _createElementBlock(\"span\", _hoisted_6))\n : _createCommentVNode(\"\", true),\n _hoisted_7\n ], 8, _hoisted_5)\n ])\n ]))\n ])\n ]))\n}","import { toDisplayString as _toDisplayString, createElementVNode as _createElementVNode, openBlock as _openBlock, createElementBlock as _createElementBlock, createCommentVNode as _createCommentVNode, resolveComponent as _resolveComponent, createVNode as _createVNode, withCtx as _withCtx, createTextVNode as _createTextVNode, vModelText as _vModelText, withDirectives as _withDirectives, renderList as _renderList, Fragment as _Fragment, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-fd1a5ff2\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = {\n key: 0,\n class: \"d-flex flex-column mt-10\"\n}\nconst _hoisted_2 = { key: 0 }\nconst _hoisted_3 = { class: \"d-flex align-items-center flex-row mb-5\" }\nconst _hoisted_4 = { class: \"d-flex flex-column\" }\nconst _hoisted_5 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"label\", { class: \"fs-6 fw-bold mb-1\" }, \"Currency\", -1))\nconst _hoisted_6 = { class: \"mx-5 mt-7 mb-sm-0\" }\nconst _hoisted_7 = { class: \"form-check form-switch form-check-custom form-check-solid\" }\nconst _hoisted_8 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"label\", {\n class: \"form-check-label\",\n for: \"flexSwitchDefault\"\n}, \"Enable night rates\", -1))\nconst _hoisted_9 = {\n key: 0,\n class: \"d-flex align-content-between flex-column\"\n}\nconst _hoisted_10 = { class: \"fs-6 fw-bold mb-2\" }\nconst _hoisted_11 = /*#__PURE__*/_createTextVNode(\"Night hours \")\nconst _hoisted_12 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"i\", { class: \"fa fa-info-circle ms-1\" }, null, -1))\nconst _hoisted_13 = { class: \"d-flex justify-content-between align-items-center\" }\nconst _hoisted_14 = [\"id\"]\nconst _hoisted_15 = [\"id\"]\nconst _hoisted_16 = { class: \"table-responsive\" }\nconst _hoisted_17 = { class: \"table table-row-dashed table-row-gray-300 align-middle gs-0 gy-2\" }\nconst _hoisted_18 = { class: \"fw-bolder text-muted\" }\nconst _hoisted_19 = { class: \"text-center\" }\nconst _hoisted_20 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"th\", { class: \"min-w-100px\" }, \" Skill \", -1))\nconst _hoisted_21 = { class: \"min-w-100px\" }\nconst _hoisted_22 = { class: \"d-flex flex-column\" }\nconst _hoisted_23 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"span\", null, \"Standart\", -1))\nconst _hoisted_24 = { class: \"min-w-100px\" }\nconst _hoisted_25 = { class: \"d-flex flex-column\" }\nconst _hoisted_26 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"span\", null, \"Weekend\", -1))\nconst _hoisted_27 = {\n key: 0,\n class: \"min-w-120px\"\n}\nconst _hoisted_28 = { class: \"d-flex flex-column\" }\nconst _hoisted_29 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"span\", null, \"Night Bonus\", -1))\nconst _hoisted_30 = { class: \"text-end\" }\nconst _hoisted_31 = { class: \"d-flex justify-content-end\" }\nconst _hoisted_32 = { class: \"text-center\" }\nconst _hoisted_33 = [\"value\", \"placeholder\", \"onChange\"]\nconst _hoisted_34 = [\"value\", \"placeholder\", \"onChange\"]\nconst _hoisted_35 = { key: 0 }\nconst _hoisted_36 = [\"placeholder\", \"value\", \"onChange\"]\n\nexport function render(_ctx: any,_cache: any,$props: any,$setup: any,$data: any,$options: any) {\n const _component_CurrenciesDropdown = _resolveComponent(\"CurrenciesDropdown\")!\n const _component_el_switch = _resolveComponent(\"el-switch\")!\n const _component_el_tooltip = _resolveComponent(\"el-tooltip\")!\n const _component_el_checkbox = _resolveComponent(\"el-checkbox\")!\n\n return (_ctx.hasData)\n ? (_openBlock(), _createElementBlock(\"div\", _hoisted_1, [\n (_ctx.job.book_from_branches.length > 1)\n ? (_openBlock(), _createElementBlock(\"div\", _hoisted_2, [\n _createElementVNode(\"h3\", null, _toDisplayString(_ctx.branch.name), 1)\n ]))\n : _createCommentVNode(\"\", true),\n _createElementVNode(\"div\", _hoisted_3, [\n _createElementVNode(\"div\", _hoisted_4, [\n _hoisted_5,\n _createVNode(_component_CurrenciesDropdown, {\n modelValue: _ctx.companyRate.currency_id,\n \"onUpdate:modelValue\": _cache[0] || (_cache[0] = ($event: any) => ((_ctx.companyRate.currency_id) = $event))\n }, null, 8, [\"modelValue\"])\n ]),\n _createElementVNode(\"div\", _hoisted_6, [\n _createElementVNode(\"div\", _hoisted_7, [\n _createVNode(_component_el_switch, {\n modelValue: _ctx.companyRate.has_night_hours,\n \"onUpdate:modelValue\": _cache[1] || (_cache[1] = ($event: any) => ((_ctx.companyRate.has_night_hours) = $event)),\n \"active-value\": 1,\n \"inactive-value\": 0\n }, null, 8, [\"modelValue\"]),\n _hoisted_8\n ])\n ]),\n (_ctx.companyRate.has_night_hours === 1)\n ? (_openBlock(), _createElementBlock(\"div\", _hoisted_9, [\n _createElementVNode(\"label\", _hoisted_10, [\n _hoisted_11,\n _createVNode(_component_el_tooltip, {\n class: \"item\",\n effect: \"dark\",\n content: \"Define when the 'NIGHT BONUS' starts and finishes (e.g. 19:00 - 07:00)\",\n placement: \"top-start\"\n }, {\n default: _withCtx(() => [\n _hoisted_12\n ]),\n _: 1\n })\n ]),\n _createElementVNode(\"div\", _hoisted_13, [\n _withDirectives(_createElementVNode(\"input\", {\n id: `night_hours_1_${_ctx.branch.id}`,\n class: \"form-control me-4 w-100px h-40px\",\n inputmode: \"text\",\n \"onUpdate:modelValue\": _cache[2] || (_cache[2] = ($event: any) => ((_ctx.companyRate.night_start) = $event))\n }, null, 8, _hoisted_14), [\n [_vModelText, _ctx.companyRate.night_start]\n ]),\n _withDirectives(_createElementVNode(\"input\", {\n id: `night_hours_1_${_ctx.branch.id}`,\n class: \"form-control me-2 w-100px h-40px\",\n inputmode: \"text\",\n \"onUpdate:modelValue\": _cache[3] || (_cache[3] = ($event: any) => ((_ctx.companyRate.night_end) = $event))\n }, null, 8, _hoisted_15), [\n [_vModelText, _ctx.companyRate.night_end]\n ])\n ])\n ]))\n : _createCommentVNode(\"\", true)\n ]),\n _createElementVNode(\"div\", _hoisted_16, [\n _createElementVNode(\"table\", _hoisted_17, [\n _createElementVNode(\"thead\", null, [\n _createElementVNode(\"tr\", _hoisted_18, [\n _createElementVNode(\"th\", _hoisted_19, [\n _createVNode(_component_el_checkbox, {\n onChange: _cache[4] || (_cache[4] = event => _ctx.handleSelectAllRows(event))\n })\n ]),\n _hoisted_20,\n _createElementVNode(\"th\", _hoisted_21, [\n _createElementVNode(\"div\", _hoisted_22, [\n _hoisted_23,\n _withDirectives(_createElementVNode(\"input\", {\n type: \"number\",\n \"onUpdate:modelValue\": _cache[5] || (_cache[5] = ($event: any) => ((_ctx.bulkEdit.base_rate) = $event)),\n class: \"form-control w-100px h-30px\"\n }, null, 512), [\n [_vModelText, _ctx.bulkEdit.base_rate]\n ])\n ])\n ]),\n _createElementVNode(\"th\", _hoisted_24, [\n _createElementVNode(\"div\", _hoisted_25, [\n _hoisted_26,\n _withDirectives(_createElementVNode(\"input\", {\n type: \"number\",\n \"onUpdate:modelValue\": _cache[6] || (_cache[6] = ($event: any) => ((_ctx.bulkEdit.weekend_bonus) = $event)),\n class: \"form-control w-100px h-30px\"\n }, null, 512), [\n [_vModelText, _ctx.bulkEdit.weekend_bonus]\n ])\n ])\n ]),\n (_ctx.companyRate.has_night_hours === 1)\n ? (_openBlock(), _createElementBlock(\"th\", _hoisted_27, [\n _createElementVNode(\"div\", _hoisted_28, [\n _hoisted_29,\n _withDirectives(_createElementVNode(\"input\", {\n type: \"number\",\n \"onUpdate:modelValue\": _cache[7] || (_cache[7] = ($event: any) => ((_ctx.bulkEdit.night_bonus) = $event)),\n class: \"form-control w-100px h-30px\"\n }, null, 512), [\n [_vModelText, _ctx.bulkEdit.night_bonus]\n ])\n ])\n ]))\n : _createCommentVNode(\"\", true),\n _createElementVNode(\"th\", _hoisted_30, [\n _createElementVNode(\"div\", _hoisted_31, [\n _createElementVNode(\"button\", {\n style: {\"height\":\"28px\"},\n class: \"d-flex align-items-center btn btn-sm btn-primary\",\n onClick: _cache[8] || (_cache[8] = \n//@ts-ignore\n(...args) => (_ctx.applyBulkEdit && _ctx.applyBulkEdit(...args)))\n }, \" Apply \")\n ])\n ])\n ])\n ]),\n (_openBlock(), _createElementBlock(\"tbody\", { key: _ctx.tableKey }, [\n (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(_ctx.clientRates.skills, (skill, index) => {\n return (_openBlock(), _createElementBlock(\"tr\", { key: index }, [\n _createElementVNode(\"td\", _hoisted_32, [\n _createVNode(_component_el_checkbox, {\n onChange: ($event: any) => (_ctx.handleBulkEditList(skill.id)),\n checked: _ctx.bulkEditList.includes(skill.id)\n }, null, 8, [\"onChange\", \"checked\"])\n ]),\n _createElementVNode(\"td\", null, _toDisplayString(skill.name), 1),\n _createElementVNode(\"td\", null, [\n _createElementVNode(\"input\", {\n type: \"number\",\n min: \"0\",\n value: _ctx.model[skill.id].standard_price,\n class: \"form-control w-100px h-30px\",\n placeholder: _ctx.model[skill.id].placeholder_standard ? _ctx.model[skill.id].placeholder_standard : '',\n onChange: \n event => (_ctx.model[skill.id].standard_price = event.target.value)\n \n }, null, 40, _hoisted_33)\n ]),\n _createElementVNode(\"td\", null, [\n _createElementVNode(\"input\", {\n type: \"number\",\n min: \"0\",\n value: _ctx.model[skill.id].weekend_price,\n placeholder: _ctx.model[skill.id].placeholder_weekend ? _ctx.model[skill.id].placeholder_weekend : '',\n class: \"form-control w-100px h-30px\",\n onChange: \n event => (_ctx.model[skill.id].weekend_price = event.target.value)\n \n }, null, 40, _hoisted_34)\n ]),\n (_ctx.companyRate.has_night_hours === 1)\n ? (_openBlock(), _createElementBlock(\"td\", _hoisted_35, [\n _createElementVNode(\"div\", null, [\n _createElementVNode(\"input\", {\n type: \"number\",\n min: \"0\",\n placeholder: _ctx.model[skill.id].placeholder_night ? _ctx.model[skill.id].placeholder_night : '',\n value: _ctx.model[skill.id].night_price,\n class: \"form-control w-100px h-30px\",\n onChange: \n event => (_ctx.model[skill.id].night_price = event.target.value)\n \n }, null, 40, _hoisted_36)\n ])\n ]))\n : _createCommentVNode(\"\", true)\n ]))\n }), 128))\n ]))\n ])\n ])\n ]))\n : _createCommentVNode(\"\", true)\n}","/* eslint-disable @typescript-eslint/camelcase */\ntype companyRate = {\n branch_id: number\n company_id: number\n currency_id: null | number\n has_night_hours: number;\n id: number | null;\n minimum_call: number\n night_end: string\n night_start: string\n rates: rate[],\n job_id: null | number\n}\n\nfunction initCompanyRate(branchID: number, companyID:number, jobID?: number) {\n return {\n id: null,\n branch_id: branchID,\n company_id: companyID,\n currency_id: null,\n has_night_hours: 0,\n minimum_call: 0,\n night_end: \"07:00\",\n night_start: \"19:00\",\n job_id: jobID ? jobID : null,\n rates: [] as rate[]\n };\n}\n\ntype rate = {\n id: number;\n standard_price: number;\n minimum_call: number;\n weekend_price: number;\n night_price: number;\n skill_id: number;\n company_rate_id: number;\n job_id: number | null\n}\n\nexport { companyRate, rate, initCompanyRate };","\n/* eslint-disable @typescript-eslint/camelcase */\nimport {computed, defineComponent, nextTick, onMounted, onUpdated, PropType, reactive, ref, watch} from \"vue\";\nimport { branch } from \"@/components/jobs/Misc/types\"\nimport {useStore} from \"vuex\";\nimport { jobRatesData } from \"@/components/jobs/Misc/types\";\nimport {companyRate, initCompanyRate} from \"@/components/clients/misc/types\";\nimport CurrenciesDropdown from \"@/components/dropdown/CurrenciesDropdown.vue\";\nimport Inputmask from \"inputmask\";\n\nexport default defineComponent({\n name: 'job-client-rates-table',\n props: {\n branch: {\n type: Object as PropType,\n required: true\n },\n saveEvent: {\n type: Boolean as PropType,\n default: false\n }\n },\n components: {\n CurrenciesDropdown\n },\n setup(props, { emit }) {\n const store = useStore();\n const hasRate = ref(false);\n const bulkEditList = ref([]);\n const tableKey = ref(0);\n const companyRate = ref();\n const bulkEdit = reactive({\n night_bonus: \"\",\n weekend_bonus: \"\",\n base_rate: \"\",\n minimum_call: \"\"\n });\n\n const job = computed(\n () => store.getters['JobModule/item']\n );\n const clientRates = computed(\n () => store.getters['JobModule/getClientRates']\n );\n const model = reactive({});\n const hasData = computed(() => Object.values(model).length > 0);\n\n const nonJobRate = computed(\n () => clientRates.value.non_job_rates.find(rate => rate.branch_id == props.branch.id)\n );\n\n const handleBulkEditList = skill_id => {\n if (bulkEditList.value.includes(skill_id)) {\n bulkEditList.value = bulkEditList.value.filter(e => e != skill_id);\n } else {\n bulkEditList.value.push(skill_id);\n }\n };\n watch(() => props.saveEvent, () => {\n emit('addToQueue', props.branch.id as number);\n const payload = {\n companyRate: companyRate.value,\n rates: model,\n jobID: job.value.id\n }\n store.dispatch('NewRatesModule/saveJobRates', payload)\n .then(() => {\n emit('removeFromQueue', props.branch.id as number);\n });\n })\n const handleSelectAllRows = event => {\n if (event) {\n bulkEditList.value = [];\n Object.keys(model).forEach(key => {\n bulkEditList.value.push(parseInt(key));\n });\n } else {\n bulkEditList.value = [];\n }\n tableKey.value++;\n };\n const applyBulkEdit = () => {\n bulkEditList.value.forEach(skill => {\n model[skill].standard_price =\n bulkEdit.base_rate != \"\"\n ? bulkEdit.base_rate\n : model[skill].standard_price;\n model[skill].night_price =\n bulkEdit.night_bonus != \"\"\n ? bulkEdit.night_bonus\n : model[skill].night_price;\n model[skill].weekend_price =\n bulkEdit.weekend_bonus != \"\"\n ? bulkEdit.weekend_bonus\n : model[skill].weekend_price;\n });\n tableKey.value++;\n };\n\n const buildModel = (rate: companyRate | null) => {\n for (let i = 0; i < clientRates.value.skills.length; i++) {\n let standard_price = '' as string|number;\n let weekend_price = '' as string|number;\n let night_price = '' as string|number;\n let placeholder_standard = null as number|null;\n let placeholder_weekend = null as number|null;\n let placeholder_night = null as number|null;\n let existingRateID = null as number|null;\n if(rate){\n const existingRate = rate.rates.find(\n rate => rate.skill_id == clientRates.value.skills[i].id\n );\n if (existingRate) {\n standard_price = existingRate.standard_price;\n weekend_price = existingRate.weekend_price;\n night_price = existingRate.night_price;\n existingRateID = existingRate.id;\n } else {\n if(nonJobRate.value) {\n const skillRate = nonJobRate.value.rates.find(rate => rate.skill_id == clientRates.value.skills[i].id);\n if (skillRate) {\n placeholder_night = skillRate.night_price;\n placeholder_weekend = skillRate.weekend_price;\n placeholder_standard = skillRate.standard_price\n }\n }\n }\n } else {\n if(nonJobRate.value) {\n const skillRate = nonJobRate.value.rates.find(rate => rate.skill_id == clientRates.value.skills[i].id);\n if (skillRate) {\n placeholder_night = skillRate.night_price;\n placeholder_weekend = skillRate.weekend_price;\n placeholder_standard = skillRate.standard_price\n }\n }\n }\n model[clientRates.value.skills[i].id] = {\n skill_id: clientRates.value.skills[i].id,\n standard_price: standard_price,\n weekend_price: weekend_price,\n existing_rate_id: existingRateID,\n night_price: night_price,\n placeholder_standard: placeholder_standard,\n placeholder_weekend: placeholder_weekend,\n placeholder_night: placeholder_night\n };\n }\n }\n\n onMounted(() => {\n const rate = clientRates.value.rates.find(item => item.branch_id == props.branch.id);\n if(rate) {\n companyRate.value = rate;\n hasRate.value = true;\n buildModel(rate);\n } else {\n companyRate.value = initCompanyRate(props.branch.id as number, job.value.company.id as number, job.value.id as number);\n buildModel(null);\n }\n });\n watch(() => companyRate.value?.has_night_hours, async () => {\n await nextTick().then(() => {\n Inputmask({\n regex: \"^([0-1]?[0-9]|2[0-3]):[0-5][0-9]$\"\n }).mask(`#night_hours_1_${props.branch.id}`);\n Inputmask({\n regex: \"^([0-1]?[0-9]|2[0-3]):[0-5][0-9]$\"\n }).mask(`#night_hours_2_${props.branch.id}`);\n })\n })\n return {\n model,\n clientRates,\n bulkEdit,\n bulkEditList,\n companyRate,\n hasData,\n job,\n tableKey,\n handleSelectAllRows,\n applyBulkEdit,\n handleBulkEditList\n }\n }\n});\n","import { render } from \"./JobClientRatesTable.vue?vue&type=template&id=fd1a5ff2&scoped=true&ts=true\"\nimport script from \"./JobClientRatesTable.vue?vue&type=script&lang=ts\"\nexport * from \"./JobClientRatesTable.vue?vue&type=script&lang=ts\"\n\nimport \"./JobClientRatesTable.vue?vue&type=style&index=0&id=fd1a5ff2&scoped=true&lang=css\"\n\nimport exportComponent from \"/codebuild/output/src1803551405/src/wci-front/node_modules/vue-loader-v16/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['render',render],['__scopeId',\"data-v-fd1a5ff2\"]])\n\nexport default __exports__","\nimport {onMounted, defineComponent, computed, ref, watch} from \"vue\";\nimport { useStore } from \"vuex\";\nimport { useAbility } from \"@casl/vue\";\nimport JobClientRatesTable from \"@/components/jobs/Misc/JobClientRatesTable.vue\";\nimport LoadingSpinner from \"@/components/general/LoadingSpinner.vue\";\nimport Swal from \"sweetalert2\";\nimport {useRouter} from \"vue-router\";\n\nexport default defineComponent({\n name: \"client-rates-job-tab\",\n components: {\n LoadingSpinner,\n JobClientRatesTable\n },\n setup() {\n const store = useStore();\n const ability = useAbility();\n const router = useRouter();\n const saveEvent = ref(false);\n const isLoading = ref(false);\n const isUpdating = ref(false);\n const queue = ref([]);\n const containerKey = ref(0);\n const job = computed(\n () => store.getters['JobModule/item']\n );\n const clientRates = computed(\n () => store.getters['JobModule/getClientRates']\n );\n\n const addToQueue = (id: number) => {\n queue.value.push(id);\n }\n\n const removeFromQueue = (id: number) => {\n queue.value.splice(queue.value.indexOf(id), 1);\n }\n onMounted(() => {\n isLoading.value = true;\n store.dispatch('JobModule/getClientRatesForJob', job.value.id)\n .then(() => {\n isLoading.value = false;\n })\n .catch(err => {\n console.log(err);\n })\n });\n\n const triggerSaveEvent = () => {\n isUpdating.value = true;\n saveEvent.value = !saveEvent.value;\n }\n\n watch(() => queue.value.length, () => {\n if(queue.value.length == 0) {\n store.dispatch('JobModule/getClientRatesForJob', job.value.id)\n .then(() => {\n containerKey.value++;\n isUpdating.value = false;\n Swal.fire({\n position: \"top-end\",\n toast: true,\n icon: \"success\",\n title: `Record saved`,\n showConfirmButton: false,\n timer: 1000\n });\n })\n }\n });\n\n return {\n addToQueue,\n removeFromQueue,\n triggerSaveEvent,\n isUpdating,\n containerKey,\n clientRates,\n queue,\n isLoading,\n saveEvent,\n job\n }\n }\n});\n","import { render } from \"./ClientRatesJob.vue?vue&type=template&id=92004382&ts=true\"\nimport script from \"./ClientRatesJob.vue?vue&type=script&lang=ts\"\nexport * from \"./ClientRatesJob.vue?vue&type=script&lang=ts\"\n\nimport exportComponent from \"/codebuild/output/src1803551405/src/wci-front/node_modules/vue-loader-v16/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['render',render]])\n\nexport default __exports__","export * from \"-!../../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--7-oneOf-1-0!../../../../node_modules/@vue/cli-service/node_modules/css-loader/dist/cjs.js??ref--7-oneOf-1-1!../../../../node_modules/vue-loader-v16/dist/stylePostLoader.js!../../../../node_modules/postcss-loader/src/index.js??ref--7-oneOf-1-2!../../../../node_modules/cache-loader/dist/cjs.js??ref--1-0!../../../../node_modules/vue-loader-v16/dist/index.js??ref--1-1!./JobClientRatesTable.vue?vue&type=style&index=0&id=fd1a5ff2&scoped=true&lang=css\"","\n\n\n\n","import { render } from \"./CurrenciesDropdown.vue?vue&type=template&id=797408d3\"\nimport script from \"./CurrenciesDropdown.vue?vue&type=script&lang=js\"\nexport * from \"./CurrenciesDropdown.vue?vue&type=script&lang=js\"\n\nimport \"./CurrenciesDropdown.vue?vue&type=style&index=0&id=797408d3&lang=css\"\n\nimport exportComponent from \"/codebuild/output/src1803551405/src/wci-front/node_modules/vue-loader-v16/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['render',render]])\n\nexport default __exports__"],"sourceRoot":""}