@genpact/genome.mfe.solidify-app 1.17.2-alpha.165 → 1.17.2-alpha.166

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (33) hide show
  1. package/dist/solidify.umd.min.LearnerRereview.js +1 -1
  2. package/dist/solidify.umd.min.SolidifyAdministration.js +1 -1
  3. package/dist/solidify.umd.min.SolidifyAdministrationAssignProxy.js +1 -1
  4. package/dist/solidify.umd.min.SolidifyAdministrationAssignRoleToUser.js +1 -1
  5. package/dist/solidify.umd.min.SolidifyAdministrationCreateOffCyele.js +1 -1
  6. package/dist/solidify.umd.min.SolidifyAdministrationEmailTemplateManagement.js +1 -1
  7. package/dist/solidify.umd.min.SolidifyAdministrationLearnerEvents.js +1 -1
  8. package/dist/solidify.umd.min.SolidifyAdministrationLearnerGrades.js +1 -1
  9. package/dist/solidify.umd.min.SolidifyAdministrationManageProxy.js +1 -1
  10. package/dist/solidify.umd.min.SolidifyAdministrationMasterAdministration.js +1 -1
  11. package/dist/solidify.umd.min.SolidifyAdministrationNeedReviewerReport.js +1 -1
  12. package/dist/solidify.umd.min.SolidifyAdministrationOffcycleDashboard.js +1 -1
  13. package/dist/solidify.umd.min.SolidifyAdministrationOperationalDetails.js +1 -1
  14. package/dist/solidify.umd.min.SolidifyAdministrationProgramAdministration.js +1 -1
  15. package/dist/solidify.umd.min.SolidifyAdministrationProgramDetails.js +1 -1
  16. package/dist/solidify.umd.min.SolidifyAdministrationSystemSetting.js +1 -1
  17. package/dist/solidify.umd.min.SolidifyAdministrationTaskDetails.js +1 -1
  18. package/dist/solidify.umd.min.SolidifyAdministrationTaskManagement.js +1 -1
  19. package/dist/solidify.umd.min.SolidifyAdministrationViewAllProxyRequests.js +1 -1
  20. package/dist/solidify.umd.min.SolidifyAdministrationViewProxyRequests.js +1 -1
  21. package/dist/solidify.umd.min.SolidifyAdministrationharvestReport.js +1 -1
  22. package/dist/solidify.umd.min.SolidifyAdministrationsendEmailToUser.js +1 -1
  23. package/dist/solidify.umd.min.SolidifyLearner.js +2 -2
  24. package/dist/solidify.umd.min.SolidifyLearnerDone.js +1 -1
  25. package/dist/solidify.umd.min.SolidifyLearnerError.js +1 -1
  26. package/dist/solidify.umd.min.SolidifyLearnerPeerReview.js +1 -1
  27. package/dist/solidify.umd.min.SolidifyLearnerProxyReview.js +1 -1
  28. package/dist/solidify.umd.min.SolidifyLearnerSelectTask.js +1 -1
  29. package/dist/solidify.umd.min.SolidifyLearnerStatus.js +1 -1
  30. package/dist/solidify.umd.min.SolidifyLearnerSubmitTask.js +1 -1
  31. package/dist/solidify.umd.min.js +4 -4
  32. package/dist/solidify.umd.min.js.map +1 -1
  33. package/package.json +1 -1
@@ -1,2 +1,2 @@
1
- "use strict";(("undefined"!==typeof self?self:this)["webpackChunksolidify"]=("undefined"!==typeof self?self:this)["webpackChunksolidify"]||[]).push([[989],{8899:function(e,t,a){a.d(t,{Z:function(){return d}});var l=function(){var e=this,t=e._self._c;return e.isVisible?t("main",{staticClass:"modal-wrapper relative z-50 modal-filter fixed inset-0 w-full h-screen flex mt-2 justify-center bg-semi-75 h-fit"},[t("transition",{attrs:{name:"modal-fade"}},[t("div",{staticClass:"modal-overlay",on:{click:function(t){return e.$emit("close-modal")}}},[t("div",{staticClass:"modal relative",on:{click:function(e){e.stopPropagation()}}},[e.closeVisible?t("div",{staticClass:"absolute right-0 pr-4 top-5 cursor-pointer",on:{click:function(t){return e.$emit("closeModal")}}},[t("x-icon",{attrs:{size:"1.5x"}})],1):e._e(),t("div",{staticClass:"bg-white"},[t("div",{staticClass:"text-gray-500 px-4",domProps:{innerHTML:e._s(e.message)}}),t("div",{staticClass:"pb-6 pt-4 bg-white"},[e.reReviewButton?t("button",{staticClass:"px-4 py-2 text-white shadow-md bg-background-secondary focus:outline-none focus:ring-2 focus:ring-blue-400 focus:ring-opacity-75",on:{click:function(t){return e.applyReview(e.reReviewButtonLink)}}},[e._v(" Apply Re-Review ")]):e._e(),e.closeVisible?t("button",{staticClass:"px-4 py-2 text-white shadow-md bg-background-secondary focus:outline-none focus:ring-2 focus:ring-blue-400 focus:ring-opacity-75 mr-2",staticStyle:{"background-color":"grey"},on:{click:function(t){return e.$emit("closeModal")}}},[e._v(" Cancel ")]):e._e(),e.archiveButton?t("button",{staticClass:"px-4 py-2 text-white shadow-md bg-background-secondary focus:outline-none focus:ring-2 focus:ring-blue-400 focus:ring-opacity-75",on:{click:function(t){return e.$emit("Archive")}}},[e._v("Confirm")]):e._e(),e.linkButton?t("button",{staticClass:"px-4 py-2 text-white shadow-md bg-background-secondary focus:outline-none focus:ring-2 focus:ring-blue-400 focus:ring-opacity-75",on:{click:function(t){return e.navigate(e.link)}}},[e._v(e._s(e.linkButton))]):e._e()])])])])])],1):e._e()},r=[],s=(a(7658),a(4856)),n=a(9948),i={components:{XIcon:s.b0D},name:"Generic",props:{isVisible:{type:Boolean,default:!1,required:!0},message:{type:String,default:"",required:!0},closeVisible:{type:Boolean,default:!1,required:!1},reReviewButton:{type:Boolean,default:!1,required:!1},archiveButton:{type:Boolean,default:!1,required:!1},reReviewButtonLink:{type:String,default:"",required:!1},link:{type:String,default:"",required:!1},linkButton:{type:String,default:"",required:!1}},setup(){const e=async e=>{n.Z.push({path:"/solidify/rereview",query:{learner_task_id:e}})},t=e=>{window.location.href=e};return{applyReview:e,navigate:t}}},o=i,c=a(1001),u=(0,c.Z)(o,l,r,!1,null,null,null),d=u.exports},8153:function(e,t,a){a.d(t,{Z:function(){return u}});var l=function(){var e=this,t=e._self._c;e._self._setupProxy;return t("div",{staticClass:"w-full flex mt-6"},[t("input",{directives:[{name:"model",rawName:"v-model",value:e.search,expression:"search"}],staticClass:"appearance-none border rounded py-2 px-14 text-gray-500 leading-tight focus:outline-none focus:shadow-outline",attrs:{type:"text",placeholder:e.placeHolder1},domProps:{value:e.search},on:{keyup:function(t){e.filterProgramDetails(),e.$emit("Filtered",e.filteredProgramDetails)},input:function(t){t.target.composing||(e.search=t.target.value)}}})])},r=[],s=a(7203),n=(0,s.defineComponent)({name:"SearchBar",props:{data:[Array],placeholder:{type:String,default:"Search"}},setup(e){const t=(0,s.ref)(""),a=(0,s.ref)(),l=(0,s.ref)(),r=(0,s.ref)(),n=()=>{r.value=e.data,l.value=r.value.filter((e=>e.toLowerCase().includes(t.value.toLowerCase())))};return(0,s.onBeforeMount)((async()=>{a.value=e.placeholder,console.log("props.placeholder",e.placeholder)})),{placeHolder1:a,filteredProgramDetails:l,filterProgramDetails:n,search:t}}}),i=n,o=a(1001),c=(0,o.Z)(i,l,r,!1,null,null,null),u=c.exports},6074:function(e,t,a){a.r(t),a.d(t,{default:function(){return h}});var l=function(){var e=this,t=e._self._c;e._self._setupProxy;return t("div",{staticClass:"admin"},[e.showScreen?t("div",{staticClass:"container w-full flex flex-wrap mx-auto px-2 pt-8 lg:pt-16 md:pt-16 mt-10"},[e._m(0),t("div",{staticClass:"w-full mt-4"},[t("div",{staticClass:"flex w-full mt-6"},[t("div",{staticClass:"w-full pr-3 mb-4"},[t("label",{staticClass:"block tracking-wide -text-blue-800 opacity-80 font-normal mb-2"},[e._v(" Filter Task ")]),t("select",{directives:[{name:"model",rawName:"v-model",value:e.selectedProgram,expression:"selectedProgram"}],staticClass:"appearance-none block w-full text-gray-700 border border-gray-200 rounded py-2 px-4 leading-tight focus:outline-none focus:bg-white focus:border-gray-500",on:{change:[function(t){var a=Array.prototype.filter.call(t.target.options,(function(e){return e.selected})).map((function(e){var t="_value"in e?e._value:e.value;return t}));e.selectedProgram=t.target.multiple?a:a[0]},function(t){return e.getSelectedProgram(t)}]}},[t("option",[e._v("Select Program")]),e._l(e.programDetails,(function(a){return t("option",{key:a.program_id,domProps:{value:a.program_id}},[e._v(e._s(a.program_display_name?a.program_display_name:a.program_name))])}))],2)]),e.showSkillProf?t("div",{staticClass:"w-full pr-3 mb-4"},[t("label",{staticClass:"block tracking-wide -text-blue-800 opacity-80 font-normal mb-2"},[e._v(" Skill ")]),t("select",{directives:[{name:"model",rawName:"v-model",value:e.selectedSkill,expression:"selectedSkill"}],staticClass:"appearance-none block w-full text-gray-700 border border-gray-200 rounded py-2 px-4 leading-tight focus:outline-none focus:bg-white focus:border-gray-500",on:{change:[function(t){var a=Array.prototype.filter.call(t.target.options,(function(e){return e.selected})).map((function(e){var t="_value"in e?e._value:e.value;return t}));e.selectedSkill=t.target.multiple?a:a[0]},function(t){return e.getSelectedSkill(t)}]}},[t("option",[e._v("Select Skill")]),e._l(e.skills,(function(a){return t("option",{key:a.skill_id,domProps:{value:a.skill_id}},[e._v(e._s(a.skill_alias))])}))],2)]):e._e(),e.showSkillProf?t("div",{staticClass:"w-full pr-3 mb-4"},[t("label",{staticClass:"block tracking-wide -text-blue-800 opacity-80 font-normal mb-2"},[e._v(" Proficiency ")]),t("select",{directives:[{name:"model",rawName:"v-model",value:e.selectedProficiency,expression:"selectedProficiency"}],staticClass:"appearance-none block w-full text-gray-700 border border-gray-200 rounded py-2 px-4 leading-tight focus:outline-none focus:bg-white focus:border-gray-500",on:{change:[function(t){var a=Array.prototype.filter.call(t.target.options,(function(e){return e.selected})).map((function(e){var t="_value"in e?e._value:e.value;return t}));e.selectedProficiency=t.target.multiple?a:a[0]},function(t){return e.getSelectedProficiency(t)}]}},[t("option",[e._v("Select Proficiency")]),e._l(e.proficiency,(function(a){return t("option",{key:a.prof_id,domProps:{value:a.prof_id}},[e._v(e._s(a.prof_name))])}))],2)]):e._e(),t("div",{staticClass:"w-full mb-4"},[e.searchBtn?t("button",{staticClass:"mt-8 inline-block py-2 px-4 text-white shadow-md bg-background-secondary",on:{click:function(t){return e.searchTask()}}},[e._v("Search Task")]):e._e()])]),t("div",{staticClass:"flex w-full mt-6"},[t("div",{staticClass:"pr-3 mb-4 w-full"},[e.showTaskImportBtn?t("button",{staticClass:"mt-2 mr-4 inline-block py-2 px-4 text-white shadow-md bg-background-secondary text-right",on:{click:function(t){e.showTaskImport=!0}}},[e._v("Upload Task")]):e._e(),e.showSequencBtn?t("button",{staticClass:"mt-2 mr-4 inline-block py-2 px-4 text-white shadow-md bg-background-secondary text-right",on:{click:e.resetTaskOrder}},[e._v("Reset Task Sequence")]):e._e(),e.showExportBtn?t("button",{staticClass:"mt-2 mr-4 inline-block py-2 px-4 text-white shadow-md bg-background-secondary text-right",on:{click:e.exportTask}},[e._v("Export Task")]):e._e(),e.showArchivedTasks?t("button",{staticClass:"mt-2 mr-4 inline-block py-2 px-4 text-white shadow-md bg-background-secondary text-right",on:{click:function(t){return e.filterArchivedTasks(!1)}}},[e._v("Show Unarchived Tasks")]):e._e(),e.showArchivedTasks?e._e():t("button",{staticClass:"mt-2 inline-block py-2 px-4 text-white shadow-md bg-background-secondary text-right",on:{click:function(t){return e.filterArchivedTasks(!0)}}},[e._v("Show Archived Tasks")])])]),e.showTaskImport?t("div",{staticClass:"border border-background-secondary mt-6 p-8 w-full"},[t("div",{staticClass:"flex"},[t("input",{attrs:{type:"file"},on:{change:e.selectedFile}})]),e.errorMessage?t("div",{staticClass:"text-red-700"},[e._v(e._s(e.errorMessage))]):e._e(),e.BulksuccessMessage?t("div",{staticClass:"text-green-700"},[e._v(e._s(e.BulksuccessMessage))]):e._e(),t("button",{staticClass:"bg-background-secondary inline-block text-white py-2 px-4 mt-4",on:{click:e.bulkImportTask}},[e._v("Import Task")])]):e._e(),t("div",{staticClass:"flex w-full"},[t("div",{staticClass:"w-full pr-3 mb-4"},[t("button",{directives:[{name:"show",rawName:"v-show",value:e.taskBtn,expression:"taskBtn"}],staticClass:"mt-2 mr-2 inline-block py-2 px-4 text-white shadow-md bg-background-secondary",on:{click:function(t){return e.viewTaskDetails()}}},[e._v("View Task")]),t("button",{directives:[{name:"show",rawName:"v-show",value:e.archiveBtn,expression:"archiveBtn"}],staticClass:"mt-2 mr-2 inline-block py-2 px-4 text-white shadow-md bg-background-secondary",on:{click:function(t){return e.archieveTask()}}},[e._v("Archive Task")]),t("button",{directives:[{name:"show",rawName:"v-show",value:e.unArchiveBtn,expression:"unArchiveBtn"}],staticClass:"mt-2 mr-2 inline-block py-2 px-4 text-white shadow-md bg-background-secondary",on:{click:function(t){return e.archieveTask()}}},[e._v("UnArchive Task")]),e.archiveBtn?t("button",{directives:[{name:"show",rawName:"v-show",value:e.taskBtn,expression:"taskBtn"}],staticClass:"mt-2 mr-2 inline-block py-2 px-4 text-white shadow-md bg-background-secondary",on:{click:function(t){return e.createOffCycle()}}},[e._v("Create Off-Cycle")]):e._e()])]),e.showSingleTaskImport?t("div",{staticClass:"border border-background-secondary mt-6 p-8 w-full"},[t("div",{staticClass:"flex"},[t("input",{attrs:{type:"file"},on:{change:e.selectedFile}})]),e.errorMessage?t("div",{staticClass:"text-red-700"},[e._v(e._s(e.errorMessage))]):e._e(),e.SinglesuccessMessage?t("div",{staticClass:"text-green-700"},[e._v(e._s(e.SinglesuccessMessage))]):e._e(),t("button",{staticClass:"bg-background-secondary inline-block text-white py-2 px-4 mt-4",on:{click:e.bulkSingleImportTask}},[e._v("Import Single Task")])]):e._e(),e.successMessage?t("div",{staticClass:"text-green-700"},[e._v(e._s(e.successMessage))]):e._e(),e.taskDetails?t("div",{staticClass:"w-full mb-8 tableScroll"},[t("SearchBar",{attrs:{data:e.taskDetailsArray,placeholder:"Search By Task Name"},on:{Filtered:e.getFilteredList}}),t("table",{staticClass:"w-full text-md bg-white shadow rounded mb-4 tableScroll"},[e._m(1),t("tbody",{staticClass:"opacity-80 align-bottom"},e._l(e.filteredTaskDetails,(function(a){return t("tr",{key:a.task_id,staticClass:"border-b hover:bg-gray-300"},[t("td",{staticClass:"py-2 pl-3 pr-0 text-sm w-6"},[t("input",{directives:[{name:"model",rawName:"v-model",value:e.taskCheckOne,expression:"taskCheckOne"}],attrs:{type:"checkbox",id:a.task_id},domProps:{value:a.task_id,checked:Array.isArray(e.taskCheckOne)?e._i(e.taskCheckOne,a.task_id)>-1:e.taskCheckOne},on:{change:[function(t){var l=e.taskCheckOne,r=t.target,s=!!r.checked;if(Array.isArray(l)){var n=a.task_id,i=e._i(l,n);r.checked?i<0&&(e.taskCheckOne=l.concat([n])):i>-1&&(e.taskCheckOne=l.slice(0,i).concat(l.slice(i+1)))}else e.taskCheckOne=s},function(t){return e.showTaskBtn(t,a.task_id,a.is_archive)}],click:e.taskcheckedOne}})]),t("td",{staticClass:"p-2 px-3",attrs:{title:a.task_name}},[e._v(e._s(a.task_name))]),t("td",{staticClass:"p-2 px-3",attrs:{title:a.is_archive}},[e._v(e._s(a.is_archive))]),t("td",{staticClass:"p-2 px-3",attrs:{title:a.task_type}},[e._v(e._s(a.task_type))]),t("td",{staticClass:"p-2 px-3",attrs:{title:a.modified_date}},[e._v(e._s(a.created_date))]),t("td",{staticClass:"p-2 px-3",attrs:{title:a.modified_date}},[e._v(e._s(a.modified_date))]),t("td",{staticClass:"p-2 px-3",attrs:{title:a.modified_by}},[e._v(e._s(a.modified_by))]),t("td",{staticClass:"p-2 px-3",attrs:{title:a.task_order}},[e._v(e._s(a.task_order))])])})),0)]),t("Generic",{attrs:{"is-visible":e.modalVisible,message:e.modalMessage,"close-visible":!0,"archive-button":e.modalButtonVisible},on:{closeModal:e.closeModal,Archive:e.archieveTaskFunction}})],1):e._e()]),e.renderReady?e._e():t("div",{staticClass:"flex flex-col h-min-screen justify-center text-center pageLoader"},[t("img",{staticClass:"mb-8 block mx-auto loadercss mt-3%",attrs:{src:a(9756),alt:"Loader Gif"}}),t("p",{staticClass:"mx-auto mb-10 leading-normal px-4 loadertextcss ext-genpact-darkest-blue"},[e._v("Loading...")])])]):t("div",{staticClass:"container w-full flex flex-wrap mx-auto px-2 pt-8 lg:pt-16 md:pt-16 mt-10"},[e._v("You don't have access")])])},r=[function(){var e=this,t=e._self._c;e._self._setupProxy;return t("div",{staticClass:"w-full flex justify-between"},[t("div",{staticClass:"w-full text-center text-3xl text-background-secondary"},[e._v("Task Management")])])},function(){var e=this,t=e._self._c;e._self._setupProxy;return t("thead",{staticClass:"opacity-90"},[t("tr",{staticClass:"border-b"},[t("th",{staticClass:"text-left py-2 pl-3 pr-0 w-6 text-background-secondary"}),t("th",{staticClass:"text-left p-2 px-3 text-background-secondary"},[e._v("Task Name")]),t("th",{staticClass:"text-left p-2 px-3 text-background-secondary"},[e._v("Is Archive")]),t("th",{staticClass:"text-left p-2 px-3 text-background-secondary"},[e._v("Learner Type")]),t("th",{staticClass:"text-left p-2 px-3 text-background-secondary"},[e._v("Created Date")]),t("th",{staticClass:"text-left p-2 px-3 text-background-secondary"},[e._v("Modified Date")]),t("th",{staticClass:"text-left p-2 px-3 text-background-secondary"},[e._v("Modified By")]),t("th",{staticClass:"text-left p-2 px-3 text-background-secondary"},[e._v("Sequence Number")])])])}],s=(a(7658),a(7203)),n=a(1602),i=a.n(n),o=a(9649),c=a(9948),u=a(8899),d=a(5279),v=a(568),f=a(8709),g=a(8153),p=(0,s.defineComponent)({name:"TaskManagement",components:{Generic:u.Z,SearchBar:g.Z},setup(){const e=(0,s.ref)(),t=(0,s.ref)(!0),a=(0,s.ref)(),l=(0,s.ref)([]),r=(0,s.ref)("Select Program"),n=(0,s.ref)(),u=(0,s.ref)(),g=(0,s.ref)(),p=(0,s.ref)(!0),m=(0,s.ref)(!1),k=(0,s.ref)(!1),y=(0,s.ref)(),h=(0,s.ref)(),_=(0,s.ref)(),w=(0,s.ref)(),b=(0,s.ref)(),x=(0,s.ref)(!1),S=(0,s.ref)(),C=(0,s.ref)(),T=(0,s.ref)(),I=(0,s.ref)(),P=(0,s.ref)("Select Skill"),Z=(0,s.ref)("Select Proficiency"),B=(0,s.ref)(!1),A=(0,s.ref)(!1),M=(0,s.ref)(!1),O=(0,s.ref)(!1),$=(0,s.ref)(!1),N=(0,s.ref)(!1),D=(0,s.ref)(),V=(0,s.ref)(),q=(0,s.ref)(!1),F=(0,s.ref)(),L=(0,s.ref)(!1),R={},j=(0,s.ref)(),U=(0,s.ref)(),Y=(0,s.ref)(!1);let J;const G=()=>{l.value=[]},X=(e,t,a)=>{const l=e.target.checked;!0===l?(u.value=t,n.value=!0,O.value=!0,!0===a?(C.value=!1,x.value=!1,S.value=!0):(C.value=!0,x.value=!0,S.value=!1)):(n.value=!1,x.value=!1,S.value=!1,O.value=!1,$.value=!1)},E=async()=>{t.value=!1,a.value=await(0,o.VA)("/getAllTaskByProgram",R),j.value=a.value.map((e=>e.task_name)),U.value=a.value,console.log("taskDetailsArray",j);for(let e=0;e<a.value.length;e+=1){const t=a.value[e];t.created_date&&(t.created_date=i()(t.created_date).format("MMM Do YYYY, h:mm a"),t.modified_date=i()(t.modified_date).format("MMM Do YYYY, h:mm a"))}a.value=a.value.sort(((e,t)=>e.task_name.localeCompare(t.task_name))),"infinity"===r.value?M.value=!1:M.value=!0,t.value=!0},H=async()=>{"Select Program"!==r.value&&Object.assign(R,{program_id:r.value}),"Select Skill"!==P.value&&Object.assign(R,{skill_id:P.value}),"Select Proficiency"!==Z.value&&Object.assign(R,{proficiency_id:Z.value}),"Select Program"!==r.value&&(n.value=!1,x.value=!1,S.value=!1,n.value=!1,O.value=!1,await E())},z=async e=>{t.value=!1,localStorage.setItem("program",e.target.value),localStorage.removeItem("skill"),localStorage.removeItem("proficiency"),r.value=e.target.value,"Select Program"!==r.value?(k.value=!0,N.value=!0,A.value=!0,"infinity"===r.value?(M.value=!1,P.value="Select Skill",Z.value="Select Proficiency",B.value=!0):(B.value=!1,P.value="",Z.value="",M.value=!0)):(k.value=!1,m.value=!1,A.value=!1,N.value=!1,B.value=!1),t.value=!0},W=async e=>{localStorage.setItem("skill",e.target.value),P.value=e.target.value,"Select Skill"===P.value&&(P.value="")},Q=async e=>{localStorage.setItem("proficiency",e.target.value),Z.value=e.target.value,"Select Proficiency"===Z.value&&(Z.value="")},K=async()=>{t.value=!1,e.value=await(0,o.dr)("/cache?cache=program"),t.value=!0},ee=async()=>{c.Z.push({name:"SolidifyAdministrationTaskDetails",query:{task_id:u.value}})},te=async e=>{try{const t=e.target.files[0],a=t.name,l=a.endsWith(".csv");l?(y.value=a,h.value=t):(_.value="Please Select valid file to upload, only CSV file is allowed",setTimeout((()=>{_.value=null}),6e3),h.value=null,y.value=null)}catch(t){console.log(t)}},ae=async()=>{if(h.value){const e=i()().format("llll");t.value=!1;const l=`${r.value}_${e}.csv`,s=await(0,v.ux)("/v1/pretAuthUrlForUpload",{folder_name:"task_import",key_name:l});console.log("presigned URL",s),b.value=s.data.preSignedUrl;const n=await(0,o.q$)(b.value,h.value);if(200===n.status){const e={task_id:u.value,file_key:`${l}`},s=await(0,o.$M)("/task/importSingleTask",e);console.log(s),t.value=!1,D.value="Task Updated",h.value=null,y.value=null,a.value=await(0,o.VA)("/getAllTaskByProgram",{program_id:r.value}),t.value=!0,setTimeout((()=>{D.value=null,$.value=!1}),6e3)}}else _.value="Please Select valid file to upload, only CSV file is allowed",setTimeout((()=>{_.value=null}),6e3)},le=async()=>{if(h.value){const e=i()().format("llll");t.value=!1;const l=`${r.value}_${e}.csv`,s=await(0,v.ux)("/v1/pretAuthUrlForUpload",{folder_name:"task_import",key_name:l});console.log("presigned URL",s),b.value=s.data.preSignedUrl;const n=await(0,o.q$)(b.value,h.value);if(200===n.status){const e={program_id:r.value,file_key:`${l}`},s=await(0,o.$M)("/task/import",e);console.log(s),t.value=!1,V.value="Task added",h.value=null,y.value=null,a.value=await(0,o.VA)("/getAllTaskByProgram",{program_id:r.value}),t.value=!0,setTimeout((()=>{V.value=null,m.value=!1}),6e3)}}else _.value="Please Select valid file to upload, only CSV file is allowed",setTimeout((()=>{_.value=null}),6e3)},re=async()=>{t.value=!1;const e=await(0,f.QZ)("/getAllSkillProf?skill_type=genome");T.value=e.skill,I.value=e.proficiency,t.value=!0},se=async()=>{const e=r.value;"infinity"!==e&&await(0,o.jz)("/resetActiveTaskOrder ",{program_id:e}),await E()},ne=async()=>{t.value=!1,J={task_id:u.value,archive_type:C.value},q.value=!0,J.archive_type?F.value="Archiving a task also archives linked offcycle tasks. Please confirm if you want to proceed.":F.value="Unarchiving a task also unarchives linked offcycle tasks. Please confirm if you want to proceed.",L.value=!0,t.value=!0},ie=()=>{const t=e.value.find((e=>e.program_id===r.value));console.log(`programDetail ${JSON.stringify(t)}`);const l=a.value.find((e=>e.task_id===u.value));if(console.log(`taskDetail ${JSON.stringify(l)}`),console.log("programId",r.value),console.log("programName",t.program_name),console.log("linkedTaskId",u.value),console.log("taskName",l.task_name),console.log("taskType",l.task_type),localStorage.setItem("programId",r.value),localStorage.setItem("programName",t.program_name),localStorage.setItem("linkedTaskId",u.value),"infinity"===r.value){localStorage.setItem("skillId",P.value);const e=T.value.find((e=>e.skill_id===P.value));console.log(`skillDetail ${JSON.stringify(e)}`),localStorage.setItem("skillName",e.skill_alias);const t=I.value.find((e=>e.prof_id===Z.value));console.log(`profDetail ${JSON.stringify(t)}`),localStorage.setItem("proficiencyId",Z.value),localStorage.setItem("proficiencyName",t.prof_name),console.log("skill",P.value),console.log("skill Name",e.skill_alias),console.log("proficiency",Z.value),console.log("prof Name",t.prof_name)}localStorage.setItem("taskName",l.task_name),localStorage.setItem("taskType",l.task_type),c.Z.push({name:"SolidifyAdministrationCreateOffCycle"})},oe=async()=>{t.value=!1,w.value="The task report is being processed. You should get that over email in next 15 minutes",setTimeout((()=>{w.value=null}),6e3),t.value=!0,await(0,o.gs)(r.value)},ce=()=>{q.value=!1},ue=async()=>{t.value=!1,q.value=!1,await(0,o.HX)("/archieveTask",J),console.log("inside archieveTask"),await se(),x.value=!1,S.value=!1,n.value=!1,l.value=[],t.value=!0},de=e=>{U.value=a.value.filter((t=>e.includes(t.task_name)&&t.is_archive===Y.value)),console.log("filteredTaskDetails",U.value)},ve=e=>{Y.value=e,U.value=e?a.value.filter((e=>!0===e.is_archive)):a.value.filter((e=>!0!==e.is_archive))};return(0,s.onBeforeMount)((async()=>{const e=await(0,d.GF)("/getUserRole");g.value=e.user_roles,g.value.length>0&&(g.value.includes("System Admin")||g.value.includes("System Admin View Access")||g.value.includes("Community Manager")||g.value.includes("Program Admin")?p.value=!0:p.value=!1),localStorage.removeItem("programId"),localStorage.removeItem("programName"),localStorage.removeItem("linkedTaskId"),localStorage.removeItem("skillId"),localStorage.removeItem("skillName"),localStorage.removeItem("proficiencyId"),localStorage.removeItem("proficiencyName"),localStorage.removeItem("taskName"),localStorage.removeItem("taskType"),await K(),await re(),localStorage.getItem("program")&&(r.value=localStorage.getItem("program")||"Select Program",Object.assign(R,{program_id:localStorage.getItem("program")})),localStorage.getItem("skill")&&(P.value=localStorage.getItem("skill")||"Select Skill",Object.assign(R,{skill_id:localStorage.getItem("skill")})),localStorage.getItem("proficiency")&&(Z.value=localStorage.getItem("proficiency")||"Select Proficiency",Object.assign(R,{proficiency_id:localStorage.getItem("proficiency")})),console.log("Local Storage Value",R),"Select Program"!==localStorage.getItem("program")&&(N.value=!0,k.value=!0,await E(),ve(Y.value)),A.value=!0,"infinity"===r.value?(B.value=!0,M.value=!1):B.value=!1})),{renderReady:t,programDetails:e,getSelectedProgram:z,taskDetails:a,taskCheckOne:l,taskcheckedOne:G,checkedTaskId:u,showTaskBtn:X,taskBtn:n,viewTaskDetails:ee,showScreen:p,archieveTask:ne,selectedProgram:r,showTaskImport:m,showTaskImportBtn:k,bulkImportTask:le,selectedFile:te,errorMessage:_,successMessage:w,archiveBtn:x,unArchiveBtn:S,getTaskDetails:E,skills:T,proficiency:I,getSelectedSkill:W,getSelectedProficiency:Q,showSkillProf:B,searchBtn:A,resetTaskOrder:se,showSequencBtn:M,createOffCycle:ie,selectedSkill:P,selectedProficiency:Z,searchTask:H,singleTaskBtn:O,showSingleTaskImport:$,bulkSingleImportTask:ae,exportTask:oe,showExportBtn:N,SinglesuccessMessage:D,BulksuccessMessage:V,modalVisible:q,modalMessage:F,closeModal:ce,modalButtonVisible:L,archieveTaskFunction:ue,taskDetailsArray:j,getFilteredList:de,filteredTaskDetails:U,filterArchivedTasks:ve,showArchivedTasks:Y}}}),m=p,k=a(1001),y=(0,k.Z)(m,l,r,!1,null,"e99bcd34",null),h=y.exports},8709:function(e,t,a){a.d(t,{G7:function(){return r},Nl:function(){return n},QZ:function(){return s},kn:function(){return i}});var l=a(7129);const r=async(e,t)=>{const a=await l.Z.post(e,t);return a},s=async e=>{let t;return await l.Z.get(e).then((e=>(t=e.data,t))),t},n=async(e,t)=>{let a;return await l.Z.get(`${e}/${t}`).then((e=>(a=e.data.allProxyList,a))),a},i=async(e,t)=>{const a=await l.Z.post(e,t);return a}},5279:function(e,t,a){a.d(t,{$d:function(){return r},$i:function(){return x},Ao:function(){return m},DU:function(){return g},EX:function(){return A},F5:function(){return M},FS:function(){return v},GF:function(){return I},Iu:function(){return n},J1:function(){return b},Jf:function(){return h},Kk:function(){return k},N9:function(){return P},P8:function(){return u},VP:function(){return y},Vz:function(){return S},WX:function(){return f},X$:function(){return _},XP:function(){return s},Yb:function(){return T},a4:function(){return Z},dH:function(){return w},gh:function(){return p},nb:function(){return o},oA:function(){return C},r4:function(){return d},sd:function(){return c},wp:function(){return i},xJ:function(){return B}});var l=a(7129);const r=async e=>{let t;return await l.Z.get(e).then((e=>(t=e.data,t))),t},s=async e=>{let t;return await l.Z.get(e).then((e=>(t=e.data,t))),t},n=async e=>{let t;return await l.Z.get(e).then((e=>(t=e.data,t))),t},i=async e=>{let t;return await l.Z.get(e).then((e=>(t=e.data,t))),t},o=async e=>{let t;return await l.Z.get(e).then((e=>(t=e.data,t))),t},c=async e=>{let t;return await l.Z.get(e).then((e=>(t=e.data,t))),t},u=async e=>{let t;return await l.Z.get(e).then((e=>(t=e.data,t))),t},d=async e=>{let t;return await l.Z.get(e).then((e=>(t=e.data,t))),t},v=async e=>{let t;return await l.Z.get(e).then((e=>(t=e.data,t))),t},f=async e=>{let t;return await l.Z.get(e).then((e=>(t=e.data,t))),t},g=async e=>{let t;return await l.Z.get(e).then((e=>(t=e.data,t))),t},p=async e=>{let t;return await l.Z.get(e).then((e=>(t=e.data,t))),t},m=async e=>{let t;return await l.Z.get(e).then((e=>(t=e.data.userObj,t))),t},k=async e=>{let t;return await l.Z.get(e).then((e=>(t=e.data.userObj,t))),t},y=async e=>{let t;return await l.Z.get(e).then((e=>(t=e.data.userObj,t))),t},h=async e=>{let t;return await l.Z.get(e).then((e=>(t=e.data,t))),t},_=async e=>{let t;return await l.Z.get(e).then((e=>(t=e.data,t))),t},w=async e=>{let t;return await l.Z.get(e).then((e=>(t=e.data,t))),t},b=async e=>{const t=await l.Z.get(e);return t},x=async e=>{const t=await l.Z.get(e);return t},S=async e=>{const t=await l.Z.get(e);return t},C=async e=>{let t;return await l.Z.get(e).then((e=>(t=e.data,t))),t},T=async e=>{let t;return await l.Z.get(e).then((e=>(t=e.data,t))),t},I=async e=>{let t;return await l.Z.get(e).then((e=>(t=e.data.userObj,t))),t},P=async e=>{const t=await l.Z.post("/user/role",e);return t},Z=async e=>{const t=await l.Z.post("/user/removeRole",e);return t},B=async()=>{const e=await l.Z.get("role");return e},A=async e=>{const t=await l.Z.post("/user/saveLSS",e);return t},M=async e=>{const t=await l.Z.post("/user/saveEnvAccess",e);return t}},9649:function(e,t,a){a.d(t,{$M:function(){return d},F9:function(){return f},HX:function(){return i},V$:function(){return o},VA:function(){return s},dr:function(){return r},gs:function(){return g},jz:function(){return v},q$:function(){return u},rP:function(){return n},yW:function(){return c}});var l=a(7129);const r=async e=>{let t;return await l.Z.get(e).then((e=>(console.log("Response",e),t=e.data.response.program_name,t))),t},s=async(e,t)=>{let a;return await l.Z.post(e,t).then((e=>(a=e.data.tasks,a))),a},n=async(e,t)=>{let a;return await l.Z.post(e,t).then((e=>(a=e.data.learnerDetails,a))),a},i=async(e,t)=>{let a;return await l.Z.post(e,t).then((e=>(a=e.data.tasks,a))),a},o=async(e,t)=>{let a;return await l.Z.post(e,t).then((e=>(a=e.data,a))),a},c=async e=>{let t;try{return await l.Z.get(`/task/${e}`).then((e=>(t=e.data.data,t))),t}catch(a){return a}},u=async(e,t)=>{try{const a=await fetch(`${e}`,{method:"put",body:t}),l=a;return l}catch(a){return console.error(a),a}},d=async(e,t)=>{let a;return await l.Z.post(e,t).then((e=>(a=e.data.tasks,a))),a},v=async(e,t)=>{let a;return await l.Z.post(e,t).then((e=>(a=e.data.tasks,a))),a},f=async e=>{console.log(`inside save task data ${JSON.stringify(e)}`);const t=await l.Z.post("/task/create",e);return t},g=async e=>{try{let t;return await l.Z.get(`/admin/task/taskExport/${e}`).then((async e=>(t=e.data,t))),t}catch(t){return t}}},568:function(e,t,a){a.d(t,{ie:function(){return i},rC:function(){return o},sc:function(){return s},ux:function(){return r},yW:function(){return n}});var l=a(7129);const r=async(e,t)=>{const a=await l.Z.post(e,t);return a},s=async(e,t)=>{let a;const l=await fetch(`${e}`,{method:"put",body:t});return a=l,a},n=async e=>{const t=await l.Z.get(`/task/${e}`);return t},i=async(e,t)=>{const a=await l.Z.post(e,{learner_task_id:t});return a},o=async(e,t)=>{const a=await l.Z.post(e,t);return a}},9756:function(e,t,a){e.exports=a.p+"img/loadernew.gif"}}]);
1
+ "use strict";(("undefined"!==typeof self?self:this)["webpackChunksolidify"]=("undefined"!==typeof self?self:this)["webpackChunksolidify"]||[]).push([[989],{8899:function(e,t,a){a.d(t,{Z:function(){return d}});var l=function(){var e=this,t=e._self._c;return e.isVisible?t("main",{staticClass:"modal-wrapper relative z-50 modal-filter fixed inset-0 w-full h-screen flex mt-2 justify-center bg-semi-75 h-fit"},[t("transition",{attrs:{name:"modal-fade"}},[t("div",{staticClass:"modal-overlay",on:{click:function(t){return e.$emit("close-modal")}}},[t("div",{staticClass:"modal relative",on:{click:function(e){e.stopPropagation()}}},[e.closeVisible?t("div",{staticClass:"absolute right-0 pr-4 top-5 cursor-pointer",on:{click:function(t){return e.$emit("closeModal")}}},[t("x-icon",{attrs:{size:"1.5x"}})],1):e._e(),t("div",{staticClass:"bg-white"},[t("div",{staticClass:"text-gray-500 px-4",domProps:{innerHTML:e._s(e.message)}}),t("div",{staticClass:"pb-6 pt-4 bg-white"},[e.reReviewButton?t("button",{staticClass:"px-4 py-2 text-white shadow-md bg-background-secondary focus:outline-none focus:ring-2 focus:ring-blue-400 focus:ring-opacity-75",on:{click:function(t){return e.applyReview(e.reReviewButtonLink)}}},[e._v(" Apply Re-Review ")]):e._e(),e.closeVisible?t("button",{staticClass:"px-4 py-2 text-white shadow-md bg-background-secondary focus:outline-none focus:ring-2 focus:ring-blue-400 focus:ring-opacity-75 mr-2",staticStyle:{"background-color":"grey"},on:{click:function(t){return e.$emit("closeModal")}}},[e._v(" Cancel ")]):e._e(),e.archiveButton?t("button",{staticClass:"px-4 py-2 text-white shadow-md bg-background-secondary focus:outline-none focus:ring-2 focus:ring-blue-400 focus:ring-opacity-75",on:{click:function(t){return e.$emit("Archive")}}},[e._v("Confirm")]):e._e(),e.linkButton?t("button",{staticClass:"px-4 py-2 text-white shadow-md bg-background-secondary focus:outline-none focus:ring-2 focus:ring-blue-400 focus:ring-opacity-75",on:{click:function(t){return e.navigate(e.link)}}},[e._v(e._s(e.linkButton))]):e._e()])])])])])],1):e._e()},r=[],s=(a(7658),a(4856)),n=a(4679),i={components:{XIcon:s.b0D},name:"Generic",props:{isVisible:{type:Boolean,default:!1,required:!0},message:{type:String,default:"",required:!0},closeVisible:{type:Boolean,default:!1,required:!1},reReviewButton:{type:Boolean,default:!1,required:!1},archiveButton:{type:Boolean,default:!1,required:!1},reReviewButtonLink:{type:String,default:"",required:!1},link:{type:String,default:"",required:!1},linkButton:{type:String,default:"",required:!1}},setup(){const e=async e=>{n.Z.push({path:"/solidify/rereview",query:{learner_task_id:e}})},t=e=>{window.location.href=e};return{applyReview:e,navigate:t}}},o=i,c=a(1001),u=(0,c.Z)(o,l,r,!1,null,null,null),d=u.exports},8153:function(e,t,a){a.d(t,{Z:function(){return u}});var l=function(){var e=this,t=e._self._c;e._self._setupProxy;return t("div",{staticClass:"w-full flex mt-6"},[t("input",{directives:[{name:"model",rawName:"v-model",value:e.search,expression:"search"}],staticClass:"appearance-none border rounded py-2 px-14 text-gray-500 leading-tight focus:outline-none focus:shadow-outline",attrs:{type:"text",placeholder:e.placeHolder1},domProps:{value:e.search},on:{keyup:function(t){e.filterProgramDetails(),e.$emit("Filtered",e.filteredProgramDetails)},input:function(t){t.target.composing||(e.search=t.target.value)}}})])},r=[],s=a(7203),n=(0,s.defineComponent)({name:"SearchBar",props:{data:[Array],placeholder:{type:String,default:"Search"}},setup(e){const t=(0,s.ref)(""),a=(0,s.ref)(),l=(0,s.ref)(),r=(0,s.ref)(),n=()=>{r.value=e.data,l.value=r.value.filter((e=>e.toLowerCase().includes(t.value.toLowerCase())))};return(0,s.onBeforeMount)((async()=>{a.value=e.placeholder,console.log("props.placeholder",e.placeholder)})),{placeHolder1:a,filteredProgramDetails:l,filterProgramDetails:n,search:t}}}),i=n,o=a(1001),c=(0,o.Z)(i,l,r,!1,null,null,null),u=c.exports},6074:function(e,t,a){a.r(t),a.d(t,{default:function(){return h}});var l=function(){var e=this,t=e._self._c;e._self._setupProxy;return t("div",{staticClass:"admin"},[e.showScreen?t("div",{staticClass:"container w-full flex flex-wrap mx-auto px-2 pt-8 lg:pt-16 md:pt-16 mt-10"},[e._m(0),t("div",{staticClass:"w-full mt-4"},[t("div",{staticClass:"flex w-full mt-6"},[t("div",{staticClass:"w-full pr-3 mb-4"},[t("label",{staticClass:"block tracking-wide -text-blue-800 opacity-80 font-normal mb-2"},[e._v(" Filter Task ")]),t("select",{directives:[{name:"model",rawName:"v-model",value:e.selectedProgram,expression:"selectedProgram"}],staticClass:"appearance-none block w-full text-gray-700 border border-gray-200 rounded py-2 px-4 leading-tight focus:outline-none focus:bg-white focus:border-gray-500",on:{change:[function(t){var a=Array.prototype.filter.call(t.target.options,(function(e){return e.selected})).map((function(e){var t="_value"in e?e._value:e.value;return t}));e.selectedProgram=t.target.multiple?a:a[0]},function(t){return e.getSelectedProgram(t)}]}},[t("option",[e._v("Select Program")]),e._l(e.programDetails,(function(a){return t("option",{key:a.program_id,domProps:{value:a.program_id}},[e._v(e._s(a.program_display_name?a.program_display_name:a.program_name))])}))],2)]),e.showSkillProf?t("div",{staticClass:"w-full pr-3 mb-4"},[t("label",{staticClass:"block tracking-wide -text-blue-800 opacity-80 font-normal mb-2"},[e._v(" Skill ")]),t("select",{directives:[{name:"model",rawName:"v-model",value:e.selectedSkill,expression:"selectedSkill"}],staticClass:"appearance-none block w-full text-gray-700 border border-gray-200 rounded py-2 px-4 leading-tight focus:outline-none focus:bg-white focus:border-gray-500",on:{change:[function(t){var a=Array.prototype.filter.call(t.target.options,(function(e){return e.selected})).map((function(e){var t="_value"in e?e._value:e.value;return t}));e.selectedSkill=t.target.multiple?a:a[0]},function(t){return e.getSelectedSkill(t)}]}},[t("option",[e._v("Select Skill")]),e._l(e.skills,(function(a){return t("option",{key:a.skill_id,domProps:{value:a.skill_id}},[e._v(e._s(a.skill_alias))])}))],2)]):e._e(),e.showSkillProf?t("div",{staticClass:"w-full pr-3 mb-4"},[t("label",{staticClass:"block tracking-wide -text-blue-800 opacity-80 font-normal mb-2"},[e._v(" Proficiency ")]),t("select",{directives:[{name:"model",rawName:"v-model",value:e.selectedProficiency,expression:"selectedProficiency"}],staticClass:"appearance-none block w-full text-gray-700 border border-gray-200 rounded py-2 px-4 leading-tight focus:outline-none focus:bg-white focus:border-gray-500",on:{change:[function(t){var a=Array.prototype.filter.call(t.target.options,(function(e){return e.selected})).map((function(e){var t="_value"in e?e._value:e.value;return t}));e.selectedProficiency=t.target.multiple?a:a[0]},function(t){return e.getSelectedProficiency(t)}]}},[t("option",[e._v("Select Proficiency")]),e._l(e.proficiency,(function(a){return t("option",{key:a.prof_id,domProps:{value:a.prof_id}},[e._v(e._s(a.prof_name))])}))],2)]):e._e(),t("div",{staticClass:"w-full mb-4"},[e.searchBtn?t("button",{staticClass:"mt-8 inline-block py-2 px-4 text-white shadow-md bg-background-secondary",on:{click:function(t){return e.searchTask()}}},[e._v("Search Task")]):e._e()])]),t("div",{staticClass:"flex w-full mt-6"},[t("div",{staticClass:"pr-3 mb-4 w-full"},[e.showTaskImportBtn?t("button",{staticClass:"mt-2 mr-4 inline-block py-2 px-4 text-white shadow-md bg-background-secondary text-right",on:{click:function(t){e.showTaskImport=!0}}},[e._v("Upload Task")]):e._e(),e.showSequencBtn?t("button",{staticClass:"mt-2 mr-4 inline-block py-2 px-4 text-white shadow-md bg-background-secondary text-right",on:{click:e.resetTaskOrder}},[e._v("Reset Task Sequence")]):e._e(),e.showExportBtn?t("button",{staticClass:"mt-2 mr-4 inline-block py-2 px-4 text-white shadow-md bg-background-secondary text-right",on:{click:e.exportTask}},[e._v("Export Task")]):e._e(),e.showArchivedTasks?t("button",{staticClass:"mt-2 mr-4 inline-block py-2 px-4 text-white shadow-md bg-background-secondary text-right",on:{click:function(t){return e.filterArchivedTasks(!1)}}},[e._v("Show Unarchived Tasks")]):e._e(),e.showArchivedTasks?e._e():t("button",{staticClass:"mt-2 inline-block py-2 px-4 text-white shadow-md bg-background-secondary text-right",on:{click:function(t){return e.filterArchivedTasks(!0)}}},[e._v("Show Archived Tasks")])])]),e.showTaskImport?t("div",{staticClass:"border border-background-secondary mt-6 p-8 w-full"},[t("div",{staticClass:"flex"},[t("input",{attrs:{type:"file"},on:{change:e.selectedFile}})]),e.errorMessage?t("div",{staticClass:"text-red-700"},[e._v(e._s(e.errorMessage))]):e._e(),e.BulksuccessMessage?t("div",{staticClass:"text-green-700"},[e._v(e._s(e.BulksuccessMessage))]):e._e(),t("button",{staticClass:"bg-background-secondary inline-block text-white py-2 px-4 mt-4",on:{click:e.bulkImportTask}},[e._v("Import Task")])]):e._e(),t("div",{staticClass:"flex w-full"},[t("div",{staticClass:"w-full pr-3 mb-4"},[t("button",{directives:[{name:"show",rawName:"v-show",value:e.taskBtn,expression:"taskBtn"}],staticClass:"mt-2 mr-2 inline-block py-2 px-4 text-white shadow-md bg-background-secondary",on:{click:function(t){return e.viewTaskDetails()}}},[e._v("View Task")]),t("button",{directives:[{name:"show",rawName:"v-show",value:e.archiveBtn,expression:"archiveBtn"}],staticClass:"mt-2 mr-2 inline-block py-2 px-4 text-white shadow-md bg-background-secondary",on:{click:function(t){return e.archieveTask()}}},[e._v("Archive Task")]),t("button",{directives:[{name:"show",rawName:"v-show",value:e.unArchiveBtn,expression:"unArchiveBtn"}],staticClass:"mt-2 mr-2 inline-block py-2 px-4 text-white shadow-md bg-background-secondary",on:{click:function(t){return e.archieveTask()}}},[e._v("UnArchive Task")]),e.archiveBtn?t("button",{directives:[{name:"show",rawName:"v-show",value:e.taskBtn,expression:"taskBtn"}],staticClass:"mt-2 mr-2 inline-block py-2 px-4 text-white shadow-md bg-background-secondary",on:{click:function(t){return e.createOffCycle()}}},[e._v("Create Off-Cycle")]):e._e()])]),e.showSingleTaskImport?t("div",{staticClass:"border border-background-secondary mt-6 p-8 w-full"},[t("div",{staticClass:"flex"},[t("input",{attrs:{type:"file"},on:{change:e.selectedFile}})]),e.errorMessage?t("div",{staticClass:"text-red-700"},[e._v(e._s(e.errorMessage))]):e._e(),e.SinglesuccessMessage?t("div",{staticClass:"text-green-700"},[e._v(e._s(e.SinglesuccessMessage))]):e._e(),t("button",{staticClass:"bg-background-secondary inline-block text-white py-2 px-4 mt-4",on:{click:e.bulkSingleImportTask}},[e._v("Import Single Task")])]):e._e(),e.successMessage?t("div",{staticClass:"text-green-700"},[e._v(e._s(e.successMessage))]):e._e(),e.taskDetails?t("div",{staticClass:"w-full mb-8 tableScroll"},[t("SearchBar",{attrs:{data:e.taskDetailsArray,placeholder:"Search By Task Name"},on:{Filtered:e.getFilteredList}}),t("table",{staticClass:"w-full text-md bg-white shadow rounded mb-4 tableScroll"},[e._m(1),t("tbody",{staticClass:"opacity-80 align-bottom"},e._l(e.filteredTaskDetails,(function(a){return t("tr",{key:a.task_id,staticClass:"border-b hover:bg-gray-300"},[t("td",{staticClass:"py-2 pl-3 pr-0 text-sm w-6"},[t("input",{directives:[{name:"model",rawName:"v-model",value:e.taskCheckOne,expression:"taskCheckOne"}],attrs:{type:"checkbox",id:a.task_id},domProps:{value:a.task_id,checked:Array.isArray(e.taskCheckOne)?e._i(e.taskCheckOne,a.task_id)>-1:e.taskCheckOne},on:{change:[function(t){var l=e.taskCheckOne,r=t.target,s=!!r.checked;if(Array.isArray(l)){var n=a.task_id,i=e._i(l,n);r.checked?i<0&&(e.taskCheckOne=l.concat([n])):i>-1&&(e.taskCheckOne=l.slice(0,i).concat(l.slice(i+1)))}else e.taskCheckOne=s},function(t){return e.showTaskBtn(t,a.task_id,a.is_archive)}],click:e.taskcheckedOne}})]),t("td",{staticClass:"p-2 px-3",attrs:{title:a.task_name}},[e._v(e._s(a.task_name))]),t("td",{staticClass:"p-2 px-3",attrs:{title:a.is_archive}},[e._v(e._s(a.is_archive))]),t("td",{staticClass:"p-2 px-3",attrs:{title:a.task_type}},[e._v(e._s(a.task_type))]),t("td",{staticClass:"p-2 px-3",attrs:{title:a.modified_date}},[e._v(e._s(a.created_date))]),t("td",{staticClass:"p-2 px-3",attrs:{title:a.modified_date}},[e._v(e._s(a.modified_date))]),t("td",{staticClass:"p-2 px-3",attrs:{title:a.modified_by}},[e._v(e._s(a.modified_by))]),t("td",{staticClass:"p-2 px-3",attrs:{title:a.task_order}},[e._v(e._s(a.task_order))])])})),0)]),t("Generic",{attrs:{"is-visible":e.modalVisible,message:e.modalMessage,"close-visible":!0,"archive-button":e.modalButtonVisible},on:{closeModal:e.closeModal,Archive:e.archieveTaskFunction}})],1):e._e()]),e.renderReady?e._e():t("div",{staticClass:"flex flex-col h-min-screen justify-center text-center pageLoader"},[t("img",{staticClass:"mb-8 block mx-auto loadercss mt-3%",attrs:{src:a(9756),alt:"Loader Gif"}}),t("p",{staticClass:"mx-auto mb-10 leading-normal px-4 loadertextcss ext-genpact-darkest-blue"},[e._v("Loading...")])])]):t("div",{staticClass:"container w-full flex flex-wrap mx-auto px-2 pt-8 lg:pt-16 md:pt-16 mt-10"},[e._v("You don't have access")])])},r=[function(){var e=this,t=e._self._c;e._self._setupProxy;return t("div",{staticClass:"w-full flex justify-between"},[t("div",{staticClass:"w-full text-center text-3xl text-background-secondary"},[e._v("Task Management")])])},function(){var e=this,t=e._self._c;e._self._setupProxy;return t("thead",{staticClass:"opacity-90"},[t("tr",{staticClass:"border-b"},[t("th",{staticClass:"text-left py-2 pl-3 pr-0 w-6 text-background-secondary"}),t("th",{staticClass:"text-left p-2 px-3 text-background-secondary"},[e._v("Task Name")]),t("th",{staticClass:"text-left p-2 px-3 text-background-secondary"},[e._v("Is Archive")]),t("th",{staticClass:"text-left p-2 px-3 text-background-secondary"},[e._v("Learner Type")]),t("th",{staticClass:"text-left p-2 px-3 text-background-secondary"},[e._v("Created Date")]),t("th",{staticClass:"text-left p-2 px-3 text-background-secondary"},[e._v("Modified Date")]),t("th",{staticClass:"text-left p-2 px-3 text-background-secondary"},[e._v("Modified By")]),t("th",{staticClass:"text-left p-2 px-3 text-background-secondary"},[e._v("Sequence Number")])])])}],s=(a(7658),a(7203)),n=a(1602),i=a.n(n),o=a(9649),c=a(4679),u=a(8899),d=a(5279),v=a(568),f=a(8709),g=a(8153),p=(0,s.defineComponent)({name:"TaskManagement",components:{Generic:u.Z,SearchBar:g.Z},setup(){const e=(0,s.ref)(),t=(0,s.ref)(!0),a=(0,s.ref)(),l=(0,s.ref)([]),r=(0,s.ref)("Select Program"),n=(0,s.ref)(),u=(0,s.ref)(),g=(0,s.ref)(),p=(0,s.ref)(!0),m=(0,s.ref)(!1),k=(0,s.ref)(!1),y=(0,s.ref)(),h=(0,s.ref)(),_=(0,s.ref)(),w=(0,s.ref)(),b=(0,s.ref)(),x=(0,s.ref)(!1),S=(0,s.ref)(),C=(0,s.ref)(),T=(0,s.ref)(),I=(0,s.ref)(),P=(0,s.ref)("Select Skill"),Z=(0,s.ref)("Select Proficiency"),B=(0,s.ref)(!1),A=(0,s.ref)(!1),M=(0,s.ref)(!1),O=(0,s.ref)(!1),$=(0,s.ref)(!1),N=(0,s.ref)(!1),D=(0,s.ref)(),V=(0,s.ref)(),q=(0,s.ref)(!1),F=(0,s.ref)(),L=(0,s.ref)(!1),R={},j=(0,s.ref)(),U=(0,s.ref)(),Y=(0,s.ref)(!1);let J;const G=()=>{l.value=[]},X=(e,t,a)=>{const l=e.target.checked;!0===l?(u.value=t,n.value=!0,O.value=!0,!0===a?(C.value=!1,x.value=!1,S.value=!0):(C.value=!0,x.value=!0,S.value=!1)):(n.value=!1,x.value=!1,S.value=!1,O.value=!1,$.value=!1)},E=async()=>{t.value=!1,a.value=await(0,o.VA)("/getAllTaskByProgram",R),j.value=a.value.map((e=>e.task_name)),U.value=a.value,console.log("taskDetailsArray",j);for(let e=0;e<a.value.length;e+=1){const t=a.value[e];t.created_date&&(t.created_date=i()(t.created_date).format("MMM Do YYYY, h:mm a"),t.modified_date=i()(t.modified_date).format("MMM Do YYYY, h:mm a"))}a.value=a.value.sort(((e,t)=>e.task_name.localeCompare(t.task_name))),"infinity"===r.value?M.value=!1:M.value=!0,t.value=!0},H=async()=>{"Select Program"!==r.value&&Object.assign(R,{program_id:r.value}),"Select Skill"!==P.value&&Object.assign(R,{skill_id:P.value}),"Select Proficiency"!==Z.value&&Object.assign(R,{proficiency_id:Z.value}),"Select Program"!==r.value&&(n.value=!1,x.value=!1,S.value=!1,n.value=!1,O.value=!1,await E())},z=async e=>{t.value=!1,localStorage.setItem("program",e.target.value),localStorage.removeItem("skill"),localStorage.removeItem("proficiency"),r.value=e.target.value,"Select Program"!==r.value?(k.value=!0,N.value=!0,A.value=!0,"infinity"===r.value?(M.value=!1,P.value="Select Skill",Z.value="Select Proficiency",B.value=!0):(B.value=!1,P.value="",Z.value="",M.value=!0)):(k.value=!1,m.value=!1,A.value=!1,N.value=!1,B.value=!1),t.value=!0},W=async e=>{localStorage.setItem("skill",e.target.value),P.value=e.target.value,"Select Skill"===P.value&&(P.value="")},Q=async e=>{localStorage.setItem("proficiency",e.target.value),Z.value=e.target.value,"Select Proficiency"===Z.value&&(Z.value="")},K=async()=>{t.value=!1,e.value=await(0,o.dr)("/cache?cache=program"),t.value=!0},ee=async()=>{c.Z.push({name:"SolidifyAdministrationTaskDetails",query:{task_id:u.value}})},te=async e=>{try{const t=e.target.files[0],a=t.name,l=a.endsWith(".csv");l?(y.value=a,h.value=t):(_.value="Please Select valid file to upload, only CSV file is allowed",setTimeout((()=>{_.value=null}),6e3),h.value=null,y.value=null)}catch(t){console.log(t)}},ae=async()=>{if(h.value){const e=i()().format("llll");t.value=!1;const l=`${r.value}_${e}.csv`,s=await(0,v.ux)("/v1/pretAuthUrlForUpload",{folder_name:"task_import",key_name:l});console.log("presigned URL",s),b.value=s.data.preSignedUrl;const n=await(0,o.q$)(b.value,h.value);if(200===n.status){const e={task_id:u.value,file_key:`${l}`},s=await(0,o.$M)("/task/importSingleTask",e);console.log(s),t.value=!1,D.value="Task Updated",h.value=null,y.value=null,a.value=await(0,o.VA)("/getAllTaskByProgram",{program_id:r.value}),t.value=!0,setTimeout((()=>{D.value=null,$.value=!1}),6e3)}}else _.value="Please Select valid file to upload, only CSV file is allowed",setTimeout((()=>{_.value=null}),6e3)},le=async()=>{if(h.value){const e=i()().format("llll");t.value=!1;const l=`${r.value}_${e}.csv`,s=await(0,v.ux)("/v1/pretAuthUrlForUpload",{folder_name:"task_import",key_name:l});console.log("presigned URL",s),b.value=s.data.preSignedUrl;const n=await(0,o.q$)(b.value,h.value);if(200===n.status){const e={program_id:r.value,file_key:`${l}`},s=await(0,o.$M)("/task/import",e);console.log(s),t.value=!1,V.value="Task added",h.value=null,y.value=null,a.value=await(0,o.VA)("/getAllTaskByProgram",{program_id:r.value}),t.value=!0,setTimeout((()=>{V.value=null,m.value=!1}),6e3)}}else _.value="Please Select valid file to upload, only CSV file is allowed",setTimeout((()=>{_.value=null}),6e3)},re=async()=>{t.value=!1;const e=await(0,f.QZ)("/getAllSkillProf?skill_type=genome");T.value=e.skill,I.value=e.proficiency,t.value=!0},se=async()=>{const e=r.value;"infinity"!==e&&await(0,o.jz)("/resetActiveTaskOrder ",{program_id:e}),await E()},ne=async()=>{t.value=!1,J={task_id:u.value,archive_type:C.value},q.value=!0,J.archive_type?F.value="Archiving a task also archives linked offcycle tasks. Please confirm if you want to proceed.":F.value="Unarchiving a task also unarchives linked offcycle tasks. Please confirm if you want to proceed.",L.value=!0,t.value=!0},ie=()=>{const t=e.value.find((e=>e.program_id===r.value));console.log(`programDetail ${JSON.stringify(t)}`);const l=a.value.find((e=>e.task_id===u.value));if(console.log(`taskDetail ${JSON.stringify(l)}`),console.log("programId",r.value),console.log("programName",t.program_name),console.log("linkedTaskId",u.value),console.log("taskName",l.task_name),console.log("taskType",l.task_type),localStorage.setItem("programId",r.value),localStorage.setItem("programName",t.program_name),localStorage.setItem("linkedTaskId",u.value),"infinity"===r.value){localStorage.setItem("skillId",P.value);const e=T.value.find((e=>e.skill_id===P.value));console.log(`skillDetail ${JSON.stringify(e)}`),localStorage.setItem("skillName",e.skill_alias);const t=I.value.find((e=>e.prof_id===Z.value));console.log(`profDetail ${JSON.stringify(t)}`),localStorage.setItem("proficiencyId",Z.value),localStorage.setItem("proficiencyName",t.prof_name),console.log("skill",P.value),console.log("skill Name",e.skill_alias),console.log("proficiency",Z.value),console.log("prof Name",t.prof_name)}localStorage.setItem("taskName",l.task_name),localStorage.setItem("taskType",l.task_type),c.Z.push({name:"SolidifyAdministrationCreateOffCycle"})},oe=async()=>{t.value=!1,w.value="The task report is being processed. You should get that over email in next 15 minutes",setTimeout((()=>{w.value=null}),6e3),t.value=!0,await(0,o.gs)(r.value)},ce=()=>{q.value=!1},ue=async()=>{t.value=!1,q.value=!1,await(0,o.HX)("/archieveTask",J),console.log("inside archieveTask"),await se(),x.value=!1,S.value=!1,n.value=!1,l.value=[],t.value=!0},de=e=>{U.value=a.value.filter((t=>e.includes(t.task_name)&&t.is_archive===Y.value)),console.log("filteredTaskDetails",U.value)},ve=e=>{Y.value=e,U.value=e?a.value.filter((e=>!0===e.is_archive)):a.value.filter((e=>!0!==e.is_archive))};return(0,s.onBeforeMount)((async()=>{const e=await(0,d.GF)("/getUserRole");g.value=e.user_roles,g.value.length>0&&(g.value.includes("System Admin")||g.value.includes("System Admin View Access")||g.value.includes("Community Manager")||g.value.includes("Program Admin")?p.value=!0:p.value=!1),localStorage.removeItem("programId"),localStorage.removeItem("programName"),localStorage.removeItem("linkedTaskId"),localStorage.removeItem("skillId"),localStorage.removeItem("skillName"),localStorage.removeItem("proficiencyId"),localStorage.removeItem("proficiencyName"),localStorage.removeItem("taskName"),localStorage.removeItem("taskType"),await K(),await re(),localStorage.getItem("program")&&(r.value=localStorage.getItem("program")||"Select Program",Object.assign(R,{program_id:localStorage.getItem("program")})),localStorage.getItem("skill")&&(P.value=localStorage.getItem("skill")||"Select Skill",Object.assign(R,{skill_id:localStorage.getItem("skill")})),localStorage.getItem("proficiency")&&(Z.value=localStorage.getItem("proficiency")||"Select Proficiency",Object.assign(R,{proficiency_id:localStorage.getItem("proficiency")})),console.log("Local Storage Value",R),"Select Program"!==localStorage.getItem("program")&&(N.value=!0,k.value=!0,await E(),ve(Y.value)),A.value=!0,"infinity"===r.value?(B.value=!0,M.value=!1):B.value=!1})),{renderReady:t,programDetails:e,getSelectedProgram:z,taskDetails:a,taskCheckOne:l,taskcheckedOne:G,checkedTaskId:u,showTaskBtn:X,taskBtn:n,viewTaskDetails:ee,showScreen:p,archieveTask:ne,selectedProgram:r,showTaskImport:m,showTaskImportBtn:k,bulkImportTask:le,selectedFile:te,errorMessage:_,successMessage:w,archiveBtn:x,unArchiveBtn:S,getTaskDetails:E,skills:T,proficiency:I,getSelectedSkill:W,getSelectedProficiency:Q,showSkillProf:B,searchBtn:A,resetTaskOrder:se,showSequencBtn:M,createOffCycle:ie,selectedSkill:P,selectedProficiency:Z,searchTask:H,singleTaskBtn:O,showSingleTaskImport:$,bulkSingleImportTask:ae,exportTask:oe,showExportBtn:N,SinglesuccessMessage:D,BulksuccessMessage:V,modalVisible:q,modalMessage:F,closeModal:ce,modalButtonVisible:L,archieveTaskFunction:ue,taskDetailsArray:j,getFilteredList:de,filteredTaskDetails:U,filterArchivedTasks:ve,showArchivedTasks:Y}}}),m=p,k=a(1001),y=(0,k.Z)(m,l,r,!1,null,"e99bcd34",null),h=y.exports},8709:function(e,t,a){a.d(t,{G7:function(){return r},Nl:function(){return n},QZ:function(){return s},kn:function(){return i}});var l=a(7129);const r=async(e,t)=>{const a=await l.Z.post(e,t);return a},s=async e=>{let t;return await l.Z.get(e).then((e=>(t=e.data,t))),t},n=async(e,t)=>{let a;return await l.Z.get(`${e}/${t}`).then((e=>(a=e.data.allProxyList,a))),a},i=async(e,t)=>{const a=await l.Z.post(e,t);return a}},5279:function(e,t,a){a.d(t,{$d:function(){return r},$i:function(){return x},Ao:function(){return m},DU:function(){return g},EX:function(){return A},F5:function(){return M},FS:function(){return v},GF:function(){return I},Iu:function(){return n},J1:function(){return b},Jf:function(){return h},Kk:function(){return k},N9:function(){return P},P8:function(){return u},VP:function(){return y},Vz:function(){return S},WX:function(){return f},X$:function(){return _},XP:function(){return s},Yb:function(){return T},a4:function(){return Z},dH:function(){return w},gh:function(){return p},nb:function(){return o},oA:function(){return C},r4:function(){return d},sd:function(){return c},wp:function(){return i},xJ:function(){return B}});var l=a(7129);const r=async e=>{let t;return await l.Z.get(e).then((e=>(t=e.data,t))),t},s=async e=>{let t;return await l.Z.get(e).then((e=>(t=e.data,t))),t},n=async e=>{let t;return await l.Z.get(e).then((e=>(t=e.data,t))),t},i=async e=>{let t;return await l.Z.get(e).then((e=>(t=e.data,t))),t},o=async e=>{let t;return await l.Z.get(e).then((e=>(t=e.data,t))),t},c=async e=>{let t;return await l.Z.get(e).then((e=>(t=e.data,t))),t},u=async e=>{let t;return await l.Z.get(e).then((e=>(t=e.data,t))),t},d=async e=>{let t;return await l.Z.get(e).then((e=>(t=e.data,t))),t},v=async e=>{let t;return await l.Z.get(e).then((e=>(t=e.data,t))),t},f=async e=>{let t;return await l.Z.get(e).then((e=>(t=e.data,t))),t},g=async e=>{let t;return await l.Z.get(e).then((e=>(t=e.data,t))),t},p=async e=>{let t;return await l.Z.get(e).then((e=>(t=e.data,t))),t},m=async e=>{let t;return await l.Z.get(e).then((e=>(t=e.data.userObj,t))),t},k=async e=>{let t;return await l.Z.get(e).then((e=>(t=e.data.userObj,t))),t},y=async e=>{let t;return await l.Z.get(e).then((e=>(t=e.data.userObj,t))),t},h=async e=>{let t;return await l.Z.get(e).then((e=>(t=e.data,t))),t},_=async e=>{let t;return await l.Z.get(e).then((e=>(t=e.data,t))),t},w=async e=>{let t;return await l.Z.get(e).then((e=>(t=e.data,t))),t},b=async e=>{const t=await l.Z.get(e);return t},x=async e=>{const t=await l.Z.get(e);return t},S=async e=>{const t=await l.Z.get(e);return t},C=async e=>{let t;return await l.Z.get(e).then((e=>(t=e.data,t))),t},T=async e=>{let t;return await l.Z.get(e).then((e=>(t=e.data,t))),t},I=async e=>{let t;return await l.Z.get(e).then((e=>(t=e.data.userObj,t))),t},P=async e=>{const t=await l.Z.post("/user/role",e);return t},Z=async e=>{const t=await l.Z.post("/user/removeRole",e);return t},B=async()=>{const e=await l.Z.get("role");return e},A=async e=>{const t=await l.Z.post("/user/saveLSS",e);return t},M=async e=>{const t=await l.Z.post("/user/saveEnvAccess",e);return t}},9649:function(e,t,a){a.d(t,{$M:function(){return d},F9:function(){return f},HX:function(){return i},V$:function(){return o},VA:function(){return s},dr:function(){return r},gs:function(){return g},jz:function(){return v},q$:function(){return u},rP:function(){return n},yW:function(){return c}});var l=a(7129);const r=async e=>{let t;return await l.Z.get(e).then((e=>(console.log("Response",e),t=e.data.response.program_name,t))),t},s=async(e,t)=>{let a;return await l.Z.post(e,t).then((e=>(a=e.data.tasks,a))),a},n=async(e,t)=>{let a;return await l.Z.post(e,t).then((e=>(a=e.data.learnerDetails,a))),a},i=async(e,t)=>{let a;return await l.Z.post(e,t).then((e=>(a=e.data.tasks,a))),a},o=async(e,t)=>{let a;return await l.Z.post(e,t).then((e=>(a=e.data,a))),a},c=async e=>{let t;try{return await l.Z.get(`/task/${e}`).then((e=>(t=e.data.data,t))),t}catch(a){return a}},u=async(e,t)=>{try{const a=await fetch(`${e}`,{method:"put",body:t}),l=a;return l}catch(a){return console.error(a),a}},d=async(e,t)=>{let a;return await l.Z.post(e,t).then((e=>(a=e.data.tasks,a))),a},v=async(e,t)=>{let a;return await l.Z.post(e,t).then((e=>(a=e.data.tasks,a))),a},f=async e=>{console.log(`inside save task data ${JSON.stringify(e)}`);const t=await l.Z.post("/task/create",e);return t},g=async e=>{try{let t;return await l.Z.get(`/admin/task/taskExport/${e}`).then((async e=>(t=e.data,t))),t}catch(t){return t}}},568:function(e,t,a){a.d(t,{ie:function(){return i},rC:function(){return o},sc:function(){return s},ux:function(){return r},yW:function(){return n}});var l=a(7129);const r=async(e,t)=>{const a=await l.Z.post(e,t);return a},s=async(e,t)=>{let a;const l=await fetch(`${e}`,{method:"put",body:t});return a=l,a},n=async e=>{const t=await l.Z.get(`/task/${e}`);return t},i=async(e,t)=>{const a=await l.Z.post(e,{learner_task_id:t});return a},o=async(e,t)=>{const a=await l.Z.post(e,t);return a}}}]);
2
2
  //# sourceMappingURL=solidify.umd.min.SolidifyAdministrationTaskManagement.js.map
@@ -1,2 +1,2 @@
1
- "use strict";(("undefined"!==typeof self?self:this)["webpackChunksolidify"]=("undefined"!==typeof self?self:this)["webpackChunksolidify"]||[]).push([[412],{8153:function(e,t,a){a.d(t,{Z:function(){return u}});var r=function(){var e=this,t=e._self._c;e._self._setupProxy;return t("div",{staticClass:"w-full flex mt-6"},[t("input",{directives:[{name:"model",rawName:"v-model",value:e.search,expression:"search"}],staticClass:"appearance-none border rounded py-2 px-14 text-gray-500 leading-tight focus:outline-none focus:shadow-outline",attrs:{type:"text",placeholder:e.placeHolder1},domProps:{value:e.search},on:{keyup:function(t){e.filterProgramDetails(),e.$emit("Filtered",e.filteredProgramDetails)},input:function(t){t.target.composing||(e.search=t.target.value)}}})])},s=[],l=a(7203),n=(0,l.defineComponent)({name:"SearchBar",props:{data:[Array],placeholder:{type:String,default:"Search"}},setup(e){const t=(0,l.ref)(""),a=(0,l.ref)(),r=(0,l.ref)(),s=(0,l.ref)(),n=()=>{s.value=e.data,r.value=s.value.filter((e=>e.toLowerCase().includes(t.value.toLowerCase())))};return(0,l.onBeforeMount)((async()=>{a.value=e.placeholder,console.log("props.placeholder",e.placeholder)})),{placeHolder1:a,filteredProgramDetails:r,filterProgramDetails:n,search:t}}}),o=n,i=a(1001),c=(0,i.Z)(o,r,s,!1,null,null,null),u=c.exports},408:function(e,t,a){a.r(t),a.d(t,{default:function(){return k}});var r=function(){var e=this,t=e._self._c;e._self._setupProxy;return t("div",{staticClass:"admin"},[e.showScreen?t("div",{staticClass:"container w-full flex flex-wrap mx-auto px-2 pt-8 lg:pt-16 md:pt-16 mt-10"},[e._m(0),t("div",{staticClass:"flex w-full mt-6 justify-end items-center gap-2"},[t("div",{staticClass:"w-1/5"},[t("input",{directives:[{name:"model",rawName:"v-model",value:e.rangeStart,expression:"rangeStart"}],staticClass:"appearance-none block w-full text-gray-700 border border-gray-200 rounded py-2 px-4 leading-tight focus:outline-none focus:bg-white focus:border-gray-500",attrs:{type:"date"},domProps:{value:e.rangeStart},on:{input:function(t){t.target.composing||(e.rangeStart=t.target.value)}}})]),t("div",{staticClass:"w-1/5"},[t("input",{directives:[{name:"model",rawName:"v-model",value:e.rangeEnd,expression:"rangeEnd"}],staticClass:"appearance-none block w-full text-gray-700 border border-gray-200 rounded py-2 px-4 leading-tight focus:outline-none focus:bg-white focus:border-gray-500",attrs:{type:"date"},domProps:{value:e.rangeEnd},on:{input:function(t){t.target.composing||(e.rangeEnd=t.target.value)}}})]),t("div",{staticClass:"pr-3"},[t("button",{staticClass:"inline-block py-2 px-4 text-white shadow-md bg-background-secondary text-right",on:{click:function(t){return e.triggerProxyReport()}}},[e._v("Export All Proxy Report")])])]),t("div",{staticClass:"w-full mt-4"},[t("div",{staticClass:"max-w-6xl m-auto shadow text-background-secondary p-4"},[t("div",{staticClass:"flex w-full mt-6"},[t("div",{staticClass:"w-full pr-3 mb-4"},[t("label",{staticClass:"block tracking-wide -text-blue-800 opacity-80 font-normal mb-2"},[e._v(" Filter Task ")]),t("select",{directives:[{name:"model",rawName:"v-model",value:e.selectedProgram,expression:"selectedProgram"}],staticClass:"appearance-none block w-full text-gray-700 border border-gray-200 rounded py-2 px-4 leading-tight focus:outline-none focus:bg-white focus:border-gray-500",on:{change:[function(t){var a=Array.prototype.filter.call(t.target.options,(function(e){return e.selected})).map((function(e){var t="_value"in e?e._value:e.value;return t}));e.selectedProgram=t.target.multiple?a:a[0]},function(t){return e.getSelectedProgram(t)}]}},[t("option",[e._v("Select Program")]),e._l(e.programDetails,(function(a){return t("option",{key:a.program_id,domProps:{value:a.program_id}},[e._v(e._s(a.program_display_name?a.program_display_name:a.program_name))])}))],2)]),e.showSkillProf?t("div",{staticClass:"w-full pr-3 mb-4"},[t("label",{staticClass:"block tracking-wide -text-blue-800 opacity-80 font-normal mb-2"},[e._v(" Skill ")]),t("select",{directives:[{name:"model",rawName:"v-model",value:e.selectedSkill,expression:"selectedSkill"}],staticClass:"appearance-none block w-full text-gray-700 border border-gray-200 rounded py-2 px-4 leading-tight focus:outline-none focus:bg-white focus:border-gray-500",on:{change:[function(t){var a=Array.prototype.filter.call(t.target.options,(function(e){return e.selected})).map((function(e){var t="_value"in e?e._value:e.value;return t}));e.selectedSkill=t.target.multiple?a:a[0]},function(t){return e.getSelectedSkill(t)}]}},[t("option",[e._v("Select Skill")]),e._l(e.skills,(function(a){return t("option",{key:a.skill_id,domProps:{value:a.skill_id}},[e._v(e._s(a.skill_alias))])}))],2)]):e._e(),e.showSkillProf?t("div",{staticClass:"w-full pr-3 mb-4"},[t("label",{staticClass:"block tracking-wide -text-blue-800 opacity-80 font-normal mb-2"},[e._v(" Proficiency ")]),t("select",{directives:[{name:"model",rawName:"v-model",value:e.selectedProficiency,expression:"selectedProficiency"}],staticClass:"appearance-none block w-full text-gray-700 border border-gray-200 rounded py-2 px-4 leading-tight focus:outline-none focus:bg-white focus:border-gray-500",on:{change:[function(t){var a=Array.prototype.filter.call(t.target.options,(function(e){return e.selected})).map((function(e){var t="_value"in e?e._value:e.value;return t}));e.selectedProficiency=t.target.multiple?a:a[0]},function(t){return e.getSelectedProficiency(t)}]}},[t("option",[e._v("Select Proficiency")]),e._l(e.proficiency,(function(a){return t("option",{key:a.prof_id,domProps:{value:a.prof_id}},[e._v(e._s(a.prof_name))])}))],2)]):e._e(),t("div",{staticClass:"w-1/2 pr-3 mb-4"},[t("label",{staticClass:"block tracking-wide -text-blue-800 opacity-80 font-normal mb-2"},[e._v(" Ageing ")]),t("select",{directives:[{name:"model",rawName:"v-model",value:e.selectedAgeing,expression:"selectedAgeing"}],staticClass:"appearance-none block w-full text-gray-700 border border-gray-200 rounded py-2 px-3 leading-tight focus:outline-none focus:bg-white focus:border-gray-500",on:{change:[function(t){var a=Array.prototype.filter.call(t.target.options,(function(e){return e.selected})).map((function(e){var t="_value"in e?e._value:e.value;return t}));e.selectedAgeing=t.target.multiple?a:a[0]},function(t){return e.performAgeingFilter(t)}]}},[t("option",[e._v("Select Ageing")]),e._l(e.ageingValues,(function(a){return t("option",{key:a,domProps:{value:a}},[e._v(e._s(a))])}))],2)]),t("div",{staticClass:"w-full mb-4"},[t("button",{staticClass:"mt-8 inline-block py-2 px-4 text-white shadow-md",class:e.showSearchBtn?"bg-background-secondary":"bg-gray-500 cursor-not-allowed",attrs:{disabled:!e.showSearchBtn},on:{click:function(t){return e.getLearnerForProxy()}}},[e._v(" Search Learners ")])])]),e.showSuccessMessage?t("div",{staticClass:"w-full px-3 text-center mt-4 bg-green-600 py-2 text-white"},[e._v(" "+e._s(e.resMessage)+" ")]):e._e(),e.showErrorMessage?t("div",{staticClass:"w-full px-3 text-center mt-4 bg-red-400 py-2 text-white"},[e._v(" "+e._s(e.resMessage)+" ")]):e._e(),e.proxyButtonVisible?t("div",{staticClass:"flex w-full mt-6"},[t("div",{staticClass:"w-1/2 pr-3 mb-4"},[t("button",{staticClass:"mt-2 inline-block py-2 px-4 text-white shadow-md bg-background-secondary mr-2",on:{click:function(t){return e.showProxy()}}},[e._v("View available Proxy")]),e.nudgeButtonVisible?t("button",{staticClass:"mt-2 inline-block py-2 px-4 text-white shadow-md bg-background-secondary",on:{click:function(t){return e.sendNudge()}}},[e._v("Send Proxy Nudge")]):e._e()])]):e._e(),e.reportSuccessMessage?t("div",{staticClass:"text-green-700"},[e._v(e._s(e.reportSuccessMessage))]):e._e(),e.learnerData?t("div",{staticClass:"flex w-full"},[t("div",{staticClass:"w-full mt-4 tableScroll"},[t("table",{staticClass:"w-full text-md bg-white rounded"},[t("thead",{staticClass:"opacity-90 -text-blue-800"},[t("tr",{staticClass:"border-b"},[t("th",{staticClass:"text-left py-2 pl-3 pr-0 w-6 text-background-secondary"}),t("th",{staticClass:"text-left p-2 px-3 text-background-secondary"},[e._v("Learner ID")]),t("th",{staticClass:"text-left p-2 px-3 text-background-secondary"},[e._v("Proxy OHR")]),"infinity"===e.selectedProgram?t("th",{staticClass:"text-left p-2 px-3 text-background-secondary"},[e._v("Skill")]):e._e(),"infinity"===e.selectedProgram?t("th",{staticClass:"text-left p-2 px-3 text-background-secondary"},[e._v("Proficiency")]):e._e(),t("th",{staticClass:"text-left p-2 px-3 text-background-secondary"},[e._v("Proxy Requested Date")]),t("th",{staticClass:"text-left p-2 px-3 text-background-secondary"},[e._v("Proxy Assignment Date")]),t("th",{staticClass:"text-left p-2 px-3 text-background-secondary"},[e._v("Re-review")]),t("th",{staticClass:"text-left p-2 px-3 text-background-secondary"},[e._v("Ageing")])])]),t("tbody",{staticClass:"opacity-80 -text-blue-800 align-bottom"},e._l(e.filteredLearnerData,(function(a){return t("tr",{key:a.id,staticClass:"border-b hover:bg-gray-300"},[t("td",{staticClass:"py-2 pl-3 pr-0 text-sm w-6"},[t("input",{directives:[{name:"model",rawName:"v-model",value:e.selectedTaskId,expression:"selectedTaskId"}],attrs:{type:"checkbox",disabled:e.selectedTaskId.length>4,id:a.learner_task_id},domProps:{value:a.learner_task_id,checked:Array.isArray(e.selectedTaskId)?e._i(e.selectedTaskId,a.learner_task_id)>-1:e.selectedTaskId},on:{change:[function(t){var r=e.selectedTaskId,s=t.target,l=!!s.checked;if(Array.isArray(r)){var n=a.learner_task_id,o=e._i(r,n);s.checked?o<0&&(e.selectedTaskId=r.concat([n])):o>-1&&(e.selectedTaskId=r.slice(0,o).concat(r.slice(o+1)))}else e.selectedTaskId=l},function(t){return e.setProxyBtn(t)}]}})]),t("td",{staticClass:"p-2 px-3"},[e._v(e._s(a.learner_task_id))]),t("td",{staticClass:"p-2 px-3"},[e._v(e._s(a.proxy_key))]),"infinity"===e.selectedProgram?t("td",{staticClass:"p-2 px-3"},[e._v(e._s(a.skillName))]):e._e(),"infinity"===e.selectedProgram?t("td",{staticClass:"p-2 px-3"},[e._v(e._s(a.proficiencyName))]):e._e(),t("td",{staticClass:"p-2 px-3"},[e._v(e._s(a.proxy_requested_date))]),t("td",{staticClass:"p-2 px-3"},[e._v(e._s(a.assignment_date))]),t("td",{staticClass:"p-2 px-3"},[e._v(e._s(a.isRereview))]),t("td",{staticClass:"p-2 px-3"},[e._v(e._s(a.ageing))])])})),0)])])]):e._e(),e.isVisible?t("div",{staticClass:"w-full mt-4%"},[t("div",{staticClass:"text-center text-3xl text-background-secondary"},[e._v("Available Proxy")]),e.proxyList?t("div",{staticClass:"w-full flex mt-6"},[t("SearchBar",{attrs:{data:e.proxyDetailsArray,placeholder:"Search By Proxy Name"},on:{Filtered:e.getFilteredList}})],1):e._e(),e.proxyAssignedBtn?t("div",{staticClass:"w-1/4 pr-3 mb-4"},[t("button",{staticClass:"mt-2 inline-block py-2 px-4 text-white shadow-md bg-background-secondary",on:{click:function(t){return e.assignLearnerToProxy()}}},[e._v("Re-assign Proxy")])]):e._e(),t("div",{staticClass:"w-full mt-4"},[t("table",{staticClass:"w-full text-md bg-white shadow rounded text-over"},[t("thead",{staticClass:"opacity-90 -text-blue-800"},[t("tr",{staticClass:"border-b"},[t("th",{staticClass:"text-left py-2 pl-3 pr-0 w-6 text-background-secondary"}),t("th",{staticClass:"text-left p-2 px-3 text-background-secondary"},[e._v("Name")]),t("th",{staticClass:"text-left p-2 px-3 text-background-secondary"},[e._v("Email")]),"infinity"===e.selectedProgram?t("th",{staticClass:"text-left p-2 px-3 text-background-secondary"},[e._v("Role")]):e._e(),t("th",{staticClass:"text-left p-2 px-3 text-background-secondary"},[e._v("OHR")])])]),t("tbody",{staticClass:"opacity-80 -text-blue-800 align-bottom"},e._l(e.filteredproxyDetails,(function(a,r){return t("tr",{key:r,staticClass:"border-b hover:bg-gray-300"},[t("td",{staticClass:"py-2 pl-3 pr-0 text-sm w-6"},[t("input",{directives:[{name:"model",rawName:"v-model",value:e.selectedProxyOhr,expression:"selectedProxyOhr"}],attrs:{type:"checkbox",id:a.proxy_ohr},domProps:{value:a.proxy_ohr,checked:Array.isArray(e.selectedProxyOhr)?e._i(e.selectedProxyOhr,a.proxy_ohr)>-1:e.selectedProxyOhr},on:{change:[function(t){var r=e.selectedProxyOhr,s=t.target,l=!!s.checked;if(Array.isArray(r)){var n=a.proxy_ohr,o=e._i(r,n);s.checked?o<0&&(e.selectedProxyOhr=r.concat([n])):o>-1&&(e.selectedProxyOhr=r.slice(0,o).concat(r.slice(o+1)))}else e.selectedProxyOhr=l},function(t){return e.showAssignProxyBtn(t)}],click:e.checkOne}})]),t("td",{staticClass:"p-2 px-3"},[e._v(e._s(a.proxy_name))]),t("td",{staticClass:"p-2 px-3"},[e._v(e._s(a.proxy_email))]),"infinity"===e.selectedProgram?t("td",{staticClass:"p-2 px-3"},[e._v(e._s(a.proxy_role))]):e._e(),t("th",{staticClass:"text-left p-2 px-3 text-background-secondary"},[e._v(e._s(a.proxy_ohr))])])})),0)])])]):e._e()])]),e.renderReady?e._e():t("div",{staticClass:"flex flex-col h-min-screen justify-center text-center pageLoader"},[t("img",{staticClass:"mb-8 block mx-auto loadercss mt-3%",attrs:{src:a(9756),alt:"Loader Gif"}}),t("p",{staticClass:"mx-auto mb-10 leading-normal px-4 loadertextcss ext-genpact-darkest-blue"},[e._v("Loading...")])])]):t("div",{staticClass:"container w-full flex flex-wrap mx-auto px-2 pt-8 lg:pt-16 md:pt-16 mt-10"},[e._v("You don't have access")])])},s=[function(){var e=this,t=e._self._c;e._self._setupProxy;return t("div",{staticClass:"w-full"},[t("div",{staticClass:"text-center text-3xl text-background-secondary"},[e._v("All Proxy Review Request")])])}],l=(a(7658),a(7203)),n=a(8709),o=a(1068),i=a(5279),c=a(1602),u=a.n(c),d=a(9649),p=a(306),g=a(1815),y=a(1232),f=a(2027),v=a(8153),x=(0,l.defineComponent)({name:"ViewAllProgramProxyAssignment",components:{SearchBar:v.Z},setup(){const e=(0,l.ref)(),t=(0,l.ref)(),a=(0,l.ref)(),r=(0,l.ref)(),s=(0,l.ref)(),c=(0,l.ref)(),v=(0,l.ref)(!1),x=(0,l.ref)(!1),m=(0,l.ref)(),_=(0,l.ref)([]),h=(0,l.ref)(),k=(0,l.ref)(!1),w=(0,l.ref)(),b=(0,l.ref)(!0),C=(0,l.ref)(),P=(0,l.ref)(),S=(0,l.ref)(),A=(0,l.ref)(),Z=(0,l.ref)(!1),O=(0,l.ref)("Select Program"),$=(0,l.ref)(!1),D=(0,l.ref)(),N=(0,l.ref)(!1),T=(0,l.ref)(!1),M=(0,l.ref)(),R=(0,l.ref)(!1),L=(0,l.ref)("Select Ageing"),Y=(0,l.ref)(),I=(0,l.ref)(),B=(0,l.ref)(),E=(0,l.ref)(["0-5","5-10","10-15","15-20",">20"]),V=(0,l.ref)(""),F=(0,l.ref)(""),J=()=>{h.value=[]},q=()=>{let t,a;console.log(L.value);let r=!1;"Select Ageing"!==L.value?(L.value.includes(">")?(t=L.value.slice(1),r=!0):[t,a]=L.value.split("-"),console.log(t,a),Y.value=e.value.filter((e=>{if(console.log(e.ageing,e.ageing>=t&&(r||e.ageing<=a)),e.ageing>=t&&(r||e.ageing<=a))return e}))):Y.value=e.value},j=async()=>{const e=[];Y.value.filter((t=>{for(let a=0;a<_.value.length;a+=1)_.value[a]===t.learner_task_id&&e.push({learner_task_id:t.learner_task_id,proxyOhr:t.proxy_key})}));const t={nudge_arr:e};console.log(" Proxy OHR ",t);try{r.value=!1;const e=await(0,y.F)("/proxyreview/nudge",t);console.log(e),D.value=e.data.message,r.value=!0,N.value=!0,T.value=!1,window.scroll(0,0),r.value=!0,setTimeout((()=>{N.value=!1}),5e3)}catch(a){if(r.value=!0,p.Z.isAxiosError(a)){const e=a;r.value=!0,D.value=e.response?.data?.message,T.value=!0,N.value=!1,setTimeout((()=>{T.value=!1}),5e3)}}},H=e=>{const t=e.target.checked;!0===t?(console.log("selected Task id",_.value),x.value=!0):0===_.value.length&&(x.value=!1,v.value=!1)},G=async()=>{r.value=!1;const e=await(0,n.QZ)("/getAllSkillProf?skill_type=genome");t.value=e.skill,a.value=e.proficiency,r.value=!0},Q=async()=>{r.value=!1,A.value=await(0,d.dr)("/cache?cache=program"),r.value=!0},X=async t=>{r.value=!1,localStorage.setItem("program",t.target.value),localStorage.removeItem("skill"),localStorage.removeItem("proficiency"),O.value=t.target.value,"Select Program"!==O.value?($.value=!0,"infinity"===O.value?(await G(),s.value="Select Skill",c.value="Select Proficiency",Z.value=!0):(Z.value=!1,s.value="",c.value="")):($.value=!1,Z.value=!1),x.value=!1,R.value=!1,e.value=[],v.value=!1,_.value=[],Y.value=[],r.value=!0},U=async()=>{try{const l={linked_program_name:O.value,skill:s.value,proficiency:c.value};console.log({data:l}),r.value=!1,await J(),_.value=[],x.value=!1,v.value=!1;const n=await(0,o.cQ)(l);e.value=n.data.allProxyList;for(let r=0;r<e.value.length;r+=1){const s=e.value[r];console.log(`res ${JSON.stringify(s)}`);const l=u()().utc().format("YYYY-MM-DD");if(s.assignment_date){const e=u()(s.assignment_date).utc().format("YYYY-MM-DD");s.ageing=u()(l).diff(u()(e),"days"),s.assignment_date=u()(s.assignment_date).format("DD-MM-YYYY")}if(s.proxy_requested_date&&(s.proxy_requested_date=u()(s.proxy_requested_date).format("DD-MM-YYYY")),"infinity"===O.value){if(s.skill){const e=t.value.filter((e=>{console.log(`item ${JSON.stringify(e)}`);const t=e.skill_id;return console.log(`skill ${t}`),!!t&&t===s.skill}));console.log(`learnerSkillArr ${JSON.stringify(e)}`),s.skillName=e[0].skill_alias}else s.skillName="";if(s.proficiency){const e=a.value.filter((e=>{console.log(`item ${JSON.stringify(e)}`);const t=e.prof_id;return console.log(`prof ${t}`),!!t&&t===s.proficiency}));console.log(`learnerProfArr ${JSON.stringify(e)}`),s.proficiencyName=e[0].prof_name}else s.proficiencyName=""}}const i=await(0,f.uA)(O.value),d="PROXY_NUDGE",p=i.prog_detail.email_templates;R.value=void 0!==p[d],Y.value=e.value,q(),e.value=e.value.sort(((e,t)=>t.ageing-e.ageing))}catch(l){console.log(l)}r.value=!0},z=async e=>{s.value=e.target.value,console.log(`selectedSkill.value ${s.value}`)},W=async e=>{c.value=e.target.value,console.log(`selectedProficiency.value ${c.value}`)},K=async()=>{console.log(`selectedTaskId.value[0] ${_.value[0]}`);let t=`/v2/admin/proxy/program/${O.value}`;const a=e.value.filter((e=>_.value[0]===e.learner_task_id));console.log(`selectedLearnerArr ${a}`),"infinity"===O.value&&(C.value=a[0].skill,P.value=a[0].proficiency,t=`/v2/admin/proxy/program/infinity/skill/${C.value}`),v.value=!0,r.value=!1;const s=await(0,g.oA)(t);m.value=s.all_proxies,I.value=m.value.map((e=>e.proxy_name)),B.value=m.value,r.value=!0,console.log("Proxy List",m.value)},ee=e=>{B.value=m.value.filter((t=>e.includes(t.proxy_name))),console.log("filteredproxyDetails",B.value)},te=async e=>{const t=e.target.checked;k.value=!0===t},ae=async()=>{try{console.log(`selectedProxyOhr.value[0] ${h.value[0]}`),console.log(`selectedSkill.value ${s.value}`),console.log(`selectedProficiency.value ${c.value}`),r.value=!1;const e={proxy_key:h.value[0],learners:_.value,linked_program_name:O.value,skill:C.value,proficiency:P.value},t=await(0,n.kn)("/proxyreview",e);D.value=t?.data.message,N.value=!0,setTimeout((()=>{N.value=!1}),6e3),v.value=!1,await U(),r.value=!0,console.log("data ohr",t)}catch(e){if(p.Z.isAxiosError(e)){const t=e;console.log("err.response?.data",t.response?.data),r.value=!0,D.value=t.response?.data?.message,console.log(`errorMessage.value ${M.value}`),T.value=!0,setTimeout((()=>{T.value=!1}),6e3)}}},re=async()=>{try{if(!V.value||!F.value)return D.value="Start Date or End Date should not be empty",T.value=!0,void setTimeout((()=>{T.value=!1}),6e3);const e=await(0,o.yc)(`/admin/proxy/export?start_date=${V.value}&end_date=${F.value}`);S.value="The report will be emailed to you",setTimeout((()=>{S.value=null}),6e3),console.log(`Report Trigger Response ${e}`)}catch(e){if(p.Z.isAxiosError(e)){const t=e;console.log("err.response?.data",t.response?.data),r.value=!0,D.value=t.response?.data?.message,console.log(`errorMessage.value ${M.value}`),T.value=!0,setTimeout((()=>{T.value=!1}),6e3)}}};return(0,l.onBeforeMount)((async()=>{await Q();const e=await(0,i.GF)("/getUserRole");w.value=e.user_roles,w.value.length>0&&(w.value.includes("System Admin")||w.value.includes("Community Manager")||w.value.includes("Proxy Admin")?b.value=!0:b.value=!1)})),{learnerData:e,skills:t,proficiency:a,renderReady:r,selectedSkill:s,selectedProficiency:c,getSelectedSkill:z,getSelectedProficiency:W,isVisible:v,showProxy:K,getSkillandProf:G,getLearnerForProxy:U,selectedTaskId:_,proxyButtonVisible:x,setProxyBtn:H,proxyList:m,selectedProxyOhr:h,checkOne:J,showAssignProxyBtn:te,proxyAssignedBtn:k,assignLearnerToProxy:ae,showScreen:b,triggerProxyReport:re,reportSuccessMessage:S,programDetails:A,getSelectedProgram:X,showSearchBtn:$,selectedProgram:O,showSkillProf:Z,resMessage:D,showSuccessMessage:N,showErrorMessage:T,errorMessage:M,performAgeingFilter:q,ageingValues:E,filteredLearnerData:Y,selectedAgeing:L,sendNudge:j,nudgeButtonVisible:R,getFilteredList:ee,filteredproxyDetails:B,proxyDetailsArray:I,rangeStart:V,rangeEnd:F}}}),m=x,_=a(1001),h=(0,_.Z)(m,r,s,!1,null,"7ac7a042",null),k=h.exports},1055:function(e,t,a){a.r(t),a.d(t,{default:function(){return f}});var r=function(){var e=this,t=e._self._c;e._self._setupProxy;return t("div",{staticClass:"admin"},[e.showScreen?t("div",{staticClass:"container w-full flex flex-wrap mx-auto px-2 pt-8 lg:pt-16 md:pt-16 mt-10"},[e._m(0),t("div",{staticClass:"flex w-full mt-6"},[t("div",{staticClass:"pr-3 mb-4 w-full text-right"},[t("button",{staticClass:"mt-2 inline-block py-2 px-4 text-white shadow-md bg-background-secondary text-right",on:{click:function(t){return e.triggerProxyReport()}}},[e._v("Export All Proxy Report")])])]),t("div",{staticClass:"w-full mt-4"},[t("div",{staticClass:"max-w-6xl m-auto shadow text-background-secondary p-4"},[t("div",{staticClass:"flex w-full mt-6"},[t("div",{staticClass:"w-full pr-3 mb-4"},[t("label",{staticClass:"block tracking-wide -text-blue-800 opacity-80 font-normal mb-2"},[e._v(" Skill ")]),t("select",{staticClass:"appearance-none block w-full text-gray-700 border border-gray-200 rounded py-2 px-4 leading-tight focus:outline-none focus:bg-white focus:border-gray-500",on:{change:function(t){return e.getSelectedSkill(t)}}},[t("option",[e._v("Select Skill")]),e._l(e.skills,(function(a){return t("option",{key:a.skill_id,domProps:{value:a.skill_id}},[e._v(e._s(a.skill_alias))])}))],2)]),t("div",{staticClass:"w-full pr-3 mb-4"},[t("label",{staticClass:"block tracking-wide -text-blue-800 opacity-80 font-normal mb-2"},[e._v(" Proficiency ")]),t("select",{staticClass:"appearance-none block w-full text-gray-700 border border-gray-200 rounded py-2 px-4 leading-tight focus:outline-none focus:bg-white focus:border-gray-500",on:{change:function(t){return e.getSelectedProficiency(t)}}},[t("option",[e._v("Select Proficiency")]),e._l(e.proficiency,(function(a){return t("option",{key:a.prof_id,domProps:{value:a.prof_id}},[e._v(e._s(a.prof_name))])}))],2)]),t("div",{staticClass:"w-full mb-4"},[t("button",{staticClass:"mt-8 inline-block py-2 px-4 text-white shadow-md bg-background-secondary",on:{click:function(t){return e.getLearnerForProxy()}}},[e._v("Search Learner")])])]),e.proxyButtonVisible?t("div",{staticClass:"flex w-full mt-6"},[t("div",{staticClass:"w-1/4 pr-3 mb-4"},[t("button",{staticClass:"mt-2 inline-block py-2 px-4 text-white shadow-md bg-background-secondary",on:{click:function(t){return e.showProxy()}}},[e._v("View available Proxy")])])]):e._e(),e.reportSuccessMessage?t("div",{staticClass:"text-green-700"},[e._v(e._s(e.reportSuccessMessage))]):e._e(),e.learnerData?t("div",{staticClass:"flex w-full"},[t("div",{staticClass:"w-full mt-4 tableScroll"},[t("table",{staticClass:"w-full text-md bg-white rounded"},[e._m(1),t("tbody",{staticClass:"opacity-80 -text-blue-800 align-bottom"},e._l(e.learnerData,(function(a){return t("tr",{key:a.id,staticClass:"border-b hover:bg-gray-300"},[t("td",{staticClass:"py-2 pl-3 pr-0 text-sm w-6"},[t("input",{directives:[{name:"model",rawName:"v-model",value:e.selectedTaskId,expression:"selectedTaskId"}],attrs:{type:"checkbox",disabled:e.selectedTaskId.length>4,id:a.learner_task_id},domProps:{value:a.learner_task_id,checked:Array.isArray(e.selectedTaskId)?e._i(e.selectedTaskId,a.learner_task_id)>-1:e.selectedTaskId},on:{click:function(t){return e.setProxyBtn(t)},change:function(t){var r=e.selectedTaskId,s=t.target,l=!!s.checked;if(Array.isArray(r)){var n=a.learner_task_id,o=e._i(r,n);s.checked?o<0&&(e.selectedTaskId=r.concat([n])):o>-1&&(e.selectedTaskId=r.slice(0,o).concat(r.slice(o+1)))}else e.selectedTaskId=l}}})]),t("td",{staticClass:"p-2 px-3"},[e._v(e._s(a.learner_task_id))]),t("td",{staticClass:"p-2 px-3"},[e._v(e._s(a.proxy_key))]),t("td",{staticClass:"p-2 px-3"},[e._v(e._s(a.skillName))]),t("td",{staticClass:"p-2 px-3"},[e._v(e._s(a.proficiencyName))]),t("td",{staticClass:"p-2 px-3"},[e._v(e._s(a.proxy_requested_date))]),t("td",{staticClass:"p-2 px-3"},[e._v(e._s(a.assignment_date))]),t("td",{staticClass:"p-2 px-3"},[e._v(e._s(a.isRereview))]),t("td",{staticClass:"p-2 px-3"},[e._v(e._s(a.ageing))])])})),0)])])]):e._e(),e.isVisible?t("div",{staticClass:"w-full mt-4%"},[t("div",{staticClass:"text-center text-3xl text-background-secondary"},[e._v("Available Proxy")]),e.proxyAssignedBtn?t("div",{staticClass:"w-1/4 pr-3 mb-4"},[t("button",{staticClass:"mt-2 inline-block py-2 px-4 text-white shadow-md bg-background-secondary",on:{click:function(t){return e.assignLearnerToProxy()}}},[e._v("Re-assign Proxy")])]):e._e(),t("div",{staticClass:"w-full mt-4"},[t("table",{staticClass:"w-full text-md bg-white shadow rounded text-over"},[e._m(2),t("tbody",{staticClass:"opacity-80 -text-blue-800 align-bottom"},e._l(e.proxyList,(function(a){return t("tr",{key:a.proxy_ohr,staticClass:"border-b hover:bg-gray-300"},[t("td",{staticClass:"py-2 pl-3 pr-0 text-sm w-6"},[t("input",{directives:[{name:"model",rawName:"v-model",value:e.selectedProxyOhr,expression:"selectedProxyOhr"}],attrs:{type:"checkbox",id:a.proxy_ohr},domProps:{value:a.proxy_ohr,checked:Array.isArray(e.selectedProxyOhr)?e._i(e.selectedProxyOhr,a.proxy_ohr)>-1:e.selectedProxyOhr},on:{change:[function(t){var r=e.selectedProxyOhr,s=t.target,l=!!s.checked;if(Array.isArray(r)){var n=a.proxy_ohr,o=e._i(r,n);s.checked?o<0&&(e.selectedProxyOhr=r.concat([n])):o>-1&&(e.selectedProxyOhr=r.slice(0,o).concat(r.slice(o+1)))}else e.selectedProxyOhr=l},function(t){return e.showAssignProxyBtn(t)}],click:e.checkOne}})]),t("td",{staticClass:"p-2 px-3"},[e._v(e._s(a.proxy_name))]),t("td",{staticClass:"p-2 px-3"},[e._v(e._s(a.proxy_email))]),t("td",{staticClass:"p-2 px-3"},[e._v(e._s(a.proxy_role))]),t("th",{staticClass:"text-left p-2 px-3 text-background-secondary"},[e._v(e._s(a.proxy_ohr))])])})),0)])])]):e._e()])]),e.renderReady?e._e():t("div",{staticClass:"flex flex-col h-min-screen justify-center text-center pageLoader"},[t("img",{staticClass:"mb-8 block mx-auto loadercss mt-3%",attrs:{src:a(9756),alt:"Loader Gif"}}),t("p",{staticClass:"mx-auto mb-10 leading-normal px-4 loadertextcss ext-genpact-darkest-blue"},[e._v("Loading...")])])]):t("div",{staticClass:"container w-full flex flex-wrap mx-auto px-2 pt-8 lg:pt-16 md:pt-16 mt-10"},[e._v("You don't have access")])])},s=[function(){var e=this,t=e._self._c;e._self._setupProxy;return t("div",{staticClass:"w-full"},[t("div",{staticClass:"text-center text-3xl text-background-secondary"},[e._v("All Proxy Review Request")])])},function(){var e=this,t=e._self._c;e._self._setupProxy;return t("thead",{staticClass:"opacity-90 -text-blue-800"},[t("tr",{staticClass:"border-b"},[t("th",{staticClass:"text-left py-2 pl-3 pr-0 w-6 text-background-secondary"}),t("th",{staticClass:"text-left p-2 px-3 text-background-secondary"},[e._v("Learner ID")]),t("th",{staticClass:"text-left p-2 px-3 text-background-secondary"},[e._v("Proxy OHR")]),t("th",{staticClass:"text-left p-2 px-3 text-background-secondary"},[e._v("Skill")]),t("th",{staticClass:"text-left p-2 px-3 text-background-secondary"},[e._v("Proficiency")]),t("th",{staticClass:"text-left p-2 px-3 text-background-secondary"},[e._v("Proxy Requested Date")]),t("th",{staticClass:"text-left p-2 px-3 text-background-secondary"},[e._v("Proxy Assignment Date")]),t("th",{staticClass:"text-left p-2 px-3 text-background-secondary"},[e._v("Re-review")]),t("th",{staticClass:"text-left p-2 px-3 text-background-secondary"},[e._v("Ageing")])])])},function(){var e=this,t=e._self._c;e._self._setupProxy;return t("thead",{staticClass:"opacity-90 -text-blue-800"},[t("tr",{staticClass:"border-b"},[t("th",{staticClass:"text-left py-2 pl-3 pr-0 w-6 text-background-secondary"}),t("th",{staticClass:"text-left p-2 px-3 text-background-secondary"},[e._v("Name")]),t("th",{staticClass:"text-left p-2 px-3 text-background-secondary"},[e._v("Email")]),t("th",{staticClass:"text-left p-2 px-3 text-background-secondary"},[e._v("Role")]),t("th",{staticClass:"text-left p-2 px-3 text-background-secondary"},[e._v("OHR")])])])}],l=a(7203),n=a(8709),o=a(1068),i=a(5279),c=a(1602),u=a.n(c),d=(0,l.defineComponent)({name:"AssignProxy",setup(){const e=(0,l.ref)(),t=(0,l.ref)(),a=(0,l.ref)(),r=(0,l.ref)(),s=(0,l.ref)(),c=(0,l.ref)(),d=(0,l.ref)(!1),p=(0,l.ref)(!1),g=(0,l.ref)(),y=(0,l.ref)([]),f=(0,l.ref)(),v=(0,l.ref)(!1),x=(0,l.ref)(),m=(0,l.ref)(!0),_=(0,l.ref)(),h=(0,l.ref)(),k=(0,l.ref)(),w=()=>{f.value=[]},b=e=>{y.value=[];const t=e.target.checked;!0===t?p.value=!0:(p.value=!1,d.value=!1)},C={},P=async()=>{r.value=!1;const e=await(0,n.QZ)("/getAllSkillProf?skill_type=genome");t.value=e.skill,a.value=e.proficiency,r.value=!0},S=async()=>{try{console.log(C),r.value=!1,await w(),y.value=[];const s=await(0,o._A)(C);e.value=s.data.allProxyList;for(let r=0;r<e.value.length;r+=1){const s=e.value[r];console.log(`res ${JSON.stringify(s)}`);const l=u()().utc().format("YYYY-MM-DD");if(s.assignment_date){const e=u()(s.assignment_date).utc().format("YYYY-MM-DD");s.ageing=u()(l).diff(u()(e),"days"),s.assignment_date=u()(s.assignment_date).format("DD-MM-YYYY")}if(s.proxy_requested_date&&(s.proxy_requested_date=u()(s.proxy_requested_date).format("DD-MM-YYYY")),s.skill){const e=t.value.filter((e=>{console.log(`item ${JSON.stringify(e)}`);const t=e.skill_id;return console.log(`skill ${t}`),!!t&&t===s.skill}));console.log(`learnerSkillArr ${JSON.stringify(e)}`),s.skillName=e[0].skill_alias}else s.skillName="";if(s.proficiency){const e=a.value.filter((e=>{console.log(`item ${JSON.stringify(e)}`);const t=e.prof_id;return console.log(`prof ${t}`),!!t&&t===s.proficiency}));console.log(`learnerProfArr ${JSON.stringify(e)}`),s.proficiencyName=e[0].prof_name}else s.proficiencyName=""}e.value=e.value.sort(((e,t)=>t.ageing-e.ageing)),r.value=!0}catch(s){console.log(s)}},A=async e=>{s.value=e.target.value,Object.assign(C,{skill:s.value})},Z=async e=>{c.value=e.target.value,Object.assign(C,{proficiency:c.value})},O=async()=>{console.log(`selectedTaskId.value[0] ${y.value[0]}`);const t=e.value.filter((e=>y.value[0]===e.learner_task_id));console.log(`selectedLearnerArr ${t}`),_.value=t[0].skill,h.value=t[0].proficiency,d.value=!0,r.value=!1,g.value=await(0,n.Nl)("/getAllProxyBySkill",_.value),r.value=!0,console.log("Proxy List",g.value)},$=async e=>{const t=e.target.checked;v.value=!0===t},D=async()=>{try{console.log(`selectedProxyOhr.value[0] ${f.value[0]}`),console.log(`selectedSkill.value ${_.value}`),console.log(`selectedProficiency.value ${h.value}`),r.value=!1;const e={proxy_key:f.value[0],learners:y.value,linked_program_name:"infinity",skill:_.value,proficiency:h.value},t=await(0,n.kn)("/proxyreview",e);d.value=!1,await S(),r.value=!0,console.log("data ohr",t)}catch(e){console.log("data ohr",e)}},N=async()=>{const e=await(0,o.yc)("/admin/proxy/export");k.value="The report will be emailed to you",setTimeout((()=>{k.value=null}),6e3),console.log(`Report Trigger Response ${e}`)};return(0,l.onBeforeMount)((async()=>{await P();const e=await(0,i.GF)("/getUserRole");x.value=e.user_roles,x.value.length>0&&(x.value.includes("System Admin")||x.value.includes("Community Manager")||x.value.includes("Proxy Admin")?m.value=!0:m.value=!1)})),{learnerData:e,skills:t,proficiency:a,renderReady:r,getSelectedSkill:A,getSelectedProficiency:Z,isVisible:d,showProxy:O,getSkillandProf:P,getLearnerForProxy:S,selectedTaskId:y,proxyButtonVisible:p,setProxyBtn:b,proxyList:g,selectedProxyOhr:f,checkOne:w,showAssignProxyBtn:$,proxyAssignedBtn:v,assignLearnerToProxy:D,showScreen:m,triggerProxyReport:N,reportSuccessMessage:k}}}),p=d,g=a(1001),y=(0,g.Z)(p,r,s,!1,null,"6f090fc0",null),f=y.exports},8709:function(e,t,a){a.d(t,{G7:function(){return s},Nl:function(){return n},QZ:function(){return l},kn:function(){return o}});var r=a(7129);const s=async(e,t)=>{const a=await r.Z.post(e,t);return a},l=async e=>{let t;return await r.Z.get(e).then((e=>(t=e.data,t))),t},n=async(e,t)=>{let a;return await r.Z.get(`${e}/${t}`).then((e=>(a=e.data.allProxyList,a))),a},o=async(e,t)=>{const a=await r.Z.post(e,t);return a}},1815:function(e,t,a){a.d(t,{Lo:function(){return n},M0:function(){return o},QZ:function(){return s},Z9:function(){return i},oA:function(){return l}});var r=a(7129);const s=async e=>{let t;return await r.Z.get(e).then((e=>(t=e.data,t))),t},l=async e=>{const t=await r.Z.get(e);return t.data},n=async(e,t)=>{const a=await r.Z.post(e,t);return a.data},o=async(e,t)=>{const a=await r.Z.post(e,t);return a.data.resp_message},i=async(e,t)=>{const a=await r.Z.post(e,t);return a.data.resp_message}},5279:function(e,t,a){a.d(t,{$d:function(){return s},$i:function(){return b},Ao:function(){return v},DU:function(){return y},EX:function(){return D},F5:function(){return N},FS:function(){return p},GF:function(){return A},Iu:function(){return n},J1:function(){return w},Jf:function(){return _},Kk:function(){return x},N9:function(){return Z},P8:function(){return u},VP:function(){return m},Vz:function(){return C},WX:function(){return g},X$:function(){return h},XP:function(){return l},Yb:function(){return S},a4:function(){return O},dH:function(){return k},gh:function(){return f},nb:function(){return i},oA:function(){return P},r4:function(){return d},sd:function(){return c},wp:function(){return o},xJ:function(){return $}});var r=a(7129);const s=async e=>{let t;return await r.Z.get(e).then((e=>(t=e.data,t))),t},l=async e=>{let t;return await r.Z.get(e).then((e=>(t=e.data,t))),t},n=async e=>{let t;return await r.Z.get(e).then((e=>(t=e.data,t))),t},o=async e=>{let t;return await r.Z.get(e).then((e=>(t=e.data,t))),t},i=async e=>{let t;return await r.Z.get(e).then((e=>(t=e.data,t))),t},c=async e=>{let t;return await r.Z.get(e).then((e=>(t=e.data,t))),t},u=async e=>{let t;return await r.Z.get(e).then((e=>(t=e.data,t))),t},d=async e=>{let t;return await r.Z.get(e).then((e=>(t=e.data,t))),t},p=async e=>{let t;return await r.Z.get(e).then((e=>(t=e.data,t))),t},g=async e=>{let t;return await r.Z.get(e).then((e=>(t=e.data,t))),t},y=async e=>{let t;return await r.Z.get(e).then((e=>(t=e.data,t))),t},f=async e=>{let t;return await r.Z.get(e).then((e=>(t=e.data,t))),t},v=async e=>{let t;return await r.Z.get(e).then((e=>(t=e.data.userObj,t))),t},x=async e=>{let t;return await r.Z.get(e).then((e=>(t=e.data.userObj,t))),t},m=async e=>{let t;return await r.Z.get(e).then((e=>(t=e.data.userObj,t))),t},_=async e=>{let t;return await r.Z.get(e).then((e=>(t=e.data,t))),t},h=async e=>{let t;return await r.Z.get(e).then((e=>(t=e.data,t))),t},k=async e=>{let t;return await r.Z.get(e).then((e=>(t=e.data,t))),t},w=async e=>{const t=await r.Z.get(e);return t},b=async e=>{const t=await r.Z.get(e);return t},C=async e=>{const t=await r.Z.get(e);return t},P=async e=>{let t;return await r.Z.get(e).then((e=>(t=e.data,t))),t},S=async e=>{let t;return await r.Z.get(e).then((e=>(t=e.data,t))),t},A=async e=>{let t;return await r.Z.get(e).then((e=>(t=e.data.userObj,t))),t},Z=async e=>{const t=await r.Z.post("/user/role",e);return t},O=async e=>{const t=await r.Z.post("/user/removeRole",e);return t},$=async()=>{const e=await r.Z.get("role");return e},D=async e=>{const t=await r.Z.post("/user/saveLSS",e);return t},N=async e=>{const t=await r.Z.post("/user/saveEnvAccess",e);return t}},2027:function(e,t,a){a.d(t,{DC:function(){return l},JS:function(){return n},uA:function(){return s}});var r=a(7129);const s=async e=>{try{let t;return await r.Z.get(`/program/${e}`).then((e=>(t=e.data,t))),t}catch(t){return t}},l=async e=>{try{let t;return console.log("inside update Program Service"),await r.Z.put("/program",e).then((e=>(console.log("program Response",e),t=e.data,t))),t}catch(t){return t}},n=async e=>{const t=await r.Z.post("/program/email/event/create",e);return t}},9649:function(e,t,a){a.d(t,{$M:function(){return d},F9:function(){return g},HX:function(){return o},V$:function(){return i},VA:function(){return l},dr:function(){return s},gs:function(){return y},jz:function(){return p},q$:function(){return u},rP:function(){return n},yW:function(){return c}});var r=a(7129);const s=async e=>{let t;return await r.Z.get(e).then((e=>(console.log("Response",e),t=e.data.response.program_name,t))),t},l=async(e,t)=>{let a;return await r.Z.post(e,t).then((e=>(a=e.data.tasks,a))),a},n=async(e,t)=>{let a;return await r.Z.post(e,t).then((e=>(a=e.data.learnerDetails,a))),a},o=async(e,t)=>{let a;return await r.Z.post(e,t).then((e=>(a=e.data.tasks,a))),a},i=async(e,t)=>{let a;return await r.Z.post(e,t).then((e=>(a=e.data,a))),a},c=async e=>{let t;try{return await r.Z.get(`/task/${e}`).then((e=>(t=e.data.data,t))),t}catch(a){return a}},u=async(e,t)=>{try{const a=await fetch(`${e}`,{method:"put",body:t}),r=a;return r}catch(a){return console.error(a),a}},d=async(e,t)=>{let a;return await r.Z.post(e,t).then((e=>(a=e.data.tasks,a))),a},p=async(e,t)=>{let a;return await r.Z.post(e,t).then((e=>(a=e.data.tasks,a))),a},g=async e=>{console.log(`inside save task data ${JSON.stringify(e)}`);const t=await r.Z.post("/task/create",e);return t},y=async e=>{try{let t;return await r.Z.get(`/admin/task/taskExport/${e}`).then((async e=>(t=e.data,t))),t}catch(t){return t}}},1068:function(e,t,a){a.d(t,{Ho:function(){return s},_A:function(){return l},cQ:function(){return n},yc:function(){return o}});var r=a(7129);const s=async(e,t)=>{let a;return await r.Z.post(e,t).then((e=>(a=e.data,a))),a},l=async e=>{const t=await r.Z.post("getAllProxyAssignedLearner",e);return t},n=async e=>{const t=await r.Z.post("program/proxies/learners",e);return t},o=async e=>{const t=await r.Z.get(e);return t}},9756:function(e,t,a){e.exports=a.p+"img/loadernew.gif"}}]);
1
+ "use strict";(("undefined"!==typeof self?self:this)["webpackChunksolidify"]=("undefined"!==typeof self?self:this)["webpackChunksolidify"]||[]).push([[412],{8153:function(e,t,a){a.d(t,{Z:function(){return u}});var r=function(){var e=this,t=e._self._c;e._self._setupProxy;return t("div",{staticClass:"w-full flex mt-6"},[t("input",{directives:[{name:"model",rawName:"v-model",value:e.search,expression:"search"}],staticClass:"appearance-none border rounded py-2 px-14 text-gray-500 leading-tight focus:outline-none focus:shadow-outline",attrs:{type:"text",placeholder:e.placeHolder1},domProps:{value:e.search},on:{keyup:function(t){e.filterProgramDetails(),e.$emit("Filtered",e.filteredProgramDetails)},input:function(t){t.target.composing||(e.search=t.target.value)}}})])},s=[],l=a(7203),n=(0,l.defineComponent)({name:"SearchBar",props:{data:[Array],placeholder:{type:String,default:"Search"}},setup(e){const t=(0,l.ref)(""),a=(0,l.ref)(),r=(0,l.ref)(),s=(0,l.ref)(),n=()=>{s.value=e.data,r.value=s.value.filter((e=>e.toLowerCase().includes(t.value.toLowerCase())))};return(0,l.onBeforeMount)((async()=>{a.value=e.placeholder,console.log("props.placeholder",e.placeholder)})),{placeHolder1:a,filteredProgramDetails:r,filterProgramDetails:n,search:t}}}),o=n,i=a(1001),c=(0,i.Z)(o,r,s,!1,null,null,null),u=c.exports},408:function(e,t,a){a.r(t),a.d(t,{default:function(){return k}});var r=function(){var e=this,t=e._self._c;e._self._setupProxy;return t("div",{staticClass:"admin"},[e.showScreen?t("div",{staticClass:"container w-full flex flex-wrap mx-auto px-2 pt-8 lg:pt-16 md:pt-16 mt-10"},[e._m(0),t("div",{staticClass:"flex w-full mt-6 justify-end items-center gap-2"},[t("div",{staticClass:"w-1/5"},[t("input",{directives:[{name:"model",rawName:"v-model",value:e.rangeStart,expression:"rangeStart"}],staticClass:"appearance-none block w-full text-gray-700 border border-gray-200 rounded py-2 px-4 leading-tight focus:outline-none focus:bg-white focus:border-gray-500",attrs:{type:"date"},domProps:{value:e.rangeStart},on:{input:function(t){t.target.composing||(e.rangeStart=t.target.value)}}})]),t("div",{staticClass:"w-1/5"},[t("input",{directives:[{name:"model",rawName:"v-model",value:e.rangeEnd,expression:"rangeEnd"}],staticClass:"appearance-none block w-full text-gray-700 border border-gray-200 rounded py-2 px-4 leading-tight focus:outline-none focus:bg-white focus:border-gray-500",attrs:{type:"date"},domProps:{value:e.rangeEnd},on:{input:function(t){t.target.composing||(e.rangeEnd=t.target.value)}}})]),t("div",{staticClass:"pr-3"},[t("button",{staticClass:"inline-block py-2 px-4 text-white shadow-md bg-background-secondary text-right",on:{click:function(t){return e.triggerProxyReport()}}},[e._v("Export All Proxy Report")])])]),t("div",{staticClass:"w-full mt-4"},[t("div",{staticClass:"max-w-6xl m-auto shadow text-background-secondary p-4"},[t("div",{staticClass:"flex w-full mt-6"},[t("div",{staticClass:"w-full pr-3 mb-4"},[t("label",{staticClass:"block tracking-wide -text-blue-800 opacity-80 font-normal mb-2"},[e._v(" Filter Task ")]),t("select",{directives:[{name:"model",rawName:"v-model",value:e.selectedProgram,expression:"selectedProgram"}],staticClass:"appearance-none block w-full text-gray-700 border border-gray-200 rounded py-2 px-4 leading-tight focus:outline-none focus:bg-white focus:border-gray-500",on:{change:[function(t){var a=Array.prototype.filter.call(t.target.options,(function(e){return e.selected})).map((function(e){var t="_value"in e?e._value:e.value;return t}));e.selectedProgram=t.target.multiple?a:a[0]},function(t){return e.getSelectedProgram(t)}]}},[t("option",[e._v("Select Program")]),e._l(e.programDetails,(function(a){return t("option",{key:a.program_id,domProps:{value:a.program_id}},[e._v(e._s(a.program_display_name?a.program_display_name:a.program_name))])}))],2)]),e.showSkillProf?t("div",{staticClass:"w-full pr-3 mb-4"},[t("label",{staticClass:"block tracking-wide -text-blue-800 opacity-80 font-normal mb-2"},[e._v(" Skill ")]),t("select",{directives:[{name:"model",rawName:"v-model",value:e.selectedSkill,expression:"selectedSkill"}],staticClass:"appearance-none block w-full text-gray-700 border border-gray-200 rounded py-2 px-4 leading-tight focus:outline-none focus:bg-white focus:border-gray-500",on:{change:[function(t){var a=Array.prototype.filter.call(t.target.options,(function(e){return e.selected})).map((function(e){var t="_value"in e?e._value:e.value;return t}));e.selectedSkill=t.target.multiple?a:a[0]},function(t){return e.getSelectedSkill(t)}]}},[t("option",[e._v("Select Skill")]),e._l(e.skills,(function(a){return t("option",{key:a.skill_id,domProps:{value:a.skill_id}},[e._v(e._s(a.skill_alias))])}))],2)]):e._e(),e.showSkillProf?t("div",{staticClass:"w-full pr-3 mb-4"},[t("label",{staticClass:"block tracking-wide -text-blue-800 opacity-80 font-normal mb-2"},[e._v(" Proficiency ")]),t("select",{directives:[{name:"model",rawName:"v-model",value:e.selectedProficiency,expression:"selectedProficiency"}],staticClass:"appearance-none block w-full text-gray-700 border border-gray-200 rounded py-2 px-4 leading-tight focus:outline-none focus:bg-white focus:border-gray-500",on:{change:[function(t){var a=Array.prototype.filter.call(t.target.options,(function(e){return e.selected})).map((function(e){var t="_value"in e?e._value:e.value;return t}));e.selectedProficiency=t.target.multiple?a:a[0]},function(t){return e.getSelectedProficiency(t)}]}},[t("option",[e._v("Select Proficiency")]),e._l(e.proficiency,(function(a){return t("option",{key:a.prof_id,domProps:{value:a.prof_id}},[e._v(e._s(a.prof_name))])}))],2)]):e._e(),t("div",{staticClass:"w-1/2 pr-3 mb-4"},[t("label",{staticClass:"block tracking-wide -text-blue-800 opacity-80 font-normal mb-2"},[e._v(" Ageing ")]),t("select",{directives:[{name:"model",rawName:"v-model",value:e.selectedAgeing,expression:"selectedAgeing"}],staticClass:"appearance-none block w-full text-gray-700 border border-gray-200 rounded py-2 px-3 leading-tight focus:outline-none focus:bg-white focus:border-gray-500",on:{change:[function(t){var a=Array.prototype.filter.call(t.target.options,(function(e){return e.selected})).map((function(e){var t="_value"in e?e._value:e.value;return t}));e.selectedAgeing=t.target.multiple?a:a[0]},function(t){return e.performAgeingFilter(t)}]}},[t("option",[e._v("Select Ageing")]),e._l(e.ageingValues,(function(a){return t("option",{key:a,domProps:{value:a}},[e._v(e._s(a))])}))],2)]),t("div",{staticClass:"w-full mb-4"},[t("button",{staticClass:"mt-8 inline-block py-2 px-4 text-white shadow-md",class:e.showSearchBtn?"bg-background-secondary":"bg-gray-500 cursor-not-allowed",attrs:{disabled:!e.showSearchBtn},on:{click:function(t){return e.getLearnerForProxy()}}},[e._v(" Search Learners ")])])]),e.showSuccessMessage?t("div",{staticClass:"w-full px-3 text-center mt-4 bg-green-600 py-2 text-white"},[e._v(" "+e._s(e.resMessage)+" ")]):e._e(),e.showErrorMessage?t("div",{staticClass:"w-full px-3 text-center mt-4 bg-red-400 py-2 text-white"},[e._v(" "+e._s(e.resMessage)+" ")]):e._e(),e.proxyButtonVisible?t("div",{staticClass:"flex w-full mt-6"},[t("div",{staticClass:"w-1/2 pr-3 mb-4"},[t("button",{staticClass:"mt-2 inline-block py-2 px-4 text-white shadow-md bg-background-secondary mr-2",on:{click:function(t){return e.showProxy()}}},[e._v("View available Proxy")]),e.nudgeButtonVisible?t("button",{staticClass:"mt-2 inline-block py-2 px-4 text-white shadow-md bg-background-secondary",on:{click:function(t){return e.sendNudge()}}},[e._v("Send Proxy Nudge")]):e._e()])]):e._e(),e.reportSuccessMessage?t("div",{staticClass:"text-green-700"},[e._v(e._s(e.reportSuccessMessage))]):e._e(),e.learnerData?t("div",{staticClass:"flex w-full"},[t("div",{staticClass:"w-full mt-4 tableScroll"},[t("table",{staticClass:"w-full text-md bg-white rounded"},[t("thead",{staticClass:"opacity-90 -text-blue-800"},[t("tr",{staticClass:"border-b"},[t("th",{staticClass:"text-left py-2 pl-3 pr-0 w-6 text-background-secondary"}),t("th",{staticClass:"text-left p-2 px-3 text-background-secondary"},[e._v("Learner ID")]),t("th",{staticClass:"text-left p-2 px-3 text-background-secondary"},[e._v("Proxy OHR")]),"infinity"===e.selectedProgram?t("th",{staticClass:"text-left p-2 px-3 text-background-secondary"},[e._v("Skill")]):e._e(),"infinity"===e.selectedProgram?t("th",{staticClass:"text-left p-2 px-3 text-background-secondary"},[e._v("Proficiency")]):e._e(),t("th",{staticClass:"text-left p-2 px-3 text-background-secondary"},[e._v("Proxy Requested Date")]),t("th",{staticClass:"text-left p-2 px-3 text-background-secondary"},[e._v("Proxy Assignment Date")]),t("th",{staticClass:"text-left p-2 px-3 text-background-secondary"},[e._v("Re-review")]),t("th",{staticClass:"text-left p-2 px-3 text-background-secondary"},[e._v("Ageing")])])]),t("tbody",{staticClass:"opacity-80 -text-blue-800 align-bottom"},e._l(e.filteredLearnerData,(function(a){return t("tr",{key:a.id,staticClass:"border-b hover:bg-gray-300"},[t("td",{staticClass:"py-2 pl-3 pr-0 text-sm w-6"},[t("input",{directives:[{name:"model",rawName:"v-model",value:e.selectedTaskId,expression:"selectedTaskId"}],attrs:{type:"checkbox",disabled:e.selectedTaskId.length>4,id:a.learner_task_id},domProps:{value:a.learner_task_id,checked:Array.isArray(e.selectedTaskId)?e._i(e.selectedTaskId,a.learner_task_id)>-1:e.selectedTaskId},on:{change:[function(t){var r=e.selectedTaskId,s=t.target,l=!!s.checked;if(Array.isArray(r)){var n=a.learner_task_id,o=e._i(r,n);s.checked?o<0&&(e.selectedTaskId=r.concat([n])):o>-1&&(e.selectedTaskId=r.slice(0,o).concat(r.slice(o+1)))}else e.selectedTaskId=l},function(t){return e.setProxyBtn(t)}]}})]),t("td",{staticClass:"p-2 px-3"},[e._v(e._s(a.learner_task_id))]),t("td",{staticClass:"p-2 px-3"},[e._v(e._s(a.proxy_key))]),"infinity"===e.selectedProgram?t("td",{staticClass:"p-2 px-3"},[e._v(e._s(a.skillName))]):e._e(),"infinity"===e.selectedProgram?t("td",{staticClass:"p-2 px-3"},[e._v(e._s(a.proficiencyName))]):e._e(),t("td",{staticClass:"p-2 px-3"},[e._v(e._s(a.proxy_requested_date))]),t("td",{staticClass:"p-2 px-3"},[e._v(e._s(a.assignment_date))]),t("td",{staticClass:"p-2 px-3"},[e._v(e._s(a.isRereview))]),t("td",{staticClass:"p-2 px-3"},[e._v(e._s(a.ageing))])])})),0)])])]):e._e(),e.isVisible?t("div",{staticClass:"w-full mt-4%"},[t("div",{staticClass:"text-center text-3xl text-background-secondary"},[e._v("Available Proxy")]),e.proxyList?t("div",{staticClass:"w-full flex mt-6"},[t("SearchBar",{attrs:{data:e.proxyDetailsArray,placeholder:"Search By Proxy Name"},on:{Filtered:e.getFilteredList}})],1):e._e(),e.proxyAssignedBtn?t("div",{staticClass:"w-1/4 pr-3 mb-4"},[t("button",{staticClass:"mt-2 inline-block py-2 px-4 text-white shadow-md bg-background-secondary",on:{click:function(t){return e.assignLearnerToProxy()}}},[e._v("Re-assign Proxy")])]):e._e(),t("div",{staticClass:"w-full mt-4"},[t("table",{staticClass:"w-full text-md bg-white shadow rounded text-over"},[t("thead",{staticClass:"opacity-90 -text-blue-800"},[t("tr",{staticClass:"border-b"},[t("th",{staticClass:"text-left py-2 pl-3 pr-0 w-6 text-background-secondary"}),t("th",{staticClass:"text-left p-2 px-3 text-background-secondary"},[e._v("Name")]),t("th",{staticClass:"text-left p-2 px-3 text-background-secondary"},[e._v("Email")]),"infinity"===e.selectedProgram?t("th",{staticClass:"text-left p-2 px-3 text-background-secondary"},[e._v("Role")]):e._e(),t("th",{staticClass:"text-left p-2 px-3 text-background-secondary"},[e._v("OHR")])])]),t("tbody",{staticClass:"opacity-80 -text-blue-800 align-bottom"},e._l(e.filteredproxyDetails,(function(a,r){return t("tr",{key:r,staticClass:"border-b hover:bg-gray-300"},[t("td",{staticClass:"py-2 pl-3 pr-0 text-sm w-6"},[t("input",{directives:[{name:"model",rawName:"v-model",value:e.selectedProxyOhr,expression:"selectedProxyOhr"}],attrs:{type:"checkbox",id:a.proxy_ohr},domProps:{value:a.proxy_ohr,checked:Array.isArray(e.selectedProxyOhr)?e._i(e.selectedProxyOhr,a.proxy_ohr)>-1:e.selectedProxyOhr},on:{change:[function(t){var r=e.selectedProxyOhr,s=t.target,l=!!s.checked;if(Array.isArray(r)){var n=a.proxy_ohr,o=e._i(r,n);s.checked?o<0&&(e.selectedProxyOhr=r.concat([n])):o>-1&&(e.selectedProxyOhr=r.slice(0,o).concat(r.slice(o+1)))}else e.selectedProxyOhr=l},function(t){return e.showAssignProxyBtn(t)}],click:e.checkOne}})]),t("td",{staticClass:"p-2 px-3"},[e._v(e._s(a.proxy_name))]),t("td",{staticClass:"p-2 px-3"},[e._v(e._s(a.proxy_email))]),"infinity"===e.selectedProgram?t("td",{staticClass:"p-2 px-3"},[e._v(e._s(a.proxy_role))]):e._e(),t("th",{staticClass:"text-left p-2 px-3 text-background-secondary"},[e._v(e._s(a.proxy_ohr))])])})),0)])])]):e._e()])]),e.renderReady?e._e():t("div",{staticClass:"flex flex-col h-min-screen justify-center text-center pageLoader"},[t("img",{staticClass:"mb-8 block mx-auto loadercss mt-3%",attrs:{src:a(9756),alt:"Loader Gif"}}),t("p",{staticClass:"mx-auto mb-10 leading-normal px-4 loadertextcss ext-genpact-darkest-blue"},[e._v("Loading...")])])]):t("div",{staticClass:"container w-full flex flex-wrap mx-auto px-2 pt-8 lg:pt-16 md:pt-16 mt-10"},[e._v("You don't have access")])])},s=[function(){var e=this,t=e._self._c;e._self._setupProxy;return t("div",{staticClass:"w-full"},[t("div",{staticClass:"text-center text-3xl text-background-secondary"},[e._v("All Proxy Review Request")])])}],l=(a(7658),a(7203)),n=a(8709),o=a(1068),i=a(5279),c=a(1602),u=a.n(c),d=a(9649),p=a(306),g=a(1815),y=a(1232),f=a(2027),v=a(8153),x=(0,l.defineComponent)({name:"ViewAllProgramProxyAssignment",components:{SearchBar:v.Z},setup(){const e=(0,l.ref)(),t=(0,l.ref)(),a=(0,l.ref)(),r=(0,l.ref)(),s=(0,l.ref)(),c=(0,l.ref)(),v=(0,l.ref)(!1),x=(0,l.ref)(!1),m=(0,l.ref)(),_=(0,l.ref)([]),h=(0,l.ref)(),k=(0,l.ref)(!1),w=(0,l.ref)(),b=(0,l.ref)(!0),C=(0,l.ref)(),P=(0,l.ref)(),S=(0,l.ref)(),A=(0,l.ref)(),Z=(0,l.ref)(!1),O=(0,l.ref)("Select Program"),$=(0,l.ref)(!1),D=(0,l.ref)(),N=(0,l.ref)(!1),T=(0,l.ref)(!1),M=(0,l.ref)(),R=(0,l.ref)(!1),L=(0,l.ref)("Select Ageing"),Y=(0,l.ref)(),I=(0,l.ref)(),B=(0,l.ref)(),E=(0,l.ref)(["0-5","5-10","10-15","15-20",">20"]),V=(0,l.ref)(""),F=(0,l.ref)(""),J=()=>{h.value=[]},q=()=>{let t,a;console.log(L.value);let r=!1;"Select Ageing"!==L.value?(L.value.includes(">")?(t=L.value.slice(1),r=!0):[t,a]=L.value.split("-"),console.log(t,a),Y.value=e.value.filter((e=>{if(console.log(e.ageing,e.ageing>=t&&(r||e.ageing<=a)),e.ageing>=t&&(r||e.ageing<=a))return e}))):Y.value=e.value},j=async()=>{const e=[];Y.value.filter((t=>{for(let a=0;a<_.value.length;a+=1)_.value[a]===t.learner_task_id&&e.push({learner_task_id:t.learner_task_id,proxyOhr:t.proxy_key})}));const t={nudge_arr:e};console.log(" Proxy OHR ",t);try{r.value=!1;const e=await(0,y.F)("/proxyreview/nudge",t);console.log(e),D.value=e.data.message,r.value=!0,N.value=!0,T.value=!1,window.scroll(0,0),r.value=!0,setTimeout((()=>{N.value=!1}),5e3)}catch(a){if(r.value=!0,p.Z.isAxiosError(a)){const e=a;r.value=!0,D.value=e.response?.data?.message,T.value=!0,N.value=!1,setTimeout((()=>{T.value=!1}),5e3)}}},H=e=>{const t=e.target.checked;!0===t?(console.log("selected Task id",_.value),x.value=!0):0===_.value.length&&(x.value=!1,v.value=!1)},G=async()=>{r.value=!1;const e=await(0,n.QZ)("/getAllSkillProf?skill_type=genome");t.value=e.skill,a.value=e.proficiency,r.value=!0},Q=async()=>{r.value=!1,A.value=await(0,d.dr)("/cache?cache=program"),r.value=!0},X=async t=>{r.value=!1,localStorage.setItem("program",t.target.value),localStorage.removeItem("skill"),localStorage.removeItem("proficiency"),O.value=t.target.value,"Select Program"!==O.value?($.value=!0,"infinity"===O.value?(await G(),s.value="Select Skill",c.value="Select Proficiency",Z.value=!0):(Z.value=!1,s.value="",c.value="")):($.value=!1,Z.value=!1),x.value=!1,R.value=!1,e.value=[],v.value=!1,_.value=[],Y.value=[],r.value=!0},U=async()=>{try{const l={linked_program_name:O.value,skill:s.value,proficiency:c.value};console.log({data:l}),r.value=!1,await J(),_.value=[],x.value=!1,v.value=!1;const n=await(0,o.cQ)(l);e.value=n.data.allProxyList;for(let r=0;r<e.value.length;r+=1){const s=e.value[r];console.log(`res ${JSON.stringify(s)}`);const l=u()().utc().format("YYYY-MM-DD");if(s.assignment_date){const e=u()(s.assignment_date).utc().format("YYYY-MM-DD");s.ageing=u()(l).diff(u()(e),"days"),s.assignment_date=u()(s.assignment_date).format("DD-MM-YYYY")}if(s.proxy_requested_date&&(s.proxy_requested_date=u()(s.proxy_requested_date).format("DD-MM-YYYY")),"infinity"===O.value){if(s.skill){const e=t.value.filter((e=>{console.log(`item ${JSON.stringify(e)}`);const t=e.skill_id;return console.log(`skill ${t}`),!!t&&t===s.skill}));console.log(`learnerSkillArr ${JSON.stringify(e)}`),s.skillName=e[0].skill_alias}else s.skillName="";if(s.proficiency){const e=a.value.filter((e=>{console.log(`item ${JSON.stringify(e)}`);const t=e.prof_id;return console.log(`prof ${t}`),!!t&&t===s.proficiency}));console.log(`learnerProfArr ${JSON.stringify(e)}`),s.proficiencyName=e[0].prof_name}else s.proficiencyName=""}}const i=await(0,f.uA)(O.value),d="PROXY_NUDGE",p=i.prog_detail.email_templates;R.value=void 0!==p[d],Y.value=e.value,q(),e.value=e.value.sort(((e,t)=>t.ageing-e.ageing))}catch(l){console.log(l)}r.value=!0},z=async e=>{s.value=e.target.value,console.log(`selectedSkill.value ${s.value}`)},W=async e=>{c.value=e.target.value,console.log(`selectedProficiency.value ${c.value}`)},K=async()=>{console.log(`selectedTaskId.value[0] ${_.value[0]}`);let t=`/v2/admin/proxy/program/${O.value}`;const a=e.value.filter((e=>_.value[0]===e.learner_task_id));console.log(`selectedLearnerArr ${a}`),"infinity"===O.value&&(C.value=a[0].skill,P.value=a[0].proficiency,t=`/v2/admin/proxy/program/infinity/skill/${C.value}`),v.value=!0,r.value=!1;const s=await(0,g.oA)(t);m.value=s.all_proxies,I.value=m.value.map((e=>e.proxy_name)),B.value=m.value,r.value=!0,console.log("Proxy List",m.value)},ee=e=>{B.value=m.value.filter((t=>e.includes(t.proxy_name))),console.log("filteredproxyDetails",B.value)},te=async e=>{const t=e.target.checked;k.value=!0===t},ae=async()=>{try{console.log(`selectedProxyOhr.value[0] ${h.value[0]}`),console.log(`selectedSkill.value ${s.value}`),console.log(`selectedProficiency.value ${c.value}`),r.value=!1;const e={proxy_key:h.value[0],learners:_.value,linked_program_name:O.value,skill:C.value,proficiency:P.value},t=await(0,n.kn)("/proxyreview",e);D.value=t?.data.message,N.value=!0,setTimeout((()=>{N.value=!1}),6e3),v.value=!1,await U(),r.value=!0,console.log("data ohr",t)}catch(e){if(p.Z.isAxiosError(e)){const t=e;console.log("err.response?.data",t.response?.data),r.value=!0,D.value=t.response?.data?.message,console.log(`errorMessage.value ${M.value}`),T.value=!0,setTimeout((()=>{T.value=!1}),6e3)}}},re=async()=>{try{if(!V.value||!F.value)return D.value="Start Date or End Date should not be empty",T.value=!0,void setTimeout((()=>{T.value=!1}),6e3);const e=await(0,o.yc)(`/admin/proxy/export?start_date=${V.value}&end_date=${F.value}`);S.value="The report will be emailed to you",setTimeout((()=>{S.value=null}),6e3),console.log(`Report Trigger Response ${e}`)}catch(e){if(p.Z.isAxiosError(e)){const t=e;console.log("err.response?.data",t.response?.data),r.value=!0,D.value=t.response?.data?.message,console.log(`errorMessage.value ${M.value}`),T.value=!0,setTimeout((()=>{T.value=!1}),6e3)}}};return(0,l.onBeforeMount)((async()=>{await Q();const e=await(0,i.GF)("/getUserRole");w.value=e.user_roles,w.value.length>0&&(w.value.includes("System Admin")||w.value.includes("Community Manager")||w.value.includes("Proxy Admin")?b.value=!0:b.value=!1)})),{learnerData:e,skills:t,proficiency:a,renderReady:r,selectedSkill:s,selectedProficiency:c,getSelectedSkill:z,getSelectedProficiency:W,isVisible:v,showProxy:K,getSkillandProf:G,getLearnerForProxy:U,selectedTaskId:_,proxyButtonVisible:x,setProxyBtn:H,proxyList:m,selectedProxyOhr:h,checkOne:J,showAssignProxyBtn:te,proxyAssignedBtn:k,assignLearnerToProxy:ae,showScreen:b,triggerProxyReport:re,reportSuccessMessage:S,programDetails:A,getSelectedProgram:X,showSearchBtn:$,selectedProgram:O,showSkillProf:Z,resMessage:D,showSuccessMessage:N,showErrorMessage:T,errorMessage:M,performAgeingFilter:q,ageingValues:E,filteredLearnerData:Y,selectedAgeing:L,sendNudge:j,nudgeButtonVisible:R,getFilteredList:ee,filteredproxyDetails:B,proxyDetailsArray:I,rangeStart:V,rangeEnd:F}}}),m=x,_=a(1001),h=(0,_.Z)(m,r,s,!1,null,"7ac7a042",null),k=h.exports},1055:function(e,t,a){a.r(t),a.d(t,{default:function(){return f}});var r=function(){var e=this,t=e._self._c;e._self._setupProxy;return t("div",{staticClass:"admin"},[e.showScreen?t("div",{staticClass:"container w-full flex flex-wrap mx-auto px-2 pt-8 lg:pt-16 md:pt-16 mt-10"},[e._m(0),t("div",{staticClass:"flex w-full mt-6"},[t("div",{staticClass:"pr-3 mb-4 w-full text-right"},[t("button",{staticClass:"mt-2 inline-block py-2 px-4 text-white shadow-md bg-background-secondary text-right",on:{click:function(t){return e.triggerProxyReport()}}},[e._v("Export All Proxy Report")])])]),t("div",{staticClass:"w-full mt-4"},[t("div",{staticClass:"max-w-6xl m-auto shadow text-background-secondary p-4"},[t("div",{staticClass:"flex w-full mt-6"},[t("div",{staticClass:"w-full pr-3 mb-4"},[t("label",{staticClass:"block tracking-wide -text-blue-800 opacity-80 font-normal mb-2"},[e._v(" Skill ")]),t("select",{staticClass:"appearance-none block w-full text-gray-700 border border-gray-200 rounded py-2 px-4 leading-tight focus:outline-none focus:bg-white focus:border-gray-500",on:{change:function(t){return e.getSelectedSkill(t)}}},[t("option",[e._v("Select Skill")]),e._l(e.skills,(function(a){return t("option",{key:a.skill_id,domProps:{value:a.skill_id}},[e._v(e._s(a.skill_alias))])}))],2)]),t("div",{staticClass:"w-full pr-3 mb-4"},[t("label",{staticClass:"block tracking-wide -text-blue-800 opacity-80 font-normal mb-2"},[e._v(" Proficiency ")]),t("select",{staticClass:"appearance-none block w-full text-gray-700 border border-gray-200 rounded py-2 px-4 leading-tight focus:outline-none focus:bg-white focus:border-gray-500",on:{change:function(t){return e.getSelectedProficiency(t)}}},[t("option",[e._v("Select Proficiency")]),e._l(e.proficiency,(function(a){return t("option",{key:a.prof_id,domProps:{value:a.prof_id}},[e._v(e._s(a.prof_name))])}))],2)]),t("div",{staticClass:"w-full mb-4"},[t("button",{staticClass:"mt-8 inline-block py-2 px-4 text-white shadow-md bg-background-secondary",on:{click:function(t){return e.getLearnerForProxy()}}},[e._v("Search Learner")])])]),e.proxyButtonVisible?t("div",{staticClass:"flex w-full mt-6"},[t("div",{staticClass:"w-1/4 pr-3 mb-4"},[t("button",{staticClass:"mt-2 inline-block py-2 px-4 text-white shadow-md bg-background-secondary",on:{click:function(t){return e.showProxy()}}},[e._v("View available Proxy")])])]):e._e(),e.reportSuccessMessage?t("div",{staticClass:"text-green-700"},[e._v(e._s(e.reportSuccessMessage))]):e._e(),e.learnerData?t("div",{staticClass:"flex w-full"},[t("div",{staticClass:"w-full mt-4 tableScroll"},[t("table",{staticClass:"w-full text-md bg-white rounded"},[e._m(1),t("tbody",{staticClass:"opacity-80 -text-blue-800 align-bottom"},e._l(e.learnerData,(function(a){return t("tr",{key:a.id,staticClass:"border-b hover:bg-gray-300"},[t("td",{staticClass:"py-2 pl-3 pr-0 text-sm w-6"},[t("input",{directives:[{name:"model",rawName:"v-model",value:e.selectedTaskId,expression:"selectedTaskId"}],attrs:{type:"checkbox",disabled:e.selectedTaskId.length>4,id:a.learner_task_id},domProps:{value:a.learner_task_id,checked:Array.isArray(e.selectedTaskId)?e._i(e.selectedTaskId,a.learner_task_id)>-1:e.selectedTaskId},on:{click:function(t){return e.setProxyBtn(t)},change:function(t){var r=e.selectedTaskId,s=t.target,l=!!s.checked;if(Array.isArray(r)){var n=a.learner_task_id,o=e._i(r,n);s.checked?o<0&&(e.selectedTaskId=r.concat([n])):o>-1&&(e.selectedTaskId=r.slice(0,o).concat(r.slice(o+1)))}else e.selectedTaskId=l}}})]),t("td",{staticClass:"p-2 px-3"},[e._v(e._s(a.learner_task_id))]),t("td",{staticClass:"p-2 px-3"},[e._v(e._s(a.proxy_key))]),t("td",{staticClass:"p-2 px-3"},[e._v(e._s(a.skillName))]),t("td",{staticClass:"p-2 px-3"},[e._v(e._s(a.proficiencyName))]),t("td",{staticClass:"p-2 px-3"},[e._v(e._s(a.proxy_requested_date))]),t("td",{staticClass:"p-2 px-3"},[e._v(e._s(a.assignment_date))]),t("td",{staticClass:"p-2 px-3"},[e._v(e._s(a.isRereview))]),t("td",{staticClass:"p-2 px-3"},[e._v(e._s(a.ageing))])])})),0)])])]):e._e(),e.isVisible?t("div",{staticClass:"w-full mt-4%"},[t("div",{staticClass:"text-center text-3xl text-background-secondary"},[e._v("Available Proxy")]),e.proxyAssignedBtn?t("div",{staticClass:"w-1/4 pr-3 mb-4"},[t("button",{staticClass:"mt-2 inline-block py-2 px-4 text-white shadow-md bg-background-secondary",on:{click:function(t){return e.assignLearnerToProxy()}}},[e._v("Re-assign Proxy")])]):e._e(),t("div",{staticClass:"w-full mt-4"},[t("table",{staticClass:"w-full text-md bg-white shadow rounded text-over"},[e._m(2),t("tbody",{staticClass:"opacity-80 -text-blue-800 align-bottom"},e._l(e.proxyList,(function(a){return t("tr",{key:a.proxy_ohr,staticClass:"border-b hover:bg-gray-300"},[t("td",{staticClass:"py-2 pl-3 pr-0 text-sm w-6"},[t("input",{directives:[{name:"model",rawName:"v-model",value:e.selectedProxyOhr,expression:"selectedProxyOhr"}],attrs:{type:"checkbox",id:a.proxy_ohr},domProps:{value:a.proxy_ohr,checked:Array.isArray(e.selectedProxyOhr)?e._i(e.selectedProxyOhr,a.proxy_ohr)>-1:e.selectedProxyOhr},on:{change:[function(t){var r=e.selectedProxyOhr,s=t.target,l=!!s.checked;if(Array.isArray(r)){var n=a.proxy_ohr,o=e._i(r,n);s.checked?o<0&&(e.selectedProxyOhr=r.concat([n])):o>-1&&(e.selectedProxyOhr=r.slice(0,o).concat(r.slice(o+1)))}else e.selectedProxyOhr=l},function(t){return e.showAssignProxyBtn(t)}],click:e.checkOne}})]),t("td",{staticClass:"p-2 px-3"},[e._v(e._s(a.proxy_name))]),t("td",{staticClass:"p-2 px-3"},[e._v(e._s(a.proxy_email))]),t("td",{staticClass:"p-2 px-3"},[e._v(e._s(a.proxy_role))]),t("th",{staticClass:"text-left p-2 px-3 text-background-secondary"},[e._v(e._s(a.proxy_ohr))])])})),0)])])]):e._e()])]),e.renderReady?e._e():t("div",{staticClass:"flex flex-col h-min-screen justify-center text-center pageLoader"},[t("img",{staticClass:"mb-8 block mx-auto loadercss mt-3%",attrs:{src:a(9756),alt:"Loader Gif"}}),t("p",{staticClass:"mx-auto mb-10 leading-normal px-4 loadertextcss ext-genpact-darkest-blue"},[e._v("Loading...")])])]):t("div",{staticClass:"container w-full flex flex-wrap mx-auto px-2 pt-8 lg:pt-16 md:pt-16 mt-10"},[e._v("You don't have access")])])},s=[function(){var e=this,t=e._self._c;e._self._setupProxy;return t("div",{staticClass:"w-full"},[t("div",{staticClass:"text-center text-3xl text-background-secondary"},[e._v("All Proxy Review Request")])])},function(){var e=this,t=e._self._c;e._self._setupProxy;return t("thead",{staticClass:"opacity-90 -text-blue-800"},[t("tr",{staticClass:"border-b"},[t("th",{staticClass:"text-left py-2 pl-3 pr-0 w-6 text-background-secondary"}),t("th",{staticClass:"text-left p-2 px-3 text-background-secondary"},[e._v("Learner ID")]),t("th",{staticClass:"text-left p-2 px-3 text-background-secondary"},[e._v("Proxy OHR")]),t("th",{staticClass:"text-left p-2 px-3 text-background-secondary"},[e._v("Skill")]),t("th",{staticClass:"text-left p-2 px-3 text-background-secondary"},[e._v("Proficiency")]),t("th",{staticClass:"text-left p-2 px-3 text-background-secondary"},[e._v("Proxy Requested Date")]),t("th",{staticClass:"text-left p-2 px-3 text-background-secondary"},[e._v("Proxy Assignment Date")]),t("th",{staticClass:"text-left p-2 px-3 text-background-secondary"},[e._v("Re-review")]),t("th",{staticClass:"text-left p-2 px-3 text-background-secondary"},[e._v("Ageing")])])])},function(){var e=this,t=e._self._c;e._self._setupProxy;return t("thead",{staticClass:"opacity-90 -text-blue-800"},[t("tr",{staticClass:"border-b"},[t("th",{staticClass:"text-left py-2 pl-3 pr-0 w-6 text-background-secondary"}),t("th",{staticClass:"text-left p-2 px-3 text-background-secondary"},[e._v("Name")]),t("th",{staticClass:"text-left p-2 px-3 text-background-secondary"},[e._v("Email")]),t("th",{staticClass:"text-left p-2 px-3 text-background-secondary"},[e._v("Role")]),t("th",{staticClass:"text-left p-2 px-3 text-background-secondary"},[e._v("OHR")])])])}],l=a(7203),n=a(8709),o=a(1068),i=a(5279),c=a(1602),u=a.n(c),d=(0,l.defineComponent)({name:"AssignProxy",setup(){const e=(0,l.ref)(),t=(0,l.ref)(),a=(0,l.ref)(),r=(0,l.ref)(),s=(0,l.ref)(),c=(0,l.ref)(),d=(0,l.ref)(!1),p=(0,l.ref)(!1),g=(0,l.ref)(),y=(0,l.ref)([]),f=(0,l.ref)(),v=(0,l.ref)(!1),x=(0,l.ref)(),m=(0,l.ref)(!0),_=(0,l.ref)(),h=(0,l.ref)(),k=(0,l.ref)(),w=()=>{f.value=[]},b=e=>{y.value=[];const t=e.target.checked;!0===t?p.value=!0:(p.value=!1,d.value=!1)},C={},P=async()=>{r.value=!1;const e=await(0,n.QZ)("/getAllSkillProf?skill_type=genome");t.value=e.skill,a.value=e.proficiency,r.value=!0},S=async()=>{try{console.log(C),r.value=!1,await w(),y.value=[];const s=await(0,o._A)(C);e.value=s.data.allProxyList;for(let r=0;r<e.value.length;r+=1){const s=e.value[r];console.log(`res ${JSON.stringify(s)}`);const l=u()().utc().format("YYYY-MM-DD");if(s.assignment_date){const e=u()(s.assignment_date).utc().format("YYYY-MM-DD");s.ageing=u()(l).diff(u()(e),"days"),s.assignment_date=u()(s.assignment_date).format("DD-MM-YYYY")}if(s.proxy_requested_date&&(s.proxy_requested_date=u()(s.proxy_requested_date).format("DD-MM-YYYY")),s.skill){const e=t.value.filter((e=>{console.log(`item ${JSON.stringify(e)}`);const t=e.skill_id;return console.log(`skill ${t}`),!!t&&t===s.skill}));console.log(`learnerSkillArr ${JSON.stringify(e)}`),s.skillName=e[0].skill_alias}else s.skillName="";if(s.proficiency){const e=a.value.filter((e=>{console.log(`item ${JSON.stringify(e)}`);const t=e.prof_id;return console.log(`prof ${t}`),!!t&&t===s.proficiency}));console.log(`learnerProfArr ${JSON.stringify(e)}`),s.proficiencyName=e[0].prof_name}else s.proficiencyName=""}e.value=e.value.sort(((e,t)=>t.ageing-e.ageing)),r.value=!0}catch(s){console.log(s)}},A=async e=>{s.value=e.target.value,Object.assign(C,{skill:s.value})},Z=async e=>{c.value=e.target.value,Object.assign(C,{proficiency:c.value})},O=async()=>{console.log(`selectedTaskId.value[0] ${y.value[0]}`);const t=e.value.filter((e=>y.value[0]===e.learner_task_id));console.log(`selectedLearnerArr ${t}`),_.value=t[0].skill,h.value=t[0].proficiency,d.value=!0,r.value=!1,g.value=await(0,n.Nl)("/getAllProxyBySkill",_.value),r.value=!0,console.log("Proxy List",g.value)},$=async e=>{const t=e.target.checked;v.value=!0===t},D=async()=>{try{console.log(`selectedProxyOhr.value[0] ${f.value[0]}`),console.log(`selectedSkill.value ${_.value}`),console.log(`selectedProficiency.value ${h.value}`),r.value=!1;const e={proxy_key:f.value[0],learners:y.value,linked_program_name:"infinity",skill:_.value,proficiency:h.value},t=await(0,n.kn)("/proxyreview",e);d.value=!1,await S(),r.value=!0,console.log("data ohr",t)}catch(e){console.log("data ohr",e)}},N=async()=>{const e=await(0,o.yc)("/admin/proxy/export");k.value="The report will be emailed to you",setTimeout((()=>{k.value=null}),6e3),console.log(`Report Trigger Response ${e}`)};return(0,l.onBeforeMount)((async()=>{await P();const e=await(0,i.GF)("/getUserRole");x.value=e.user_roles,x.value.length>0&&(x.value.includes("System Admin")||x.value.includes("Community Manager")||x.value.includes("Proxy Admin")?m.value=!0:m.value=!1)})),{learnerData:e,skills:t,proficiency:a,renderReady:r,getSelectedSkill:A,getSelectedProficiency:Z,isVisible:d,showProxy:O,getSkillandProf:P,getLearnerForProxy:S,selectedTaskId:y,proxyButtonVisible:p,setProxyBtn:b,proxyList:g,selectedProxyOhr:f,checkOne:w,showAssignProxyBtn:$,proxyAssignedBtn:v,assignLearnerToProxy:D,showScreen:m,triggerProxyReport:N,reportSuccessMessage:k}}}),p=d,g=a(1001),y=(0,g.Z)(p,r,s,!1,null,"6f090fc0",null),f=y.exports},8709:function(e,t,a){a.d(t,{G7:function(){return s},Nl:function(){return n},QZ:function(){return l},kn:function(){return o}});var r=a(7129);const s=async(e,t)=>{const a=await r.Z.post(e,t);return a},l=async e=>{let t;return await r.Z.get(e).then((e=>(t=e.data,t))),t},n=async(e,t)=>{let a;return await r.Z.get(`${e}/${t}`).then((e=>(a=e.data.allProxyList,a))),a},o=async(e,t)=>{const a=await r.Z.post(e,t);return a}},1815:function(e,t,a){a.d(t,{Lo:function(){return n},M0:function(){return o},QZ:function(){return s},Z9:function(){return i},oA:function(){return l}});var r=a(7129);const s=async e=>{let t;return await r.Z.get(e).then((e=>(t=e.data,t))),t},l=async e=>{const t=await r.Z.get(e);return t.data},n=async(e,t)=>{const a=await r.Z.post(e,t);return a.data},o=async(e,t)=>{const a=await r.Z.post(e,t);return a.data.resp_message},i=async(e,t)=>{const a=await r.Z.post(e,t);return a.data.resp_message}},5279:function(e,t,a){a.d(t,{$d:function(){return s},$i:function(){return b},Ao:function(){return v},DU:function(){return y},EX:function(){return D},F5:function(){return N},FS:function(){return p},GF:function(){return A},Iu:function(){return n},J1:function(){return w},Jf:function(){return _},Kk:function(){return x},N9:function(){return Z},P8:function(){return u},VP:function(){return m},Vz:function(){return C},WX:function(){return g},X$:function(){return h},XP:function(){return l},Yb:function(){return S},a4:function(){return O},dH:function(){return k},gh:function(){return f},nb:function(){return i},oA:function(){return P},r4:function(){return d},sd:function(){return c},wp:function(){return o},xJ:function(){return $}});var r=a(7129);const s=async e=>{let t;return await r.Z.get(e).then((e=>(t=e.data,t))),t},l=async e=>{let t;return await r.Z.get(e).then((e=>(t=e.data,t))),t},n=async e=>{let t;return await r.Z.get(e).then((e=>(t=e.data,t))),t},o=async e=>{let t;return await r.Z.get(e).then((e=>(t=e.data,t))),t},i=async e=>{let t;return await r.Z.get(e).then((e=>(t=e.data,t))),t},c=async e=>{let t;return await r.Z.get(e).then((e=>(t=e.data,t))),t},u=async e=>{let t;return await r.Z.get(e).then((e=>(t=e.data,t))),t},d=async e=>{let t;return await r.Z.get(e).then((e=>(t=e.data,t))),t},p=async e=>{let t;return await r.Z.get(e).then((e=>(t=e.data,t))),t},g=async e=>{let t;return await r.Z.get(e).then((e=>(t=e.data,t))),t},y=async e=>{let t;return await r.Z.get(e).then((e=>(t=e.data,t))),t},f=async e=>{let t;return await r.Z.get(e).then((e=>(t=e.data,t))),t},v=async e=>{let t;return await r.Z.get(e).then((e=>(t=e.data.userObj,t))),t},x=async e=>{let t;return await r.Z.get(e).then((e=>(t=e.data.userObj,t))),t},m=async e=>{let t;return await r.Z.get(e).then((e=>(t=e.data.userObj,t))),t},_=async e=>{let t;return await r.Z.get(e).then((e=>(t=e.data,t))),t},h=async e=>{let t;return await r.Z.get(e).then((e=>(t=e.data,t))),t},k=async e=>{let t;return await r.Z.get(e).then((e=>(t=e.data,t))),t},w=async e=>{const t=await r.Z.get(e);return t},b=async e=>{const t=await r.Z.get(e);return t},C=async e=>{const t=await r.Z.get(e);return t},P=async e=>{let t;return await r.Z.get(e).then((e=>(t=e.data,t))),t},S=async e=>{let t;return await r.Z.get(e).then((e=>(t=e.data,t))),t},A=async e=>{let t;return await r.Z.get(e).then((e=>(t=e.data.userObj,t))),t},Z=async e=>{const t=await r.Z.post("/user/role",e);return t},O=async e=>{const t=await r.Z.post("/user/removeRole",e);return t},$=async()=>{const e=await r.Z.get("role");return e},D=async e=>{const t=await r.Z.post("/user/saveLSS",e);return t},N=async e=>{const t=await r.Z.post("/user/saveEnvAccess",e);return t}},2027:function(e,t,a){a.d(t,{DC:function(){return l},JS:function(){return n},uA:function(){return s}});var r=a(7129);const s=async e=>{try{let t;return await r.Z.get(`/program/${e}`).then((e=>(t=e.data,t))),t}catch(t){return t}},l=async e=>{try{let t;return console.log("inside update Program Service"),await r.Z.put("/program",e).then((e=>(console.log("program Response",e),t=e.data,t))),t}catch(t){return t}},n=async e=>{const t=await r.Z.post("/program/email/event/create",e);return t}},9649:function(e,t,a){a.d(t,{$M:function(){return d},F9:function(){return g},HX:function(){return o},V$:function(){return i},VA:function(){return l},dr:function(){return s},gs:function(){return y},jz:function(){return p},q$:function(){return u},rP:function(){return n},yW:function(){return c}});var r=a(7129);const s=async e=>{let t;return await r.Z.get(e).then((e=>(console.log("Response",e),t=e.data.response.program_name,t))),t},l=async(e,t)=>{let a;return await r.Z.post(e,t).then((e=>(a=e.data.tasks,a))),a},n=async(e,t)=>{let a;return await r.Z.post(e,t).then((e=>(a=e.data.learnerDetails,a))),a},o=async(e,t)=>{let a;return await r.Z.post(e,t).then((e=>(a=e.data.tasks,a))),a},i=async(e,t)=>{let a;return await r.Z.post(e,t).then((e=>(a=e.data,a))),a},c=async e=>{let t;try{return await r.Z.get(`/task/${e}`).then((e=>(t=e.data.data,t))),t}catch(a){return a}},u=async(e,t)=>{try{const a=await fetch(`${e}`,{method:"put",body:t}),r=a;return r}catch(a){return console.error(a),a}},d=async(e,t)=>{let a;return await r.Z.post(e,t).then((e=>(a=e.data.tasks,a))),a},p=async(e,t)=>{let a;return await r.Z.post(e,t).then((e=>(a=e.data.tasks,a))),a},g=async e=>{console.log(`inside save task data ${JSON.stringify(e)}`);const t=await r.Z.post("/task/create",e);return t},y=async e=>{try{let t;return await r.Z.get(`/admin/task/taskExport/${e}`).then((async e=>(t=e.data,t))),t}catch(t){return t}}},1068:function(e,t,a){a.d(t,{Ho:function(){return s},_A:function(){return l},cQ:function(){return n},yc:function(){return o}});var r=a(7129);const s=async(e,t)=>{let a;return await r.Z.post(e,t).then((e=>(a=e.data,a))),a},l=async e=>{const t=await r.Z.post("getAllProxyAssignedLearner",e);return t},n=async e=>{const t=await r.Z.post("program/proxies/learners",e);return t},o=async e=>{const t=await r.Z.get(e);return t}}}]);
2
2
  //# sourceMappingURL=solidify.umd.min.SolidifyAdministrationViewAllProxyRequests.js.map
@@ -1,2 +1,2 @@
1
- "use strict";(("undefined"!==typeof self?self:this)["webpackChunksolidify"]=("undefined"!==typeof self?self:this)["webpackChunksolidify"]||[]).push([[885],{5927:function(e,t,a){a.r(t),a.d(t,{default:function(){return _}});var s=function(){var e=this,t=e._self._c;e._self._setupProxy;return t("div",{staticClass:"admin"},[t("div",{staticClass:"container w-full flex flex-wrap mx-auto px-2 pt-8 lg:pt-16 md:pt-16 mt-10"},[e._m(0),t("div",{staticClass:"flex w-full mt-6"},[t("div",{staticClass:"w-8 mt-7 mb-4"},[t("button",{staticClass:"mt-4 mr-2 text-blue-900 shadow-md",on:{click:function(t){return e.refreshPage()}}},[t("RefreshCcwIcon",{staticClass:"mr-2",attrs:{size:"1x"}})],1)]),t("div",{staticClass:"w-1/4 mb-4"},[t("label",{staticClass:"block tracking-wide -text-blue-800 opacity-80 font-normal mb-2"},[e._v(" Filter By Status ")]),t("select",{directives:[{name:"model",rawName:"v-model",value:e.selectedstatus,expression:"selectedstatus"}],staticClass:"appearance-none block w-full text-gray-700 border border-gray-200 rounded py-2 px-4 leading-tight focus:outline-none focus:bg-white focus:border-gray-500",on:{change:[function(t){var a=Array.prototype.filter.call(t.target.options,(function(e){return e.selected})).map((function(e){var t="_value"in e?e._value:e.value;return t}));e.selectedstatus=t.target.multiple?a:a[0]},function(t){return e.getSelectedStatus(t)}]}},[t("option",{attrs:{value:""}},[e._v("Select Status")]),e._l(e.proxyStatus,(function(a){return t("option",{key:a,domProps:{value:a}},[e._v(e._s(a))])}))],2)])]),t("div",{directives:[{name:"show",rawName:"v-show",value:e.reviewBtnShow,expression:"reviewBtnShow"}],staticClass:"flex w-full"},[t("router-link",{staticClass:"mt-6 inline-block py-2 px-4 text-white shadow-md bg-background-secondary",attrs:{to:{name:"SolidifyLearnerProxyReview",query:{learner_task_id:e.learnerTaskId}},target:"_blank"}},[e._v("Review")])],1),t("div",{staticClass:"w-full mt-1 tableScroll"},[t("table",{staticClass:"w-full text-center text-md bg-white shadow rounded mb-4"},[t("thead",{staticClass:"opacity-90 -text-blue-800"},[t("tr",{staticClass:"border-b"},[t("th",{staticClass:"py-2 pl-3 pr-0 w-6"}),t("th",{staticClass:"p-2 px-3 text-background-secondary"},[e._v("Skill")]),t("th",{staticClass:"p-2 px-3 text-background-secondary"},[e._v("Proficiency")]),t("th",{staticClass:"p-2 px-3 text-background-secondary"},[e._v("Task Name")]),t("th",{staticClass:"p-2 px-3 text-background-secondary"},[e._v("Task Submission Date")]),t("th",{staticClass:"p-2 px-3 text-background-secondary"},[e._v("ID - Learner Activities")]),t("th",{staticClass:"p-2 px-3 text-background-secondary"},[e._v("Proxy Requested Date")]),t("th",{staticClass:"p-2 px-3 text-background-secondary"},[e._v("Assign Date")]),e.showDeassignCol?t("th",{staticClass:"p-2 px-3 text-background-secondary"},[e._v("Deassign Date")]):e._e(),e.showCompletionCol?t("th",{staticClass:"p-2 px-3 text-background-secondary"},[e._v("Completion Date")]):e._e(),t("th",{staticClass:"p-2 px-3 text-background-secondary"},[e._v("is Re-review")]),t("th",{staticClass:"p-2 px-3 text-background-secondary"},[e._v("Status")])])]),t("tbody",{staticClass:"opacity-80 -text-blue-800"},e._l(e.proxyLearnerDetails,(function(a){return t("tr",{key:a.id,staticClass:"border-b hover:bg-gray-300"},[t("td",{staticClass:"py-2 pl-3 pr-0 text-sm w-6"},[t("input",{directives:[{name:"model",rawName:"v-model",value:e.reviewCheckOne,expression:"reviewCheckOne"}],attrs:{type:"checkbox",id:a.learner_task_id},domProps:{value:a.learner_task_id,checked:Array.isArray(e.reviewCheckOne)?e._i(e.reviewCheckOne,a.learner_task_id)>-1:e.reviewCheckOne},on:{change:[function(t){var s=e.reviewCheckOne,r=t.target,n=!!r.checked;if(Array.isArray(s)){var i=a.learner_task_id,l=e._i(s,i);r.checked?l<0&&(e.reviewCheckOne=s.concat([i])):l>-1&&(e.reviewCheckOne=s.slice(0,l).concat(s.slice(l+1)))}else e.reviewCheckOne=n},function(t){return e.showReviewBtn(t,a.learner_task_id,a.review_status)}],click:e.assignedcheckedOne}})]),t("td",{staticClass:"p-2 px-3"},[e._v(e._s(a.skill))]),t("td",{staticClass:"p-2 px-3"},[e._v(e._s(a.proficiency))]),t("td",{staticClass:"p-2 px-3"},[e._v(e._s(a.task_name))]),t("td",{staticClass:"p-2 px-3"},[e._v(e._s(a.submission_date))]),t("td",{staticClass:"p-2 px-3"},[e._v(e._s(a.learner_task_id))]),t("td",{staticClass:"p-2 px-3"},[e._v(e._s(a.proxy_requested_date))]),t("td",{staticClass:"p-2 px-3"},[e._v(e._s(a.assignment_date))]),e.showDeassignCol?t("td",{staticClass:"p-2 px-3"},[e._v(e._s(a.deassignment_date))]):e._e(),e.showCompletionCol?t("td",{staticClass:"p-2 px-3"},[e._v(e._s(a.completion_date))]):e._e(),t("td",{staticClass:"p-2 px-3"},[e._v(e._s(a.isRereview))]),t("td",{staticClass:"p-2 px-3"},[e._v(e._s(a.review_status))])])})),0)])]),e.renderReady?e._e():t("div",{staticClass:"flex flex-col h-min-screen justify-center text-center pageLoader"},[t("img",{staticClass:"mb-8 block mx-auto loadercss mt-3%",attrs:{src:a(9756),alt:"Loader Gif"}}),t("p",{staticClass:"mx-auto mb-10 leading-normal px-4 loadertextcss ext-genpact-darkest-blue"},[e._v("Loading...")])])])])},r=[function(){var e=this,t=e._self._c;e._self._setupProxy;return t("div",{staticClass:"w-full"},[t("div",{staticClass:"text-center text-3xl text-background-secondary"},[e._v("My Proxy Review Request")])])}],n=a(7203),i=a(4856),l=a(1068),o=a(1602),c=a.n(o),d=(0,n.defineComponent)({components:{RefreshCcwIcon:i.Qn4},name:"ViewRereviewRequests",setup(){const e=(0,n.ref)(),t=(0,n.ref)(),a=(0,n.ref)(),s=(0,n.ref)([]),r=(0,n.ref)(!1),i=(0,n.ref)(),o=(0,n.ref)(),d=(0,n.ref)(""),u=(0,n.ref)(!1),p=(0,n.ref)(!1),v=(0,n.ref)(0),_=(0,n.ref)(0),x=()=>{s.value=[]},f=(e,t,a)=>{const s=e.target.checked;!0===s&&"active"===a?(r.value=!0,i.value=t):r.value=!1},m=async()=>{try{t.value=!1,_.value=0,v.value=0,p.value=!1,u.value=!1;const e=await(0,l.Ho)("/learnerTaskToProxyReview",{review_status:d.value});a.value=e.learnerToProxyAssign,o.value=e.reviewStatus;for(let t=0;t<a.value.length;t+=1){const e=a.value[t];e.assignment_date&&(e.assignment_date=c()(e.assignment_date).utc().format("YYYY-MM-DD")),e.submission_date&&(e.submission_date=c()(e.submission_date).utc().format("YYYY-MM-DD")),e.proxy_requested_date&&(e.proxy_requested_date=c()(e.proxy_requested_date).utc().format("YYYY-MM-DD")),e.completion_date?(_.value+=1,e.completion_date=c()(e.completion_date).utc().format("YYYY-MM-DD")):e.completion_date="",e.deassignment_date?(v.value+=1,e.deassignment_date=c()(e.deassignment_date).utc().format("YYYY-MM-DD")):e.deassignment_date=""}_.value>0&&(p.value=!0),v.value>0&&(u.value=!0),t.value=!0}catch(e){}},w=async()=>{s.value=[],i.value="",r.value=!1,await m()},y=async e=>{d.value=e.target.value,await m()};return(0,n.onBeforeMount)((async()=>{await m()})),{LearnerDetails:e,renderReady:t,proxyLearnerDetails:a,getProxyLearner:m,reviewCheckOne:s,reviewBtnShow:r,learnerTaskId:i,assignedcheckedOne:x,showReviewBtn:f,refreshPage:w,proxyStatus:o,getSelectedStatus:y,selectedstatus:d,showDeassignCol:u,showCompletionCol:p}}}),u=d,p=a(1001),v=(0,p.Z)(u,s,r,!1,null,"e086cae2",null),_=v.exports},1068:function(e,t,a){a.d(t,{Ho:function(){return r},_A:function(){return n},cQ:function(){return i},yc:function(){return l}});var s=a(7129);const r=async(e,t)=>{let a;return await s.Z.post(e,t).then((e=>(a=e.data,a))),a},n=async e=>{const t=await s.Z.post("getAllProxyAssignedLearner",e);return t},i=async e=>{const t=await s.Z.post("program/proxies/learners",e);return t},l=async e=>{const t=await s.Z.get(e);return t}},9756:function(e,t,a){e.exports=a.p+"img/loadernew.gif"}}]);
1
+ "use strict";(("undefined"!==typeof self?self:this)["webpackChunksolidify"]=("undefined"!==typeof self?self:this)["webpackChunksolidify"]||[]).push([[885],{5927:function(e,t,a){a.r(t),a.d(t,{default:function(){return _}});var s=function(){var e=this,t=e._self._c;e._self._setupProxy;return t("div",{staticClass:"admin"},[t("div",{staticClass:"container w-full flex flex-wrap mx-auto px-2 pt-8 lg:pt-16 md:pt-16 mt-10"},[e._m(0),t("div",{staticClass:"flex w-full mt-6"},[t("div",{staticClass:"w-8 mt-7 mb-4"},[t("button",{staticClass:"mt-4 mr-2 text-blue-900 shadow-md",on:{click:function(t){return e.refreshPage()}}},[t("RefreshCcwIcon",{staticClass:"mr-2",attrs:{size:"1x"}})],1)]),t("div",{staticClass:"w-1/4 mb-4"},[t("label",{staticClass:"block tracking-wide -text-blue-800 opacity-80 font-normal mb-2"},[e._v(" Filter By Status ")]),t("select",{directives:[{name:"model",rawName:"v-model",value:e.selectedstatus,expression:"selectedstatus"}],staticClass:"appearance-none block w-full text-gray-700 border border-gray-200 rounded py-2 px-4 leading-tight focus:outline-none focus:bg-white focus:border-gray-500",on:{change:[function(t){var a=Array.prototype.filter.call(t.target.options,(function(e){return e.selected})).map((function(e){var t="_value"in e?e._value:e.value;return t}));e.selectedstatus=t.target.multiple?a:a[0]},function(t){return e.getSelectedStatus(t)}]}},[t("option",{attrs:{value:""}},[e._v("Select Status")]),e._l(e.proxyStatus,(function(a){return t("option",{key:a,domProps:{value:a}},[e._v(e._s(a))])}))],2)])]),t("div",{directives:[{name:"show",rawName:"v-show",value:e.reviewBtnShow,expression:"reviewBtnShow"}],staticClass:"flex w-full"},[t("router-link",{staticClass:"mt-6 inline-block py-2 px-4 text-white shadow-md bg-background-secondary",attrs:{to:{name:"SolidifyLearnerProxyReview",query:{learner_task_id:e.learnerTaskId}},target:"_blank"}},[e._v("Review")])],1),t("div",{staticClass:"w-full mt-1 tableScroll"},[t("table",{staticClass:"w-full text-center text-md bg-white shadow rounded mb-4"},[t("thead",{staticClass:"opacity-90 -text-blue-800"},[t("tr",{staticClass:"border-b"},[t("th",{staticClass:"py-2 pl-3 pr-0 w-6"}),t("th",{staticClass:"p-2 px-3 text-background-secondary"},[e._v("Skill")]),t("th",{staticClass:"p-2 px-3 text-background-secondary"},[e._v("Proficiency")]),t("th",{staticClass:"p-2 px-3 text-background-secondary"},[e._v("Task Name")]),t("th",{staticClass:"p-2 px-3 text-background-secondary"},[e._v("Task Submission Date")]),t("th",{staticClass:"p-2 px-3 text-background-secondary"},[e._v("ID - Learner Activities")]),t("th",{staticClass:"p-2 px-3 text-background-secondary"},[e._v("Proxy Requested Date")]),t("th",{staticClass:"p-2 px-3 text-background-secondary"},[e._v("Assign Date")]),e.showDeassignCol?t("th",{staticClass:"p-2 px-3 text-background-secondary"},[e._v("Deassign Date")]):e._e(),e.showCompletionCol?t("th",{staticClass:"p-2 px-3 text-background-secondary"},[e._v("Completion Date")]):e._e(),t("th",{staticClass:"p-2 px-3 text-background-secondary"},[e._v("is Re-review")]),t("th",{staticClass:"p-2 px-3 text-background-secondary"},[e._v("Status")])])]),t("tbody",{staticClass:"opacity-80 -text-blue-800"},e._l(e.proxyLearnerDetails,(function(a){return t("tr",{key:a.id,staticClass:"border-b hover:bg-gray-300"},[t("td",{staticClass:"py-2 pl-3 pr-0 text-sm w-6"},[t("input",{directives:[{name:"model",rawName:"v-model",value:e.reviewCheckOne,expression:"reviewCheckOne"}],attrs:{type:"checkbox",id:a.learner_task_id},domProps:{value:a.learner_task_id,checked:Array.isArray(e.reviewCheckOne)?e._i(e.reviewCheckOne,a.learner_task_id)>-1:e.reviewCheckOne},on:{change:[function(t){var s=e.reviewCheckOne,r=t.target,n=!!r.checked;if(Array.isArray(s)){var i=a.learner_task_id,l=e._i(s,i);r.checked?l<0&&(e.reviewCheckOne=s.concat([i])):l>-1&&(e.reviewCheckOne=s.slice(0,l).concat(s.slice(l+1)))}else e.reviewCheckOne=n},function(t){return e.showReviewBtn(t,a.learner_task_id,a.review_status)}],click:e.assignedcheckedOne}})]),t("td",{staticClass:"p-2 px-3"},[e._v(e._s(a.skill))]),t("td",{staticClass:"p-2 px-3"},[e._v(e._s(a.proficiency))]),t("td",{staticClass:"p-2 px-3"},[e._v(e._s(a.task_name))]),t("td",{staticClass:"p-2 px-3"},[e._v(e._s(a.submission_date))]),t("td",{staticClass:"p-2 px-3"},[e._v(e._s(a.learner_task_id))]),t("td",{staticClass:"p-2 px-3"},[e._v(e._s(a.proxy_requested_date))]),t("td",{staticClass:"p-2 px-3"},[e._v(e._s(a.assignment_date))]),e.showDeassignCol?t("td",{staticClass:"p-2 px-3"},[e._v(e._s(a.deassignment_date))]):e._e(),e.showCompletionCol?t("td",{staticClass:"p-2 px-3"},[e._v(e._s(a.completion_date))]):e._e(),t("td",{staticClass:"p-2 px-3"},[e._v(e._s(a.isRereview))]),t("td",{staticClass:"p-2 px-3"},[e._v(e._s(a.review_status))])])})),0)])]),e.renderReady?e._e():t("div",{staticClass:"flex flex-col h-min-screen justify-center text-center pageLoader"},[t("img",{staticClass:"mb-8 block mx-auto loadercss mt-3%",attrs:{src:a(9756),alt:"Loader Gif"}}),t("p",{staticClass:"mx-auto mb-10 leading-normal px-4 loadertextcss ext-genpact-darkest-blue"},[e._v("Loading...")])])])])},r=[function(){var e=this,t=e._self._c;e._self._setupProxy;return t("div",{staticClass:"w-full"},[t("div",{staticClass:"text-center text-3xl text-background-secondary"},[e._v("My Proxy Review Request")])])}],n=a(7203),i=a(4856),l=a(1068),c=a(1602),o=a.n(c),d=(0,n.defineComponent)({components:{RefreshCcwIcon:i.Qn4},name:"ViewRereviewRequests",setup(){const e=(0,n.ref)(),t=(0,n.ref)(),a=(0,n.ref)(),s=(0,n.ref)([]),r=(0,n.ref)(!1),i=(0,n.ref)(),c=(0,n.ref)(),d=(0,n.ref)(""),u=(0,n.ref)(!1),p=(0,n.ref)(!1),v=(0,n.ref)(0),_=(0,n.ref)(0),x=()=>{s.value=[]},f=(e,t,a)=>{const s=e.target.checked;!0===s&&"active"===a?(r.value=!0,i.value=t):r.value=!1},m=async()=>{try{t.value=!1,_.value=0,v.value=0,p.value=!1,u.value=!1;const e=await(0,l.Ho)("/learnerTaskToProxyReview",{review_status:d.value});a.value=e.learnerToProxyAssign,c.value=e.reviewStatus;for(let t=0;t<a.value.length;t+=1){const e=a.value[t];e.assignment_date&&(e.assignment_date=o()(e.assignment_date).utc().format("YYYY-MM-DD")),e.submission_date&&(e.submission_date=o()(e.submission_date).utc().format("YYYY-MM-DD")),e.proxy_requested_date&&(e.proxy_requested_date=o()(e.proxy_requested_date).utc().format("YYYY-MM-DD")),e.completion_date?(_.value+=1,e.completion_date=o()(e.completion_date).utc().format("YYYY-MM-DD")):e.completion_date="",e.deassignment_date?(v.value+=1,e.deassignment_date=o()(e.deassignment_date).utc().format("YYYY-MM-DD")):e.deassignment_date=""}_.value>0&&(p.value=!0),v.value>0&&(u.value=!0),t.value=!0}catch(e){}},w=async()=>{s.value=[],i.value="",r.value=!1,await m()},y=async e=>{d.value=e.target.value,await m()};return(0,n.onBeforeMount)((async()=>{await m()})),{LearnerDetails:e,renderReady:t,proxyLearnerDetails:a,getProxyLearner:m,reviewCheckOne:s,reviewBtnShow:r,learnerTaskId:i,assignedcheckedOne:x,showReviewBtn:f,refreshPage:w,proxyStatus:c,getSelectedStatus:y,selectedstatus:d,showDeassignCol:u,showCompletionCol:p}}}),u=d,p=a(1001),v=(0,p.Z)(u,s,r,!1,null,"e086cae2",null),_=v.exports},1068:function(e,t,a){a.d(t,{Ho:function(){return r},_A:function(){return n},cQ:function(){return i},yc:function(){return l}});var s=a(7129);const r=async(e,t)=>{let a;return await s.Z.post(e,t).then((e=>(a=e.data,a))),a},n=async e=>{const t=await s.Z.post("getAllProxyAssignedLearner",e);return t},i=async e=>{const t=await s.Z.post("program/proxies/learners",e);return t},l=async e=>{const t=await s.Z.get(e);return t}}}]);
2
2
  //# sourceMappingURL=solidify.umd.min.SolidifyAdministrationViewProxyRequests.js.map
@@ -1,2 +1,2 @@
1
- "use strict";(("undefined"!==typeof self?self:this)["webpackChunksolidify"]=("undefined"!==typeof self?self:this)["webpackChunksolidify"]||[]).push([[325],{4960:function(t,e,n){n.r(e),n.d(e,{default:function(){return f}});var a=function(){var t=this,e=t._self._c;t._self._setupProxy;return e("div",{staticClass:"admin"},[t.showScreen?e("div",{staticClass:"container w-full flex flex-wrap mx-auto px-2 pt-8 lg:pt-16 md:pt-16 mt-10"},[t._m(0),e("div",{staticClass:"w-full mt-4"},[e("div",{staticClass:"max-w-6xl m-auto shadow p-4 text-background-secondary"},[e("div",{staticClass:"flex w-full mt-6"},[e("div",{staticClass:"w-full pr-3 mb-4"},[e("label",{staticClass:"block tracking-wide -text-blue-800 opacity-80 font-normal mb-2"},[t._v(" Skill ")]),e("select",{staticClass:"appearance-none block w-full text-gray-700 border border-gray-200 rounded py-2 px-4 leading-tight focus:outline-none focus:bg-white focus:border-gray-500",on:{change:function(e){return t.getSelectedSkill(e)}}},[e("option",[t._v("Select Skill")]),t._l(t.skills,(function(n){return e("option",{key:n.skill_id,domProps:{value:n.skill_id}},[t._v(t._s(n.skill_alias))])}))],2)]),e("div",{staticClass:"w-full pr-3 mb-4"},[e("label",{staticClass:"block tracking-wide -text-blue-800 opacity-80 font-normal mb-2"},[t._v(" Proficiency ")]),e("select",{staticClass:"appearance-none block w-full text-gray-700 border border-gray-200 rounded py-2 px-4 leading-tight focus:outline-none focus:bg-white focus:border-gray-500",on:{change:function(e){return t.getSelectedProficiency(e)}}},[e("option",[t._v("Select Proficiency")]),t._l(t.proficiency,(function(n){return e("option",{key:n.prof_id,domProps:{value:n.prof_id}},[t._v(t._s(n.prof_name))])}))],2)]),e("div",{staticClass:"w-full pr-3 mb-4"},[e("label",{staticClass:"block tracking-wide -text-blue-800 opacity-80 font-normal mb-2"},[t._v(" Threshold Value ")]),e("input",{directives:[{name:"model",rawName:"v-model",value:t.threshold,expression:"threshold"}],staticClass:"appearance-none block w-full text-gray-700 border border-gray-200 rounded py-2 px-4 leading-tight focus:outline-none focus:bg-white focus:border-gray-500",attrs:{type:"text",pattern:"^[0-9]*$"},domProps:{value:t.threshold},on:{input:function(e){e.target.composing||(t.threshold=e.target.value)}}}),t.numErrMessage?e("div",{staticClass:"text-red-700"},[t._v(t._s(t.numErrMessage))]):t._e()]),e("div",{staticClass:"w-full mb-4"},[e("button",{staticClass:"mt-8 inline-block py-2 px-4 text-white shadow-md bg-background-secondary",on:{click:function(e){return t.triggerReport()}}},[t._v("Submit")])])]),t.successMessage?e("div",{staticClass:"text-green-700"},[t._v(t._s(t.successMessage))]):t._e(),t.errorMessage?e("div",{staticClass:"text-red-700"},[t._v(t._s(t.errorMessage))]):t._e()])]),t.renderReady?t._e():e("div",{staticClass:"flex flex-col h-min-screen justify-center text-center pageLoader"},[e("img",{staticClass:"mb-8 block mx-auto loadercss mt-3%",attrs:{src:n(9756),alt:"Loader Gif"}}),e("p",{staticClass:"mx-auto mb-10 leading-normal px-4 loadertextcss ext-genpact-darkest-blue"},[t._v("Loading...")])])]):e("div",{staticClass:"container w-full flex flex-wrap mx-auto px-2 pt-8 lg:pt-16 md:pt-16 mt-10"},[t._v("You don't have access")])])},r=[function(){var t=this,e=t._self._c;t._self._setupProxy;return e("div",{staticClass:"w-full"},[e("div",{staticClass:"text-center text-3xl text-background-secondary"},[t._v("Harvest Report")])])}],s=n(7203),l=n(5279),i=n(9178),u=(0,s.defineComponent)({name:"AssignProxy",setup(){const t=(0,s.ref)(),e=(0,s.ref)(),n=(0,s.ref)(),a=(0,s.ref)(),r=(0,s.ref)(),u=(0,s.ref)(),o=(0,s.ref)(),c=(0,s.ref)(),d=(0,s.ref)(),f=(0,s.ref)(),g=(0,s.ref)(!0),y=async()=>{if(n.value=!1,void 0===a.value)o.value="Select Skill",setTimeout((()=>{o.value=null}),6e3);else if(/^[0-9]+$/.test(d.value)){const t={skill_id:a.value,proficiency_id:r.value,threshold:d.value};await(0,i.I$)("/admin/report/harvestLJ",t),c.value="The harvesting report is being processed. You should get that over email in next 15 minutes",setTimeout((()=>{c.value=null}),6e3)}else f.value="Enter only Number",setTimeout((()=>{f.value=null}),6e3);n.value=!0},v=async()=>{n.value=!1;const a=await(0,i.QZ)("/getAllSkillProf?skill_type=all");t.value=a.skill,e.value=a.proficiency,n.value=!0},p=async t=>{a.value=t.target.value},h=async t=>{r.value=t.target.value,"Select Proficiency"===r.value&&(r.value="")};return(0,s.onBeforeMount)((async()=>{const t=await(0,l.GF)("/getUserRole");u.value=t.user_roles,u.value.length>0&&(console.log("inside length"),u.value.includes("System Admin")||u.value.includes("Proxy Admin")||u.value.includes("Community Manager")||u.value.includes("Knowledge Manager")?(g.value=!0,v()):g.value=!1)})),{skills:t,proficiency:e,renderReady:n,getSelectedSkill:p,getSelectedProficiency:h,getSkillandProf:v,showScreen:g,triggerReport:y,errorMessage:o,successMessage:c,threshold:d,numErrMessage:f}}}),o=u,c=n(1001),d=(0,c.Z)(o,a,r,!1,null,"383c6043",null),f=d.exports},9178:function(t,e,n){n.d(e,{I$:function(){return s},N0:function(){return i},QZ:function(){return r},S$:function(){return l},WK:function(){return u}});var a=n(7129);const r=async t=>{let e;return await a.Z.get(t).then((t=>(e=t.data,e))),e},s=async(t,e)=>{let n;return await a.Z.post(t,e).then((t=>(n=t.data,n))),n},l=async t=>{let e;return await a.Z.get(t).then((t=>(e=t.data,e))),e},i=async t=>{let e;return await a.Z.get(t).then((t=>(e=t.data,e))),e},u=async t=>{let e;return await a.Z.get(t).then((t=>(e=t.data,e))),e}},5279:function(t,e,n){n.d(e,{$d:function(){return r},$i:function(){return k},Ao:function(){return p},DU:function(){return y},EX:function(){return R},F5:function(){return E},FS:function(){return f},GF:function(){return P},Iu:function(){return l},J1:function(){return _},Jf:function(){return m},Kk:function(){return h},N9:function(){return M},P8:function(){return c},VP:function(){return w},Vz:function(){return Z},WX:function(){return g},X$:function(){return b},XP:function(){return s},Yb:function(){return S},a4:function(){return $},dH:function(){return x},gh:function(){return v},nb:function(){return u},oA:function(){return C},r4:function(){return d},sd:function(){return o},wp:function(){return i},xJ:function(){return A}});var a=n(7129);const r=async t=>{let e;return await a.Z.get(t).then((t=>(e=t.data,e))),e},s=async t=>{let e;return await a.Z.get(t).then((t=>(e=t.data,e))),e},l=async t=>{let e;return await a.Z.get(t).then((t=>(e=t.data,e))),e},i=async t=>{let e;return await a.Z.get(t).then((t=>(e=t.data,e))),e},u=async t=>{let e;return await a.Z.get(t).then((t=>(e=t.data,e))),e},o=async t=>{let e;return await a.Z.get(t).then((t=>(e=t.data,e))),e},c=async t=>{let e;return await a.Z.get(t).then((t=>(e=t.data,e))),e},d=async t=>{let e;return await a.Z.get(t).then((t=>(e=t.data,e))),e},f=async t=>{let e;return await a.Z.get(t).then((t=>(e=t.data,e))),e},g=async t=>{let e;return await a.Z.get(t).then((t=>(e=t.data,e))),e},y=async t=>{let e;return await a.Z.get(t).then((t=>(e=t.data,e))),e},v=async t=>{let e;return await a.Z.get(t).then((t=>(e=t.data,e))),e},p=async t=>{let e;return await a.Z.get(t).then((t=>(e=t.data.userObj,e))),e},h=async t=>{let e;return await a.Z.get(t).then((t=>(e=t.data.userObj,e))),e},w=async t=>{let e;return await a.Z.get(t).then((t=>(e=t.data.userObj,e))),e},m=async t=>{let e;return await a.Z.get(t).then((t=>(e=t.data,e))),e},b=async t=>{let e;return await a.Z.get(t).then((t=>(e=t.data,e))),e},x=async t=>{let e;return await a.Z.get(t).then((t=>(e=t.data,e))),e},_=async t=>{const e=await a.Z.get(t);return e},k=async t=>{const e=await a.Z.get(t);return e},Z=async t=>{const e=await a.Z.get(t);return e},C=async t=>{let e;return await a.Z.get(t).then((t=>(e=t.data,e))),e},S=async t=>{let e;return await a.Z.get(t).then((t=>(e=t.data,e))),e},P=async t=>{let e;return await a.Z.get(t).then((t=>(e=t.data.userObj,e))),e},M=async t=>{const e=await a.Z.post("/user/role",t);return e},$=async t=>{const e=await a.Z.post("/user/removeRole",t);return e},A=async()=>{const t=await a.Z.get("role");return t},R=async t=>{const e=await a.Z.post("/user/saveLSS",t);return e},E=async t=>{const e=await a.Z.post("/user/saveEnvAccess",t);return e}},9756:function(t,e,n){t.exports=n.p+"img/loadernew.gif"}}]);
1
+ "use strict";(("undefined"!==typeof self?self:this)["webpackChunksolidify"]=("undefined"!==typeof self?self:this)["webpackChunksolidify"]||[]).push([[325],{4960:function(t,e,n){n.r(e),n.d(e,{default:function(){return f}});var a=function(){var t=this,e=t._self._c;t._self._setupProxy;return e("div",{staticClass:"admin"},[t.showScreen?e("div",{staticClass:"container w-full flex flex-wrap mx-auto px-2 pt-8 lg:pt-16 md:pt-16 mt-10"},[t._m(0),e("div",{staticClass:"w-full mt-4"},[e("div",{staticClass:"max-w-6xl m-auto shadow p-4 text-background-secondary"},[e("div",{staticClass:"flex w-full mt-6"},[e("div",{staticClass:"w-full pr-3 mb-4"},[e("label",{staticClass:"block tracking-wide -text-blue-800 opacity-80 font-normal mb-2"},[t._v(" Skill ")]),e("select",{staticClass:"appearance-none block w-full text-gray-700 border border-gray-200 rounded py-2 px-4 leading-tight focus:outline-none focus:bg-white focus:border-gray-500",on:{change:function(e){return t.getSelectedSkill(e)}}},[e("option",[t._v("Select Skill")]),t._l(t.skills,(function(n){return e("option",{key:n.skill_id,domProps:{value:n.skill_id}},[t._v(t._s(n.skill_alias))])}))],2)]),e("div",{staticClass:"w-full pr-3 mb-4"},[e("label",{staticClass:"block tracking-wide -text-blue-800 opacity-80 font-normal mb-2"},[t._v(" Proficiency ")]),e("select",{staticClass:"appearance-none block w-full text-gray-700 border border-gray-200 rounded py-2 px-4 leading-tight focus:outline-none focus:bg-white focus:border-gray-500",on:{change:function(e){return t.getSelectedProficiency(e)}}},[e("option",[t._v("Select Proficiency")]),t._l(t.proficiency,(function(n){return e("option",{key:n.prof_id,domProps:{value:n.prof_id}},[t._v(t._s(n.prof_name))])}))],2)]),e("div",{staticClass:"w-full pr-3 mb-4"},[e("label",{staticClass:"block tracking-wide -text-blue-800 opacity-80 font-normal mb-2"},[t._v(" Threshold Value ")]),e("input",{directives:[{name:"model",rawName:"v-model",value:t.threshold,expression:"threshold"}],staticClass:"appearance-none block w-full text-gray-700 border border-gray-200 rounded py-2 px-4 leading-tight focus:outline-none focus:bg-white focus:border-gray-500",attrs:{type:"text",pattern:"^[0-9]*$"},domProps:{value:t.threshold},on:{input:function(e){e.target.composing||(t.threshold=e.target.value)}}}),t.numErrMessage?e("div",{staticClass:"text-red-700"},[t._v(t._s(t.numErrMessage))]):t._e()]),e("div",{staticClass:"w-full mb-4"},[e("button",{staticClass:"mt-8 inline-block py-2 px-4 text-white shadow-md bg-background-secondary",on:{click:function(e){return t.triggerReport()}}},[t._v("Submit")])])]),t.successMessage?e("div",{staticClass:"text-green-700"},[t._v(t._s(t.successMessage))]):t._e(),t.errorMessage?e("div",{staticClass:"text-red-700"},[t._v(t._s(t.errorMessage))]):t._e()])]),t.renderReady?t._e():e("div",{staticClass:"flex flex-col h-min-screen justify-center text-center pageLoader"},[e("img",{staticClass:"mb-8 block mx-auto loadercss mt-3%",attrs:{src:n(9756),alt:"Loader Gif"}}),e("p",{staticClass:"mx-auto mb-10 leading-normal px-4 loadertextcss ext-genpact-darkest-blue"},[t._v("Loading...")])])]):e("div",{staticClass:"container w-full flex flex-wrap mx-auto px-2 pt-8 lg:pt-16 md:pt-16 mt-10"},[t._v("You don't have access")])])},r=[function(){var t=this,e=t._self._c;t._self._setupProxy;return e("div",{staticClass:"w-full"},[e("div",{staticClass:"text-center text-3xl text-background-secondary"},[t._v("Harvest Report")])])}],s=n(7203),l=n(5279),u=n(9178),i=(0,s.defineComponent)({name:"AssignProxy",setup(){const t=(0,s.ref)(),e=(0,s.ref)(),n=(0,s.ref)(),a=(0,s.ref)(),r=(0,s.ref)(),i=(0,s.ref)(),o=(0,s.ref)(),c=(0,s.ref)(),d=(0,s.ref)(),f=(0,s.ref)(),g=(0,s.ref)(!0),y=async()=>{if(n.value=!1,void 0===a.value)o.value="Select Skill",setTimeout((()=>{o.value=null}),6e3);else if(/^[0-9]+$/.test(d.value)){const t={skill_id:a.value,proficiency_id:r.value,threshold:d.value};await(0,u.I$)("/admin/report/harvestLJ",t),c.value="The harvesting report is being processed. You should get that over email in next 15 minutes",setTimeout((()=>{c.value=null}),6e3)}else f.value="Enter only Number",setTimeout((()=>{f.value=null}),6e3);n.value=!0},v=async()=>{n.value=!1;const a=await(0,u.QZ)("/getAllSkillProf?skill_type=all");t.value=a.skill,e.value=a.proficiency,n.value=!0},p=async t=>{a.value=t.target.value},h=async t=>{r.value=t.target.value,"Select Proficiency"===r.value&&(r.value="")};return(0,s.onBeforeMount)((async()=>{const t=await(0,l.GF)("/getUserRole");i.value=t.user_roles,i.value.length>0&&(console.log("inside length"),i.value.includes("System Admin")||i.value.includes("Proxy Admin")||i.value.includes("Community Manager")||i.value.includes("Knowledge Manager")?(g.value=!0,v()):g.value=!1)})),{skills:t,proficiency:e,renderReady:n,getSelectedSkill:p,getSelectedProficiency:h,getSkillandProf:v,showScreen:g,triggerReport:y,errorMessage:o,successMessage:c,threshold:d,numErrMessage:f}}}),o=i,c=n(1001),d=(0,c.Z)(o,a,r,!1,null,"383c6043",null),f=d.exports},9178:function(t,e,n){n.d(e,{I$:function(){return s},N0:function(){return u},QZ:function(){return r},S$:function(){return l},WK:function(){return i}});var a=n(7129);const r=async t=>{let e;return await a.Z.get(t).then((t=>(e=t.data,e))),e},s=async(t,e)=>{let n;return await a.Z.post(t,e).then((t=>(n=t.data,n))),n},l=async t=>{let e;return await a.Z.get(t).then((t=>(e=t.data,e))),e},u=async t=>{let e;return await a.Z.get(t).then((t=>(e=t.data,e))),e},i=async t=>{let e;return await a.Z.get(t).then((t=>(e=t.data,e))),e}},5279:function(t,e,n){n.d(e,{$d:function(){return r},$i:function(){return k},Ao:function(){return p},DU:function(){return y},EX:function(){return R},F5:function(){return E},FS:function(){return f},GF:function(){return P},Iu:function(){return l},J1:function(){return _},Jf:function(){return m},Kk:function(){return h},N9:function(){return M},P8:function(){return c},VP:function(){return w},Vz:function(){return Z},WX:function(){return g},X$:function(){return b},XP:function(){return s},Yb:function(){return S},a4:function(){return $},dH:function(){return x},gh:function(){return v},nb:function(){return i},oA:function(){return C},r4:function(){return d},sd:function(){return o},wp:function(){return u},xJ:function(){return A}});var a=n(7129);const r=async t=>{let e;return await a.Z.get(t).then((t=>(e=t.data,e))),e},s=async t=>{let e;return await a.Z.get(t).then((t=>(e=t.data,e))),e},l=async t=>{let e;return await a.Z.get(t).then((t=>(e=t.data,e))),e},u=async t=>{let e;return await a.Z.get(t).then((t=>(e=t.data,e))),e},i=async t=>{let e;return await a.Z.get(t).then((t=>(e=t.data,e))),e},o=async t=>{let e;return await a.Z.get(t).then((t=>(e=t.data,e))),e},c=async t=>{let e;return await a.Z.get(t).then((t=>(e=t.data,e))),e},d=async t=>{let e;return await a.Z.get(t).then((t=>(e=t.data,e))),e},f=async t=>{let e;return await a.Z.get(t).then((t=>(e=t.data,e))),e},g=async t=>{let e;return await a.Z.get(t).then((t=>(e=t.data,e))),e},y=async t=>{let e;return await a.Z.get(t).then((t=>(e=t.data,e))),e},v=async t=>{let e;return await a.Z.get(t).then((t=>(e=t.data,e))),e},p=async t=>{let e;return await a.Z.get(t).then((t=>(e=t.data.userObj,e))),e},h=async t=>{let e;return await a.Z.get(t).then((t=>(e=t.data.userObj,e))),e},w=async t=>{let e;return await a.Z.get(t).then((t=>(e=t.data.userObj,e))),e},m=async t=>{let e;return await a.Z.get(t).then((t=>(e=t.data,e))),e},b=async t=>{let e;return await a.Z.get(t).then((t=>(e=t.data,e))),e},x=async t=>{let e;return await a.Z.get(t).then((t=>(e=t.data,e))),e},_=async t=>{const e=await a.Z.get(t);return e},k=async t=>{const e=await a.Z.get(t);return e},Z=async t=>{const e=await a.Z.get(t);return e},C=async t=>{let e;return await a.Z.get(t).then((t=>(e=t.data,e))),e},S=async t=>{let e;return await a.Z.get(t).then((t=>(e=t.data,e))),e},P=async t=>{let e;return await a.Z.get(t).then((t=>(e=t.data.userObj,e))),e},M=async t=>{const e=await a.Z.post("/user/role",t);return e},$=async t=>{const e=await a.Z.post("/user/removeRole",t);return e},A=async()=>{const t=await a.Z.get("role");return t},R=async t=>{const e=await a.Z.post("/user/saveLSS",t);return e},E=async t=>{const e=await a.Z.post("/user/saveEnvAccess",t);return e}}}]);
2
2
  //# sourceMappingURL=solidify.umd.min.SolidifyAdministrationharvestReport.js.map
@@ -1,2 +1,2 @@
1
- "use strict";(("undefined"!==typeof self?self:this)["webpackChunksolidify"]=("undefined"!==typeof self?self:this)["webpackChunksolidify"]||[]).push([[647],{2225:function(e,t,a){a.r(t),a.d(t,{default:function(){return v}});var n=function(){var e=this,t=e._self._c;e._self._setupProxy;return t("div",{staticClass:"admin"},[e.showScreen?t("div",{staticClass:"container w-full flex flex-wrap mx-auto px-2 pt-8 lg:pt-16 md:pt-16 mt-12"},[e._m(0),e.renderReady?t("div",{staticClass:"w-full mt-4"},[t("div",{staticClass:"max-w-4xl m-auto shadow p-5 mb-4 -text-blue-900"},[t("div",{staticClass:"flex flex-wrap -mx-3 mb-6"},[t("div",{staticClass:"w-full md:w-1/2 px-3 mb-4"},[t("label",{staticClass:"block tracking-wide -text-blue-800 opacity-80 font-normal mb-2"},[e._v(" Events ")]),t("select",{directives:[{name:"model",rawName:"v-model",value:e.selectedEvents,expression:"selectedEvents"}],staticClass:"appearance-none block w-full text-gray-700 border border-gray-200 rounded py-2 px-4 leading-tight focus:outline-none focus:bg-white focus:border-gray-500",on:{change:function(t){var a=Array.prototype.filter.call(t.target.options,(function(e){return e.selected})).map((function(e){var t="_value"in e?e._value:e.value;return t}));e.selectedEvents=t.target.multiple?a:a[0]}}},e._l(e.events,(function(a,n){return t("option",{key:n,domProps:{value:n}},[e._v(e._s(a))])})),0),e.errorMessage?t("div",{staticClass:"text-red-700"},[e._v(e._s(e.errorMessage))]):e._e()]),t("div",{staticClass:"w-full md:w-1/2 px-3 mb-4"},[t("label",{staticClass:"block tracking-wide -text-blue-800 opacity-80 font-normal mb-2"},[e._v(" Learner Task Id ")]),t("input",{directives:[{name:"model",rawName:"v-model",value:e.taskIdToSendEmail,expression:"taskIdToSendEmail"}],staticClass:"appearance-none block w-full text-gray-700 border border-gray-200 rounded py-2 px-4 leading-tight focus:outline-none focus:bg-white focus:border-gray-500",attrs:{type:"text"},domProps:{value:e.taskIdToSendEmail},on:{input:function(t){t.target.composing||(e.taskIdToSendEmail=t.target.value)}}}),e.errorMessage?t("div",{staticClass:"text-red-700"},[e._v(e._s(e.errorMessage))]):e._e()]),t("div",{staticClass:"w-full px-3 text-center mt-4"},[t("button",{staticClass:"px-4 py-2 text-white shadow-md bg-background-secondary focus:outline-none focus:ring-2 focus:ring-blue-400 focus:ring-opacity-75 inline-block mr-4",on:{click:function(t){return e.sendEmailToLearner()}}},[e._v("Send Email")])]),e.showSuccessMessage?t("div",{staticClass:"w-full px-3 text-center mt-4 bg-green-600 py-2 text-white"},[e._v(" "+e._s(e.resMessage)+" ")]):e._e(),e.showErrorMessage?t("div",{staticClass:"w-full px-3 text-center mt-4 bg-red-400 py-2 text-white"},[e._v(" "+e._s(e.resMessage)+" ")]):e._e()])])]):e._e(),e.renderReady?e._e():t("div",{staticClass:"flex flex-col h-min-screen justify-center text-center pageLoader"},[t("img",{staticClass:"mb-8 block mx-auto loadercss mt-3%",attrs:{src:a(9756),alt:"Loader Gif"}}),t("p",{staticClass:"mx-auto mb-10 leading-normal px-4 loadertextcss ext-genpact-darkest-blue"},[e._v("Loading...")])])]):t("div",{staticClass:"container w-full flex flex-wrap mx-auto px-2 pt-8 lg:pt-16 md:pt-16 mt-10"},[e._v("You don't have access")])])},r=[function(){var e=this,t=e._self._c;e._self._setupProxy;return t("div",{staticClass:"w-full"},[t("div",{staticClass:"text-center text-3xl -text-blue-900"},[e._v("Send Email To Learner")])])}],s=a(7203),l=a(5279),o=a(7129);const u=async e=>{let t;return await o.Z.get(e).then((e=>(console.log("Response",e),t=e.data,t))),t},i=async(e,t)=>{let a;return await o.Z.post(e,t).then((e=>(console.log("Response",e),a=e.data,a))),a};var c=(0,s.defineComponent)({name:"SendEmailToUser",setup(){const e=(0,s.ref)(!0),t=(0,s.ref)(),a=(0,s.ref)(),n=(0,s.ref)(),r=(0,s.ref)(!0),o=(0,s.ref)(!1),c=(0,s.ref)(),d=(0,s.ref)(!1),f=(0,s.ref)(),g=(0,s.ref)(),v=async()=>{if(e.value=!1,t.value)if(g.value){const e={leaner_task_id:g.value,event_type:t.value};console.log(`selected Events ${t.value} and Task Id ${g.value}`);const a=await i("/email/learner_task",e);c.value=a.msg,o.value=!0,g.value="",t.value="",setTimeout((()=>{o.value=!1}),2e3),console.log("Email Send Response",a)}else console.log("Please Enter Task Id");else console.log("Please Select Events");e.value=!0},w=async()=>{const e=await u("/event");f.value=e.events,console.log("events",f.value)};return(0,s.onBeforeMount)((async()=>{try{e.value=!1;const t=await(0,l.GF)("/getUserRole");n.value=t.user_roles,n.value.length>0&&(n.value.includes("System Admin")?(r.value=!0,await w()):r.value=!1),e.value=!0}catch(t){console.log(t)}})),{renderReady:e,selectedEvents:t,errorMessage:a,showScreen:r,resMessage:c,showErrorMessage:d,showSuccessMessage:o,taskIdToSendEmail:g,events:f,sendEmailToLearner:v}}}),d=c,f=a(1001),g=(0,f.Z)(d,n,r,!1,null,"06eec98e",null),v=g.exports},5279:function(e,t,a){a.d(t,{$d:function(){return r},$i:function(){return Z},Ao:function(){return p},DU:function(){return v},EX:function(){return P},F5:function(){return L},FS:function(){return f},GF:function(){return S},Iu:function(){return l},J1:function(){return _},Jf:function(){return x},Kk:function(){return m},N9:function(){return M},P8:function(){return c},VP:function(){return y},Vz:function(){return k},WX:function(){return g},X$:function(){return h},XP:function(){return s},Yb:function(){return E},a4:function(){return T},dH:function(){return b},gh:function(){return w},nb:function(){return u},oA:function(){return C},r4:function(){return d},sd:function(){return i},wp:function(){return o},xJ:function(){return I}});var n=a(7129);const r=async e=>{let t;return await n.Z.get(e).then((e=>(t=e.data,t))),t},s=async e=>{let t;return await n.Z.get(e).then((e=>(t=e.data,t))),t},l=async e=>{let t;return await n.Z.get(e).then((e=>(t=e.data,t))),t},o=async e=>{let t;return await n.Z.get(e).then((e=>(t=e.data,t))),t},u=async e=>{let t;return await n.Z.get(e).then((e=>(t=e.data,t))),t},i=async e=>{let t;return await n.Z.get(e).then((e=>(t=e.data,t))),t},c=async e=>{let t;return await n.Z.get(e).then((e=>(t=e.data,t))),t},d=async e=>{let t;return await n.Z.get(e).then((e=>(t=e.data,t))),t},f=async e=>{let t;return await n.Z.get(e).then((e=>(t=e.data,t))),t},g=async e=>{let t;return await n.Z.get(e).then((e=>(t=e.data,t))),t},v=async e=>{let t;return await n.Z.get(e).then((e=>(t=e.data,t))),t},w=async e=>{let t;return await n.Z.get(e).then((e=>(t=e.data,t))),t},p=async e=>{let t;return await n.Z.get(e).then((e=>(t=e.data.userObj,t))),t},m=async e=>{let t;return await n.Z.get(e).then((e=>(t=e.data.userObj,t))),t},y=async e=>{let t;return await n.Z.get(e).then((e=>(t=e.data.userObj,t))),t},x=async e=>{let t;return await n.Z.get(e).then((e=>(t=e.data,t))),t},h=async e=>{let t;return await n.Z.get(e).then((e=>(t=e.data,t))),t},b=async e=>{let t;return await n.Z.get(e).then((e=>(t=e.data,t))),t},_=async e=>{const t=await n.Z.get(e);return t},Z=async e=>{const t=await n.Z.get(e);return t},k=async e=>{const t=await n.Z.get(e);return t},C=async e=>{let t;return await n.Z.get(e).then((e=>(t=e.data,t))),t},E=async e=>{let t;return await n.Z.get(e).then((e=>(t=e.data,t))),t},S=async e=>{let t;return await n.Z.get(e).then((e=>(t=e.data.userObj,t))),t},M=async e=>{const t=await n.Z.post("/user/role",e);return t},T=async e=>{const t=await n.Z.post("/user/removeRole",e);return t},I=async()=>{const e=await n.Z.get("role");return e},P=async e=>{const t=await n.Z.post("/user/saveLSS",e);return t},L=async e=>{const t=await n.Z.post("/user/saveEnvAccess",e);return t}},9756:function(e,t,a){e.exports=a.p+"img/loadernew.gif"}}]);
1
+ "use strict";(("undefined"!==typeof self?self:this)["webpackChunksolidify"]=("undefined"!==typeof self?self:this)["webpackChunksolidify"]||[]).push([[647],{2225:function(e,t,a){a.r(t),a.d(t,{default:function(){return g}});var n=function(){var e=this,t=e._self._c;e._self._setupProxy;return t("div",{staticClass:"admin"},[e.showScreen?t("div",{staticClass:"container w-full flex flex-wrap mx-auto px-2 pt-8 lg:pt-16 md:pt-16 mt-12"},[e._m(0),e.renderReady?t("div",{staticClass:"w-full mt-4"},[t("div",{staticClass:"max-w-4xl m-auto shadow p-5 mb-4 -text-blue-900"},[t("div",{staticClass:"flex flex-wrap -mx-3 mb-6"},[t("div",{staticClass:"w-full md:w-1/2 px-3 mb-4"},[t("label",{staticClass:"block tracking-wide -text-blue-800 opacity-80 font-normal mb-2"},[e._v(" Events ")]),t("select",{directives:[{name:"model",rawName:"v-model",value:e.selectedEvents,expression:"selectedEvents"}],staticClass:"appearance-none block w-full text-gray-700 border border-gray-200 rounded py-2 px-4 leading-tight focus:outline-none focus:bg-white focus:border-gray-500",on:{change:function(t){var a=Array.prototype.filter.call(t.target.options,(function(e){return e.selected})).map((function(e){var t="_value"in e?e._value:e.value;return t}));e.selectedEvents=t.target.multiple?a:a[0]}}},e._l(e.events,(function(a,n){return t("option",{key:n,domProps:{value:n}},[e._v(e._s(a))])})),0),e.errorMessage?t("div",{staticClass:"text-red-700"},[e._v(e._s(e.errorMessage))]):e._e()]),t("div",{staticClass:"w-full md:w-1/2 px-3 mb-4"},[t("label",{staticClass:"block tracking-wide -text-blue-800 opacity-80 font-normal mb-2"},[e._v(" Learner Task Id ")]),t("input",{directives:[{name:"model",rawName:"v-model",value:e.taskIdToSendEmail,expression:"taskIdToSendEmail"}],staticClass:"appearance-none block w-full text-gray-700 border border-gray-200 rounded py-2 px-4 leading-tight focus:outline-none focus:bg-white focus:border-gray-500",attrs:{type:"text"},domProps:{value:e.taskIdToSendEmail},on:{input:function(t){t.target.composing||(e.taskIdToSendEmail=t.target.value)}}}),e.errorMessage?t("div",{staticClass:"text-red-700"},[e._v(e._s(e.errorMessage))]):e._e()]),t("div",{staticClass:"w-full px-3 text-center mt-4"},[t("button",{staticClass:"px-4 py-2 text-white shadow-md bg-background-secondary focus:outline-none focus:ring-2 focus:ring-blue-400 focus:ring-opacity-75 inline-block mr-4",on:{click:function(t){return e.sendEmailToLearner()}}},[e._v("Send Email")])]),e.showSuccessMessage?t("div",{staticClass:"w-full px-3 text-center mt-4 bg-green-600 py-2 text-white"},[e._v(" "+e._s(e.resMessage)+" ")]):e._e(),e.showErrorMessage?t("div",{staticClass:"w-full px-3 text-center mt-4 bg-red-400 py-2 text-white"},[e._v(" "+e._s(e.resMessage)+" ")]):e._e()])])]):e._e(),e.renderReady?e._e():t("div",{staticClass:"flex flex-col h-min-screen justify-center text-center pageLoader"},[t("img",{staticClass:"mb-8 block mx-auto loadercss mt-3%",attrs:{src:a(9756),alt:"Loader Gif"}}),t("p",{staticClass:"mx-auto mb-10 leading-normal px-4 loadertextcss ext-genpact-darkest-blue"},[e._v("Loading...")])])]):t("div",{staticClass:"container w-full flex flex-wrap mx-auto px-2 pt-8 lg:pt-16 md:pt-16 mt-10"},[e._v("You don't have access")])])},r=[function(){var e=this,t=e._self._c;e._self._setupProxy;return t("div",{staticClass:"w-full"},[t("div",{staticClass:"text-center text-3xl -text-blue-900"},[e._v("Send Email To Learner")])])}],s=a(7203),l=a(5279),o=a(7129);const u=async e=>{let t;return await o.Z.get(e).then((e=>(console.log("Response",e),t=e.data,t))),t},c=async(e,t)=>{let a;return await o.Z.post(e,t).then((e=>(console.log("Response",e),a=e.data,a))),a};var i=(0,s.defineComponent)({name:"SendEmailToUser",setup(){const e=(0,s.ref)(!0),t=(0,s.ref)(),a=(0,s.ref)(),n=(0,s.ref)(),r=(0,s.ref)(!0),o=(0,s.ref)(!1),i=(0,s.ref)(),d=(0,s.ref)(!1),f=(0,s.ref)(),v=(0,s.ref)(),g=async()=>{if(e.value=!1,t.value)if(v.value){const e={leaner_task_id:v.value,event_type:t.value};console.log(`selected Events ${t.value} and Task Id ${v.value}`);const a=await c("/email/learner_task",e);i.value=a.msg,o.value=!0,v.value="",t.value="",setTimeout((()=>{o.value=!1}),2e3),console.log("Email Send Response",a)}else console.log("Please Enter Task Id");else console.log("Please Select Events");e.value=!0},w=async()=>{const e=await u("/event");f.value=e.events,console.log("events",f.value)};return(0,s.onBeforeMount)((async()=>{try{e.value=!1;const t=await(0,l.GF)("/getUserRole");n.value=t.user_roles,n.value.length>0&&(n.value.includes("System Admin")?(r.value=!0,await w()):r.value=!1),e.value=!0}catch(t){console.log(t)}})),{renderReady:e,selectedEvents:t,errorMessage:a,showScreen:r,resMessage:i,showErrorMessage:d,showSuccessMessage:o,taskIdToSendEmail:v,events:f,sendEmailToLearner:g}}}),d=i,f=a(1001),v=(0,f.Z)(d,n,r,!1,null,"06eec98e",null),g=v.exports},5279:function(e,t,a){a.d(t,{$d:function(){return r},$i:function(){return Z},Ao:function(){return p},DU:function(){return g},EX:function(){return P},F5:function(){return L},FS:function(){return f},GF:function(){return S},Iu:function(){return l},J1:function(){return _},Jf:function(){return x},Kk:function(){return m},N9:function(){return M},P8:function(){return i},VP:function(){return y},Vz:function(){return k},WX:function(){return v},X$:function(){return h},XP:function(){return s},Yb:function(){return E},a4:function(){return T},dH:function(){return b},gh:function(){return w},nb:function(){return u},oA:function(){return C},r4:function(){return d},sd:function(){return c},wp:function(){return o},xJ:function(){return I}});var n=a(7129);const r=async e=>{let t;return await n.Z.get(e).then((e=>(t=e.data,t))),t},s=async e=>{let t;return await n.Z.get(e).then((e=>(t=e.data,t))),t},l=async e=>{let t;return await n.Z.get(e).then((e=>(t=e.data,t))),t},o=async e=>{let t;return await n.Z.get(e).then((e=>(t=e.data,t))),t},u=async e=>{let t;return await n.Z.get(e).then((e=>(t=e.data,t))),t},c=async e=>{let t;return await n.Z.get(e).then((e=>(t=e.data,t))),t},i=async e=>{let t;return await n.Z.get(e).then((e=>(t=e.data,t))),t},d=async e=>{let t;return await n.Z.get(e).then((e=>(t=e.data,t))),t},f=async e=>{let t;return await n.Z.get(e).then((e=>(t=e.data,t))),t},v=async e=>{let t;return await n.Z.get(e).then((e=>(t=e.data,t))),t},g=async e=>{let t;return await n.Z.get(e).then((e=>(t=e.data,t))),t},w=async e=>{let t;return await n.Z.get(e).then((e=>(t=e.data,t))),t},p=async e=>{let t;return await n.Z.get(e).then((e=>(t=e.data.userObj,t))),t},m=async e=>{let t;return await n.Z.get(e).then((e=>(t=e.data.userObj,t))),t},y=async e=>{let t;return await n.Z.get(e).then((e=>(t=e.data.userObj,t))),t},x=async e=>{let t;return await n.Z.get(e).then((e=>(t=e.data,t))),t},h=async e=>{let t;return await n.Z.get(e).then((e=>(t=e.data,t))),t},b=async e=>{let t;return await n.Z.get(e).then((e=>(t=e.data,t))),t},_=async e=>{const t=await n.Z.get(e);return t},Z=async e=>{const t=await n.Z.get(e);return t},k=async e=>{const t=await n.Z.get(e);return t},C=async e=>{let t;return await n.Z.get(e).then((e=>(t=e.data,t))),t},E=async e=>{let t;return await n.Z.get(e).then((e=>(t=e.data,t))),t},S=async e=>{let t;return await n.Z.get(e).then((e=>(t=e.data.userObj,t))),t},M=async e=>{const t=await n.Z.post("/user/role",e);return t},T=async e=>{const t=await n.Z.post("/user/removeRole",e);return t},I=async()=>{const e=await n.Z.get("role");return e},P=async e=>{const t=await n.Z.post("/user/saveLSS",e);return t},L=async e=>{const t=await n.Z.post("/user/saveEnvAccess",e);return t}}}]);
2
2
  //# sourceMappingURL=solidify.umd.min.SolidifyAdministrationsendEmailToUser.js.map