{"version":3,"sources":["webpack:///./src/client/project.vue?86de","webpack:///./node_modules/@babel/runtime/helpers/esm/arrayLikeToArray.js","webpack:///./node_modules/@babel/runtime/helpers/esm/arrayWithoutHoles.js","webpack:///./node_modules/@babel/runtime/helpers/esm/iterableToArray.js","webpack:///./node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js","webpack:///./node_modules/@babel/runtime/helpers/esm/nonIterableSpread.js","webpack:///./node_modules/@babel/runtime/helpers/esm/toConsumableArray.js","webpack:///./node_modules/core-js/internals/array-from.js","webpack:///./src/client/project.vue","webpack:///src/client/project.vue","webpack:///./src/client/project.vue?0eac","webpack:///./src/client/project.vue?50e8","webpack:///./node_modules/core-js/internals/call-with-safe-iteration-closing.js","webpack:///./node_modules/core-js/modules/es.array.from.js"],"names":["_arrayLikeToArray","arr","len","length","i","arr2","Array","_arrayWithoutHoles","isArray","arrayLikeToArray","_iterableToArray","iter","Symbol","iterator","from","_unsupportedIterableToArray","o","minLen","n","Object","prototype","toString","call","slice","constructor","name","test","_nonIterableSpread","TypeError","_toConsumableArray","arrayWithoutHoles","iterableToArray","unsupportedIterableToArray","nonIterableSpread","bind","toObject","callWithSafeIterationClosing","isArrayIteratorMethod","isConstructor","lengthOfArrayLike","createProperty","getIterator","getIteratorMethod","$Array","module","exports","arrayLike","O","IS_CONSTRUCTOR","this","argumentsLength","arguments","mapfn","undefined","mapping","result","step","next","value","iteratorMethod","index","done","render","_vm","_c","_self","staticClass","attrs","on","$event","stopPropagation","preventDefault","onSubmit","apply","form","id","_e","_v","_s","$t","$v","project_name","$dirty","$error","model","$model","callback","$$v","$set","expression","survey_style_id","surveyStylesOptions","source","estimated_start_date","platform","is_flight_type_usable","on_effort_interval","off_effort_interval","NARWOptions","is_NARW","directives","rawName","is_survey_mode_usable","domProps","_i","$$a","$$el","target","$$c","checked","$$i","concat","surveyModes","survey_mode","editSurveyModes","tags","isDisabled","showArchieved","enabled","searchFn","totalRecords","isLoading","dropdownAllowAll","perPageDropdown","rows","columns","onPageChange","onSortChange","onColumnFilter","onPerPageChange","scopedSlots","_u","key","fn","props","column","field","editProject","row","deleteProject","duplicateProject","staticRenderFns","toast","position","Vue","mixins","components","VueTagsInput","data","project_id","survey_name","description","status","client_id","flight_type","text","showPassword","showPassword1","inputType","inputType1","checkedPassword","serverParams","columnFilters","sort","type","page","perPage","options","label","filterable","sortable","formatFn","rowsForBulkEdit","categories","orders","validations","required","watch","newValue","immediate","handler","mounted","methods","tiClasses","timeout","showProgressBar","closeOnClick","pauseOnHover","API","resetForm","formatDate","updateParams","newProps","params","searchTerm","formatStatus","loadItems","e","window","top","behavior","console","title","showCancelButton","confirmButtonColor","cancelButtonColor","confirmButtonText","then","getSurveyStyle","client_url","getEffortData","projectId","projects","computed","surveyModeNames","get","set","component","anObject","iteratorClose","ENTRIES","error","$","checkCorrectnessOfIteration","INCORRECT_ITERATION","iterable","stat","forced"],"mappings":"gHAAA,W,kCCAe,SAASA,EAAkBC,EAAKC,IAClC,MAAPA,GAAeA,EAAMD,EAAIE,UAAQD,EAAMD,EAAIE,QAE/C,IAAK,IAAIC,EAAI,EAAGC,EAAO,IAAIC,MAAMJ,GAAME,EAAIF,EAAKE,IAC9CC,EAAKD,GAAKH,EAAIG,GAGhB,OAAOC,ECNM,SAASE,EAAmBN,GACzC,GAAIK,MAAME,QAAQP,GAAM,OAAOQ,EAAiBR,G,wGCFnC,SAASS,EAAiBC,GACvC,GAAsB,qBAAXC,QAAmD,MAAzBD,EAAKC,OAAOC,WAA2C,MAAtBF,EAAK,cAAuB,OAAOL,MAAMQ,KAAKH,G,wCCAvG,SAASI,EAA4BC,EAAGC,GACrD,GAAKD,EAAL,CACA,GAAiB,kBAANA,EAAgB,OAAOP,EAAiBO,EAAGC,GACtD,IAAIC,EAAIC,OAAOC,UAAUC,SAASC,KAAKN,GAAGO,MAAM,GAAI,GAEpD,MADU,WAANL,GAAkBF,EAAEQ,cAAaN,EAAIF,EAAEQ,YAAYC,MAC7C,QAANP,GAAq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AC,cACAR,wDAEAS,iBACAC,MACA,CACA3B,WACA4B,cAIAC,OACAC,YAEAC,SACA,UACA,QACA,WAEA1C,SACA,CACA2C,oBACAhC,qBACAiC,eAEA,CACAD,wBACAhC,0BACAiC,cACAC,aAEA,CACAF,mBACAhC,mBACAkC,YACAC,0BAEA,CACAH,eACAhC,eACAkC,cAGAjD,aACAG,QACAgD,mBACApD,eAEAqD,cACAC,UACAnF,uBACAwB,UAIA4D,aACArG,MACAC,MACAM,cACA+F,wBAEA3B,YACA2B,wBAEAtF,iBACAsF,0BAOAC,OACA,uBADA,SACAC,GAEA,qCACA,+BAGA,oBAEA,eACA,oBACA,+BACA,gCACA,MACA,gCACA,iCACA,kCACA,MACA,QAEA,kCACA,mCACA,QAIA,gBACAC,aACAC,QAFA,SAEAF,GAEA,UACA,oBACA,WACA,wBAKAG,QAtJA,WAwJA,mCACA,0CACA,iBACA,oBAEA,iBACA,0BAEA,kBACA,iBACA,uBAEAC,SACAjE,cADA,WAEA,sDAEAH,gBAJA,WAKA,8BAEA,kBACA,CAAAvC,KAAAlD,eACA,CAAAkD,KAAAlD,gBACA,CAAAkD,KAAAlD,kBAKA,mDAAAkI,YAAA4B,4BAEA/G,SAjBA,WAiBA,WAIA,GAHA,uBAGA,wBAKA,2BAQA,OAPA,wBACA,0DACAgH,YACAC,mBACAC,gBACAC,kBAKA,OACAtC,kCACAI,wDACAnD,uDAEA,6EAEA,wBACA8C,qCAMAwC,sBACA,WACA,YAEA,gBACA,mBACA,8BACAJ,YACAC,mBACAC,gBACAC,kBAEA,cACA,cAEA,UACA,eACA,CAAAhH,KAAAlD,eACA,CAAAkD,KAAAlD,gBACA,CAAAkD,KAAAlD,iBAEA,yBAEA,YAEA,gBACA,oBACA+J,YACAC,mBACAC,gBACAC,uBAKAE,UAtFA,WAuFA,WACA5G,gBACAS,mBACA4D,eACA1D,UACAC,wBACAC,YACAmB,eACAwC,0DAIAqC,WAnGA,SAmGApI,GACA,KACA,4CAGAqI,aAxGA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kBAIA,6CAAAkI,YAAA4B,8BAEA,YACAkB,2DACA,eACA,CAAA9H,KAAAlD,eACA,CAAAkD,KAAAlD,gBACA,CAAAkD,KAAAlD,iBAEA,6CAAAkI,YAAA4B,gCAGA8B,UACAC,iBACAC,IADA,WAEA,sEAEAC,IAJA,SAIAtC,GAAA,WACA,gCACA,kEACA,OAAAzJ,cAAAkD,mBAEA,mBACA,4BC3wBiV,I,wBCQ7U8I,EAAY,eACd,EACA3J,EACA+E,GACA,EACA,KACA,KACA,MAIa,aAAA4E,E,yDCnBf,IAAIC,EAAW,EAAQ,QACnBC,EAAgB,EAAQ,QAG5B/K,EAAOC,QAAU,SAAUhC,EAAUwH,EAAI3E,EAAOkK,GAC9C,IACE,OAAOA,EAAUvF,EAAGqF,EAAShK,GAAO,GAAIA,EAAM,IAAM2E,EAAG3E,GACvD,MAAOmK,GACPF,EAAc9M,EAAU,QAASgN,M,qBCRrC,IAAIC,EAAI,EAAQ,QACZhN,EAAO,EAAQ,QACfiN,EAA8B,EAAQ,QAEtCC,GAAuBD,GAA4B,SAAUE,GAE/D3N,MAAMQ,KAAKmN,MAKbH,EAAE,CAAEnH,OAAQ,QAASuH,MAAM,EAAMC,OAAQH,GAAuB,CAC9DlN,KAAMA","file":"js/chunk-3869c402.785d0ccb.js","sourcesContent":["export * from \"-!../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--7-oneOf-1-0!../../node_modules/css-loader/dist/cjs.js??ref--7-oneOf-1-1!../../node_modules/vue-loader/lib/loaders/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/lib/index.js??vue-loader-options!./project.vue?vue&type=style&index=0&id=b69942a6&prod&lang=css&\"","export default function _arrayLikeToArray(arr, len) {\n if (len == null || len > arr.length) len = arr.length;\n\n for (var i = 0, arr2 = new Array(len); i < len; i++) {\n arr2[i] = arr[i];\n }\n\n return arr2;\n}","import arrayLikeToArray from \"./arrayLikeToArray.js\";\nexport default function _arrayWithoutHoles(arr) {\n if (Array.isArray(arr)) return arrayLikeToArray(arr);\n}","export default function _iterableToArray(iter) {\n if (typeof Symbol !== \"undefined\" && iter[Symbol.iterator] != null || iter[\"@@iterator\"] != null) return Array.from(iter);\n}","import arrayLikeToArray from \"./arrayLikeToArray.js\";\nexport default function _unsupportedIterableToArray(o, minLen) {\n if (!o) return;\n if (typeof o === \"string\") return arrayLikeToArray(o, minLen);\n var n = Object.prototype.toString.call(o).slice(8, -1);\n if (n === \"Object\" && o.constructor) n = o.constructor.name;\n if (n === \"Map\" || n === \"Set\") return Array.from(o);\n if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return arrayLikeToArray(o, minLen);\n}","export default function _nonIterableSpread() {\n throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}","import arrayWithoutHoles from \"./arrayWithoutHoles.js\";\nimport iterableToArray from \"./iterableToArray.js\";\nimport unsupportedIterableToArray from \"./unsupportedIterableToArray.js\";\nimport nonIterableSpread from \"./nonIterableSpread.js\";\nexport default function _toConsumableArray(arr) {\n return arrayWithoutHoles(arr) || iterableToArray(arr) || unsupportedIterableToArray(arr) || nonIterableSpread();\n}","'use strict';\nvar bind = require('../internals/function-bind-context');\nvar call = require('../internals/function-call');\nvar toObject = require('../internals/to-object');\nvar callWithSafeIterationClosing = require('../internals/call-with-safe-iteration-closing');\nvar isArrayIteratorMethod = require('../internals/is-array-iterator-method');\nvar isConstructor = require('../internals/is-constructor');\nvar lengthOfArrayLike = require('../internals/length-of-array-like');\nvar createProperty = require('../internals/create-property');\nvar getIterator = require('../internals/get-iterator');\nvar getIteratorMethod = require('../internals/get-iterator-method');\n\nvar $Array = Array;\n\n// `Array.from` method implementation\n// https://tc39.es/ecma262/#sec-array.from\nmodule.exports = function from(arrayLike /* , mapfn = undefined, thisArg = undefined */) {\n var O = toObject(arrayLike);\n var IS_CONSTRUCTOR = isConstructor(this);\n var argumentsLength = arguments.length;\n var mapfn = argumentsLength > 1 ? arguments[1] : undefined;\n var mapping = mapfn !== undefined;\n if (mapping) mapfn = bind(mapfn, argumentsLength > 2 ? arguments[2] : undefined);\n var iteratorMethod = getIteratorMethod(O);\n var index = 0;\n var length, result, step, iterator, next, value;\n // if the target is not iterable or it's an array with the default iterator - use a simple case\n if (iteratorMethod && !(this === $Array && isArrayIteratorMethod(iteratorMethod))) {\n iterator = getIterator(O, iteratorMethod);\n next = iterator.next;\n result = IS_CONSTRUCTOR ? new this() : [];\n for (;!(step = call(next, iterator)).done; index++) {\n value = mapping ? callWithSafeIterationClosing(iterator, mapfn, [step.value, index], true) : step.value;\n createProperty(result, index, value);\n }\n } else {\n length = lengthOfArrayLike(O);\n result = IS_CONSTRUCTOR ? new this(length) : $Array(length);\n for (;length > index; index++) {\n value = mapping ? mapfn(O[index], index) : O[index];\n createProperty(result, index, value);\n }\n }\n result.length = index;\n return result;\n};\n","var render = function render(){var _vm=this,_c=_vm._self._c;return _c('section',{staticClass:\"tables new-updated-design\"},[_c('vue-snotify'),_c('form',{staticClass:\"forms-sample\",attrs:{\"autocomplete\":\"off\"},on:{\"submit\":function($event){$event.stopPropagation();$event.preventDefault();return _vm.onSubmit.apply(null, arguments)}}},[_c('div',{staticClass:\"row\"},[_c('div',{staticClass:\"col-md-12 d-flex align-items-stretch grid-margin\"},[_c('div',{staticClass:\"row flex-grow\"},[_c('div',{staticClass:\"col-12 grid-margin\"},[_c('div',{staticClass:\"card\"},[_c('div',{staticClass:\"card-header\"},[(!this.form.id)?_c('h4',{staticClass:\"card-title\"},[_vm._v(_vm._s(_vm.$t('App Project (Survey)')))]):_vm._e(),(this.form.id)?_c('h4',{staticClass:\"card-title\"},[_vm._v(_vm._s(_vm.$t('edit-project')))]):_vm._e()]),_c('div',{staticClass:\"card-body new-card-body\"},[_c('div',{staticClass:\"row\"},[_c('div',{staticClass:\"col-md-6\"},[_c('b-form-group',{attrs:{\"label\":_vm.$t('Project Name (Survey Name)*'),\"label-for\":\"project_name\"}},[_c('b-form-input',{attrs:{\"type\":\"text\",\"id\":\"project_name\",\"name\":\"project_name\",\"autocomplete\":\"new-password\",\"placeholder\":_vm.$t('project-name*'),\"state\":_vm.$v.form.project_name.$dirty ? !_vm.$v.form.project_name.$error : null,\"aria-describedby\":\"input-1-live-feedback\"},model:{value:(_vm.$v.form.project_name.$model),callback:function ($$v) {_vm.$set(_vm.$v.form.project_name, \"$model\", $$v)},expression:\"$v.form.project_name.$model\"}}),_c('b-form-invalid-feedback',{attrs:{\"id\":\"input-1-live-feedback\"}},[_vm._v(\" \"+_vm._s(_vm.$t(\"field-required\"))+\" \")])],1)],1),_c('div',{staticClass:\"col-md-6\"},[_c('b-form-group',{attrs:{\"label\":_vm.$t('survey-style*'),\"label-for\":\"name\"}},[_c('b-form-select',{attrs:{\"state\":_vm.$v.form.survey_style_id.$dirty ? !_vm.$v.form.survey_style_id.$error : null,\"aria-describedby\":\"input-1-live-feedback\",\"options\":_vm.surveyStylesOptions,\"value-field\":\"id\",\"text-field\":\"name\"},model:{value:(_vm.$v.form.survey_style_id.$model),callback:function ($$v) {_vm.$set(_vm.$v.form.survey_style_id, \"$model\", $$v)},expression:\"$v.form.survey_style_id.$model\"}},[(_vm.surveyStylesOptions.length === 0)?_c('b-form-select-option',[_vm._v(_vm._s(_vm.$t('No Style Found')))]):_vm._e()],1),_c('b-form-invalid-feedback',{attrs:{\"id\":\"input-1-live-feedback\"}},[_vm._v(\" \"+_vm._s(_vm.$t(\"field-required\"))+\" \")])],1)],1)]),_c('div',{staticClass:\"row\"}),_c('div',{staticClass:\"row\"},[_c('div',{staticClass:\"col-md-6\"},[_c('b-form-group',{attrs:{\"label\":_vm.$t('Source (Client)'),\"label-for\":\"source\"}},[_c('b-form-input',{attrs:{\"type\":\"text\",\"id\":\"source\",\"name\":\"source\",\"autocomplete\":\"new-password\",\"placeholder\":_vm.$t('Source')},model:{value:(_vm.form.source),callback:function ($$v) {_vm.$set(_vm.form, \"source\", $$v)},expression:\"form.source\"}})],1)],1),_c('div',{staticClass:\"col-md-6\"},[_c('b-form-group',{attrs:{\"label\":_vm.$t('estimated-start-date'),\"label-for\":\"estimated_start_date\"}},[_c('b-form-input',{attrs:{\"type\":\"date\",\"id\":\"estimated_start_date\",\"name\":\"estimated_start_date\",\"autocomplete\":\"new-password\",\"placeholder\":_vm.$t('estimated-start-date')},model:{value:(_vm.form.estimated_start_date),callback:function ($$v) {_vm.$set(_vm.form, \"estimated_start_date\", $$v)},expression:\"form.estimated_start_date\"}})],1)],1)]),_c('div',{staticClass:\"row\"},[_c('div',{staticClass:\"col-md-6\"},[_c('b-form-group',{attrs:{\"label\":_vm.$t('Platform'),\"label-for\":\"platform\"}},[_c('b-form-input',{attrs:{\"type\":\"text\",\"id\":\"platform\",\"name\":\"platform\",\"autocomplete\":\"new-password\",\"placeholder\":_vm.$t('Platform')},model:{value:(_vm.form.platform),callback:function ($$v) {_vm.$set(_vm.form, \"platform\", $$v)},expression:\"form.platform\"}})],1)],1),_c('div',{staticClass:\"col-md-6\"},[_c('label',{staticClass:\"mr-sm-2 ml-0 pl-0\",attrs:{\"for\":\"inline-form-custom-select-pref\"}},[_vm._v(_vm._s(_vm.$t('Flight Type')))]),_c('br'),_c('toggle-button',{staticClass:\"switchColor\",attrs:{\"sync\":true},model:{value:(_vm.form.is_flight_type_usable),callback:function ($$v) {_vm.$set(_vm.form, \"is_flight_type_usable\", $$v)},expression:\"form.is_flight_type_usable\"}})],1)]),_c('div',{staticClass:\"row\"},[_c('div',{staticClass:\"col-md-6\"},[_c('label',{staticClass:\"mr-sm-2 ml-0 pl-0\",attrs:{\"for\":\"on-effort\"}},[_vm._v(_vm._s(_vm.$t('On Effort Interval (seconds)')))]),_c('b-form-input',{staticClass:\"mb-3\",attrs:{\"id\":\"on-effort\",\"type\":\"number\",\"min\":\"1\",\"placeholder\":_vm.$t('Enter On Effort Interval in seconds')},model:{value:(_vm.form.on_effort_interval),callback:function ($$v) {_vm.$set(_vm.form, \"on_effort_interval\", $$v)},expression:\"form.on_effort_interval\"}})],1),_c('div',{staticClass:\"col-md-6\"},[_c('label',{staticClass:\"mr-sm-2 ml-0 pl-0\",attrs:{\"for\":\"off-effort\"}},[_vm._v(_vm._s(_vm.$t('Off Effort Interval (seconds)')))]),_c('b-form-input',{staticClass:\"mb-3\",attrs:{\"id\":\"off-effort\",\"type\":\"number\",\"min\":\"1\",\"placeholder\":_vm.$t('Enter Off Effort Interval in seconds')},model:{value:(_vm.form.off_effort_interval),callback:function ($$v) {_vm.$set(_vm.form, \"off_effort_interval\", $$v)},expression:\"form.off_effort_interval\"}})],1)]),_c('div',{staticClass:\"row\"},[_c('div',{staticClass:\"col-md-6\"},[_c('label',{staticClass:\"mr-sm-2 ml-0 pl-0\",attrs:{\"for\":\"narw\"}},[_vm._v(_vm._s(_vm.$t('NARW Survey')))]),_c('b-form-select',{staticClass:\"mb-3\",attrs:{\"id\":\"narw\",\"options\":_vm.NARWOptions},model:{value:(_vm.form.is_NARW),callback:function ($$v) {_vm.$set(_vm.form, \"is_NARW\", $$v)},expression:\"form.is_NARW\"}})],1)]),_c('div',{staticClass:\"row project-checkbox\"},[_c('div',{staticClass:\"col-lg-8\"},[_c('div',{staticClass:\"row\"},[_c('div',{staticClass:\"col-md-4 mt-4\"},[_c('div',{staticClass:\"form-flex-group\"},[_c('input',{directives:[{name:\"model\",rawName:\"v-model\",value:(_vm.form.is_survey_mode_usable),expression:\"form.is_survey_mode_usable\"}],attrs:{\"type\":\"checkbox\"},domProps:{\"checked\":Array.isArray(_vm.form.is_survey_mode_usable)?_vm._i(_vm.form.is_survey_mode_usable,null)>-1:(_vm.form.is_survey_mode_usable)},on:{\"change\":function($event){var $$a=_vm.form.is_survey_mode_usable,$$el=$event.target,$$c=$$el.checked?(true):(false);if(Array.isArray($$a)){var $$v=null,$$i=_vm._i($$a,$$v);if($$el.checked){$$i<0&&(_vm.$set(_vm.form, \"is_survey_mode_usable\", $$a.concat([$$v])))}else{$$i>-1&&(_vm.$set(_vm.form, \"is_survey_mode_usable\", $$a.slice(0,$$i).concat($$a.slice($$i+1))))}}else{_vm.$set(_vm.form, \"is_survey_mode_usable\", $$c)}}}}),_c('label',{attrs:{\"for\":\"surveyModes\"}},[_vm._v(_vm._s(_vm.$t('Survey Mode')))])])]),_c('div',{staticClass:\"col-md-5 mt-3\"},[_c('b-form-group',{attrs:{\"label-for\":\"surveyModes\"}},[_c('b-form-select',{attrs:{\"aria-describedby\":\"input-1-live-feedback\",\"options\":_vm.surveyModes,\"value-field\":\"id\",\"text-field\":\"name\"},model:{value:(_vm.form.survey_mode),callback:function ($$v) {_vm.$set(_vm.form, \"survey_mode\", $$v)},expression:\"form.survey_mode\"}},[(_vm.surveyModes.length === 0)?_c('b-form-select-option',{attrs:{\"disabled\":true}},[_vm._v(\" \"+_vm._s(_vm.$t('No Survey Mode Found'))+\" \")]):_vm._e()],1)],1)],1),_c('div',{staticClass:\"col-md-3 mt-3\"},[_c('b-button',{staticClass:\"btn btn-success\",on:{\"click\":_vm.editSurveyModes}},[_vm._v(\" \"+_vm._s(_vm.$t('edit-values'))+\" \")])],1)])]),_c('div',{staticClass:\"col-lg-3\"},[_c('div',{staticClass:\"row\"},[_c('div',{staticClass:\"col-md-12\"},[_c('section',[_c('vue-tags-input',{staticClass:\"tags-input\",attrs:{\"tags\":_vm.tags,\"allow-edit-tags\":true,\"placeholder\":_vm.$t('Enter values as tags'),\"add-only-from-autocomplete\":false},on:{\"tags-changed\":function($event){_vm.tags = $event}}})],1)])])])]),_c('div',{staticClass:\"row\"},[_c('div',{staticClass:\"col-md-6\"}),_c('div',{staticClass:\"col-md-6 mt-3\"},[_c('b-button',{staticClass:\"btn float-right btn-success\",attrs:{\"type\":\"submit\",\"variant\":\"success\",\"disabled\":_vm.isDisabled}},[(!this.form.id)?_c('span',[_vm._v(_vm._s(_vm.$t('submit-btn')))]):_vm._e(),(this.form.id)?_c('span',[_vm._v(_vm._s(_vm.$t('update-btn')))]):_vm._e()])],1)])])])])])])])]),_c('div',{staticClass:\"row\"},[_c('div',{staticClass:\"col-lg-12 stretch-card\"},[_c('div',{staticClass:\"card\"},[_c('div',{staticClass:\"card-header\"},[_c('div',{staticClass:\"d-flex align-items-center question-order row-question-order\"},[_c('h4',{staticClass:\"card-title\"},[_vm._v(_vm._s(_vm.$t('Survey History')))]),_c('div',{staticClass:\"header-buttons\"},[_c('button',{staticClass:\"btn btn-primary\",on:{\"click\":_vm.showArchieved}},[_vm._v(_vm._s(_vm.$t('Archived')))])])])]),_c('div',{staticClass:\"card-body new-card-body\"},[_c('vue-good-table',{staticClass:\"pd-table\",attrs:{\"mode\":\"remote\",\"line-numbers\":true,\"search-options\":{enabled: true,searchFn: _vm.searchFn},\"totalRows\":_vm.totalRecords,\"isLoading\":_vm.isLoading,\"pagination-options\":{\n enabled: true,\n dropdownAllowAll: false,\n perPageDropdown: [10, 20, 50, 100, 200],\n },\"rows\":_vm.rows,\"columns\":_vm.columns},on:{\"on-page-change\":_vm.onPageChange,\"on-sort-change\":_vm.onSortChange,\"on-column-filter\":_vm.onColumnFilter,\"on-per-page-change\":_vm.onPerPageChange,\"on-search\":_vm.searchFn,\"update:isLoading\":function($event){_vm.isLoading=$event},\"update:is-loading\":function($event){_vm.isLoading=$event}},scopedSlots:_vm._u([{key:\"table-row\",fn:function(props){return [(props.column.field === 'action')?_c('span',{staticClass:\"text-nowrap\"},[_c('b-button',{staticClass:\"mr-1 btn-info text-white\",attrs:{\"size\":\"sm\"},on:{\"click\":function($event){return _vm.editProject(props.row.id)}}},[_vm._v(\" \"+_vm._s(_vm.$t('edit-btn'))+\" \")]),_c('b-button',{staticClass:\"mr-1 btn-danger text-white\",attrs:{\"size\":\"sm\"},on:{\"click\":function($event){return _vm.deleteProject(props.row.id)}}},[_vm._v(\" \"+_vm._s(_vm.$t('delete-btn'))+\" \")]),_c('b-button',{staticClass:\"btn-duplicate btn-secondary text-white\",attrs:{\"size\":\"sm\"},on:{\"click\":function($event){return _vm.duplicateProject(props.row.id)}}},[_vm._v(\" \"+_vm._s(_vm.$t('Duplicate'))+\" \")])],1):_vm._e()]}}])})],1)])])])],1)\n}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","<template>\r\n <section class=\"tables new-updated-design\">\r\n <vue-snotify></vue-snotify>\r\n <form class=\"forms-sample\" @submit.stop.prevent=\"onSubmit\" autocomplete=\"off\">\r\n <div class=\"row\">\r\n <div class=\"col-md-12 d-flex align-items-stretch grid-margin\">\r\n <div class=\"row flex-grow\">\r\n <div class=\"col-12 grid-margin\">\r\n <div class=\"card\">\r\n <div class=\"card-header\">\r\n <h4 v-if=\"!this.form.id\" class=\"card-title\">{{ $t('App Project (Survey)') }}</h4>\r\n <h4 v-if=\"this.form.id\" class=\"card-title\">{{ $t('edit-project') }}</h4>\r\n </div>\r\n <div class=\"card-body new-card-body\">\r\n <div class=\"row\">\r\n <div class=\"col-md-6\">\r\n <b-form-group :label=\"$t('Project Name (Survey Name)*')\" label-for=\"project_name\">\r\n <b-form-input\r\n type=\"text\"\r\n id=\"project_name\"\r\n name=\"project_name\"\r\n autocomplete=\"new-password\"\r\n :placeholder=\"$t('project-name*')\"\r\n v-model=\"$v.form.project_name.$model\" :state=\"$v.form.project_name.$dirty ? !$v.form.project_name.$error : null\"\r\n aria-describedby=\"input-1-live-feedback\"\r\n >\r\n </b-form-input>\r\n <b-form-invalid-feedback id=\"input-1-live-feedback\">\r\n {{ $t(\"field-required\") }}\r\n </b-form-invalid-feedback>\r\n </b-form-group>\r\n </div>\r\n <div class=\"col-md-6\">\r\n <b-form-group :label=\"$t('survey-style*')\" label-for=\"name\">\r\n <b-form-select v-model=\"$v.form.survey_style_id.$model\" :state=\"$v.form.survey_style_id.$dirty ? !$v.form.survey_style_id.$error : null\" aria-describedby=\"input-1-live-feedback\" :options=\"surveyStylesOptions\" value-field=\"id\" text-field=\"name\">\r\n <b-form-select-option v-if=\"surveyStylesOptions.length === 0\" >{{ $t('No Style Found') }}</b-form-select-option>\r\n </b-form-select>\r\n <b-form-invalid-feedback id=\"input-1-live-feedback\">\r\n {{ $t(\"field-required\") }}\r\n </b-form-invalid-feedback>\r\n </b-form-group>\r\n </div>\r\n <!-- <div class=\"col-md-6\">\r\n <b-form-group :label=\"$t('project-id*')\" label-for=\"project_id\">\r\n <b-form-input\r\n type=\"text\"\r\n id=\"project_id\"\r\n name=\"project_id\"\r\n readonly\r\n :placeholder=\"$t('project-id*')\"\r\n v-model=\"$v.form.project_id.$model\" :state=\"$v.form.project_id.$dirty ? !$v.form.project_id.$error : null\"\r\n >\r\n </b-form-input>\r\n </b-form-group>\r\n </div> -->\r\n </div>\r\n\r\n <div class=\"row\">\r\n \r\n <!-- <div class=\"col-md-6\">\r\n <b-form-group :label=\"$t('Survey Name')\" label-for=\"survey_name\">\r\n <b-form-input\r\n type=\"text\"\r\n id=\"survey_name\"\r\n name=\"survey_name\"\r\n autocomplete=\"new-password\"\r\n :placeholder=\"$t('Survey Name')\"\r\n v-model=\"$v.form.survey_name.$model\" :state=\"$v.form.survey_name.$dirty ? !$v.form.survey_name.$error : null\"\r\n aria-describedby=\"input-1-live-feedback\"\r\n >\r\n </b-form-input>\r\n <b-form-invalid-feedback id=\"input-1-live-feedback\">\r\n {{ $t(\"field-required\") }}\r\n </b-form-invalid-feedback>\r\n </b-form-group>\r\n </div>-->\r\n </div>\r\n\r\n <div class=\"row\">\r\n <div class=\"col-md-6\">\r\n <b-form-group :label=\"$t('Source (Client)')\" label-for=\"source\">\r\n <b-form-input\r\n type=\"text\"\r\n id=\"source\"\r\n name=\"source\"\r\n autocomplete=\"new-password\"\r\n :placeholder=\"$t('Source')\"\r\n v-model=\"form.source\"\r\n >\r\n </b-form-input>\r\n </b-form-group>\r\n </div>\r\n <div class=\"col-md-6\">\r\n <b-form-group :label=\"$t('estimated-start-date')\" label-for=\"estimated_start_date\">\r\n <b-form-input\r\n type=\"date\"\r\n id=\"estimated_start_date\"\r\n name=\"estimated_start_date\"\r\n autocomplete=\"new-password\"\r\n :placeholder=\"$t('estimated-start-date')\"\r\n v-model=\"form.estimated_start_date\"\r\n >\r\n </b-form-input>\r\n </b-form-group>\r\n </div>\r\n </div>\r\n\r\n <div class=\"row\">\r\n <div class=\"col-md-6\">\r\n <b-form-group :label=\"$t('Platform')\" label-for=\"platform\">\r\n <b-form-input\r\n type=\"text\"\r\n id=\"platform\"\r\n name=\"platform\"\r\n autocomplete=\"new-password\"\r\n :placeholder=\"$t('Platform')\"\r\n v-model=\"form.platform\"\r\n >\r\n </b-form-input>\r\n </b-form-group>\r\n </div>\r\n <div class=\"col-md-6\">\r\n <label class=\"mr-sm-2 ml-0 pl-0\" for=\"inline-form-custom-select-pref\">{{ $t('Flight Type') }}</label>\r\n <br>\r\n <toggle-button v-model=\"form.is_flight_type_usable\" :sync=\"true\" class=\"switchColor\" />\r\n </div>\r\n </div>\r\n <div class=\"row\">\r\n <div class=\"col-md-6\">\r\n <label class=\"mr-sm-2 ml-0 pl-0\" for=\"on-effort\">{{ $t('On Effort Interval (seconds)') }}</label>\r\n <b-form-input\r\n id=\"on-effort\"\r\n v-model=\"form.on_effort_interval\"\r\n type=\"number\"\r\n min=\"1\"\r\n class=\"mb-3\"\r\n :placeholder=\"$t('Enter On Effort Interval in seconds')\"\r\n ></b-form-input>\r\n </div>\r\n <div class=\"col-md-6\">\r\n <label class=\"mr-sm-2 ml-0 pl-0\" for=\"off-effort\">{{ $t('Off Effort Interval (seconds)') }}</label>\r\n <b-form-input\r\n id=\"off-effort\"\r\n v-model=\"form.off_effort_interval\"\r\n type=\"number\"\r\n min=\"1\"\r\n class=\"mb-3\"\r\n :placeholder=\"$t('Enter Off Effort Interval in seconds')\"\r\n ></b-form-input>\r\n </div>\r\n </div>\r\n <div class=\"row\">\r\n <div class=\"col-md-6\">\r\n <label class=\"mr-sm-2 ml-0 pl-0\" for=\"narw\">{{ $t('NARW Survey') }}</label>\r\n <b-form-select\r\n id=\"narw\"\r\n v-model=\"form.is_NARW\"\r\n :options=\"NARWOptions\"\r\n class=\"mb-3\"\r\n ></b-form-select>\r\n </div>\r\n </div>\r\n <div class=\"row project-checkbox\">\r\n <div class=\"col-lg-8\">\r\n <div class=\"row\">\r\n <div class=\"col-md-4 mt-4\">\r\n <div class=\"form-flex-group\">\r\n <input type=\"checkbox\" v-model=\"form.is_survey_mode_usable\">\r\n <label for=\"surveyModes\">{{ $t('Survey Mode') }}</label>\r\n </div>\r\n </div>\r\n <div class=\"col-md-5 mt-3\">\r\n <b-form-group label-for=\"surveyModes\">\r\n <b-form-select \r\n v-model=\"form.survey_mode\" \r\n aria-describedby=\"input-1-live-feedback\" \r\n :options=\"surveyModes\" \r\n value-field=\"id\" \r\n text-field=\"name\"\r\n >\r\n <b-form-select-option v-if=\"surveyModes.length === 0\" :disabled=\"true\">\r\n {{ $t('No Survey Mode Found') }}\r\n </b-form-select-option>\r\n </b-form-select>\r\n </b-form-group>\r\n </div>\r\n <div class=\"col-md-3 mt-3\">\r\n <b-button class=\"btn btn-success\" @click=\"editSurveyModes\">\r\n {{ $t('edit-values') }}\r\n </b-button>\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"col-lg-3\">\r\n <div class=\"row\">\r\n <div class=\"col-md-12\">\r\n <section>\r\n <vue-tags-input\r\n :tags=\"tags\"\r\n @tags-changed=\"tags = $event\"\r\n :allow-edit-tags=\"true\"\r\n class=\"tags-input\"\r\n :placeholder=\"$t('Enter values as tags')\"\r\n :add-only-from-autocomplete=\"false\"\r\n />\r\n </section>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"row\">\r\n <div class=\"col-md-6\"></div>\r\n <div class=\"col-md-6 mt-3\">\r\n <b-button type=\"submit\" variant=\"success\" :disabled=\"isDisabled\" class=\"btn float-right btn-success\">\r\n <span v-if=\"!this.form.id\">{{ $t('submit-btn') }}</span>\r\n <span v-if=\"this.form.id\">{{ $t('update-btn') }}</span>\r\n </b-button>\r\n </div>\r\n </div>\r\n <!-- </form>-->\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </form>\r\n <div class=\"row\">\r\n <div class=\"col-lg-12 stretch-card\">\r\n <div class=\"card\">\r\n <div class=\"card-header\">\r\n <div class=\"d-flex align-items-center question-order row-question-order\">\r\n <h4 class=\"card-title\">{{ $t('Survey History') }}</h4>\r\n <div class=\"header-buttons\">\r\n <button class=\"btn btn-primary\" @click=\"showArchieved\">{{ $t('Archived') }}</button>\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"card-body new-card-body\">\r\n <vue-good-table\r\n mode=\"remote\"\r\n @on-page-change=\"onPageChange\"\r\n @on-sort-change=\"onSortChange\"\r\n @on-column-filter=\"onColumnFilter\"\r\n @on-per-page-change=\"onPerPageChange\"\r\n :line-numbers=\"true\"\r\n @on-search=\"searchFn\"\r\n :search-options=\"{enabled: true,searchFn: searchFn}\"\r\n :totalRows=\"totalRecords\"\r\n :isLoading.sync=\"isLoading\"\r\n :pagination-options=\"{\r\n enabled: true,\r\n dropdownAllowAll: false,\r\n perPageDropdown: [10, 20, 50, 100, 200],\r\n }\"\r\n :rows=\"rows\"\r\n :columns=\"columns\"\r\n class=\"pd-table\">\r\n <template slot=\"table-row\" slot-scope=\"props\">\r\n <span\r\n v-if=\"props.column.field === 'action'\"\r\n class=\"text-nowrap\"\r\n >\r\n <b-button size=\"sm\" @click=\"editProject(props.row.id)\"\r\n class=\"mr-1 btn-info text-white\">\r\n {{ $t('edit-btn') }}\r\n </b-button>\r\n <b-button size=\"sm\" @click=\"deleteProject(props.row.id)\"\r\n class=\"mr-1 btn-danger text-white\">\r\n {{ $t('delete-btn') }}\r\n </b-button>\r\n <b-button size=\"sm\" @click=\"duplicateProject(props.row.id)\"\r\n class=\"btn-duplicate btn-secondary text-white\">\r\n {{ $t('Duplicate') }}\r\n </b-button>\r\n </span>\r\n </template>\r\n </vue-good-table>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </section>\r\n</template>\r\n\r\n\r\n<script>\r\n import Vue from \"vue\";\r\n import API from '@/api'\r\n import Snotify, {SnotifyPosition} from 'vue-snotify'\r\n import {validationMixin} from \"vuelidate\";\r\n import {required, minLength, requiredIf, sameAs} from \"vuelidate/lib/validators\";\r\n import moment from 'moment';\r\n import i18n from '@/i18n';\r\n import VueTagsInput from '@johmun/vue-tags-input';\r\n const options = {\r\n toast: {\r\n position: SnotifyPosition.rightTop,\r\n }\r\n }\r\n Vue.use(Snotify, options)\r\n export default {\r\n name: 'Users',\r\n mixins: [validationMixin],\r\n components: {\r\n VueTagsInput,\r\n },\r\n data() {\r\n return {\r\n form: {\r\n id: '',\r\n project_name: '',\r\n project_id: '',\r\n survey_style_id: '',\r\n survey_name: '',\r\n source: '',\r\n estimated_start_date: '',\r\n platform: '',\r\n description: '',\r\n status: true,\r\n client_id: JSON.parse(localStorage.getItem('client_id')),\r\n is_flight_type_usable: false,\r\n flight_type: '',\r\n survey_mode: '',\r\n is_survey_mode_usable: false,\r\n on_effort_interval: null,\r\n off_effort_interval: null,\r\n is_NARW: null,\r\n },\r\n surveyModes: [],\r\n NARWOptions: [\r\n { value: null, text: \"Select an option\" },\r\n { value: 1, text: \"Yes\" },\r\n { value: 0, text: \"No\" }\r\n ],\r\n isDisabled: false,\r\n showPassword: true,\r\n showPassword1: true,\r\n inputType: 'password',\r\n inputType1: 'password',\r\n checkedPassword: false,\r\n serverParams: {\r\n client_id: JSON.parse(localStorage.getItem('client_id')),\r\n // a map of column filters example: {name: 'john', age: '20'}\r\n columnFilters: {},\r\n sort: [\r\n {\r\n field: 'id', // example: 'name'\r\n type: 'desc' // 'asc' or 'desc'\r\n }\r\n ],\r\n\r\n page: 1, // what page I want to show\r\n perPage: 10 // how many items I'm showing per page\r\n },\r\n options: {\r\n 'yes': 'Yes',\r\n 'no': 'No',\r\n 'CBD': 'CBD'\r\n },\r\n columns: [\r\n {\r\n label: 'Survey Name',\r\n field: 'project_name',\r\n filterable: true,\r\n },\r\n {\r\n label: 'Survey Template',\r\n field: 'survey_style_name',\r\n filterable: true,\r\n sortable: true,\r\n },\r\n {\r\n label: \"Created At\",\r\n field: \"created_at\",\r\n sortable: true,\r\n formatFn: this.formatDate\r\n },\r\n {\r\n label: 'Action',\r\n field: \"action\",\r\n sortable: false,\r\n },\r\n ],\r\n isLoading: false,\r\n rows: [],\r\n rowsForBulkEdit: [],\r\n totalRecords: 0,\r\n // category_id: '',\r\n categories: [],\r\n orders: [],\r\n surveyStylesOptions: [],\r\n tags: [],\r\n };\r\n },\r\n\r\n validations: {\r\n form: {\r\n id: {},\r\n project_name: {\r\n required,\r\n }, \r\n project_id: {\r\n required,\r\n },\r\n survey_style_id: {\r\n required\r\n },\r\n // survey_name: {\r\n // required,\r\n // },\r\n },\r\n },\r\n watch: {\r\n 'form.survey_style_id'(newValue) {\r\n // Find the selected survey style by its ID\r\n const selectedSurvey = this.surveyStylesOptions.find(\r\n (option) => option.id === newValue\r\n );\r\n\r\n if (selectedSurvey && !this.form.id){\r\n // Set default values based on the survey style name\r\n switch (selectedSurvey.name) {\r\n case \"Aerial Survey\":\r\n this.form.on_effort_interval = 8;\r\n this.form.off_effort_interval = 8;\r\n break;\r\n case \"Offshore Survey (General)\":\r\n this.form.on_effort_interval = 120;\r\n this.form.off_effort_interval = 120;\r\n break;\r\n default:\r\n // Reset values for other survey styles\r\n this.form.on_effort_interval = null;\r\n this.form.off_effort_interval = null;\r\n break;\r\n }\r\n }\r\n },\r\n 'form.is_NARW': {\r\n immediate: true,\r\n handler(newValue) {\r\n // Ensure the value stays consistent with dropdown selection\r\n if (newValue === \"Yes\") {\r\n this.form.is_NARW = 1;\r\n } else if (newValue === \"No\") {\r\n this.form.is_NARW = 0;\r\n }\r\n }\r\n }\r\n },\r\n mounted() {\r\n // this.serverParams.user_id = this.$route.params.id;\r\n this.form.id = this.$route.params.id;\r\n if (this.form.id && this.form.id !== 'undefined') {\r\n this.readonly = true;\r\n this.getSpotter();\r\n } else {\r\n this.readonly = false;\r\n this.getEffortData(null);\r\n }\r\n this.isLoading = true;\r\n this.loadItems();\r\n this.getSurveyStyle();\r\n },\r\n methods: {\r\n showArchieved() {\r\n this.$router.push(\"/survey/archived\", () => {});\r\n },\r\n editSurveyModes() {\r\n if (this.surveyModes.length === 0) {\r\n // Populate default values if empty\r\n this.surveyModes = [\r\n { id: 1, name: 'Select' },\r\n { id: 2, name: 'Passing' },\r\n { id: 3, name: 'Closing' },\r\n ];\r\n }\r\n // Populate the textarea with the current survey modes as a comma-separated string\r\n // this.form.survey_mode = this.surveyModes.map(w => w.name).join(', ');\r\n this.tags = this.surveyModes.map(w => ({ text: w.name, tiClasses: ['ti-valid'] }));\r\n }, \r\n onSubmit() {\r\n this.$v.form.$touch();\r\n\r\n // Check for any validation errors\r\n if (this.$v.form.$anyError) {\r\n return;\r\n }\r\n\r\n // Check if the project name is empty\r\n if (!this.form.project_name) {\r\n this.isDisabled = true;\r\n this.$snotify.warning('Please fill in the project name.', {\r\n timeout: 2000,\r\n showProgressBar: false,\r\n closeOnClick: true,\r\n pauseOnHover: true,\r\n });\r\n return;\r\n }\r\n\r\n let data = {\r\n project_id: this.selectedProjectId,\r\n client_id: JSON.parse(localStorage.getItem('client_id')),\r\n is_survey_mode_usable : this.form.is_survey_mode_usable,\r\n };\r\n this.form.survey_mode = this.tags.map(tag => tag.text).join(', ');\r\n // Include survey_mode value if it is valid\r\n if (this.form.survey_mode) {\r\n data.survey_mode = this.form.survey_mode;\r\n }\r\n // Disable the submit button to prevent multiple submissions\r\n \r\n // Call the API endpoint to add or update the project\r\n \r\n API.addEditProject(\r\n this.form,\r\n (data) => {\r\n // Reset form fields and show success message upon successful submission\r\n this.isDisabled = false;\r\n this.$v.form.$reset();\r\n this.$snotify.success(data.message, {\r\n timeout: 2000,\r\n showProgressBar: false,\r\n closeOnClick: true,\r\n pauseOnHover: true,\r\n });\r\n this.resetForm();\r\n this.loadItems();\r\n // Reset tags and survey modes dropdown\r\n this.tags = [];\r\n this.surveyModes = [\r\n { id: 1, name: 'Select' },\r\n { id: 2, name: 'Passing' },\r\n { id: 3, name: 'Closing' },\r\n ];\r\n this.form.survey_mode = '';\r\n },\r\n (err) => {\r\n // Enable the submit button and show error message in case of API error\r\n this.isDisabled = false;\r\n this.$snotify.error(err, {\r\n timeout: 2000,\r\n showProgressBar: false,\r\n closeOnClick: true,\r\n pauseOnHover: true,\r\n });\r\n }\r\n );\r\n },\r\n resetForm() {\r\n this.form = {\r\n project_name: '',\r\n survey_style_id: '',\r\n survey_name: '',\r\n source: '',\r\n estimated_start_date: '',\r\n platform: '',\r\n survey_mode: '',\r\n client_id: JSON.parse(localStorage.getItem('client_id')),\r\n };\r\n // this.surveyModes = [];\r\n },\r\n formatDate(value) {\r\n if (value) {\r\n return moment(String(value)).format('YYYY-MM-DD')\r\n }\r\n },\r\n updateParams(newProps) {\r\n this.serverParams = Object.assign({}, this.serverParams, newProps);\r\n },\r\n\r\n onPageChange(params) {\r\n this.updateParams({page: params.currentPage});\r\n this.loadItems();\r\n },\r\n\r\n onPerPageChange(params) {\r\n this.updateParams({perPage: params.currentPerPage});\r\n this.loadItems();\r\n },\r\n\r\n onSortChange(params) {\r\n this.updateParams({\r\n sort: [{\r\n type: params[0].type,\r\n field: params[0].field,\r\n }],\r\n });\r\n this.loadItems();\r\n },\r\n searchFn(params) {\r\n this.updateParams({searchTerm: params});\r\n this.loadItems();\r\n this.isLoading = false;\r\n },\r\n formatStatus(status) {\r\n if (status === 1) {\r\n return true;\r\n } else {\r\n return false;\r\n }\r\n },\r\n onColumnFilter(params) {\r\n this.updateParams(params);\r\n this.loadItems();\r\n },\r\n loadItems() {\r\n this.isLoading = true;\r\n API.getAllProjects(this.serverParams,\r\n data => {\r\n this.isLoading = false;\r\n this.totalRecords = data.totalRecords;\r\n this.rows = [...data.data.data];\r\n this.form.project_id = data.project_id;\r\n },\r\n err => {\r\n }\r\n )\r\n },\r\n editProject(e) {\r\n window.scrollTo({top: 0, behavior: 'smooth'});\r\n this.$v.form.$reset();\r\n API.editProject(\r\n e, data => {\r\n this.form.id = data.data.id;\r\n this.form.project_name = data.data.project_name;\r\n this.form.project_id = data.data.project_id;\r\n this.form.survey_style_id = data.data.survey_style_id;\r\n this.form.survey_name = data.data.survey_name;\r\n this.form.source = data.data.source;\r\n this.form.platform = data.data.platform;\r\n this.form.estimated_start_date = data.data.estimated_start_date;\r\n this.$set(this.form, 'is_NARW', data.data.is_NARW === 1 ? \"Yes\" : \"No\"); \r\n\r\n console.log('this.form.is_NARW ',this.form.is_NARW );\r\n // Assign effort interval values, falling back to defaults if null\r\n if (data.data.on_effort_interval !== null && data.data.off_effort_interval !== null) {\r\n this.form.on_effort_interval = data.data.on_effort_interval;\r\n this.form.off_effort_interval = data.data.off_effort_interval;\r\n } else {\r\n // Use default values based on survey style\r\n const selectedSurvey = this.surveyStylesOptions.find(\r\n (option) => option.id === data.data.survey_style_id\r\n );\r\n if (selectedSurvey) {\r\n switch (selectedSurvey.name) {\r\n case \"Aerial Survey\":\r\n this.form.on_effort_interval = 8;\r\n this.form.off_effort_interval = 8;\r\n break;\r\n case \"Offshore Survey (General)\":\r\n this.form.on_effort_interval = 120;\r\n this.form.off_effort_interval = 120;\r\n break;\r\n default:\r\n this.form.on_effort_interval = null;\r\n this.form.off_effort_interval = null;\r\n break;\r\n }\r\n }\r\n }\r\n // this.form.is_flight_type_usable = data.flight_type_usable;\r\n this.$set(this.form, 'is_flight_type_usable', data.flight_type_usable);\r\n this.getEffortData(this.form.id);\r\n },\r\n err => {\r\n }\r\n )\r\n },\r\n deleteProject(e) {\r\n this.$swal({\r\n title: 'Are you sure?',\r\n text: \"You won't be able to revert this!\",\r\n type: 'warning',\r\n showCancelButton: true,\r\n confirmButtonColor: '#3085d6',\r\n cancelButtonColor: '#d33',\r\n confirmButtonText: 'Yes, delete it!'\r\n }).then((result) => {\r\n if (result.value) {\r\n API.deleteProject(\r\n e,\r\n data => {\r\n this.loadItems();\r\n this.resetForm();\r\n this.$snotify.success('Record has been deleted!');\r\n this.form.id = '';\r\n this.form.logic = false;\r\n this.form.question = '';\r\n this.form.response = '';\r\n this.$v.form.$reset();\r\n this.showSubQuestions = false;\r\n },\r\n err => {\r\n })\r\n }\r\n })\r\n },\r\n duplicateProject(id) {\r\n // Call the API function to duplicate the project\r\n API.duplicateProject(id,\r\n (data) => {\r\n // Handle success, e.g., show a success message\r\n this.$snotify.success('Project duplicated successfully');\r\n // Reload the projects or update the list to reflect the changes\r\n this.loadItems();\r\n },\r\n (error) => {\r\n // Handle error, e.g., show an error message\r\n this.$snotify.error('Failed to duplicate project');\r\n }\r\n );\r\n },\r\n getSurveyStyle() {\r\n const data = {\r\n client_url: window.location.href.split('#')[0],\r\n }\r\n API.getSurveyStyle(\r\n data,\r\n data => {\r\n this.surveyStylesOptions = data.data;\r\n },\r\n err => {\r\n }\r\n )\r\n },\r\n getEffortData(projectId) {\r\n API.getProjectEffortDetails({ projectId }, response => {\r\n const projects = response.data;\r\n this.surveyModes = [];\r\n this.tags = [];\r\n\r\n if (projects.length > 0) {\r\n projects.forEach(project => {\r\n const { key, values, is_usable } = project;\r\n const valueArray = values ? values.split(',').map(val => val.trim()) : [];\r\n switch (key) {\r\n case 'survey_mode':\r\n this.surveyModes = valueArray.map(val => ({ id: project.id, name: val }));\r\n this.tags = valueArray.map(val => ({ text: val, tiClasses: ['ti-valid'] }));\r\n this.form.is_survey_mode_usable = !!is_usable;\r\n break;\r\n }\r\n });\r\n }\r\n else{\r\n this.form.is_survey_mode_usable = false;\r\n this.surveyModes = [\r\n { id: 1, name: 'Select' },\r\n { id: 2, name: 'Passing' },\r\n { id: 3, name: 'Closing' },\r\n ];\r\n }\r\n // this.form.survey_mode = this.surveyModes.map(w => w.name).join(', ');\r\n this.tags = this.surveyModes.map(w => ({ text: w.name, tiClasses: ['ti-valid'] }));\r\n\r\n }, err => {\r\n console.error('Error fetching project weather details:', err);\r\n this.surveyModes = [\r\n { id: 1, name: 'Select' },\r\n { id: 2, name: 'Passing' },\r\n { id: 3, name: 'Closing' },\r\n ];\r\n this.tags = this.surveyModes.map(w => ({ text: w.name, tiClasses: ['ti-valid'] }));\r\n });\r\n },\r\n }, computed: {\r\n surveyModeNames: {\r\n get() {\r\n return this.surveyModes.map(w => w.name).join(', ');\r\n },\r\n set(newValue) {\r\n const surveyModes = newValue.split(',').map(name => {\r\n const existingMode = this.surveyModes.find(w => w.name === name.trim());\r\n return { name: name.trim(), id: existingMode ? existingMode.id : null };\r\n });\r\n this.surveyModes = surveyModes;\r\n this.form.survey_mode = surveyModes;\r\n },\r\n },\r\n },\r\n\r\n }\r\n</script>\r\n\r\n<style>\r\n .btn-duplicate {\r\n width: 80px !important;\r\n padding-left: 10px !important;\r\n background: #5D9E12;\r\n border-color: #5D9E12;\r\n }\r\n .project-checkbox label {\r\n padding-left: 15px;\r\n }\r\n .project-checkbox textarea {\r\n border: 1px solid #000 !important;\r\n height: 250px;\r\n outline: none;\r\n box-shadow: none;\r\n border-radius: 0;\r\n }\r\n .form-flex-group {\r\n display: flex;\r\n align-items: baseline;\r\n }\r\n @media (max-width: 375px) {\r\n .row .card .new-card-body {\r\n padding: 1.25rem 1.437rem !important;\r\n }\r\n }\r\n</style>\r\n","import mod from \"-!../../node_modules/cache-loader/dist/cjs.js??ref--13-0!../../node_modules/thread-loader/dist/cjs.js!../../node_modules/babel-loader/lib/index.js!../../node_modules/cache-loader/dist/cjs.js??ref--1-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./project.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../node_modules/cache-loader/dist/cjs.js??ref--13-0!../../node_modules/thread-loader/dist/cjs.js!../../node_modules/babel-loader/lib/index.js!../../node_modules/cache-loader/dist/cjs.js??ref--1-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./project.vue?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./project.vue?vue&type=template&id=b69942a6&\"\nimport script from \"./project.vue?vue&type=script&lang=js&\"\nexport * from \"./project.vue?vue&type=script&lang=js&\"\nimport style0 from \"./project.vue?vue&type=style&index=0&id=b69942a6&prod&lang=css&\"\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 null,\n null\n \n)\n\nexport default component.exports","var anObject = require('../internals/an-object');\nvar iteratorClose = require('../internals/iterator-close');\n\n// call something on iterator step with safe closing on error\nmodule.exports = function (iterator, fn, value, ENTRIES) {\n try {\n return ENTRIES ? fn(anObject(value)[0], value[1]) : fn(value);\n } catch (error) {\n iteratorClose(iterator, 'throw', error);\n }\n};\n","var $ = require('../internals/export');\nvar from = require('../internals/array-from');\nvar checkCorrectnessOfIteration = require('../internals/check-correctness-of-iteration');\n\nvar INCORRECT_ITERATION = !checkCorrectnessOfIteration(function (iterable) {\n // eslint-disable-next-line es-x/no-array-from -- required for testing\n Array.from(iterable);\n});\n\n// `Array.from` method\n// https://tc39.es/ecma262/#sec-array.from\n$({ target: 'Array', stat: true, forced: INCORRECT_ITERATION }, {\n from: from\n});\n"],"sourceRoot":""}