{"version":3,"sources":["webpack:///./src/components/Icons/DeleteButton.vue?e540","webpack:///./src/components/Icons/DeleteButton.vue","webpack:///./src/components/Icons/DeleteButton.vue?842d","webpack:///./src/views/job_quotes/CreateQuote.vue?2c87","webpack:///./src/views/job_quotes/CreateQuote.vue","webpack:///./src/views/job_quotes/CreateQuote.vue?fded","webpack:///./src/components/dropdown/JobCreateSkillsDropdown.vue","webpack:///./src/components/dropdown/JobCreateSkillsDropdown.vue?a996","webpack:///./src/components/dropdown/CurrenciesDropdown.vue?ae3e","webpack:///./src/components/dropdown/CurrenciesDropdown.vue","webpack:///./src/components/dropdown/CurrenciesDropdown.vue?8f90"],"names":["_hoisted_1","version","viewBox","height","width","xmlns","id","stroke","fill","x","y","d","opacity","_hoisted_2","render","_ctx","_cache","$props","$setup","$data","$options","class","dynamicClass","svgSize","name","props","type","String","required","__exports__","_hoisted_3","_hoisted_4","_hoisted_5","_hoisted_6","_hoisted_7","_hoisted_8","_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","_hoisted_37","_hoisted_38","_hoisted_39","_hoisted_40","_hoisted_41","_hoisted_42","_hoisted_43","_hoisted_44","key","_component_el_option","_component_el_select","_component_Field","_component_ErrorMessage","_component_SkillsDropdown","_component_currencies_dropdown","_component_DeleteButtonIcon","_component_Form","_directive_loading","editing","ref","validationSchema","onSubmit","handleSubmit","default","modelValue","quoteData","company","$event","onChange","handleClientSelect","filterable","size","clearable","placeholder","companies","value","label","_","address","vat","title","onSkillChange","unit","currency","onClick","handleAddSkills","args","subSkills","subSkill","ev","handleChange","target","quoteSkill","quote","index","qty","price","handleDeleteSkill","rows","notes","disabled","saving","loading","components","CurrenciesDropdown","DeleteButtonIcon","SkillsDropdown","ErrorMessage","Form","Field","setup","store","formComponent","router","skills","getters","route","models","setSaving","state","handleEditing","dispatch","then","data","currency_id","company_id","JSON","parse","catch","push","skillId","skill","find","children","setFieldError","undefined","forEach","el","parseInt","length","payload","params","shape","quote_title","splice","preferredSkills","item","clientId","Number","methods","this","$emit","fetchFrequentlyUsedSkills","setSkills","setFreqSkills","fetchSkills","watch","deep","computed","isDisabled","getCurrencies","code","Boolean","fetchCurrencies"],"mappings":"kIAEMA,EAA0B,gCAAoB,MAAO,CACzDC,QAAS,MACTC,QAAS,YACTC,OAAQ,OACRC,MAAO,OACP,cAAe,+BACfC,MAAO,8BACN,CACY,gCAAoB,IAAK,CACpCA,MAAO,6BACPC,GAAI,oCACJC,OAAQ,OACR,eAAgB,IAChBC,KAAM,OACN,YAAa,WACZ,CACY,gCAAoB,OAAQ,CACvCF,GAAI,QACJG,EAAG,IACHC,EAAG,IACHN,MAAO,KACPD,OAAQ,OAEG,gCAAoB,OAAQ,CACvCQ,EAAG,6GACHL,GAAI,QACJE,KAAM,UACN,YAAa,YAEF,gCAAoB,OAAQ,CACvCG,EAAG,oRACHL,GAAI,QACJE,KAAM,UACNI,QAAS,YAGX,GACEC,EAAa,CACjBb,GAGK,SAASc,EAAOC,EAAUC,EAAYC,EAAYC,EAAYC,EAAWC,GAC9E,OAAQ,yBAAc,gCAAoB,OAAQ,CAChDC,MAAO,4BAAgB,CAAC,WAAY,UAAGN,EAAKO,aAAY,YAAIP,EAAKQ,YAChEV,EAAY,GC3CF,mCAAgB,CAC7BW,KAAM,mBACNC,MAAO,CACLH,aAAc,CACZI,KAAMC,OACNC,UAAU,GAEZL,QAAS,CACPG,KAAMC,OACNC,UAAU,M,qBCPhB,MAAMC,EAA2B,IAAgB,EAAQ,CAAC,CAAC,SAASf,KAErD,U,yDCLTd,EAAa,CAAEqB,MAAO,qBACtBR,EAAa,CAAEQ,MAAO,6BACt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C,EAASrG,GACd8F,MAAK,IAAMO,EAAS8E,SAAS9E,EAASnF,OACtC2E,MAAOQ,EAASrG,I,6FAUR,+BAAgB,CAC7BkB,KAAM,sBACNC,MAAO,CACL8J,WAAY,CACV7J,KAAMgK,QACNnG,QAAS,KAAM,IAGnB,OACE,MAAO,CACLY,MAAO,GACPJ,KAAM,UAGV8E,QAAS,IACJ,eAAW,cAAe,CAAC,qBAEhC,UACEC,KAAKa,mBAEPL,SAAU,IACL,eAAW,cAAe,CAAC,qB,iCCtClC,MAAMzJ,EAA2B,IAAgB,EAAQ,CAAC,CAAC,SAASf,KAErD","file":"js/chunk-44f0893b.59e3ab45.js","sourcesContent":["import { createElementVNode as _createElementVNode, normalizeClass as _normalizeClass, openBlock as _openBlock, createElementBlock as _createElementBlock } from \"vue\"\n\nconst _hoisted_1 = /*#__PURE__*/_createElementVNode(\"svg\", {\n version: \"1.1\",\n viewBox: \"0 0 24 24\",\n height: \"24px\",\n width: \"24px\",\n \"xmlns:xlink\": \"http://www.w3.org/1999/xlink\",\n xmlns: \"http://www.w3.org/2000/svg\"\n}, [\n /*#__PURE__*/_createElementVNode(\"g\", {\n xmlns: \"http://www.w3.org/2000/svg\",\n id: \"Stockholm-icons-/-General-/-Trash\",\n stroke: \"none\",\n \"stroke-width\": \"1\",\n fill: \"none\",\n \"fill-rule\": \"evenodd\"\n }, [\n /*#__PURE__*/_createElementVNode(\"rect\", {\n id: \"bound\",\n x: \"0\",\n y: \"0\",\n width: \"24\",\n height: \"24\"\n }),\n /*#__PURE__*/_createElementVNode(\"path\", {\n d: \"M6,8 L6,20.5 C6,21.3284271 6.67157288,22 7.5,22 L16.5,22 C17.3284271,22 18,21.3284271 18,20.5 L18,8 L6,8 Z\",\n id: \"round\",\n fill: \"#000000\",\n \"fill-rule\": \"nonzero\"\n }),\n /*#__PURE__*/_createElementVNode(\"path\", {\n d: \"M14,4.5 L14,4 C14,3.44771525 13.5522847,3 13,3 L11,3 C10.4477153,3 10,3.44771525 10,4 L10,4.5 L5.5,4.5 C5.22385763,4.5 5,4.72385763 5,5 L5,5.5 C5,5.77614237 5.22385763,6 5.5,6 L18.5,6 C18.7761424,6 19,5.77614237 19,5.5 L19,5 C19,4.72385763 18.7761424,4.5 18.5,4.5 L14,4.5 Z\",\n id: \"Shape\",\n fill: \"#000000\",\n opacity: \"0.3\"\n })\n ])\n], -1)\nconst _hoisted_2 = [\n _hoisted_1\n]\n\nexport function render(_ctx: any,_cache: any,$props: any,$setup: any,$data: any,$options: any) {\n return (_openBlock(), _createElementBlock(\"span\", {\n class: _normalizeClass([\"svg-icon\", `${_ctx.dynamicClass} ${_ctx.svgSize}`])\n }, _hoisted_2, 2))\n}","\nimport { defineComponent, PropType } from \"vue\";\n\nexport default defineComponent({\n name: \"DeleteButtonIcon\",\n props: {\n dynamicClass: {\n type: String as PropType,\n required: false\n },\n svgSize: {\n type: String as PropType,\n required: false\n }\n }\n});\n","import { render } from \"./DeleteButton.vue?vue&type=template&id=82f6a1ae&ts=true\"\nimport script from \"./DeleteButton.vue?vue&type=script&lang=ts\"\nexport * from \"./DeleteButton.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__","import { toDisplayString as _toDisplayString, createElementVNode as _createElementVNode, renderList as _renderList, Fragment as _Fragment, openBlock as _openBlock, createElementBlock as _createElementBlock, resolveComponent as _resolveComponent, createBlock as _createBlock, withCtx as _withCtx, createVNode as _createVNode, vModelText as _vModelText, withDirectives as _withDirectives, withModifiers as _withModifiers, createCommentVNode as _createCommentVNode, createTextVNode as _createTextVNode, resolveDirective as _resolveDirective } from \"vue\"\n\nconst _hoisted_1 = { class: \"card mb-5 mb-xl-8\" }\nconst _hoisted_2 = { class: \"card-header border-0 pt-5\" }\nconst _hoisted_3 = { class: \"card-title align-items-start flex-column\" }\nconst _hoisted_4 = { class: \"card-label fw-bolder fs-3 mb-1\" }\nconst _hoisted_5 = /*#__PURE__*/_createElementVNode(\"span\", { class: \"text-muted mt-1 fw-bold fs-7\" }, \"Enter data for job quote\", -1)\nconst _hoisted_6 = { class: \"card-body py-3\" }\nconst _hoisted_7 = /*#__PURE__*/_createElementVNode(\"h5\", {\n class: \"modal-title py-4\",\n id: \"invite_a_friend_modal_label\"\n}, \" Recipient Information: \", -1)\nconst _hoisted_8 = { class: \"d-flex align-items-center\" }\nconst _hoisted_9 = { class: \"w-100 me-2\" }\nconst _hoisted_10 = { class: \"w-100 ms-2\" }\nconst _hoisted_11 = { class: \"d-flex mt-4 align-items-center\" }\nconst _hoisted_12 = { class: \"w-100 me-2\" }\nconst _hoisted_13 = /*#__PURE__*/_createElementVNode(\"div\", { class: \"w-100 ms-2\" }, null, -1)\nconst _hoisted_14 = /*#__PURE__*/_createElementVNode(\"h5\", {\n class: \"modal-title mt-10 pb-4\",\n id: \"invite_a_friend_modal_label\"\n}, \" Quote Information: \", -1)\nconst _hoisted_15 = { class: \"d-flex\" }\nconst _hoisted_16 = { class: \"w-100 me-2 d-flex flex-column\" }\nconst _hoisted_17 = { class: \"fv-plugins-message-container\" }\nconst _hoisted_18 = { class: \"fv-help-block\" }\nconst _hoisted_19 = { class: \"w-100 ms-2 d-flex flex-column\" }\nconst _hoisted_20 = { class: \"fv-plugins-message-container\" }\nconst _hoisted_21 = { class: \"fv-help-block\" }\nconst _hoisted_22 = { class: \"mt-4 d-flex\" }\nconst _hoisted_23 = { class: \"w-100 me-2 d-flex flex-column\" }\nconst _hoisted_24 = { class: \"w-100 ms-2 d-flex flex-column\" }\nconst _hoisted_25 = { class: \"mt-10 d-flex gap-9\" }\nconst _hoisted_26 = { class: \"w-25 d-flex min-w-300px flex-column\" }\nconst _hoisted_27 = { class: \"table-responsive\" }\nconst _hoisted_28 = { class: \"table table-row-dashed table-striped table-row-gray-300 align-middle\" }\nconst _hoisted_29 = /*#__PURE__*/_createElementVNode(\"thead\", null, [\n /*#__PURE__*/_createElementVNode(\"tr\", { class: \"fw-bolder text-muted\" }, [\n /*#__PURE__*/_createElementVNode(\"th\", { class: \"min-w-50px w-175px px-9\" }, \"Required skill\"),\n /*#__PURE__*/_createElementVNode(\"th\", null, \"Quantity\")\n ])\n], -1)\nconst _hoisted_30 = { class: \"px-9\" }\nconst _hoisted_31 = { class: \"form-check form-switch form-check-custom form-check-solid\" }\nconst _hoisted_32 = [\"onChange\"]\nconst _hoisted_33 = { class: \"w-75\" }\nconst _hoisted_34 = { class: \"table table-row-dashed table-striped table-row-gray-300 align-middle\" }\nconst _hoisted_35 = /*#__PURE__*/_createElementVNode(\"thead\", null, [\n /*#__PURE__*/_createElementVNode(\"tr\", { class: \"fw-bolder text-muted\" }, [\n /*#__PURE__*/_createElementVNode(\"th\", null, \"Skill\"),\n /*#__PURE__*/_createElementVNode(\"th\", null, \"Qty\"),\n /*#__PURE__*/_createElementVNode(\"th\", null, \"Price\"),\n /*#__PURE__*/_createElementVNode(\"th\", { class: \"text-end\" })\n ])\n], -1)\nconst _hoisted_36 = { class: \"px-9\" }\nconst _hoisted_37 = [\"onUpdate:modelValue\"]\nconst _hoisted_38 = [\"onUpdate:modelValue\"]\nconst _hoisted_39 = { class: \"text-end\" }\nconst _hoisted_40 = [\"onClick\"]\nconst _hoisted_41 = { class: \"mt-10\" }\nconst _hoisted_42 = { class: \"d-flex gap-4 pb-4 mt-10 justify-content-end\" }\nconst _hoisted_43 = [\"disabled\"]\nconst _hoisted_44 = {\n key: 0,\n class: \"spinner-border me-2 spinner-border-sm\"\n}\n\nexport function render(_ctx: any,_cache: any,$props: any,$setup: any,$data: any,$options: any) {\n const _component_el_option = _resolveComponent(\"el-option\")!\n const _component_el_select = _resolveComponent(\"el-select\")!\n const _component_Field = _resolveComponent(\"Field\")!\n const _component_ErrorMessage = _resolveComponent(\"ErrorMessage\")!\n const _component_SkillsDropdown = _resolveComponent(\"SkillsDropdown\")!\n const _component_currencies_dropdown = _resolveComponent(\"currencies-dropdown\")!\n const _component_DeleteButtonIcon = _resolveComponent(\"DeleteButtonIcon\")!\n const _component_Form = _resolveComponent(\"Form\")!\n const _directive_loading = _resolveDirective(\"loading\")!\n\n return (_openBlock(), _createElementBlock(\"div\", _hoisted_1, [\n _createElementVNode(\"div\", _hoisted_2, [\n _createElementVNode(\"h3\", _hoisted_3, [\n _createElementVNode(\"span\", _hoisted_4, _toDisplayString(_ctx.editing ? \"Edit\" : \"Create\") + \" Job quote\", 1),\n _hoisted_5\n ])\n ]),\n _createElementVNode(\"div\", _hoisted_6, [\n _withDirectives((_openBlock(), _createBlock(_component_Form, {\n ref: \"formComponent\",\n \"validation-schema\": _ctx.validationSchema,\n class: \"d-flex flex-column\",\n onSubmit: _ctx.handleSubmit\n }, {\n default: _withCtx(() => [\n _hoisted_7,\n _createElementVNode(\"div\", _hoisted_8, [\n _createElementVNode(\"div\", _hoisted_9, [\n _createVNode(_component_el_select, {\n modelValue: _ctx.quoteData.company,\n \"onUpdate:modelValue\": _cache[0] || (_cache[0] = ($event: any) => ((_ctx.quoteData.company) = $event)),\n class: \"w-100\",\n onChange: _ctx.handleClientSelect,\n \"allow-create\": \"\",\n filterable: \"\",\n size: \"large\",\n clearable: \"\",\n placeholder: \"Select Company\"\n }, {\n default: _withCtx(() => [\n (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(_ctx.companies, (company) => {\n return (_openBlock(), _createBlock(_component_el_option, {\n key: company.value,\n value: company.value,\n label: company.label\n }, null, 8, [\"value\", \"label\"]))\n }), 128))\n ]),\n _: 1\n }, 8, [\"modelValue\", \"onChange\"])\n ]),\n _createElementVNode(\"div\", _hoisted_10, [\n _createVNode(_component_Field, {\n type: \"text\",\n modelValue: _ctx.quoteData.address,\n \"onUpdate:modelValue\": _cache[1] || (_cache[1] = ($event: any) => ((_ctx.quoteData.address) = $event)),\n class: \"form-control form-control-solid\",\n placeholder: \"Enter address\",\n name: \"address\"\n }, null, 8, [\"modelValue\"])\n ])\n ]),\n _createElementVNode(\"div\", _hoisted_11, [\n _createElementVNode(\"div\", _hoisted_12, [\n _createVNode(_component_Field, {\n type: \"text\",\n modelValue: _ctx.quoteData.vat,\n \"onUpdate:modelValue\": _cache[2] || (_cache[2] = ($event: any) => ((_ctx.quoteData.vat) = $event)),\n class: \"form-control form-control-solid\",\n placeholder: \"Enter VAT/Company ID\",\n name: \"company_indentifier\"\n }, null, 8, [\"modelValue\"])\n ]),\n _hoisted_13\n ]),\n _hoisted_14,\n _createElementVNode(\"div\", _hoisted_15, [\n _createElementVNode(\"div\", _hoisted_16, [\n _createVNode(_component_Field, {\n type: \"text\",\n modelValue: _ctx.quoteData.title,\n \"onUpdate:modelValue\": _cache[3] || (_cache[3] = ($event: any) => ((_ctx.quoteData.title) = $event)),\n class: \"form-control form-control-solid\",\n placeholder: \"Enter Title\",\n name: \"quote_title\"\n }, null, 8, [\"modelValue\"]),\n _createElementVNode(\"div\", _hoisted_17, [\n _createElementVNode(\"div\", _hoisted_18, [\n _createVNode(_component_ErrorMessage, { name: \"quote_title\" })\n ])\n ])\n ]),\n _createElementVNode(\"div\", _hoisted_19, [\n _createVNode(_component_SkillsDropdown, { onChange: _ctx.onSkillChange }, null, 8, [\"onChange\"]),\n _createElementVNode(\"div\", _hoisted_20, [\n _createElementVNode(\"div\", _hoisted_21, [\n _createVNode(_component_ErrorMessage, { name: \"skills\" })\n ])\n ])\n ])\n ]),\n _createElementVNode(\"div\", _hoisted_22, [\n _createElementVNode(\"div\", _hoisted_23, [\n _createVNode(_component_el_select, {\n class: \"w-100\",\n modelValue: _ctx.quoteData.unit,\n \"onUpdate:modelValue\": _cache[4] || (_cache[4] = ($event: any) => ((_ctx.quoteData.unit) = $event)),\n size: \"normal\"\n }, {\n default: _withCtx(() => [\n _createVNode(_component_el_option, {\n value: \"hour\",\n label: \"Hour\"\n }),\n _createVNode(_component_el_option, {\n value: \"day\",\n label: \"Day\"\n })\n ]),\n _: 1\n }, 8, [\"modelValue\"])\n ]),\n _createElementVNode(\"div\", _hoisted_24, [\n _createVNode(_component_currencies_dropdown, {\n modelValue: _ctx.quoteData.currency,\n \"onUpdate:modelValue\": _cache[5] || (_cache[5] = ($event: any) => ((_ctx.quoteData.currency) = $event)),\n class: \"w-100\"\n }, null, 8, [\"modelValue\"])\n ])\n ]),\n _createElementVNode(\"div\", _hoisted_25, [\n _createElementVNode(\"div\", _hoisted_26, [\n _createElementVNode(\"button\", {\n type: \"button\",\n onClick: _cache[6] || (_cache[6] = \n//@ts-ignore\n(...args) => (_ctx.handleAddSkills && _ctx.handleAddSkills(...args))),\n class: \"btn btn-success w-100 justify-content-center align-items-center d-flex h-35px mb-5\"\n }, \" Add \"),\n _createElementVNode(\"div\", _hoisted_27, [\n _createElementVNode(\"table\", _hoisted_28, [\n _hoisted_29,\n _createElementVNode(\"tbody\", null, [\n (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(_ctx.subSkills, (subSkill) => {\n return (_openBlock(), _createElementBlock(\"tr\", {\n key: subSkill.id\n }, [\n _createElementVNode(\"td\", _hoisted_30, _toDisplayString(subSkill.name), 1),\n _createElementVNode(\"td\", null, [\n _createElementVNode(\"div\", _hoisted_31, [\n _createElementVNode(\"input\", {\n class: \"form-control w-75px form-control-sm\",\n type: \"number\",\n onChange: \n ev =>\n _ctx.handleChange(\n ev.target.value,\n subSkill.id,\n subSkill.name\n )\n \n }, null, 40, _hoisted_32)\n ])\n ])\n ]))\n }), 128))\n ])\n ])\n ])\n ]),\n _createElementVNode(\"div\", _hoisted_33, [\n _createElementVNode(\"table\", _hoisted_34, [\n _hoisted_35,\n _createElementVNode(\"tbody\", null, [\n (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(_ctx.quoteSkill, (quote, index) => {\n return (_openBlock(), _createElementBlock(\"tr\", {\n key: quote.id\n }, [\n _createElementVNode(\"td\", _hoisted_36, _toDisplayString(quote.name), 1),\n _createElementVNode(\"td\", null, [\n _withDirectives(_createElementVNode(\"input\", {\n class: \"form-control w-75px form-control-sm\",\n type: \"number\",\n \"onUpdate:modelValue\": ($event: any) => ((quote.qty) = $event)\n }, null, 8, _hoisted_37), [\n [_vModelText, quote.qty]\n ])\n ]),\n _createElementVNode(\"td\", null, [\n _withDirectives(_createElementVNode(\"input\", {\n class: \"form-control w-75px form-control-sm\",\n type: \"number\",\n \"onUpdate:modelValue\": ($event: any) => ((quote.price) = $event)\n }, null, 8, _hoisted_38), [\n [_vModelText, quote.price]\n ])\n ]),\n _createElementVNode(\"td\", _hoisted_39, [\n _createElementVNode(\"a\", {\n onClick: _withModifiers(($event: any) => (_ctx.handleDeleteSkill(index)), [\"prevent\"]),\n class: \"btn btn-icon btn-bg-danger btn-active-color-light btn-sm me-1\"\n }, [\n _createVNode(_component_DeleteButtonIcon, {\n dynamicClass: 'svg-icon-white',\n svgSize: 'svg-icon-3'\n })\n ], 8, _hoisted_40)\n ])\n ]))\n }), 128))\n ])\n ])\n ])\n ]),\n _createElementVNode(\"div\", _hoisted_41, [\n _withDirectives(_createElementVNode(\"textarea\", {\n \"onUpdate:modelValue\": _cache[7] || (_cache[7] = ($event: any) => ((_ctx.quoteData.notes) = $event)),\n class: \"form-control form-control-solid\",\n placeholder: \"Enter notes\",\n rows: \"3\"\n }, null, 512), [\n [_vModelText, _ctx.quoteData.notes]\n ])\n ]),\n _createElementVNode(\"div\", _hoisted_42, [\n _createElementVNode(\"button\", {\n type: \"submit\",\n disabled: _ctx.saving,\n class: \"btn btn-primary\"\n }, [\n (_ctx.saving)\n ? (_openBlock(), _createElementBlock(\"span\", _hoisted_44))\n : _createCommentVNode(\"\", true),\n _createTextVNode(\" \" + _toDisplayString(_ctx.editing ? \"Edit\" : \"Save\") + \" quote \", 1)\n ], 8, _hoisted_43)\n ])\n ]),\n _: 1\n }, 8, [\"validation-schema\", \"onSubmit\"])), [\n [_directive_loading, _ctx.loading]\n ])\n ])\n ]))\n}","\nimport { Form, Field, ErrorMessage } from \"vee-validate\";\nimport {\n computed,\n defineComponent,\n onBeforeMount,\n onMounted,\n reactive,\n ref\n} from \"vue\";\nimport SkillsDropdown from \"@/components/dropdown/JobCreateSkillsDropdown.vue\";\nimport { useStore } from \"vuex\";\nimport { fireToast } from \"@/core/helpers/swal\";\nimport { useRoute, useRouter } from \"vue-router\";\nimport * as Yup from \"yup\";\nimport DeleteButtonIcon from \"@/components/Icons/DeleteButton.vue\";\nimport CurrenciesDropdown from \"@/components/dropdown/CurrenciesDropdown.vue\";\n\nexport interface QuoteSkill {\n id: number;\n qty: number;\n name: string;\n price: number;\n}\nexport default defineComponent({\n name: \"create-quote-view\",\n components: {\n CurrenciesDropdown,\n DeleteButtonIcon,\n SkillsDropdown,\n ErrorMessage,\n Form,\n Field\n },\n setup: function() {\n const store = useStore();\n const subSkills = ref([]);\n const formComponent = ref();\n const router = useRouter();\n const skills = computed(() => store.getters[\"ListsModule/skills\"]);\n const quoteSkill = ref([]);\n const saving = ref(false);\n const editing = ref(false);\n const loading = ref(false);\n const route = useRoute();\n const quoteData = reactive({\n company: null,\n address: \"\",\n vat: \"\",\n title: \"\",\n unit: \"\",\n currency: null,\n notes: \"\"\n });\n const models = ref([] as any[]);\n\n function setSaving(state: boolean): void {\n saving.value = state;\n }\n\n const companies = computed(\n () => store.getters[\"ListsModule/companiesDropdown\"]\n );\n\n function handleEditing(id) {\n loading.value = true;\n store\n .dispatch(\"JobQuotesModule/getQuoteById\", id)\n .then(data => {\n quoteData.unit = data.unit;\n quoteData.vat = data.unit;\n quoteData.address = data.address;\n quoteData.title = data.title;\n quoteData.currency = data.currency_id;\n quoteData.notes = data.notes;\n quoteData.company = data.company_id ? data.company_id : data.company;\n quoteSkill.value = JSON.parse(data.skills);\n loading.value = false;\n })\n .catch(() => {\n loading.value = false;\n router.push(\"job-quotes\");\n });\n }\n\n onBeforeMount((): void => {\n const route = useRoute();\n if (route.params.id) {\n editing.value = true;\n handleEditing(route.params.id);\n } else {\n editing.value = false;\n }\n });\n\n onMounted((): void => {\n store.dispatch(\"ListsModule/fetchSkills\");\n if (companies.value.length == 0) {\n store.dispatch(\"ListsModule/fetchCompaniesDropdown\");\n }\n });\n\n function onSkillChange(skillId: number): void {\n models.value = [];\n const skill = skills.value.find(skill => skill.id == skillId);\n if (skill && skill.children) {\n subSkills.value = skill.children;\n } else {\n subSkills.value = [];\n }\n }\n\n function handleChange(value: number, skillId: number, name: string): void {\n models.value[skillId] = {\n name: name,\n qty: value,\n id: skillId\n };\n }\n\n function handleAddSkills() {\n formComponent.value.setFieldError(\"skills\", undefined);\n models.value.forEach(el => {\n if (parseInt(el.qty) > 0) {\n quoteSkill.value.push({\n name: el.name,\n qty: parseInt(el.qty),\n id: el.id,\n price: 0\n });\n }\n });\n }\n\n function handleSubmit(data): void {\n if (quoteSkill.value.length == 0) {\n formComponent.value.setFieldError(\n \"skills\",\n \"Select at least one skill\"\n );\n return;\n }\n setSaving(true);\n const payload = {\n ...quoteData,\n skills: quoteSkill.value\n };\n if (editing.value) {\n payload[\"id\"] = route.params.id;\n payload[\"editing\"] = true;\n }\n store\n .dispatch(\"JobQuotesModule/saveQuote\", payload)\n .then(() => {\n router.push(\"/job-quotes\").then(() => {\n fireToast(\"Quote saved successfully\", true);\n });\n })\n .catch(() => {\n fireToast(\"Error while saving quote\", false);\n });\n }\n\n const validationSchema = Yup.object().shape({\n // eslint-disable-next-line @typescript-eslint/camelcase\n quote_title: Yup.string()\n .required()\n .label(\"Title\")\n });\n\n function handleDeleteSkill(index: number): void {\n quoteSkill.value.splice(index, 1);\n }\n\n function handleClientSelect() {\n if (typeof quoteData.company === \"number\") {\n store\n .dispatch(\"JobQuotesModule/getClientData\", {\n company: quoteData.company\n })\n .then(data => {\n quoteData.vat = data.vat;\n quoteData.address = data.address;\n if (data.preferredSkills.length) {\n subSkills.value = data.preferredSkills;\n }\n })\n .catch(() => {\n quoteData.vat = \"\";\n quoteData.address = \"\";\n });\n } else {\n quoteData.vat = \"\";\n quoteData.address = \"\";\n }\n }\n\n return {\n handleClientSelect,\n handleDeleteSkill,\n validationSchema,\n handleAddSkills,\n onSkillChange,\n formComponent,\n handleChange,\n handleSubmit,\n quoteSkill,\n companies,\n subSkills,\n quoteData,\n loading,\n editing,\n saving,\n models\n };\n }\n});\n","import { render } from \"./CreateQuote.vue?vue&type=template&id=b418892e&ts=true\"\nimport script from \"./CreateQuote.vue?vue&type=script&lang=ts\"\nexport * from \"./CreateQuote.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__","\n\n","import { render } from \"./JobCreateSkillsDropdown.vue?vue&type=template&id=00bf3f90\"\nimport script from \"./JobCreateSkillsDropdown.vue?vue&type=script&lang=js\"\nexport * from \"./JobCreateSkillsDropdown.vue?vue&type=script&lang=js\"\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!./CurrenciesDropdown.vue?vue&type=style&index=0&id=797408d3&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":""}