diff --git a/NearBeach/static/NearBeach/1032.min.js b/NearBeach/static/NearBeach/1032.min.js new file mode 100644 index 000000000..a99e2fd04 --- /dev/null +++ b/NearBeach/static/NearBeach/1032.min.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunknearbeach=self.webpackChunknearbeach||[]).push([[1032],{7267:(t,e,o)=>{o.d(e,{Z:()=>h});var n,i=o(6252),s=["onActivate","onAddUndo","onBeforeAddUndo","onBeforeExecCommand","onBeforeGetContent","onBeforeRenderUI","onBeforeSetContent","onBeforePaste","onBlur","onChange","onClearUndos","onClick","onContextMenu","onCopy","onCut","onDblclick","onDeactivate","onDirty","onDrag","onDragDrop","onDragEnd","onDragGesture","onDragOver","onDrop","onExecCommand","onFocus","onFocusIn","onFocusOut","onGetContent","onHide","onInit","onKeyDown","onKeyPress","onKeyUp","onLoadContent","onMouseDown","onMouseEnter","onMouseLeave","onMouseMove","onMouseOut","onMouseOver","onMouseUp","onNodeChange","onObjectResizeStart","onObjectResized","onObjectSelected","onPaste","onPostProcess","onPostRender","onPreProcess","onProgressState","onRedo","onRemove","onReset","onSaveContent","onSelectionChange","onSetAttrib","onSetContent","onShow","onSubmit","onUndo","onVisualAid"],a=function(t){return-1!==s.map((function(t){return t.toLowerCase()})).indexOf(t.toLowerCase())},r=0,l=function(t){var e=Date.now();return t+"_"+Math.floor(1e9*Math.random())+ ++r+String(e)},c=function(t){return void 0===t||""===t?[]:Array.isArray(t)?t:t.split(" ")},d=function(){return{listeners:[],scriptId:l("tiny-script"),scriptLoaded:!1}},u=(n=d(),{load:function(t,e,o){n.scriptLoaded?o():(n.listeners.push(o),t.getElementById(n.scriptId)||function(t,e,o,i){var s=e.createElement("script");s.referrerPolicy="origin",s.type="application/javascript",s.id=t,s.src=o;var a=function(){s.removeEventListener("load",a),n.listeners.forEach((function(t){return t()})),n.scriptLoaded=!0};s.addEventListener("load",a),e.head&&e.head.appendChild(s)}(n.scriptId,t,e))},reinitialize:function(){n=d()}}),m=function(){var t="undefined"!=typeof window?window:o.g;return t&&t.tinymce?t.tinymce:null},g={apiKey:String,cloudChannel:String,id:String,init:Object,initialValue:String,inline:Boolean,modelEvents:[String,Array],plugins:[String,Array],tagName:String,toolbar:[String,Array],modelValue:String,disabled:Boolean,tinymceScriptSrc:String,outputFormat:{type:String,validator:function(t){return"html"===t||"text"===t}}},p=o(2262),v=function(){return v=Object.assign||function(t){for(var e,o=1,n=arguments.length;o{o.d(e,{Z:()=>$});var n=o(6252),i=o(3577);const s={class:"customer-list"},a=["src"],r={class:"customer-card--details"},l={class:"customer-card--name"},c=["href"],d={class:"customer-card--email"},u={key:0,class:"customer-card--remove"};var m=o(3138),g=o(6542);const p={class:"modal fade",id:"confirmCustomerRemoveModal",tabindex:"-1","data-bs-backdrop":"static","data-bs-keyboard":"false","aria-labelledby":"confirmCustomerRemove","aria-hidden":"true"},v={class:"modal-dialog"},h={class:"modal-content"},f=(0,n._)("div",{class:"modal-header"},[(0,n._)("h5",{class:"modal-title",id:"confirmCustomerRemove"}," Please confirm Customer Removal "),(0,n.kq)(" TASK INFORMATION "),(0,n._)("button",{type:"button",class:"btn-close","data-bs-dismiss":"modal","aria-label":"Close",id:"confirmCustomerRemoveButton"})],-1),_={class:"modal-body"},b={class:"customer-card--details"},y={class:"customer-card--name"},C=["href"],w={class:"customer-card--email"},D={class:"modal-footer"};var S=o(989);const k={name:"ConfirmCustomerRemoval",emits:["remove_customer"],props:{customerObject:{type:Object,default:()=>({customer_id:0,customer_email:"",customer_first_name:"",customer_last_name:"",customer_profile_picture:""})}},computed:{...(0,S.Se)({destination:"getDestination",locationId:"getLocationId",rootUrl:"getRootUrl"})},methods:{closeModal(){document.getElementById("confirmCustomerRemoveButton").click()},removeCustomer(){const t=new FormData;t.set("customer_id",this.customerObject.customer_id);let e=`${this.rootUrl}object_data/${this.destination}/${this.locationId}/remove_customer/`;"organisation"===this.destination&&(e=`${this.rootUrl}customer_information/${this.locationId}/delete/`),this.axios.post(e,t).then((()=>{this.$emit("remove_customer",this.customerObject.customer_id)})).catch((t=>{this.$store.dispatch("newToast",{header:"Can't remove customer",message:`Sorry, could not remove customer. Error -> ${t}`,extra_classes:"bg-warning text-dark",delay:0})})),this.closeModal()}}};var I=o(3744);const T=(0,I.Z)(k,[["render",function(t,e,o,s,a,r){return(0,n.wg)(),(0,n.iD)("div",p,[(0,n._)("div",v,[(0,n._)("div",h,[f,(0,n._)("div",_,[(0,n._)("div",b,[(0,n._)("div",y,[(0,n._)("a",{href:`${t.rootUrl}customer_information/${o.customerObject.customer_id}/`,target:"_blank"},(0,i.toDisplayString)(o.customerObject.customer_first_name)+" "+(0,i.toDisplayString)(o.customerObject.customer_last_name),9,C)]),(0,n._)("div",w,(0,i.toDisplayString)(o.customerObject.customer_email),1)])]),(0,n._)("div",D,[(0,n._)("button",{type:"button",class:"btn btn-secondary",onClick:e[0]||(e[0]=(...t)=>r.closeModal&&r.closeModal(...t))}," No "),(0,n._)("button",{type:"button",class:"btn btn-primary",onClick:e[1]||(e[1]=(...t)=>r.removeCustomer&&r.removeCustomer(...t))}," Yes ")])])])])}]]);var L=o(5808);const U={name:"CustomersListModule",components:{ConfirmCustomerRemoval:T,Icon:g.JO},props:{customerResults:{type:Array,default:()=>[]}},computed:{...(0,S.Se)({destination:"getDestination",locationId:"getLocationId",rootUrl:"getRootUrl",staticUrl:"getStaticUrl",userLevel:"getUserLevel"}),defaultCustomerImage(){return`${this.staticUrl}/NearBeach/images/placeholder/people_tax.svg`}},mixins:[L.Z],data:()=>({customerObject:{customer_id:0,customer_email:"",customer_first_name:"",customer_last_name:"",customer_profile_picture:""}}),emits:["remove_customer"],methods:{confirmRemoveCustomer(t){const e=this.customerResults.filter((e=>parseInt(e.pk)===parseInt(t)));1===e.length?(this.customerObject=e.map((t=>({customer_id:t.pk,customer_email:t.fields.customer_email,customer_first_name:t.fields.customer_first_name,customer_last_name:t.fields.customer_last_name,customer_profile_picture:t.fields.customer_profile_picture})))[0],new m.u_(document.getElementById("confirmCustomerRemoveModal")).show()):this.$store.dispatch("newToast",{header:"Error Deleting Customer",message:"Could not select the correct ID of the customer. Something went wrong",extra_classes:"bg-danger",delay:0})},getCustomerImage(t){const e=t.fields.customer_profile_picture;return""===e||null===e?this.defaultCustomerImage:`${this.rootUrl}private/${e}`},removeCustomer(t){this.$emit("remove_customer",t)}}},$=(0,I.Z)(U,[["render",function(t,e,o,m,g,p){const v=(0,n.up)("Icon"),h=(0,n.up)("confirm-customer-removal");return(0,n.wg)(),(0,n.iD)(n.HY,null,[(0,n._)("div",s,[((0,n.wg)(!0),(0,n.iD)(n.HY,null,(0,n.Ko)(o.customerResults,(e=>((0,n.wg)(),(0,n.iD)("div",{key:e.pk,class:"customer-card"},[(0,n.kq)(" CUSOMER PROFILE "),(0,n._)("img",{src:p.getCustomerImage(e),alt:"default profile picture"},null,8,a),(0,n.kq)(" CUSTOMER DETAILS "),(0,n._)("div",r,[(0,n._)("div",l,[(0,n._)("a",{href:`${t.rootUrl}customer_information/${e.pk}/`},(0,i.toDisplayString)(e.fields.customer_first_name)+" "+(0,i.toDisplayString)(e.fields.customer_last_name),9,c)]),(0,n._)("div",d,[(0,n.Wm)(v,{icon:t.icons.mailIcon},null,8,["icon"]),(0,n.Uk)(" "+(0,i.toDisplayString)(e.fields.customer_email),1)])]),t.userLevel>=2?((0,n.wg)(),(0,n.iD)("div",u,[(0,n.Wm)(v,{icon:t.icons.trashCan,onClick:t=>p.confirmRemoveCustomer(e.pk)},null,8,["icon","onClick"])])):(0,n.kq)("v-if",!0)])))),128))]),(0,n.Wm)(h,{"customer-object":g.customerObject,onRemove_customer:e[0]||(e[0]=t=>p.removeCustomer(t))},null,8,["customer-object"])],64)}]])},811:(t,e,o)=>{o.d(e,{Z:()=>j});var n=o(6252),i=o(3577);const s=(0,n._)("h2",null,"Assigned Tags",-1),a={class:"text-instructions"},r={class:"tag-list"},l=["onClick"],c={class:"row submit-row"},d={class:"col-md-12"};var u=o(3138),m=o(6542),g=o(5808);const p={class:"modal fade",id:"addTagModal",tabindex:"-1","aria-labelledby":"exampleModalLabel","aria-hidden":"true"},v={class:"modal-dialog"},h={class:"modal-content"},f={class:"modal-header"},_=(0,n._)("button",{type:"button",class:"btn-close","data-bs-dismiss":"modal","aria-label":"Close",id:"addTagsCloseButton"},[(0,n._)("span",{"aria-hidden":"true"})],-1),b={class:"modal-body"},y={class:"row"},C={class:"col-md-4"},w=(0,n._)("strong",null,"Add Tag",-1),D={class:"text-instructions"},S={class:"col-md-8"},k=(0,n._)("label",null,"All Tag List",-1),I={class:"modal-footer"},T=(0,n._)("button",{type:"button",class:"btn btn-secondary","data-bs-dismiss":"modal"}," Close ",-1);var L=o(2001),U=o(989);const $={name:"AddTagWizard",components:{Icon:m.JO,NSelect:L.Z},props:{assignedTags:{type:Array,default:()=>[]},destination:{type:String,default:""},locationId:{type:Number,default:0}},mixins:[g.Z],data:()=>({allTagList:[],tagModel:[]}),computed:{...(0,U.Se)({rootUrl:"getRootUrl"}),tagList(){return this.allTagList.filter((t=>this.assignedTags.findIndex((e=>e.pk===parseInt(t.value)))<0))}},methods:{addTag(){const t=new FormData;this.tagModel.forEach((e=>{t.append("tag_id",e)})),this.axios.post(`${this.rootUrl}object_data/${this.destination}/${this.locationId}/add_tags/`,t).then((t=>{this.$emit("add_tags",t.data),document.getElementById("addTagsCloseButton").click(),this.tagModel=[]})).catch((t=>{this.$store.dispatch("newToast",{header:"Failed to add tag",message:`Sorry, we could not add tag. Errors -> ${t}`,extra_classes:"bg-danger",delay:0})}))},getTagList(){this.axios.post(`${this.rootUrl}object_data/tag_list_all/`).then((t=>{this.allTagList=t.data.map((t=>({value:t.pk,label:t.fields.tag_name})))})).catch((t=>{this.$store.dispatch("newToast",{header:"Failed to get tag list",message:`Sorry, we could not get the tag list. Errors -> ${t}`,extra_classes:"bg-danger",delay:0})}))}},mounted(){["requirement_item"].indexOf(this.destination)>=0||this.$nextTick((()=>{this.getTagList()}))}};var x=o(3744);const O={name:"ListTagsModule",components:{AddTagWizard:(0,x.Z)($,[["render",function(t,e,o,s,a,r){const l=(0,n.up)("Icon"),c=(0,n.up)("n-select");return(0,n.wg)(),(0,n.iD)("div",p,[(0,n._)("div",v,[(0,n._)("div",h,[(0,n._)("div",f,[(0,n._)("h2",null,[(0,n.Wm)(l,{icon:t.icons.usersIcon},null,8,["icon"]),(0,n.Uk)(" Add Tags Wizard ")]),_]),(0,n._)("div",b,[(0,n._)("div",y,[(0,n._)("div",C,[w,(0,n._)("p",D," Use the dropdown to select one or many lables to add to the "+(0,i.toDisplayString)(o.destination)+". ",1)]),(0,n._)("div",S,[k,(0,n.Wm)(c,{label:"tag",multiple:"",options:r.tagList,value:a.tagModel,"onUpdate:value":e[0]||(e[0]=t=>a.tagModel=t)},null,8,["options","value"])])])]),(0,n._)("div",I,[T,(0,n._)("button",{type:"button",class:"btn btn-primary",onClick:e[1]||(e[1]=(...t)=>r.addTag&&r.addTag(...t))}," Add Tag ")])])])])}]]),Icon:m.JO},data:()=>({tagList:[]}),mixins:[g.Z],computed:{...(0,U.Se)({destination:"getDestination",locationId:"getLocationId",rootUrl:"getRootUrl",userLevel:"getUserLevel"})},methods:{addTags(t){this.tagList=t},createNewTag(){new u.u_(document.getElementById("addTagModal")).show()},getAssignedTags(){this.axios.post(`${this.rootUrl}object_data/${this.destination}/${this.locationId}/tag_list/`).then((t=>{this.tagList=t.data})).catch((t=>{}))},removeTag(t){const e=new FormData;e.set("tag",t),e.set("object_enum",this.destination),e.set("object_id",this.locationId),this.axios.post(`${this.rootUrl}object_data/delete_tag/`,e).then((e=>{this.tagList=this.tagList.filter((e=>e.pk!==t))})).catch((t=>{}))}},mounted(){["requirement_item"].indexOf(this.destination)>=0||this.$nextTick((()=>{this.getAssignedTags()}))}},j=(0,x.Z)(O,[["render",function(t,e,o,u,m,g){const p=(0,n.up)("Icon"),v=(0,n.up)("add-tag-wizard");return(0,n.wg)(),(0,n.iD)("div",null,[s,(0,n._)("p",a," Here are all tags associated with this "+(0,i.toDisplayString)(t.destination)+'. You can add more tags by clicking on the "Add Tag" button. ',1),(0,n._)("div",r,[((0,n.wg)(!0),(0,n.iD)(n.HY,null,(0,n.Ko)(m.tagList,(e=>((0,n.wg)(),(0,n.iD)("div",{key:e.pk,class:"single-tag",style:(0,i.normalizeStyle)(`background-color: ${e.fields.tag_colour};color: ${e.fields.tag_text_colour};`)},[(0,n.Uk)((0,i.toDisplayString)(e.fields.tag_name)+" ",1),t.userLevel>1?((0,n.wg)(),(0,n.iD)("span",{key:0,onClick:t=>g.removeTag(e.pk)},[(0,n.Wm)(p,{icon:t.icons.xCircle},null,8,["icon"])],8,l)):(0,n.kq)("v-if",!0)],4)))),128))]),(0,n.kq)(" ADD TAG BUTTON "),(0,n._)("div",c,[(0,n._)("div",d,[t.userLevel>1?((0,n.wg)(),(0,n.iD)("a",{key:0,href:"javascript:void(0)",class:"btn btn-primary save-changes",onClick:e[0]||(e[0]=(...t)=>g.createNewTag&&g.createNewTag(...t))},"Add Tag to "+(0,i.toDisplayString)(t.destination),1)):(0,n.kq)("v-if",!0)])]),(0,n.kq)(" ADD TAG MODULE "),(0,n.Wm)(v,{destination:t.destination,"location-id":t.locationId,"assigned-tags":m.tagList,onAdd_tags:e[1]||(e[1]=t=>g.addTags(t))},null,8,["destination","location-id","assigned-tags"])])}]])},8885:(t,e,o)=>{o.d(e,{Z:()=>h});var n=o(6252),i=o(3577);const s={class:"text-instructions"},a=(0,n._)("hr",null,null,-1),r={class:"row submit-row"},l={class:"col-md-12"};var c=o(3138),d=o(5808),u=o(6542),m=o(5007),g=o(3027),p=o(989);const v={name:"NotesModule",components:{Icon:u.JO,ListNotes:m.Z,NewHistoryNoteWizard:g.Z},mixins:[d.Z],computed:{...(0,p.Se)({destination:"getDestination",locationId:"getLocationId",userLevel:"getUserLevel",rootUrl:"getRootUrl"})},methods:{createNewNote(){new c.u_(document.getElementById("newNoteModal")).show()},getNoteHistoryResults(){let t="note_list";"organisation"===this.destination&&(t="organisation_note_list"),this.axios.post(`${this.rootUrl}object_data/${this.destination}/${this.locationId}/${t}/`).then((t=>{this.$store.commit({type:"initNoteList",noteList:t.data})})).catch((t=>{this.$store.dispatch("newToast",{header:"Error Getting Note History",message:`Can not retrieve the note history. Error -> ${t}`,extra_classes:"bg-danger",delay:0})}))}},mounted(){this.$nextTick((()=>{this.getNoteHistoryResults()}))}},h=(0,o(3744).Z)(v,[["render",function(t,e,o,c,d,u){const m=(0,n.up)("Icon"),g=(0,n.up)("list-notes");return(0,n.wg)(),(0,n.iD)("div",null,[(0,n._)("h2",null,[(0,n.Wm)(m,{icon:t.icons.noteAdd},null,8,["icon"]),(0,n.Uk)(" Note History ")]),(0,n._)("p",s," The following are saved notes against this "+(0,i.toDisplayString)(t.destination)+". Add notes by clicking on the button below. ",1),(0,n.Wm)(g,{destination:t.destination},null,8,["destination"]),(0,n.kq)(" ADD NOTE HISTORY "),(0,n.kq)(" TO DO - limit it to certain users "),a,(0,n._)("div",r,[(0,n._)("div",l,[t.userLevel>1?((0,n.wg)(),(0,n.iD)("button",{key:0,class:"btn btn-primary save-changes",onClick:e[0]||(e[0]=(...t)=>u.createNewNote&&u.createNewNote(...t))}," Add Note to "+(0,i.toDisplayString)(t.destination),1)):(0,n.kq)("v-if",!0)])])])}]])},6136:(t,e,o)=>{o.d(e,{Z:()=>h});var n=o(6252),i=o(3577);const s={class:"object-card-list"},a={class:"object-card--detail"},r=["href"],l={class:"object-card--detail--link"},c={class:"object-card--detail--description"},d={class:"object-card--status"},u={class:"object-card--status--status"},m={class:"small-text"};var g=o(431),p=o(989);const v={name:"RenderObjectCard",props:{destination:{type:String,default:""},importVariables:{type:Object,default:()=>({header:"",prefix:"",id:0,title:"",status:""})},searchResults:{type:Array,default:()=>[]}},mixins:[g.Z],computed:{...(0,p.Se)({rootUrl:"getRootUrl"})}},h=(0,o(3744).Z)(v,[["render",function(t,e,o,g,p,v){return(0,n.wg)(),(0,n.iD)("div",s,[(0,n._)("h2",null,(0,i.toDisplayString)(o.importVariables.header),1),((0,n.wg)(!0),(0,n.iD)(n.HY,null,(0,n.Ko)(o.searchResults,(e=>((0,n.wg)(),(0,n.iD)("div",{class:"object-card",key:e.pk},[(0,n._)("div",a,[(0,n._)("a",{href:`${t.rootUrl}${o.destination}_information/${e[o.importVariables.id]}/`},[(0,n._)("div",l,(0,i.toDisplayString)(o.importVariables.prefix)+(0,i.toDisplayString)(e[o.importVariables.id]),1),(0,n._)("div",c,(0,i.toDisplayString)(e[o.importVariables.title]),1)],8,r)]),(0,n._)("div",d,[(0,n._)("div",u,(0,i.toDisplayString)(e[o.importVariables.status]),1),(0,n._)("p",m,(0,i.toDisplayString)(t.getNiceDatetime(e[o.importVariables.end_date])),1)])])))),128))])}]])}}]); \ No newline at end of file diff --git a/NearBeach/static/NearBeach/1032.min.js.gz b/NearBeach/static/NearBeach/1032.min.js.gz new file mode 100644 index 000000000..2cda82daf Binary files /dev/null and b/NearBeach/static/NearBeach/1032.min.js.gz differ diff --git a/NearBeach/static/NearBeach/1187.min.js b/NearBeach/static/NearBeach/1187.min.js new file mode 100644 index 000000000..90792e668 --- /dev/null +++ b/NearBeach/static/NearBeach/1187.min.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunknearbeach=self.webpackChunknearbeach||[]).push([[1187],{7740:(e,t,i)=>{i.d(t,{Z:()=>D});var o=i(6252),s=i(3577);const a=(0,o._)("h2",null,"Public Links",-1),n=(0,o._)("p",{class:"text-instructions"}," The following will be public links you can send to clients. The links will contain certain information of the current object. i.e. it's status and description. Becareful who you send the links too! ",-1),l={key:0,class:"alert alert-info"},d={key:1,class:"alert alert-info"},r={key:2,class:"table table-striped"},c=(0,o._)("td",null,"Public Link",-1),u=(0,o._)("td",{style:{"text-align":"center",width:"100px"}},"Is Active",-1),h={key:0,style:{width:"10px"}},b=["onClick"],p={style:{"text-align":"center"}},g=["checked","data-public-link-id","disabled"],m={key:0},_={class:"remove-link"},k={key:3,class:"row submit-row"},y={class:"col-md-12"};var f=i(989),v=i(6542),w=i(5808);const $={name:"ListPublicLinks",props:{isReadOnly:{type:Boolean,default:!1},overrideDestination:{type:String,default:""},overrideLocationId:{type:Number,default:0}},data:()=>({isFetchingData:!0,publicLinkResults:[]}),watch:{overrideLocationId(){this.getPublicLinks()}},components:{Icon:v.JO},computed:{...(0,f.Se)({destination:"getDestination",locationId:"getLocationId",rootUrl:"getRootUrl",userLevel:"getUserLevel"})},mixins:[w.Z],methods:{async copyPublicLink(e){const t=`${window.location.origin}${this.rootUrl}public/${this.getDestination()}/${this.getLocationId()}/${e}/`;try{await navigator.clipboard.writeText(t),this.$store.dispatch("newToast",{header:"Public Link Copied",message:"Public Link has successfully copied to the clipboard",extra_classes:"bg-success"})}catch(e){this.$store.dispatch("newToast",{header:"Can not copy public link",message:"Sorry, we failed to copy the public link",extra_classes:"bg-danger",delay:0})}},createPublicLink(){this.$store.dispatch("newToast",{header:"Creating New Toast",message:"Please wait whilst we create the toast",extra_classes:"bg-warning text-dark",delay:0,unique_type:"create_public_link"}),this.axios.post(`${this.rootUrl}public_data/${this.getDestination()}/${this.getLocationId()}/create/`).then((e=>{this.$store.dispatch("newToast",{header:"Successful new Public Link",message:"We have been able to create a new public link",extra_classes:"bg-success",unique_type:"create_public_link"}),this.publicLinkResults=e.data})).catch((e=>{this.$store.dispatch("newToast",{header:"Can not create new public link",message:`Sorry, we failed to create the new public link. Error -> ${e}`,extra_classes:"bg-danger",delay:0,unique_type:"create_public_link"})}))},deletePublicLink(e){const t=new FormData;t.set("public_link_id",e),this.$store.dispatch("newToast",{header:"Deleting Public Link",message:"Deleting Public Link",extra_classes:"bg-warning text-dark",delay:0,unique_type:"public_link_delete"}),this.axios.post(`${this.rootUrl}public_data/${this.getDestination()}/${this.getLocationId()}/delete/`,t).then((()=>{this.publicLinkResults=this.publicLinkResults.filter((t=>t.public_link_id!==e)),this.$store.dispatch("newToast",{header:"Successfully Deleted Public Link",message:"Successfully Deleted Public Link",extra_classes:"bg-success",unique_type:"public_link_delete"})})).catch((e=>{this.$store.dispatch("newToast",{header:"Error Deleting Public Link",message:`Error - could not delete link. Error -> ${e}`,extra_classes:"bg-danger",delay:0,unique_type:"public_link_delete"})}))},formatUrl(e){if(""===e||void 0===e)return"Data error!";const t=e.slice(0,7);return`${window.location.origin}${this.rootUrl}public/${this.getDestination()}/${this.getLocationId()}/${t}...`},getDestination(){return""!==this.overrideDestination?this.overrideDestination:this.destination},getLocationId(){return""!==this.overrideDestination?this.overrideLocationId:this.locationId},getPublicLinks(){0!==this.getLocationId()&&this.axios(`${this.rootUrl}public_data/${this.getDestination()}/${this.getLocationId()}/get_links/`).then((e=>{this.publicLinkResults=e.data,this.isFetchingData=!1})).catch((e=>{this.$store.dispatch("newToast",{header:"Error fetching Public Links",message:`We had an issue fetching the public links for this object. Error -> ${e}`,extra_classes:"bg-danger",delay:0})}))},updateIsActive(e){const t=e.target.dataset.publicLinkId;this.$store.dispatch("newToast",{header:"Updating Active Status for Private Link",message:"Please wait - we are updating the status",extra_classes:"bg-warning text-dark",delay:0,unique_type:`is_active-${t}`});let i="False";e.target.checked&&(i="True");const o=new FormData;o.set("public_link_id",t),o.set("public_link_is_active",i),this.axios.post(`${this.rootUrl}public_data/${this.destination}/${this.locationId}/update_link/`,o).then((()=>{this.$store.dispatch("newToast",{header:"Successfully Updated",message:"We have updated the is active status for the link",extra_classes:"bg-success",unique_type:`is_active-${t}`})})).catch((e=>{this.$store.dispatch("newToast",{header:"Error Updating Active Status for Private Link",message:`We are sorry, something went wrong. Error -> ${e}`,extra_classes:"bg-danger",delay:0,unique_type:`is_active-${t}`})}))}},mounted(){this.$nextTick((()=>{this.getPublicLinks()}))}},D=(0,i(3744).Z)($,[["render",function(e,t,i,f,v,w){const $=(0,o.up)("Icon");return(0,o.wg)(),(0,o.iD)(o.HY,null,[a,n,v.isFetchingData?((0,o.wg)(),(0,o.iD)("div",l,"Currently loading data...")):(0,o.kq)("v-if",!0),!1===v.isFetchingData&&0===v.publicLinkResults.length?((0,o.wg)(),(0,o.iD)("div",d," Sorry. There are no public links setup for this object. ")):((0,o.wg)(),(0,o.iD)("table",r,[(0,o._)("thead",null,[(0,o._)("tr",null,[c,u,e.userLevel>1?((0,o.wg)(),(0,o.iD)("td",h)):(0,o.kq)("v-if",!0)])]),(0,o._)("tbody",null,[((0,o.wg)(!0),(0,o.iD)(o.HY,null,(0,o.Ko)(v.publicLinkResults,(i=>((0,o.wg)(),(0,o.iD)("tr",{key:i.public_link_id},[(0,o._)("td",null,[(0,o._)("button",{type:"button",class:"btn btn-link",onClick:e=>w.copyPublicLink(i.public_link_id)},(0,s.toDisplayString)(w.formatUrl(i.public_link_id)),9,b)]),(0,o._)("td",p,[(0,o._)("input",{class:"form-check-input",type:"checkbox",checked:i.public_link_is_active,"data-public-link-id":i.public_link_id,disabled:e.userLevel<=1,onChange:t[0]||(t[0]=(...e)=>w.updateIsActive&&w.updateIsActive(...e))},null,40,g)]),e.userLevel>1?((0,o.wg)(),(0,o.iD)("td",m,[(0,o._)("span",_,[(0,o.Wm)($,{icon:e.icons.trashCan,onClick:e=>w.deletePublicLink(i.public_link_id)},null,8,["icon","onClick"])])])):(0,o.kq)("v-if",!0)])))),128))])])),!1===i.isReadOnly&&e.userLevel>1?((0,o.wg)(),(0,o.iD)("div",k,[(0,o._)("div",y,[(0,o._)("button",{class:"btn btn-primary save-changes",onClick:t[1]||(t[1]=(...e)=>w.createPublicLink&&w.createPublicLink(...e))}," Create Public Link ")])])):(0,o.kq)("v-if",!0)],64)}]])},6505:(e,t,i)=>{i.d(t,{Z:()=>h});var o=i(6252);const s={class:"modal fade",id:"confirmFolderDeleteModal",tabindex:"-1","data-bs-backdrop":"static","data-bs-keyboard":"false","aria-labelledby":"confirmFolderDelete","aria-hidden":"true"},a={class:"modal-dialog"},n={class:"modal-content"},l=(0,o._)("div",{class:"modal-header"},[(0,o._)("h5",{class:"modal-title",id:"confirmFolderDelete"}," Please confirm Folder Deletion "),(0,o.kq)(" TASK INFORMATION "),(0,o._)("button",{type:"button",class:"btn-close","data-bs-dismiss":"modal","aria-label":"Close",id:"confirmFolderDeleteButton"})],-1),d=(0,o._)("div",{class:"modal-body"}," Are you sure you want to delete the folder? All files under this folder will be deleted also. ",-1),r={class:"modal-footer"};var c=i(989);i(3138);const u={name:"ConfirmFolderDelete",mixins:[i(1295).Z],computed:{...(0,c.Se)({destination:"getDestination",folderRemoveId:"getFolderRemoveId",locationId:"getLocationId",rootUrl:"getRootUrl"})},methods:{deleteFolder(){if(""===this.folderRemoveId)return;const e=this.folderRemoveId,t=new FormData;t.set("folder_id",this.folderRemoveId),this.axios.post(`${this.rootUrl}documentation/${this.destination}/${this.locationId}/remove_folder/`,t).then((()=>{this.$store.dispatch("removeFolder",{folder_id:e}),this.closeModal()})).catch((e=>{this.$store.dispatch("newToast",{header:"Error removing folder",message:`We could not remove your folder. Error - ${e}`,extra_classes:"bg-danger",delay:0})})),this.closeModal()},closeModal(){this.$store.commit({type:"updateFolderRemoveId",documentRemoveKey:""}),document.getElementById("confirmFolderDeleteButton").click(),this.reopenCardInformation()}}},h=(0,i(3744).Z)(u,[["render",function(e,t,i,c,u,h){return(0,o.wg)(),(0,o.iD)("div",s,[(0,o._)("div",a,[(0,o._)("div",n,[l,d,(0,o._)("div",r,[(0,o._)("button",{type:"button",class:"btn btn-secondary",onClick:t[0]||(t[0]=(...e)=>h.closeModal&&h.closeModal(...e))}," No "),(0,o._)("button",{type:"button",class:"btn btn-primary",onClick:t[1]||(t[1]=(...e)=>h.deleteFolder&&h.deleteFolder(...e))}," Yes ")])])])])}]])},9159:(e,t,i)=>{i.d(t,{Z:()=>b});var o=i(6252);const s={class:"modal fade",id:"confirmNoteDeleteModal",tabindex:"-1","data-bs-backdrop":"static","data-bs-keyboard":"false","aria-labelledby":"confirmLinkDelete","aria-hidden":"true"},a={class:"modal-dialog"},n={class:"modal-content"},l=(0,o._)("div",{class:"modal-header"},[(0,o._)("h5",{class:"modal-title",id:"confirmNoteDelete"}," Please confirm Note Deletion "),(0,o._)("button",{type:"button",class:"btn-close","data-bs-dismiss":"modal","aria-label":"Close",id:"confirmNoteDeleteButton"})],-1),d=(0,o._)("div",{class:"modal-body"}," Are you sure you want to delete the note? ",-1),r={class:"modal-footer"};var c=i(989),u=(i(3138),i(1295));const h={name:"ConfirmNoteDelete",props:{},computed:{...(0,c.Se)({destination:"getDestination",noteId:"getSingleNoteId",rootUrl:"getRootUrl"})},mixins:[u.Z],methods:{deleteNote(){this.$store.dispatch("newToast",{header:"Deleting Note",message:"Currently deleting note",extra_classes:"bg-warning text-dark",delay:0,unique_type:"delete_note"});let e=`${this.rootUrl}note/delete/${this.noteId}/`;this.destination&&(e=`${this.rootUrl}note/organisation/delete/${this.noteId}/`),this.axios.post(e).then((()=>{this.$store.dispatch("newToast",{header:"Note is deleted",message:"Successfully Deleted Note",extra_classes:"bg-success",unique_type:"delete_note"}),this.$store.commit({type:"removeNote",noteId:this.noteId}),this.closeModal(),this.reopenCardInformation()})).catch((e=>{this.$store.dispatch("newToast",{header:"Failed to Delete Note",message:`Sorry, we failed to delete the note. Error -> ${e}`,extra_classes:"bg-danger",delay:0,unique_type:"delete_note"})}))},closeModal(){document.getElementById("confirmNoteDeleteButton").click(),this.reopenCardInformation()}}},b=(0,i(3744).Z)(h,[["render",function(e,t,i,c,u,h){return(0,o.wg)(),(0,o.iD)("div",s,[(0,o._)("div",a,[(0,o._)("div",n,[l,d,(0,o._)("div",r,[(0,o._)("button",{type:"button",class:"btn btn-secondary",onClick:t[0]||(t[0]=(...e)=>h.closeModal&&h.closeModal(...e))}," No "),(0,o._)("button",{type:"button",class:"btn btn-primary",onClick:t[1]||(t[1]=(...e)=>h.deleteNote&&h.deleteNote(...e))}," Yes ")])])])])}]])},8576:(e,t,i)=>{i.d(t,{Z:()=>y});var o=i(6252);const s={class:"modal fade",id:"editNoteModal",tabindex:"-1",role:"dialog","aria-labelledby":"exampleModalLabel","aria-hidden":"true"},a={class:"modal-dialog modal-lg",role:"document"},n={class:"modal-content"},l={class:"modal-header"},d=(0,o._)("button",{type:"button",class:"btn-close","data-bs-dismiss":"modal","aria-label":"Close",id:"editNoteCloseButton"},[(0,o._)("span",{"aria-hidden":"true"})],-1),r={class:"modal-body"},c=(0,o._)("p",{class:"text-instructions"},' Use the text editor to edit your note. Click on the "Update" button to submit the changes. ',-1),u={class:"modal-footer"},h=["disabled"];var b=i(5808),p=i(1295),g=i(6542),m=i(7267),_=i(989);i(3138);const k={name:"EditHistoryNoteWizard",components:{editor:m.Z,Icon:g.JO},mixins:[b.Z,p.Z],data:()=>({noteModel:""}),computed:{...(0,_.Se)({description:"getSingleNoteDescription",destination:"getDestination",contentCss:"getContentCss",noteDescription:"getSingleNoteDescription",noteId:"getSingleNoteId",rootUrl:"getRootUrl",skin:"getSkin"})},watch:{noteDescription(){this.noteModel=this.noteDescription}},methods:{closeModal(){document.getElementById("editNoteCloseButton").click(),this.reopenCardInformation()},updateNote(){const e=new FormData;e.set("object_note_id",`${this.noteId}`),e.set("object_note",this.noteModel),this.$store.dispatch("newToast",{header:"Updating Note",message:"Please wait - updating your note",extra_classes:"bg-warning text-dark",delay:0,unique_type:"save_note"});let t=`${this.rootUrl}note/update/${this.noteId}/`;"organisation"===this.destination&&(t=`${this.rootUrl}note/organisation/update/${this.noteId}/`),this.axios.post(t,e).then((()=>{this.$store.dispatch("newToast",{header:"Updated Note",message:"The note updated successfully.",extra_classes:"bg-success",unique_type:"save_note"}),this.$store.dispatch({type:"editSingleNote",noteId:this.noteId,noteDescription:this.noteModel}),document.getElementById("editNoteCloseButton").click(),this.reopenCardInformation()})).catch((e=>{this.$store.dispatch("newToast",{header:"Failed Updating Note",message:`Failed to update note - Error -> ${e}`,extra_classes:"bg-danger",delay:0,unique_type:"save_note"})}))}}},y=(0,i(3744).Z)(k,[["render",function(e,t,i,b,p,g){const m=(0,o.up)("Icon"),_=(0,o.up)("editor");return(0,o.wg)(),(0,o.iD)(o.HY,null,[(0,o.kq)(" EDIT HISTORY NOTE "),(0,o._)("div",s,[(0,o._)("div",a,[(0,o._)("div",n,[(0,o._)("div",l,[(0,o._)("h2",null,[(0,o.Wm)(m,{icon:e.icons.noteAdd},null,8,["icon"]),(0,o.Uk)(" Edit Note ")]),d]),(0,o._)("div",r,[c,(0,o.Wm)(_,{init:{height:300,menubar:!1,plugins:["lists","codesample","table"],toolbar:"undo redo | blocks | bold italic strikethrough underline backcolor | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | removeformat | table image codesample",skin:`${this.skin}`,content_css:`${this.contentCss}`},modelValue:p.noteModel,"onUpdate:modelValue":t[0]||(t[0]=e=>p.noteModel=e)},null,8,["init","modelValue"])]),(0,o._)("div",u,[(0,o._)("button",{type:"button",class:"btn btn-primary",disabled:""==p.noteModel,onClick:t[1]||(t[1]=(...e)=>g.updateNote&&g.updateNote(...e))}," Update Note ",8,h),(0,o._)("button",{type:"button",class:"btn btn-secondary",onClick:t[2]||(t[2]=(...e)=>g.closeModal&&g.closeModal(...e))}," Close ")])])])])],2112)}]])}}]); \ No newline at end of file diff --git a/NearBeach/static/NearBeach/1187.min.js.gz b/NearBeach/static/NearBeach/1187.min.js.gz new file mode 100644 index 000000000..30b39e48d Binary files /dev/null and b/NearBeach/static/NearBeach/1187.min.js.gz differ diff --git a/NearBeach/static/NearBeach/1510.min.js b/NearBeach/static/NearBeach/1510.min.js new file mode 100644 index 000000000..feb9b853d --- /dev/null +++ b/NearBeach/static/NearBeach/1510.min.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunknearbeach=self.webpackChunknearbeach||[]).push([[1510],{1510:(a,e,t)=>{t.d(e,{Z:()=>D});var n=t(6252);const r={key:0,class:"kanban-row"},d={key:1,class:"kanban-row"};var l=t(989),i=t(3577);const s=["id","data-level","data-column"],o=["id","data-sort-number","data-card-id"],c=(0,n._)("br",null,null,-1);var u=t(3138),m=t(6542),p=t(5808),k=t(9980),b=t.n(k);const h={name:"KanbanColumn",components:{draggable:b(),Icon:m.JO},props:{columnId:{type:Number,default:0},levelId:{type:Number,default:0},newCardInfo:{type:Array,default:()=>[]}},data:()=>({drag:!1,priorityList:["highest","high","normal","low","lowest"]}),computed:{...(0,l.Se)({allCards:"getCards",kanbanStatus:"getKanbanStatus",openCardOnLoad:"getOpenCardOnLoad",rootUrl:"getRootUrl"}),masterList(){let a=this.allCards.filter((a=>parseInt(a.fields.kanban_column)===this.columnId&&parseInt(a.fields.kanban_level)===this.levelId));return a=a.sort(((a,e)=>a.fields.kanban_card_sort_number-e.fields.kanban_card_sort_number)),a}},mixins:[p.Z],methods:{checkCardOrder(){if(0===this.masterList.length)return;const a=this.masterList.map((a=>a.fields.kanban_card_sort_number)),e=Math.min.apply(null,a),t=Math.max.apply(null,a);0===e&&t===this.masterList.length-1||(document.getElementById("sort_error").style.display="flex",this.masterList.forEach(((a,e)=>{const t=new FormData;t.set("new_card_column",this.columnId.toString()),t.set("new_card_level",this.levelId.toString()),t.set("new_card_sort_number",e.toString()),t.set("old_card_column",a.fields.kanban_column),t.set("old_card_level",a.fields.kanban_level),t.set("old_card_sort_number",a.fields.kanban_card_sort_number),t.set("card_id",a.pk),this.$store.commit({type:"updateKanbanCard",card_id:a.pk,kanban_column:this.columnId,kanban_level:this.levelId,kanban_card_sort_number:e}),this.axios.post(`${this.rootUrl}kanban_information/${a.pk}/move_card/`,t)})),document.getElementById("sort_error").style.display="")},doubleClickCard(a){const e=this.masterList.filter((e=>e.pk===a.target.dataset.cardId))[0];this.sendDataUpstream(e)},isLinkedObject(a){let e="";return null!==a.fields.project&&(e="project"),null!==a.fields.requirement&&(e="requirement"),null!==a.fields.task&&(e="task"),e},sendDataUpstream(a){const e=this.isLinkedObject(a);if(e.length>0){const t=`${this.rootUrl}${e}_information/${a.fields[e]}/`;window.open(t,"_blank").focus()}else this.$store.dispatch({type:"updateCard",cardId:a.pk,cardTitle:a.fields.kanban_card_text,cardDescription:a.fields.kanban_card_description,cardColumn:a.fields.kanban_column,cardLevel:a.fields.kanban_level,cardLink:{},cardPriority:a.fields.kanban_card_priority}),new u.u_(document.getElementById("cardInformationModal")).show()},singleClickCard(a){const e=this.masterList.filter((e=>e.pk===a))[0];this.sendDataUpstream(e)}},watch:{newCardInfo(){this.columnId===this.newCardInfo[0].fields.kanban_column&&this.levelId===this.newCardInfo[0].fields.kanban_level&&this.masterList.push(this.newCardInfo[0])}},mounted(){this.masterList.filter((a=>{const e=a.pk===this.openCardOnLoad,t=0===this.isLinkedObject(a).length;return e&&t})).length>0&&this.singleClickCard(this.openCardOnLoad)}};var _=t(3744);const f=(0,_.Z)(h,[["render",function(a,e,t,r,d,l){const u=(0,n.up)("Icon");return(0,n.wg)(),(0,n.iD)("div",{class:"list-group kanban-cell",id:`kanban_cell_${t.levelId}_${t.columnId}`,"data-level":t.levelId,"data-column":t.columnId},[((0,n.wg)(!0),(0,n.iD)(n.HY,null,(0,n.Ko)(l.masterList,(t=>((0,n.wg)(),(0,n.iD)("div",{class:"list-group-item",key:t.pk,id:t.pk,"data-sort-number":t.fields.kanban_card_sort_number,"data-card-id":t.pk,onDblclick:e[0]||(e[0]=a=>l.doubleClickCard(a))},[(0,n._)("div",{class:(0,i.normalizeClass)(`card-priority-line priority-${d.priorityList[t.fields.kanban_card_priority]}`)},null,2),l.isLinkedObject(t)?((0,n.wg)(),(0,n.j4)(u,{key:0,icon:a.icons.linkOut,"data-sort-number":t.fields.kanban_card_sort_number,"data-card-id":t.pk,class:"card-external-link"},null,8,["icon","data-sort-number","data-card-id"])):(0,n.kq)("v-if",!0),(0,n._)("b",null,"#"+(0,i.toDisplayString)(t.pk),1),c,(0,n.Uk)(" "+(0,i.toDisplayString)(t.fields.kanban_card_text)+" ",1),(0,n.Wm)(u,{class:"kanban-card-info-icon",icon:a.icons.infoCircle,onClick:a=>l.singleClickCard(t.pk),onDblclick:a=>l.singleClickCard(t.pk)},null,8,["icon","onClick","onDblclick"])],40,o)))),128))],8,s)}]]),g=["id","data-sort-number","data-card-id","data-card-priority"],C=["data-card-id","data-sort-number","data-card-priority"],y={key:1},v=(0,n._)("br",null,null,-1),w={class:"kanban-add-new-cards"},I={name:"kanbanColumnDraggable",components:{Icon:m.JO,draggable:b()},props:{columnId:{type:Number,default:0},columnProperty:{type:String,default:"Normal"},levelId:{type:Number,default:0},newCardInfo:{type:Array,default:()=>[]}},data:()=>({drag:!1,priorityList:["highest","high","normal","low","lowest"]}),computed:{...(0,l.Se)({allCards:"getCards",canDragCards:"getCanDragCards",kanbanStatus:"getKanbanStatus",levelCollapseStatus:"getLevelCollapseStatus",openCardOnLoad:"getOpenCardOnLoad",rootUrl:"getRootUrl"}),dragOptions:()=>({animation:200,group:"description",disabled:!1,ghostClass:"ghost"}),masterList(){return this.$store.getters.getCardsOrder(this.columnId,this.levelId)}},mixins:[p.Z],methods:{addNewKanbanCard(){this.$store.commit({type:"updateNewCardLocation",columnId:this.columnId,levelId:this.levelId,userCanSelectLocation:!1}),new u.u_(document.getElementById("addKanbanCardModal")).show()},addNewLink(){this.$store.commit({type:"updateNewCardLocation",columnId:this.columnId,levelId:this.levelId,userCanSelectLocation:!1}),new u.u_(document.getElementById("newLinkModal")).show()},archiveCards(){this.$store.commit({type:"updateArchiveDestination",column:this.columnId,level:this.levelId})},checkCardOrder(){if(0===this.masterList.length)return;const a=this.masterList.map((a=>a.fields.kanban_card_sort_number)),e=Math.min.apply(null,a),t=Math.max.apply(null,a);if(0===e&&t===this.masterList.length-1)return;document.getElementById("sort_error").style.display="flex";const n=new FormData;this.masterList.forEach(((a,e)=>{n.append("kanban_cards",a.pk),this.$store.commit({type:"updateKanbanCard",card_id:a.pk,kanban_card_sort_number:e})})),this.axios.post(`${this.rootUrl}kanban_information/fix_card_ordering/`,n).catch((a=>{this.$store.dispatch("newToast",{header:"Failed to move card",message:`Sorry, we could not move your card. Error -> ${a}`,extra_classes:"bg-danger",delay:0})})),document.getElementById("sort_error").style.display=""},doubleClickCard(a){const e=this.masterList.filter((e=>parseInt(e.pk)===parseInt(a.target.dataset.cardId)))[0];this.sendDataUpstream(e)},isLinkedObject(a){let e="";return null!==a.fields.project&&(e="project"),null!==a.fields.requirement&&(e="requirement"),null!==a.fields.task&&(e="task"),e},async onEnd(a){await this.$store.dispatch("kanbanCardMoved",{event:a});const e=a.to,t=a.from,n=a.item.dataset.cardId;let r=e.dataset.column,d=e.dataset.level,l=(a.newIndex,t.dataset.column),i=t.dataset.level,s=(a.oldIndex,e.dataset.columnProperty);const o=new FormData;o.set("new_card_column",r),o.set("new_card_level",d),this.$store.getters.getCardsOrder(r,d).forEach((a=>{o.append("new_destination",a.pk)})),this.$store.getters.getCardsOrder(l,i).forEach((a=>{o.append("old_destination",a.pk)})),this.axios.post(`${this.rootUrl}kanban_information/${n}/move_card/`,o).then((()=>{"Blocked"===s&&(this.$store.commit({type:"updateValue",field:"cardId",value:parseInt(n)}),new u.u_(document.getElementById("blockedNotesModal")).show())})).catch((a=>{this.$store.dispatch("newToast",{header:"Can not update Card",message:`Sorry, moving the card had an error. Error -> ${a}`,extra_classes:"bg-danger",delay:0})}))},sendDataUpstream(a){const e=this.isLinkedObject(a);if(e.length>0){const t=`${this.rootUrl}${e}_information/${a.fields[e]}/`;window.open(t,"_blank").focus()}else this.$store.dispatch({type:"updateCard",cardId:a.pk,cardTitle:a.fields.kanban_card_text,cardDescription:a.fields.kanban_card_description,cardColumn:a.fields.kanban_column,cardLevel:a.fields.kanban_level,cardLink:{},cardPriority:a.fields.kanban_card_priority}),new u.u_(document.getElementById("cardInformationModal")).show()},singleClickCard(a){const e=this.masterList.filter((e=>e.pk===a))[0];this.sendDataUpstream(e)}},watch:{newCardInfo(){this.columnId===this.newCardInfo[0].fields.kanban_column&&this.levelId===this.newCardInfo[0].fields.kanban_level&&this.masterList.push(this.newCardInfo[0])}},mounted(){this.checkCardOrder(),this.masterList.filter((a=>{const e=a.pk===this.openCardOnLoad,t=0===this.isLinkedObject(a).length;return e&&t})).length>0&&this.singleClickCard(this.openCardOnLoad)}},L={name:"KanbanRow",components:{KanbanColumn:f,KanbanColumnDraggable:(0,_.Z)(I,[["render",function(a,e,t,r,d,l){const s=(0,n.up)("Icon"),o=(0,n.up)("draggable");return a.levelCollapseStatus(t.levelId)?(0,n.kq)("v-if",!0):((0,n.wg)(),(0,n.j4)(o,{key:0,class:"list-group kanban-cell",id:`kanban_cell_${t.levelId}_${t.columnId}`,"data-level":t.levelId,"data-column":t.columnId,"data-column-property":t.columnProperty,animation:200,disabled:"Closed"===a.kanbanStatus||!a.canDragCards,group:"tasks","ghost-class":"ghost",onEnd:e[4]||(e[4]=a=>l.onEnd(a)),modelValue:l.masterList,"onUpdate:modelValue":e[5]||(e[5]=a=>l.masterList=a),"item-key":"pk"},(0,n.Nv)({item:(0,n.w5)((({element:t})=>[((0,n.wg)(),(0,n.iD)("div",{class:"list-group-item",key:t.pk,id:t.pk,"data-sort-number":t.fields.kanban_card_sort_number,"data-card-id":t.pk,"data-card-priority":t.fields.kanban_card_priority,onDblclick:e[0]||(e[0]=a=>l.doubleClickCard(a))},[(0,n._)("div",{class:(0,i.normalizeClass)(`card-priority-line priority-${d.priorityList[t.fields.kanban_card_priority]}`),"data-card-id":t.pk,"data-sort-number":t.fields.kanban_card_sort_number,"data-card-priority":t.fields.kanban_card_priority},null,10,C),l.isLinkedObject(t).length>0?((0,n.wg)(),(0,n.j4)(s,{key:0,icon:a.icons.linkOut,"data-card-id":t.pk,"data-sort-number":t.fields.kanban_card_sort_number,"data-card-priority":t.fields.kanban_card_priority,class:"card-external-link"},null,8,["icon","data-card-id","data-sort-number","data-card-priority"])):(0,n.kq)("v-if",!0),(0,n._)("b",null,"#"+(0,i.toDisplayString)(t.pk),1),a.canDragCards?(0,n.kq)("v-if",!0):((0,n.wg)(),(0,n.iD)("b",y," - LOCKED!")),v,(0,n.Uk)(" "+(0,i.toDisplayString)(t.fields.kanban_card_text)+" ",1),(0,n.Wm)(s,{class:"kanban-card-info-icon",icon:a.icons.infoCircle,onClick:a=>l.singleClickCard(t.pk),onDblclick:a=>l.singleClickCard(t.pk)},null,8,["icon","onClick","onDblclick"])],40,g))])),_:2},["Closed"!==a.kanbanStatus?{name:"footer",fn:(0,n.w5)((()=>[(0,n._)("div",w,["Closed"!==t.columnProperty?((0,n.wg)(),(0,n.iD)("a",{key:0,class:"kanban-link btn btn-primary",href:"javascript:void(0)",onClick:e[1]||(e[1]=(...a)=>l.addNewKanbanCard&&l.addNewKanbanCard(...a))}," New Card ")):(0,n.kq)("v-if",!0),"Closed"!==t.columnProperty?((0,n.wg)(),(0,n.iD)("a",{key:1,class:"kanban-link btn btn-warning",href:"javascript:void(0)",onClick:e[2]||(e[2]=(...a)=>l.addNewLink&&l.addNewLink(...a))}," Link Object ")):(0,n.kq)("v-if",!0),l.masterList.length>0?((0,n.wg)(),(0,n.iD)("a",{key:2,class:"kanban-link btn btn-danger",href:"javascript:void(0)",onClick:e[3]||(e[3]=(...a)=>l.archiveCards&&l.archiveCards(...a))}," Archive Cards ")):(0,n.kq)("v-if",!0)])])),key:"0"}:void 0]),1032,["id","data-level","data-column","data-column-property","disabled","modelValue"]))}]])},props:{levelId:{type:Number,default:0},newCardInfo:{type:Array,default:()=>[]}},computed:{...(0,l.Se)({columnResults:"getColumnResults",userLevel:"getUserLevel"})},methods:{doubleClickedCard(a){this.$emit("double_clicked_card",a)}}},D=(0,_.Z)(L,[["render",function(a,e,t,l,i,s){const o=(0,n.up)("kanban-column-draggable"),c=(0,n.up)("kanban-column");return a.userLevel>1?((0,n.wg)(),(0,n.iD)("div",r,[(0,n.kq)(" Users can edit kanban board - can drag "),((0,n.wg)(!0),(0,n.iD)(n.HY,null,(0,n.Ko)(a.columnResults,(a=>((0,n.wg)(),(0,n.j4)(o,{key:a.pk,"level-id":t.levelId,"column-id":a.pk,"column-property":a.fields.kanban_column_property,"new-card-info":t.newCardInfo,onDouble_clicked_card:e[0]||(e[0]=a=>s.doubleClickedCard(a))},null,8,["level-id","column-id","column-property","new-card-info"])))),128))])):((0,n.wg)(),(0,n.iD)("div",d,[(0,n.kq)(" Read Only Users "),((0,n.wg)(!0),(0,n.iD)(n.HY,null,(0,n.Ko)(a.columnResults,(a=>((0,n.wg)(),(0,n.j4)(c,{key:a.pk,"level-id":t.levelId,"column-id":a.pk,"new-card-info":t.newCardInfo,onDouble_clicked_card:e[1]||(e[1]=a=>s.doubleClickedCard(a))},null,8,["level-id","column-id","new-card-info"])))),128))]))}]])}}]); \ No newline at end of file diff --git a/NearBeach/static/NearBeach/1510.min.js.gz b/NearBeach/static/NearBeach/1510.min.js.gz new file mode 100644 index 000000000..c39a870b6 Binary files /dev/null and b/NearBeach/static/NearBeach/1510.min.js.gz differ diff --git a/NearBeach/static/NearBeach/1695.min.js b/NearBeach/static/NearBeach/1695.min.js new file mode 100644 index 000000000..d4cc37928 --- /dev/null +++ b/NearBeach/static/NearBeach/1695.min.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunknearbeach=self.webpackChunknearbeach||[]).push([[1695],{7267:(n,e,t)=>{t.d(e,{Z:()=>p});var o,i=t(6252),r=["onActivate","onAddUndo","onBeforeAddUndo","onBeforeExecCommand","onBeforeGetContent","onBeforeRenderUI","onBeforeSetContent","onBeforePaste","onBlur","onChange","onClearUndos","onClick","onContextMenu","onCopy","onCut","onDblclick","onDeactivate","onDirty","onDrag","onDragDrop","onDragEnd","onDragGesture","onDragOver","onDrop","onExecCommand","onFocus","onFocusIn","onFocusOut","onGetContent","onHide","onInit","onKeyDown","onKeyPress","onKeyUp","onLoadContent","onMouseDown","onMouseEnter","onMouseLeave","onMouseMove","onMouseOut","onMouseOver","onMouseUp","onNodeChange","onObjectResizeStart","onObjectResized","onObjectSelected","onPaste","onPostProcess","onPostRender","onPreProcess","onProgressState","onRedo","onRemove","onReset","onSaveContent","onSelectionChange","onSetAttrib","onSetContent","onShow","onSubmit","onUndo","onVisualAid"],a=function(n){return-1!==r.map((function(n){return n.toLowerCase()})).indexOf(n.toLowerCase())},l=0,c=function(n){var e=Date.now();return n+"_"+Math.floor(1e9*Math.random())+ ++l+String(e)},d=function(n){return void 0===n||""===n?[]:Array.isArray(n)?n:n.split(" ")},s=function(){return{listeners:[],scriptId:c("tiny-script"),scriptLoaded:!1}},u=(o=s(),{load:function(n,e,t){o.scriptLoaded?t():(o.listeners.push(t),n.getElementById(o.scriptId)||function(n,e,t,i){var r=e.createElement("script");r.referrerPolicy="origin",r.type="application/javascript",r.id=n,r.src=t;var a=function(){r.removeEventListener("load",a),o.listeners.forEach((function(n){return n()})),o.scriptLoaded=!0};r.addEventListener("load",a),e.head&&e.head.appendChild(r)}(o.scriptId,n,e))},reinitialize:function(){o=s()}}),h=function(){var n="undefined"!=typeof window?window:t.g;return n&&n.tinymce?n.tinymce:null},v={apiKey:String,cloudChannel:String,id:String,init:Object,initialValue:String,inline:Boolean,modelEvents:[String,Array],plugins:[String,Array],tagName:String,toolbar:[String,Array],modelValue:String,disabled:Boolean,tinymceScriptSrc:String,outputFormat:{type:String,validator:function(n){return"html"===n||"text"===n}}},f=t(2262),b=function(){return b=Object.assign||function(n){for(var e,t=1,o=arguments.length;t{t.d(e,{Z:()=>S});var o=t(6252),i=t(2262),r=t(834),a=t(9960),l=t(5103),c=t(6135),d=t(9699),s=t(2366),u=t(3079),h=t(945),v=t(1263),f=t(2326),b=t(6810),p=t(5944),g=t(3910);const m={name:"Switch",common:t(8373).Z,self:n=>{const{primaryColor:e,opacityDisabled:t,borderRadius:o,textColor3:i}=n;return Object.assign(Object.assign({},g.Z),{iconColor:i,textColor:"white",loadingColor:e,opacityDisabled:t,railColor:"rgba(0, 0, 0, .14)",railColorActive:e,buttonBoxShadow:"0 1px 4px 0 rgba(0, 0, 0, 0.3), inset 0 0 1px 0 rgba(0, 0, 0, 0.05)",buttonColor:"#FFF",railBorderRadiusSmall:o,railBorderRadiusMedium:o,railBorderRadiusLarge:o,buttonBorderRadiusSmall:o,buttonBorderRadiusMedium:o,buttonBorderRadiusLarge:o,boxShadowFocus:`0 0 0 2px ${(0,p.zX)(e,{alpha:.2})}`})}};var y=t(9197),w=t(9474);const C=(0,w.cB)("switch","\n height: var(--n-height);\n min-width: var(--n-width);\n vertical-align: middle;\n user-select: none;\n -webkit-user-select: none;\n display: inline-flex;\n outline: none;\n justify-content: center;\n align-items: center;\n",[(0,w.cE)("children-placeholder","\n height: var(--n-rail-height);\n display: flex;\n flex-direction: column;\n overflow: hidden;\n pointer-events: none;\n visibility: hidden;\n "),(0,w.cE)("rail-placeholder","\n display: flex;\n flex-wrap: none;\n "),(0,w.cE)("button-placeholder","\n width: calc(1.75 * var(--n-rail-height));\n height: var(--n-rail-height);\n "),(0,w.cB)("base-loading","\n position: absolute;\n top: 50%;\n left: 50%;\n transform: translateX(-50%) translateY(-50%);\n font-size: calc(var(--n-button-width) - 4px);\n color: var(--n-loading-color);\n transition: color .3s var(--n-bezier);\n ",[(0,y.c)({left:"50%",top:"50%",originalTransform:"translateX(-50%) translateY(-50%)"})]),(0,w.cE)("checked, unchecked","\n transition: color .3s var(--n-bezier);\n color: var(--n-text-color);\n box-sizing: border-box;\n position: absolute;\n white-space: nowrap;\n top: 0;\n bottom: 0;\n display: flex;\n align-items: center;\n line-height: 1;\n "),(0,w.cE)("checked","\n right: 0;\n padding-right: calc(1.25 * var(--n-rail-height) - var(--n-offset));\n "),(0,w.cE)("unchecked","\n left: 0;\n justify-content: flex-end;\n padding-left: calc(1.25 * var(--n-rail-height) - var(--n-offset));\n "),(0,w.c)("&:focus",[(0,w.cE)("rail","\n box-shadow: var(--n-box-shadow-focus);\n ")]),(0,w.cM)("round",[(0,w.cE)("rail","border-radius: calc(var(--n-rail-height) / 2);",[(0,w.cE)("button","border-radius: calc(var(--n-button-height) / 2);")])]),(0,w.u4)("disabled",[(0,w.u4)("icon",[(0,w.cM)("rubber-band",[(0,w.cM)("pressed",[(0,w.cE)("rail",[(0,w.cE)("button","max-width: var(--n-button-width-pressed);")])]),(0,w.cE)("rail",[(0,w.c)("&:active",[(0,w.cE)("button","max-width: var(--n-button-width-pressed);")])]),(0,w.cM)("active",[(0,w.cM)("pressed",[(0,w.cE)("rail",[(0,w.cE)("button","left: calc(100% - var(--n-offset) - var(--n-button-width-pressed));")])]),(0,w.cE)("rail",[(0,w.c)("&:active",[(0,w.cE)("button","left: calc(100% - var(--n-offset) - var(--n-button-width-pressed));")])])])])])]),(0,w.cM)("active",[(0,w.cE)("rail",[(0,w.cE)("button","left: calc(100% - var(--n-button-width) - var(--n-offset))")])]),(0,w.cE)("rail","\n overflow: hidden;\n height: var(--n-rail-height);\n min-width: var(--n-rail-width);\n border-radius: var(--n-rail-border-radius);\n cursor: pointer;\n position: relative;\n transition:\n opacity .3s var(--n-bezier),\n background .3s var(--n-bezier),\n box-shadow .3s var(--n-bezier);\n background-color: var(--n-rail-color);\n ",[(0,w.cE)("button-icon","\n color: var(--n-icon-color);\n transition: color .3s var(--n-bezier);\n font-size: calc(var(--n-button-height) - 4px);\n position: absolute;\n left: 0;\n right: 0;\n top: 0;\n bottom: 0;\n display: flex;\n justify-content: center;\n align-items: center;\n line-height: 1;\n ",[(0,y.c)()]),(0,w.cE)("button",'\n align-items: center; \n top: var(--n-offset);\n left: var(--n-offset);\n height: var(--n-button-height);\n width: var(--n-button-width-pressed);\n max-width: var(--n-button-width);\n border-radius: var(--n-button-border-radius);\n background-color: var(--n-button-color);\n box-shadow: var(--n-button-box-shadow);\n box-sizing: border-box;\n cursor: inherit;\n content: "";\n position: absolute;\n transition:\n background-color .3s var(--n-bezier),\n left .3s var(--n-bezier),\n opacity .3s var(--n-bezier),\n max-width .3s var(--n-bezier),\n box-shadow .3s var(--n-bezier);\n ')]),(0,w.cM)("active",[(0,w.cE)("rail","background-color: var(--n-rail-color-active);")]),(0,w.cM)("loading",[(0,w.cE)("rail","\n cursor: wait;\n ")]),(0,w.cM)("disabled",[(0,w.cE)("rail","\n cursor: not-allowed;\n opacity: .5;\n ")])]),x=Object.assign(Object.assign({},l.Z.props),{size:{type:String,default:"medium"},value:{type:[String,Number,Boolean],default:void 0},loading:Boolean,defaultValue:{type:[String,Number,Boolean],default:!1},disabled:{type:Boolean,default:void 0},round:{type:Boolean,default:!0},"onUpdate:value":[Function,Array],onUpdateValue:[Function,Array],checkedValue:{type:[String,Number,Boolean],default:!0},uncheckedValue:{type:[String,Number,Boolean],default:!1},railStyle:Function,rubberBand:{type:Boolean,default:!0},onChange:[Function,Array]});let k;const S=(0,o.aZ)({name:"Switch",props:x,setup(n){void 0===k&&(k="undefined"==typeof CSS||void 0!==CSS.supports&&CSS.supports("width","max(1px)"));const{mergedClsPrefixRef:e,inlineThemeDisabled:t}=(0,c.Z)(n),u=(0,l.Z)("Switch","-switch",C,m,n,e),h=(0,d.Z)(n),{mergedSizeRef:b,mergedDisabledRef:p}=h,g=(0,i.iH)(n.defaultValue),y=(0,i.Vh)(n,"value"),w=(0,a.Z)(y,g),x=(0,o.Fl)((()=>w.value===n.checkedValue)),S=(0,i.iH)(!1),B=(0,i.iH)(!1),E=(0,o.Fl)((()=>{const{railStyle:e}=n;if(e)return e({focused:B.value,checked:x.value})}));function $(e){const{"onUpdate:value":t,onChange:o,onUpdateValue:i}=n,{nTriggerFormInput:r,nTriggerFormChange:a}=h;t&&(0,v.R)(t,e),i&&(0,v.R)(i,e),o&&(0,v.R)(o,e),g.value=e,r(),a()}const F=(0,o.Fl)((()=>{const{value:n}=b,{self:{opacityDisabled:e,railColor:t,railColorActive:o,buttonBoxShadow:i,buttonColor:a,boxShadowFocus:l,loadingColor:c,textColor:d,iconColor:s,[(0,f.T)("buttonHeight",n)]:h,[(0,f.T)("buttonWidth",n)]:v,[(0,f.T)("buttonWidthPressed",n)]:p,[(0,f.T)("railHeight",n)]:g,[(0,f.T)("railWidth",n)]:m,[(0,f.T)("railBorderRadius",n)]:y,[(0,f.T)("buttonBorderRadius",n)]:w},common:{cubicBezierEaseInOut:C}}=u.value;let x,S,B;return k?(x=`calc((${g} - ${h}) / 2)`,S=`max(${g}, ${h})`,B=`max(${m}, calc(${m} + ${h} - ${g}))`):(x=(0,r.BL)(((0,r.fQ)(g)-(0,r.fQ)(h))/2),S=(0,r.BL)(Math.max((0,r.fQ)(g),(0,r.fQ)(h))),B=(0,r.fQ)(g)>(0,r.fQ)(h)?m:(0,r.BL)((0,r.fQ)(m)+(0,r.fQ)(h)-(0,r.fQ)(g))),{"--n-bezier":C,"--n-button-border-radius":w,"--n-button-box-shadow":i,"--n-button-color":a,"--n-button-width":v,"--n-button-width-pressed":p,"--n-button-height":h,"--n-height":S,"--n-offset":x,"--n-opacity-disabled":e,"--n-rail-border-radius":y,"--n-rail-color":t,"--n-rail-color-active":o,"--n-rail-height":g,"--n-rail-width":m,"--n-width":B,"--n-box-shadow-focus":l,"--n-loading-color":c,"--n-text-color":d,"--n-icon-color":s}})),D=t?(0,s.F)("switch",(0,o.Fl)((()=>b.value[0])),F,n):void 0;return{handleClick:function(){n.loading||p.value||(w.value!==n.checkedValue?$(n.checkedValue):$(n.uncheckedValue))},handleBlur:function(){B.value=!1,function(){const{nTriggerFormBlur:n}=h;n()}(),S.value=!1},handleFocus:function(){B.value=!0,function(){const{nTriggerFormFocus:n}=h;n()}()},handleKeyup:function(e){n.loading||p.value||" "===e.key&&(w.value!==n.checkedValue?$(n.checkedValue):$(n.uncheckedValue),S.value=!1)},handleKeydown:function(e){n.loading||p.value||" "===e.key&&(e.preventDefault(),S.value=!0)},mergedRailStyle:E,pressed:S,mergedClsPrefix:e,mergedValue:w,checked:x,mergedDisabled:p,cssVars:t?void 0:F,themeClass:null==D?void 0:D.themeClass,onRender:null==D?void 0:D.onRender}},render(){const{mergedClsPrefix:n,mergedDisabled:e,checked:t,mergedRailStyle:i,onRender:r,$slots:a}=this;null==r||r();const{checked:l,unchecked:c,icon:d,"checked-icon":s,"unchecked-icon":v}=a,f=!((0,b.aD)(d)&&(0,b.aD)(s)&&(0,b.aD)(v));return(0,o.h)("div",{role:"switch","aria-checked":t,class:[`${n}-switch`,this.themeClass,f&&`${n}-switch--icon`,t&&`${n}-switch--active`,e&&`${n}-switch--disabled`,this.round&&`${n}-switch--round`,this.loading&&`${n}-switch--loading`,this.pressed&&`${n}-switch--pressed`,this.rubberBand&&`${n}-switch--rubber-band`],tabindex:this.mergedDisabled?void 0:0,style:this.cssVars,onClick:this.handleClick,onFocus:this.handleFocus,onBlur:this.handleBlur,onKeyup:this.handleKeyup,onKeydown:this.handleKeydown},(0,o.h)("div",{class:`${n}-switch__rail`,"aria-hidden":"true",style:i},(0,b.K9)(l,(e=>(0,b.K9)(c,(t=>e||t?(0,o.h)("div",{"aria-hidden":!0,class:`${n}-switch__children-placeholder`},(0,o.h)("div",{class:`${n}-switch__rail-placeholder`},(0,o.h)("div",{class:`${n}-switch__button-placeholder`}),e),(0,o.h)("div",{class:`${n}-switch__rail-placeholder`},(0,o.h)("div",{class:`${n}-switch__button-placeholder`}),t)):null)))),(0,o.h)("div",{class:`${n}-switch__button`},(0,b.K9)(d,(e=>(0,b.K9)(s,(t=>(0,b.K9)(v,(i=>(0,o.h)(u.Z,null,{default:()=>this.loading?(0,o.h)(h.Z,{key:"loading",clsPrefix:n,strokeWidth:20}):this.checked&&(t||e)?(0,o.h)("div",{class:`${n}-switch__button-icon`,key:t?"checked-icon":"icon"},t||e):this.checked||!i&&!e?null:(0,o.h)("div",{class:`${n}-switch__button-icon`,key:i?"unchecked-icon":"icon"},i||e)}))))))),(0,b.K9)(l,(e=>e&&(0,o.h)("div",{key:"checked",class:`${n}-switch__checked`},e))),(0,b.K9)(c,(e=>e&&(0,o.h)("div",{key:"unchecked",class:`${n}-switch__unchecked`},e))))))}})}}]); \ No newline at end of file diff --git a/NearBeach/static/NearBeach/1695.min.js.gz b/NearBeach/static/NearBeach/1695.min.js.gz new file mode 100644 index 000000000..249b5d579 Binary files /dev/null and b/NearBeach/static/NearBeach/1695.min.js.gz differ diff --git a/NearBeach/static/NearBeach/2471.min.js b/NearBeach/static/NearBeach/2471.min.js new file mode 100644 index 000000000..d67e41cf7 --- /dev/null +++ b/NearBeach/static/NearBeach/2471.min.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunknearbeach=self.webpackChunknearbeach||[]).push([[2471],{8737:(e,t,o)=>{o.d(t,{Z:()=>F});var i=o(6252),n=o(3577);const d={class:"text-instructions"},s={key:0,class:"module-spacer"},l=[(0,i._)("div",{class:"alert alert-dark"}," Sorry - there are no documents or folders uploaded. ",-1)],a={key:1,class:"document--widget"},r=(0,i._)("p",{class:"text-instructions"},"Go to Parent Directory...",-1),c=["onClick"],u={class:"text-instructions"},m={key:0,class:"document--remove"},p=["href"],h={class:"text-instructions"},g={key:0,class:"document--remove"},b=(0,i._)("hr",null,null,-1),_={key:2,class:"btn-group save-changes"},y={key:0,class:"btn btn-primary dropdown-toggle",type:"button","data-bs-toggle":"dropdown","aria-expanded":"false"},f={class:"dropdown-menu"};var D=o(3138),v=o(6542),k=o(5808),w=o(989);const I={name:"DocumentsModule",components:{Icon:v.JO},props:{overrideDestination:{type:String,default:""},overrideLocationId:{type:Number,default:0},readOnly:{type:Boolean,default:!1}},mixins:[k.Z],computed:{...(0,w.Se)({currentFolder:"getCurrentFolder",destination:"getDestination",documentFilteredList:"getDocumentFilteredList",documentObjectCount:"getDocumentObjectCount",folderFilteredList:"getFolderFilteredList",locationId:"getLocationId",userLevel:"getUserLevel",rootUrl:"getRootUrl"})},watch:{overrideLocationId(){this.getDocumentList(),this.getFolderList()}},methods:{addFolder(){const e=document.getElementById("cardInformationModalCloseButton");null!==e&&e.click(),new D.u_(document.getElementById("addFolderModal")).show()},addLink(){const e=document.getElementById("cardInformationModalCloseButton");null!==e&&e.click(),new D.u_(document.getElementById("addLinkModal")).show()},confirmFileDelete(e){this.$store.commit({type:"updateDocumentRemoveKey",documentRemoveKey:e});const t=document.getElementById("cardInformationModalCloseButton");null!==t&&t.click(),new D.u_(document.getElementById("confirmFileDeleteModal")).show()},confirmFolderDelete(e){this.$store.commit({type:"updateFolderRemoveId",folderRemoveId:e});const t=document.getElementById("cardInformationModalCloseButton");null!==t&&t.click(),new D.u_(document.getElementById("confirmFolderDeleteModal")).show()},getDestination(){return""!==this.overrideDestination?this.overrideDestination:this.destination},getDocumentList(){0!==this.getLocationId()&&this.axios.post(`${this.rootUrl}documentation/${this.getDestination()}/${this.getLocationId()}/list/files/`).then((e=>{this.$store.commit({type:"updateDocumentList",documentList:e.data})})).catch((e=>{this.$store.dispatch("newToast",{header:"Error getting Document List",message:`Can not retrieve document list. Error -> ${e}`,extra_classes:"bg-danger",delay:0})}))},getFolderList(){0!==this.getLocationId()&&this.axios.post(`${this.rootUrl}documentation/${this.getDestination()}/${this.getLocationId()}/list/folders/`).then((e=>{this.$store.commit({type:"updateFolderList",folderList:e.data})}))},getIcon(e){if(""!==e.document_key__document_url_location&&null!==e.document_key__document_url_location)return this.icons.linkOut;const t=e.document_key__document.split(".");switch(t[t.length-1]){case"jpg":case"png":case"bmp":return this.icons.imageIcon;case"doc":case"docx":return this.icons.microsoftWord;case"xls":case"xlsx":return this.icons.microsoftExcel;case"ppt":case"pptx":return this.icons.microsoftPowerpoint;case"pdf":return this.icons.documentPdf;default:return this.icons.documentText}},getLocationId(){return""!==this.overrideDestination?this.overrideLocationId:this.locationId},goToParentDirectory(){this.$store.dispatch("goToParentDirectory",{})},shortName:e=>e.length<=50?e:`${e.substring(0,47)}...`,updateCurrentFolder(e){this.$store.commit({type:"updateCurrentFolder",currentFolder:e})},uploadDocument(){const e=document.getElementById("cardInformationModalCloseButton");null!==e&&e.click(),new D.u_(document.getElementById("uploadDocumentModal")).show()}},mounted(){this.$nextTick((()=>{this.getDocumentList(),this.getFolderList()}))}},F=(0,o(3744).Z)(I,[["render",function(e,t,o,D,v,k){const w=(0,i.up)("Icon");return(0,i.wg)(),(0,i.iD)("div",null,[(0,i._)("h2",null,[(0,i.Wm)(w,{icon:e.icons.bxBriefcase},null,8,["icon"]),(0,i.Uk)(" Documents ")]),(0,i._)("p",d," The following is a folder structure of all documents uploaded to this "+(0,n.toDisplayString)(this.getDestination()),1),(0,i.kq)(" DOCUMENT FOLDER TREE "),0===parseInt(e.documentObjectCount)?((0,i.wg)(),(0,i.iD)("div",s,l)):((0,i.wg)(),(0,i.iD)("div",a,[(0,i.kq)(" GO TO PARENT DIRECTORY "),0!==this.currentFolder?((0,i.wg)(),(0,i.iD)("div",{key:0,onClick:t[0]||(t[0]=e=>k.goToParentDirectory()),class:"document--child"},[(0,i.Wm)(w,{icon:e.icons.arrowUp,width:"80px",height:"80px"},null,8,["icon"]),r])):(0,i.kq)("v-if",!0),(0,i.kq)(" RENDER THE FOLDERS "),((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)(e.folderFilteredList,(t=>((0,i.wg)(),(0,i.iD)("div",{key:t.pk,class:"document--child"},[(0,i._)("a",{href:"javascript:void(0)",onClick:e=>k.updateCurrentFolder(t.pk)},[(0,i.Wm)(w,{icon:e.icons.folderIcon,width:"80px",height:"80px"},null,8,["icon"]),(0,i._)("p",u,(0,n.toDisplayString)(k.shortName(t.fields.folder_description)),1)],8,c),(0,i.kq)(" REMOVE FOLDER "),e.userLevel>=2?((0,i.wg)(),(0,i.iD)("div",m,[(0,i.Wm)(w,{icon:e.icons.trashCan,onClick:e=>k.confirmFolderDelete(t.pk)},null,8,["icon","onClick"])])):(0,i.kq)("v-if",!0)])))),128)),(0,i.kq)(" RENDER THE FILES "),((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)(e.documentFilteredList,(t=>((0,i.wg)(),(0,i.iD)("div",{key:t.document_key_id,class:"document--child"},[(0,i._)("a",{href:`/private/${t.document_key_id}/`,rel:"noopener noreferrer",target:"_blank"},[(0,i.Wm)(w,{icon:k.getIcon(t),width:"80px",height:"80px"},null,8,["icon"]),(0,i._)("p",h,(0,n.toDisplayString)(k.shortName(t.document_key__document_description)),1)],8,p),(0,i.kq)(" REMOVE DOCUMENT "),e.userLevel>=2?((0,i.wg)(),(0,i.iD)("div",g,[(0,i.Wm)(w,{icon:e.icons.trashCan,onClick:e=>k.confirmFileDelete(t.document_key_id)},null,8,["icon","onClick"])])):(0,i.kq)("v-if",!0)])))),128))])),(0,i.kq)(" ADD DOCUMENTS AND FOLDER BUTTON "),b,!1===o.readOnly?((0,i.wg)(),(0,i.iD)("div",_,[e.userLevel>1?((0,i.wg)(),(0,i.iD)("button",y," New Document/File ")):(0,i.kq)("v-if",!0),(0,i._)("ul",f,[(0,i._)("li",null,[(0,i._)("a",{class:"dropdown-item",href:"javascript:void(0)",onClick:t[1]||(t[1]=(...e)=>k.uploadDocument&&k.uploadDocument(...e))}," Upload Document ")]),(0,i._)("li",null,[(0,i._)("a",{class:"dropdown-item",href:"javascript:void(0)",onClick:t[2]||(t[2]=(...e)=>k.addLink&&k.addLink(...e))}," Add Link ")]),(0,i._)("li",null,[(0,i._)("a",{class:"dropdown-item",href:"javascript:void(0)",onClick:t[3]||(t[3]=(...e)=>k.addFolder&&k.addFolder(...e))}," Add Folder ")])])])):(0,i.kq)("v-if",!0)])}]])},5007:(e,t,o)=>{o.d(t,{Z:()=>v});var i=o(6252),n=o(3577);const d={key:0,class:"module-spacer"},s={class:"alert alert-dark"},l={key:1,class:"note-history"},a={class:"note-history--profile"},r=["src"],c={class:"note-history--username"},u={class:"note-history--date"},m={key:0,class:"note-history--edit-button"},p=["onClick"],h=["onClick"],g={class:"note-history--note"};var b=o(7267),_=o(3138),y=o(989),f=o(431);const D={name:"ListNotes",components:{editor:b.Z},mixins:[f.Z],props:{destination:{type:String,default:""}},computed:{...(0,y.Se)({contentCss:"getContentCss",noteList:"getNoteList",rootUrl:"getRootUrl",staticUrl:"getStaticUrl",skin:"getSkin"})},methods:{deleteNote(e){if(this.$store.dispatch({type:"updateNoteId",noteId:e}),new _.u_(document.getElementById("confirmNoteDeleteModal")).show(),"card"===this.destination){const e=document.getElementById("cardInformationModalCloseButton");void 0!==e&&e.click()}},editNote(e){if(this.$store.dispatch({type:"updateNoteId",noteId:e}),new _.u_(document.getElementById("editNoteModal")).show(),"card"===this.destination){const e=document.getElementById("cardInformationModalCloseButton");void 0!==e&&e.click()}},profilePicture(e){return null!==e&&""!==e?`${this.rootUrl}private/${e}/`:`${this.staticUrl}NearBeach/images/placeholder/people_tax.svg`}}},v=(0,o(3744).Z)(D,[["render",function(e,t,o,b,_,y){const f=(0,i.up)("editor");return(0,i.wg)(),(0,i.iD)("div",null,[(0,i.kq)(" NOTE HISTORY "),0===e.noteList.length?((0,i.wg)(),(0,i.iD)("div",d,[(0,i._)("div",s," Sorry - but there are no notes for this "+(0,n.toDisplayString)(o.destination)+". ",1)])):((0,i.wg)(),(0,i.iD)("div",l,[((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)(e.noteList,(t=>((0,i.wg)(),(0,i.iD)("div",{class:"note-history--row",key:t.object_note_id},[(0,i._)("div",a,[(0,i._)("img",{src:y.profilePicture(t.profile_picture),alt:"default profile",class:"note-history--profile-picture"},null,8,r),(0,i._)("div",c,(0,n.toDisplayString)(t.first_name)+" "+(0,n.toDisplayString)(t.last_name),1),(0,i._)("div",u,(0,n.toDisplayString)(e.getNiceDatetime(t.date_modified)),1),"true"===t.can_edit?((0,i.wg)(),(0,i.iD)("div",m,[(0,i._)("button",{type:"button",class:"btn btn-outline-secondary",onClick:e=>y.editNote(t.object_note_id)}," Edit Note ",8,p),(0,i._)("button",{type:"button",class:"btn btn-outline-danger",onClick:e=>y.deleteNote(t.object_note_id)}," Delete Note ",8,h)])):(0,i.kq)("v-if",!0)]),(0,i._)("div",g,[(0,i.Wm)(f,{init:{height:250,menubar:!1,plugins:["lists","image","codesample","table"],toolbar:[],skin:`${this.skin}`,content_css:`${this.contentCss}`},modelValue:t.object_note,"onUpdate:modelValue":e=>t.object_note=e,disabled:!0},null,8,["init","modelValue","onUpdate:modelValue"])])])))),128))]))])}]])},9401:(e,t,o)=>{o.d(t,{Z:()=>I});var i=o(6252),n=o(9963);const d={class:"modal fade",id:"addFolderModal",tabindex:"-1","aria-labelledby":"exampleModalLabel","aria-hidden":"true"},s={class:"modal-dialog modal-lg"},l={class:"modal-content"},a={class:"modal-header"},r=(0,i._)("button",{type:"button",class:"btn-close","data-bs-dismiss":"modal","aria-label":"Close",id:"addFolderCloseButton"},[(0,i._)("span",{"aria-hidden":"true"})],-1),c={class:"modal-body"},u={class:"row"},m=(0,i._)("div",{class:"col-md-4"},[(0,i._)("strong",null,"Creating a folder"),(0,i._)("p",{class:"text-instructions"},' Give the folder an appropriate name. When done, click on the "Save" button. It will be added to the current folder. ')],-1),p={class:"col-md-8"},h={class:"form-group"},g=(0,i._)("label",{for:"folder_description"},"Folder Name",-1),b={class:"modal-footer"},_=(0,i._)("button",{type:"button",class:"btn btn-secondary","data-bs-dismiss":"modal"}," Close ",-1),y=["disabled"];var f=o(6542),D=(o(3138),o(989)),v=o(5808),k=o(1295);const w={name:"AddFolderWizard",components:{Icon:f.JO},props:{destination:{type:String,default:"/"},locationId:{type:Number,default:0}},mixins:[v.Z,k.Z],data:()=>({disableAddFolderButton:!0,folderDescriptionModel:""}),computed:{...(0,D.Se)({existingFolders:"getFolderFilteredList",currentFolder:"getCurrentFolder",rootUrl:"getRootUrl"})},methods:{addFolder(){const e=new FormData;e.set("folder_description",this.folderDescriptionModel),this.currentFolder>0&&e.set("parent_folder",this.currentFolder),this.axios.post(`${this.rootUrl}documentation/${this.destination}/${this.locationId}/add_folder/`,e).then((e=>{this.$store.dispatch("appendFolderList",{folderList:e.data[0]}),this.folderDescriptionModel="",document.getElementById("addFolderCloseButton").click(),this.reopenCardInformation()})).catch((e=>{this.$store.dispatch("newToast",{header:"Failed to add folder",message:`Failed to add folder. Error -> ${e}`,extra_classes:"bg-danger",delay:0})}))}},updated(){const e=this.existingFolders.filter((e=>e.fields.folder_description===this.folderDescriptionModel));this.disableAddFolderButton=e.length>0||""===this.folderDescriptionModel||null===this.folderDescriptionModel}},I=(0,o(3744).Z)(w,[["render",function(e,t,o,f,D,v){const k=(0,i.up)("Icon");return(0,i.wg)(),(0,i.iD)("div",d,[(0,i._)("div",s,[(0,i._)("div",l,[(0,i._)("div",a,[(0,i._)("h2",null,[(0,i.Wm)(k,{icon:e.icons.userIcon},null,8,["icon"]),(0,i.Uk)(" Add Folder Wizard ")]),r]),(0,i._)("div",c,[(0,i._)("div",u,[m,(0,i._)("div",p,[(0,i._)("div",h,[g,(0,i.wy)((0,i._)("input",{type:"text","onUpdate:modelValue":t[0]||(t[0]=e=>D.folderDescriptionModel=e),class:"form-control",id:"folder_description",maxlength:"50"},null,512),[[n.vModelText,D.folderDescriptionModel]])])])])]),(0,i._)("div",b,[_,(0,i._)("button",{type:"button",class:"btn btn-primary",disabled:D.disableAddFolderButton,onClick:t[1]||(t[1]=(...e)=>v.addFolder&&v.addFolder(...e))}," Add Folder ",8,y)])])])])}]])},5050:(e,t,o)=>{o.d(t,{Z:()=>C});var i=o(6252),n=o(9963);const d={class:"modal fade",id:"addLinkModal",tabindex:"-1","aria-labelledby":"exampleModalLabel","aria-hidden":"true"},s={class:"modal-dialog modal-lg"},l={class:"modal-content"},a={class:"modal-header"},r=(0,i._)("button",{type:"button",class:"btn-close","data-bs-dismiss":"modal","aria-label":"Close",id:"addLinkCloseButton"},[(0,i._)("span",{"aria-hidden":"true"})],-1),c={class:"modal-body"},u={class:"row"},m=(0,i._)("div",{class:"col-md-4"},[(0,i._)("strong",null,"Add Link"),(0,i._)("p",{class:"text-instruction"}," Add hyperlinks to other documents and sources located in on the internet/cloud. ")],-1),p={class:"col-md-8"},h={class:"form-group"},g={for:"document_description"},b={key:0,class:"error"},_={class:"form-group"},y={for:"document_url_location"},f={class:"modal-footer"},D=(0,i._)("button",{type:"button",class:"btn btn-secondary","data-bs-dismiss":"modal"}," Close ",-1),v=["disabled"];var k=o(6542),w=o(989),I=o(5808),F=o(1295),x=o(5705),M=o(760),U=o(7939);o(3138);const L={name:"AddLinkWizard",setup:()=>({v$:(0,x.ZP)()}),components:{Icon:k.JO,ValidationRendering:U.Z},props:{destination:{type:String,default:"/"},locationId:{type:Number,default:0}},mixins:[I.Z,F.Z],data:()=>({linkModel:"",disableAddButton:!0,documentDescriptionModel:"",documentUrlLocationModel:"",duplicateDescription:!1}),validations:{documentDescriptionModel:{required:M.C1},documentUrlLocationModel:{required:M.C1,url:M.HQ}},computed:{...(0,w.Se)({currentFolder:"getCurrentFolder",excludeDocuments:"getDocumentFilteredList",rootUrl:"getRootUrl"})},methods:{addLink(){const e=new FormData;e.set("document_description",this.documentDescriptionModel),e.set("document_url_location",this.documentUrlLocationModel),this.currentFolder>0&&e.set("parent_folder",this.currentFolder),this.axios.post(`${this.rootUrl}documentation/${this.destination}/${this.locationId}/add_link/`,e).then((e=>{this.$store.dispatch("appendDocumentList",{documentList:e.data[0]}),this.documentDescriptionModel="",this.documentUrlLocationModel="",document.getElementById("addLinkCloseButton").click(),this.reopenCardInformation()})).catch((e=>{this.$store.dispatch("newToast",{header:"Error Adding Link",message:`Sorry, could not add the link for you. Error - ${e}`,extra_classes:"bg-danger",delay:0})}))}},updated(){const e=this.excludeDocuments.filter((e=>e.document_key__document_description===this.documentDescriptionModel));this.duplicateDescription=e.length>0,this.v$.$touch(),this.disableAddButton=this.v$.$invalid||e.length>0}},C=(0,o(3744).Z)(L,[["render",function(e,t,o,k,w,I){const F=(0,i.up)("Icon"),x=(0,i.up)("validation-rendering");return(0,i.wg)(),(0,i.iD)("div",d,[(0,i._)("div",s,[(0,i._)("div",l,[(0,i._)("div",a,[(0,i._)("h2",null,[(0,i.Wm)(F,{icon:e.icons.userIcon},null,8,["icon"]),(0,i.Uk)(" Add Link Wizard ")]),r]),(0,i._)("div",c,[(0,i._)("div",u,[m,(0,i._)("div",p,[(0,i._)("div",h,[(0,i._)("label",g,[(0,i.Uk)(" Document Description "),(0,i.Wm)(x,{"error-list":k.v$.documentDescriptionModel.$errors},null,8,["error-list"]),w.duplicateDescription?((0,i.wg)(),(0,i.iD)("span",b," Sorry - but this is a duplicated description.")):(0,i.kq)("v-if",!0)]),(0,i.wy)((0,i._)("input",{id:"document_description","onUpdate:modelValue":t[0]||(t[0]=e=>w.documentDescriptionModel=e),class:"form-control",maxlength:"50",placeholder:"NearBeach Homepage"},null,512),[[n.vModelText,w.documentDescriptionModel]])]),(0,i._)("div",_,[(0,i._)("label",y,[(0,i.Uk)(" Document URL "),(0,i.Wm)(x,{"error-list":k.v$.documentUrlLocationModel.$errors},null,8,["error-list"])]),(0,i.wy)((0,i._)("input",{id:"document_url_location","onUpdate:modelValue":t[1]||(t[1]=e=>w.documentUrlLocationModel=e),class:"form-control",placeholder:"https://nearbeach.org"},null,512),[[n.vModelText,w.documentUrlLocationModel]])])])])]),(0,i._)("div",f,[D,(0,i._)("button",{type:"button",class:"btn btn-primary",onClick:t[2]||(t[2]=(...e)=>I.addLink&&I.addLink(...e)),disabled:w.disableAddButton}," Add Link ",8,v)])])])])}]])},5014:(e,t,o)=>{o.d(t,{Z:()=>m});var i=o(6252);const n={class:"modal fade",id:"confirmFileDeleteModal",tabindex:"-1","data-bs-backdrop":"static","data-bs-keyboard":"false","aria-labelledby":"confirmFileDelete","aria-hidden":"true"},d={class:"modal-dialog"},s={class:"modal-content"},l=(0,i._)("div",{class:"modal-header"},[(0,i._)("h5",{class:"modal-title",id:"confirmFileDelete"}," Please confirm File Deletion "),(0,i.kq)(" TASK INFORMATION "),(0,i._)("button",{type:"button",class:"btn-close","data-bs-dismiss":"modal","aria-label":"Close",id:"confirmFileDeleteButton"})],-1),a=(0,i._)("div",{class:"modal-body"}," Are you sure you want to delete the file? ",-1),r={class:"modal-footer"};var c=o(989);o(3138);const u={name:"ConfirmFileDelete",mixins:[o(1295).Z],computed:{...(0,c.Se)({destination:"getDestination",documentRemoveKey:"getDocumentRemoveKey",locationId:"getLocationId",rootUrl:"getRootUrl"})},methods:{deleteFile(){if(""===this.documentRemoveKey)return;const e=this.documentRemoveKey,t=new FormData;t.set("document_key",this.documentRemoveKey),this.axios.post(`${this.rootUrl}documentation/${this.destination}/${this.locationId}/remove/`,t).then((()=>{this.$store.dispatch("removeDocument",{document_key:e}),this.closeModal()})).catch((e=>{this.$store.dispatch("newToast",{header:"Error removing file",message:`We could not remove your file. Error - ${e}`,extra_classes:"bg-danger",delay:0})})),this.closeModal()},closeModal(){this.$store.commit({type:"updateDocumentRemoveKey",documentRemoveKey:""}),document.getElementById("confirmFileDeleteButton").click(),this.reopenCardInformation()}}},m=(0,o(3744).Z)(u,[["render",function(e,t,o,c,u,m){return(0,i.wg)(),(0,i.iD)("div",n,[(0,i._)("div",d,[(0,i._)("div",s,[l,a,(0,i._)("div",r,[(0,i._)("button",{type:"button",class:"btn btn-secondary",onClick:t[0]||(t[0]=(...e)=>m.closeModal&&m.closeModal(...e))}," No "),(0,i._)("button",{type:"button",class:"btn btn-primary",onClick:t[1]||(t[1]=(...e)=>m.deleteFile&&m.deleteFile(...e))}," Yes ")])])])])}]])},3027:(e,t,o)=>{o.d(t,{Z:()=>f});var i=o(6252);const n={class:"modal fade",id:"newNoteModal",tabindex:"-1",role:"dialog","aria-labelledby":"exampleModalLabel","aria-hidden":"true"},d={class:"modal-dialog modal-lg",role:"document"},s={class:"modal-content"},l={class:"modal-header"},a=(0,i._)("button",{type:"button",class:"btn-close","data-bs-dismiss":"modal","aria-label":"Close",id:"newNoteCloseButton"},[(0,i._)("span",{"aria-hidden":"true"})],-1),r={class:"modal-body"},c=(0,i._)("p",{class:"text-instructions"}," Use the text editor to type out your note. Click on the submit button to submit the note. ",-1),u={class:"modal-footer"},m=["disabled"],p=(0,i._)("button",{type:"button",class:"btn btn-secondary","data-bs-dismiss":"modal"}," Close ",-1);var h=o(5808),g=o(6542),b=o(7267),_=o(989);const y={name:"NewHistoryNoteWizard",components:{editor:b.Z,Icon:g.JO},props:{destination:{type:String,default:""},locationId:{type:Number,default:0}},mixins:[h.Z],data:()=>({newNoteModel:""}),computed:{...(0,_.Se)({contentCss:"getContentCss",rootUrl:"getRootUrl",skin:"getSkin"})},methods:{submitNote(){this.$store.dispatch("newToast",{header:"Submitting new note",message:"Please wait. Submitting new note",extra_classes:"bg-warning text-dark",delay:0,unique_type:"submit_note"});const e=new FormData;e.set("destination",this.destination),e.set("location_id",`${this.locationId}`),e.set("note",this.newNoteModel);let t="add_notes";"organisation"===this.destination&&(t="organisation_add_notes"),this.axios.post(`${this.rootUrl}object_data/${this.destination}/${this.locationId}/${t}/`,e).then((e=>{this.$store.dispatch("newToast",{header:"New Note Submitted",message:"The new note submitted successfully.",extra_classes:"bg-success",unique_type:"submit_note"}),this.$store.commit({type:"addNote",newNote:e.data[0]}),this.newNoteModel="",document.getElementById("newNoteCloseButton").click()})).catch((e=>{this.$store.dispatch("newToast",{header:"Error Submitting Note",message:`Sorry, the note did not submit. Error -> ${e}`,extra_classes:"bg-danger",delay:0,unique_type:"submit_note"})}))}}},f=(0,o(3744).Z)(y,[["render",function(e,t,o,h,g,b){const _=(0,i.up)("Icon"),y=(0,i.up)("editor");return(0,i.wg)(),(0,i.iD)(i.HY,null,[(0,i.kq)(" NEW HISTORY NOTE "),(0,i._)("div",n,[(0,i._)("div",d,[(0,i._)("div",s,[(0,i._)("div",l,[(0,i._)("h2",null,[(0,i.Wm)(_,{icon:e.icons.noteAdd},null,8,["icon"]),(0,i.Uk)(" New Note ")]),a]),(0,i._)("div",r,[c,(0,i.Wm)(y,{init:{height:300,menubar:!1,plugins:["lists","codesample","table"],toolbar:"undo redo | blocks | bold italic strikethrough underline backcolor | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | removeformat | table image codesample",skin:`${this.skin}`,content_css:`${this.contentCss}`},modelValue:g.newNoteModel,"onUpdate:modelValue":t[0]||(t[0]=e=>g.newNoteModel=e)},null,8,["init","modelValue"])]),(0,i._)("div",u,[(0,i._)("button",{type:"button",class:"btn btn-primary",disabled:""==g.newNoteModel,onClick:t[1]||(t[1]=(...e)=>b.submitNote&&b.submitNote(...e))}," Submit Note ",8,m),p])])])])],2112)}]])},4657:(e,t,o)=>{o.d(t,{Z:()=>q});var i=o(6252),n=o(3577),d=o(9963);const s={class:"modal fade",id:"uploadDocumentModal","data-bs-backdrop":"static","data-bs-keyboard":"false",tabindex:"-1","aria-labelledby":"exampleModalLabel","aria-hidden":"true"},l={class:"modal-dialog modal-lg"},a={class:"modal-content"},r={class:"modal-header"},c=(0,i._)("button",{type:"button",class:"btn-close","data-bs-dismiss":"modal","aria-label":"Close",id:"uploadDocumentCloseButton"},[(0,i._)("span",{"aria-hidden":"true"})],-1),u={class:"modal-body"},m={class:"row"},p={class:"col-md-4"},h=(0,i._)("strong",null,"Uploading File",-1),g={class:"text-instructions"},b={key:0},_={key:1},y={key:2},f={class:"col-md-8"},D={key:0,class:"form-file"},v={class:"mb-3"},k={for:"document",class:"form-label"},w=(0,i._)("br",null,null,-1),I={key:0,class:"alert alert-warning"},F=["accept"],x={key:1,class:"form-group"},M={class:"form-group"},U=(0,i._)("label",{for:"documentDescription"},"Document Description",-1),L=(0,i._)("br",null,null,-1),C={class:"form-row"},$={key:2},E={key:0,class:"alert alert-warning"},N=(0,i._)("div",{class:"spinner-border text-primary",role:"status"},[(0,i._)("span",{class:"sr-only"},"Loading...")],-1),S=(0,i._)("div",{class:"alert alert-success"}," The document has been uploaded. The server is currently writing the file to disk. Please be patient - this modal will close automatically. Thank you ",-1),B={class:"modal-footer"},T=(0,i._)("button",{type:"button",class:"btn btn-secondary","data-bs-dismiss":"modal"}," Close ",-1),Z=["disabled"];var R=o(6542),O=(o(3138),o(989)),A=o(5808),W=o(1295);const P={name:"UploadDocumentWizard",components:{Icon:R.JO},props:{overrideDestination:{type:String,default:""},overrideLocationId:{type:Number,default:0}},mixins:[A.Z,W.Z],data:()=>({disableUploadButton:!0,documentModel:[],documentDescriptionModel:"",uploadPercentage:"",maxUploadSize:0,maxUploadString:"No Upload Limit",maxUploadWarning:!1}),computed:{...(0,O.Se)({acceptedDocuments:"getAcceptedDocuments",currentFolder:"getCurrentFolder",destination:"getDestination",excludeDocuments:"getDocumentFilteredList",locationId:"getLocationId",staticUrl:"getStaticUrl",rootUrl:"getRootUrl"})},methods:{getDestination(){return""!==this.overrideDestination?this.overrideDestination:this.destination},getLocationId(){return""!==this.overrideDestination?this.overrideLocationId:this.locationId},handleFileUploads(e){e[0].size*(0!==this.maxUploadSize)>this.maxUploadSize?this.maxUploadWarning=!0:(this.maxUploadWarning=!1,this.documentModel=e[0],this.documentDescriptionModel=e[0].name)},resetForm(){this.documentModel="",this.documentDescriptionModel="",this.uploadPercentage=""},uploadFile(){const e=new FormData;e.set("document",this.documentModel,this.documentDescriptionModel),e.set("document_description",this.documentDescriptionModel),this.currentFolder>0&&e.set("parent_folder",this.currentFolder);const t={onUploadProgress:e=>{this.uploadPercentage=parseFloat(e.loaded)/parseFloat(e.total)}};this.axios.post(`${this.rootUrl}documentation/${this.getDestination()}/${this.getLocationId()}/upload/`,e,t).then((e=>{this.$store.dispatch("appendDocumentList",{documentList:e.data[0]}),document.getElementById("uploadDocumentCloseButton").click(),this.resetForm(),this.reopenCardInformation()})).catch((e=>{this.$store.dispatch("newToast",{header:"Failed to upload documentation",message:`Can not upload the documentation. ${e}`,extra_classes:"bg-danger",delay:0})}))}},watch:{maxUploadSize(){if(0===this.maxUploadSize)return"No Upload Limit";const e=Math.floor(Math.log(this.maxUploadSize)/Math.log(1024));this.maxUploadString=`Max Upload Size: ${parseFloat((this.maxUploadSize/Math.pow(1024,e)).toFixed(2))} ${["Bytes","KB","MB","GB","TB","PB","EB","ZB","YB"][e]}`}},updated(){const e=this.excludeDocuments.filter((e=>e.document_key__document_description===this.documentDescriptionModel));this.disableUploadButton=""===this.documentModel||0===this.documentDescriptionModel.length||e.length>0},mounted(){this.$nextTick((()=>{this.axios.post(`${this.rootUrl}documentation/get/max_upload/`).then((e=>{this.maxUploadSize=e.data.max_upload_size})).catch((()=>{this.$store.dispatch("newToast",{header:"Failed to get the max upload size",message:`Had an issue getting data from backend. ${this.maxUploadString}`,extra_classes:"bg-danger",delay:0})}))}))}},q=(0,o(3744).Z)(P,[["render",function(e,t,o,R,O,A){const W=(0,i.up)("Icon");return(0,i.wg)(),(0,i.iD)("div",s,[(0,i._)("div",l,[(0,i._)("div",a,[(0,i._)("div",r,[(0,i._)("h2",null,[(0,i.Wm)(W,{icon:e.icons.userIcon},null,8,["icon"]),(0,i.Uk)(" Upload Document Wizard ")]),c]),(0,i._)("div",u,[(0,i._)("div",m,[(0,i._)("div",p,[h,(0,i._)("p",g," You will be able to upload a file against this "+(0,n.toDisplayString)(A.getDestination)+". It will appear in the current folder. ",1),0===O.documentModel.length?((0,i.wg)(),(0,i.iD)("p",b,' 1. Please click on "Upload File" button to upload a file ')):""===O.uploadPercentage?((0,i.wg)(),(0,i.iD)("p",_,' 2. Please modify the document descript to be more human readable. Or click the "Reset" button to remove the uploaded file. ')):((0,i.wg)(),(0,i.iD)("p",y," 3. Document is currently uploading. Please be patient. "))]),(0,i._)("div",f,[0===O.documentModel.length?((0,i.wg)(),(0,i.iD)("div",D,[(0,i._)("div",v,[(0,i._)("label",k,[(0,i.Uk)(" Please upload a file"),w,(0,i.Uk)(" "+(0,n.toDisplayString)(O.maxUploadString)+" ",1),O.maxUploadWarning?((0,i.wg)(),(0,i.iD)("div",I," Sorry - file too large ")):(0,i.kq)("v-if",!0)]),(0,i._)("input",{type:"file",class:"form-control",id:"document",accept:e.acceptedDocuments,onChange:t[0]||(t[0]=e=>A.handleFileUploads(e.target.files))},null,40,F)])])):""==O.uploadPercentage?((0,i.wg)(),(0,i.iD)("div",x,[(0,i.kq)(" DOCUMENT DESCRIPTION "),(0,i._)("div",M,[U,(0,i.wy)((0,i._)("input",{id:"documentDescription","onUpdate:modelValue":t[1]||(t[1]=e=>O.documentDescriptionModel=e),type:"text",class:"form-control"},null,512),[[d.vModelText,O.documentDescriptionModel]])]),(0,i.kq)(" RESET FORM BUTTON "),L,(0,i._)("div",C,[(0,i._)("button",{onClick:t[2]||(t[2]=(...e)=>A.resetForm&&A.resetForm(...e)),class:"btn btn-warning"}," Reset Form ")])])):((0,i.wg)(),(0,i.iD)("div",$,[(0,i.kq)(" THE UPLOAD SPINNER "),parseFloat(O.uploadPercentage).toFixed(0)<1?((0,i.wg)(),(0,i.iD)("div",E,[(0,i.Uk)(" Uploading "+(0,n.toDisplayString)((100*parseFloat(O.uploadPercentage)).toFixed(2))+"% ",1),N])):((0,i.wg)(),(0,i.iD)(i.HY,{key:1},[(0,i.kq)(" THE FINAL WRITING "),S],2112))]))])])]),(0,i._)("div",B,[T,(0,i._)("button",{type:"button",class:"btn btn-primary",disabled:O.disableUploadButton,onClick:t[3]||(t[3]=(...e)=>A.uploadFile&&A.uploadFile(...e))}," Upload File ",8,Z)])])])])}]])},7939:(e,t,o)=>{o.d(t,{Z:()=>s});var i=o(6252),n=o(3577);const d={name:"ValidationRendering",props:{errorList:{type:Array,default:()=>[]}}},s=(0,o(3744).Z)(d,[["render",function(e,t,o,d,s,l){return(0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)(o.errorList,(e=>((0,i.wg)(),(0,i.iD)("span",{class:"error",key:e.$uid},(0,n.toDisplayString)(e.$message),1)))),128)}]])},431:(e,t,o)=>{o.d(t,{Z:()=>n});var i=o(7126);const n={methods:{getNiceDatetime:e=>""===e||null==e?"":i.ou.fromISO(e).toLocaleString(i.ou.DATETIME_MED),getNiceDatetimeFromInt:e=>""===e||null==e?"":i.ou.fromMillis(e).toLocaleString(i.ou.DATETIME_MED),getNiceDate:e=>""===e||null==e?"":i.ou.fromISO(e).toLocaleString(i.ou.DATE_MED_WITH_WEEKDAY),disableDate(e){const t=new Date;return t.setMilliseconds(0),t.setSeconds(0),t.setHours(0),e<=t.getTime()-36e5}}}},624:(e,t,o)=>{o.d(t,{Z:()=>n});var i=o(7449);const n={data:()=>({darkTheme:i.$}),methods:{getTheme:e=>"dark"===e?i.$:null}}},5808:(e,t,o)=>{o.d(t,{Z:()=>U});var i=o(3985),n=o(5555),d=o(1826),s=o(6443),l=o(1327),a=o(8521),r=o(1056),c=o(4324),u=o(9672),m=o(9867),p=o(1239),h=o(5004),g=o(1321),b=o(1216),_=o(5550),y=o(7702),f=o(7903),D=o(2606),v=o(3843),k=o(2393),w=o(3360),I=o(9714),F=o(1323),x=o(2610),M=o(5968);const U={data:()=>({icons:{arrowUp:i.Z,bugIcon:n.Z,bxBriefcase:d.Z,cardChecklist:s.Z,clipboardIcon:l.Z,documentPdf:a.Z,documentText:r.Z,folderIcon:c.Z,groupPresentation:u.Z,imageIcon:m.Z,infoCircle:p.Z,linkIcon:h.Z,linkIcon2:g.Z,linkOut:b.Z,mailIcon:_.Z,microsoftExcel:y.Z,microsoftPowerpoint:f.Z,microsoftWord:D.Z,noteAdd:v.Z,objectStorage:k.Z,passwordIcon:w.Z,trashCan:I.Z,userIcon:F.Z,usersIcon:x.Z,xCircle:M.Z}})}},1295:(e,t,o)=>{o.d(t,{Z:()=>n});var i=o(3138);const n={methods:{reopenCardInformation(){let e=document.getElementById("cardInformationModal");null!==e&&(e=new i.u_(e),e.show()),setTimeout((()=>{const e=document.getElementsByClassName("modal-backdrop fade show");e.length>1&&e[0].remove()}),200)}}}}}]); \ No newline at end of file diff --git a/NearBeach/static/NearBeach/2471.min.js.gz b/NearBeach/static/NearBeach/2471.min.js.gz new file mode 100644 index 000000000..40be080b7 Binary files /dev/null and b/NearBeach/static/NearBeach/2471.min.js.gz differ diff --git a/NearBeach/static/NearBeach/31.min.js b/NearBeach/static/NearBeach/31.min.js new file mode 100644 index 000000000..b623a5565 --- /dev/null +++ b/NearBeach/static/NearBeach/31.min.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunknearbeach=self.webpackChunknearbeach||[]).push([[31],{7267:(e,t,n)=>{n.d(t,{Z:()=>g});var a,i=n(6252),o=["onActivate","onAddUndo","onBeforeAddUndo","onBeforeExecCommand","onBeforeGetContent","onBeforeRenderUI","onBeforeSetContent","onBeforePaste","onBlur","onChange","onClearUndos","onClick","onContextMenu","onCopy","onCut","onDblclick","onDeactivate","onDirty","onDrag","onDragDrop","onDragEnd","onDragGesture","onDragOver","onDrop","onExecCommand","onFocus","onFocusIn","onFocusOut","onGetContent","onHide","onInit","onKeyDown","onKeyPress","onKeyUp","onLoadContent","onMouseDown","onMouseEnter","onMouseLeave","onMouseMove","onMouseOut","onMouseOver","onMouseUp","onNodeChange","onObjectResizeStart","onObjectResized","onObjectSelected","onPaste","onPostProcess","onPostRender","onPreProcess","onProgressState","onRedo","onRemove","onReset","onSaveContent","onSelectionChange","onSetAttrib","onSetContent","onShow","onSubmit","onUndo","onVisualAid"],l=function(e){return-1!==o.map((function(e){return e.toLowerCase()})).indexOf(e.toLowerCase())},r=0,s=function(e){var t=Date.now();return e+"_"+Math.floor(1e9*Math.random())+ ++r+String(t)},d=function(e){return void 0===e||""===e?[]:Array.isArray(e)?e:e.split(" ")},u=function(){return{listeners:[],scriptId:s("tiny-script"),scriptLoaded:!1}},c=(a=u(),{load:function(e,t,n){a.scriptLoaded?n():(a.listeners.push(n),e.getElementById(a.scriptId)||function(e,t,n,i){var o=t.createElement("script");o.referrerPolicy="origin",o.type="application/javascript",o.id=e,o.src=n;var l=function(){o.removeEventListener("load",l),a.listeners.forEach((function(e){return e()})),a.scriptLoaded=!0};o.addEventListener("load",l),t.head&&t.head.appendChild(o)}(a.scriptId,e,t))},reinitialize:function(){a=u()}}),m=function(){var e="undefined"!=typeof window?window:n.g;return e&&e.tinymce?e.tinymce:null},p={apiKey:String,cloudChannel:String,id:String,init:Object,initialValue:String,inline:Boolean,modelEvents:[String,Array],plugins:[String,Array],tagName:String,toolbar:[String,Array],modelValue:String,disabled:Boolean,tinymceScriptSrc:String,outputFormat:{type:String,validator:function(e){return"html"===e||"text"===e}}},h=n(2262),f=function(){return f=Object.assign||function(e){for(var t,n=1,a=arguments.length;n{n.d(t,{Z:()=>g});var a=n(6252);const i={class:"row"},o=(0,a._)("div",{class:"col-md-4"},[(0,a._)("h2",null,"Backout Plan"),(0,a._)("p",{class:"text-instructions"}," Please outline the backout plan that will be implemented, and when it will be implemented, when something goes wrong with the Request for Change. ")],-1),l={class:"col-md-8",style:{"min-height":"610px"}},r=(0,a._)("br",null,null,-1);var s=n(5705),d=n(760),u=n(7939),c=n(7267),m=n(2299),p=n(4758),h=n(989);const f={name:"RfcBackoutPlan",setup:()=>({v$:(0,s.ZP)()}),components:{editor:c.Z,ValidationRendering:u.Z},props:{isReadOnly:{type:Boolean,default:!1},rfcResults:{type:Array,default:()=>[]},uuid:{type:String,default:""}},computed:{...(0,h.Se)({contentCss:"getContentCss",skin:"getSkin"})},mixins:[m.Z,p.Z],data:()=>({rfcBackoutPlanModel:""}),validations:{rfcBackoutPlanModel:{required:d.C1,maxLength:(0,d.BS)(63e4)}},methods:{handleUploadImage(e,t){return""===this.uuid?this.uploadImage(e,t):this.newObjectUploadImage(e,t)},updateValidation(){this.v$.$touch(),this.$emit("update_validation",{tab:"tab_4",value:!this.v$.$invalid})},updateValues(e,t){this.$emit("update_values",{modelName:e,modelValue:t})}},watch:{rfcBackoutPlanModel(){this.updateValues("rfcBackoutPlan",this.rfcBackoutPlanModel),this.updateValidation()}},mounted(){this.rfcResults.length>0&&(this.rfcBackoutPlanModel=this.rfcResults[0].fields.rfc_backout_plan),this.v$.$touch()}},g=(0,n(3744).Z)(f,[["render",function(e,t,n,s,d,u){const c=(0,a.up)("validation-rendering"),m=(0,a.up)("editor");return(0,a.wg)(),(0,a.iD)("div",i,[o,(0,a._)("div",l,[(0,a._)("label",null,[(0,a.Uk)(" Backout Plan: "),(0,a.Wm)(c,{"error-list":s.v$.rfcBackoutPlanModel.$errors},null,8,["error-list"])]),r,(0,a.Wm)(m,{init:{file_picker_types:"image",height:500,images_upload_handler:u.handleUploadImage,menubar:!1,paste_data_images:!0,plugins:["lists","image","codesample","table"],toolbar:"undo redo | blocks | bold italic strikethrough underline backcolor | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | removeformat | table image codesample",skin:`${this.skin}`,content_css:`${this.contentCss}`},disabled:n.isReadOnly,modelValue:e.rfcBackoutPlanModel,"onUpdate:modelValue":t[0]||(t[0]=t=>e.rfcBackoutPlanModel=t)},null,8,["init","disabled","modelValue"])])])}]])},9670:(e,t,n)=>{n.d(t,{Z:()=>g});var a=n(6252);const i={class:"row"},o=(0,a._)("div",{class:"col-md-4"},[(0,a._)("h2",null,"Implementation Plan"),(0,a._)("p",{class:"text-instructions"}," Please outline your implementation plan for this request for change. ")],-1),l={class:"col-md-8",style:{"min-height":"610px"}},r=(0,a._)("br",null,null,-1);var s=n(5705),d=n(760),u=n(7939),c=n(7267),m=n(2299),p=n(4758),h=n(989);const f={name:"RfcImplementationPlan",setup:()=>({v$:(0,s.ZP)()}),components:{editor:c.Z,ValidationRendering:u.Z},props:{isReadOnly:{type:Boolean,default:!1},rfcResults:{type:Array,default:()=>[]},uuid:{type:String,default:""}},computed:{...(0,h.Se)({contentCss:"getContentCss",skin:"getSkin"})},mixins:[m.Z,p.Z],data:()=>({rfcImplementationPlanModel:""}),validations:{rfcImplementationPlanModel:{required:d.C1,maxLength:(0,d.BS)(63e4)}},methods:{handleUploadImage(e,t){return""===this.uuid?this.uploadImage(e,t):this.newObjectUploadImage(e,t)},updateValidation(){this.v$.$touch(),this.$emit("update_validation",{tab:"tab_3",value:!this.v$.$invalid})},updateValues(e,t){this.$emit("update_values",{modelName:e,modelValue:t})}},watch:{rfcImplementationPlanModel(){this.updateValues("rfcImplementationPlanModel",this.rfcImplementationPlanModel),this.updateValidation()}},mounted(){this.rfcResults.length>0&&(this.rfcImplementationPlanModel=this.rfcResults[0].fields.rfc_implementation_plan),this.v$.$touch()}},g=(0,n(3744).Z)(f,[["render",function(e,t,n,s,d,u){const c=(0,a.up)("validation-rendering"),m=(0,a.up)("editor");return(0,a.wg)(),(0,a.iD)("div",i,[o,(0,a._)("div",l,[(0,a._)("label",null,[(0,a.Uk)(" Implementation Plan: "),(0,a.Wm)(c,{"error-list":s.v$.rfcImplementationPlanModel.$errors},null,8,["error-list"])]),r,(0,a.Wm)(m,{init:{file_picker_types:"image",height:500,images_upload_handler:u.handleUploadImage,menubar:!1,paste_data_images:!0,plugins:["lists","image","codesample","table"],toolbar:"undo redo | blocks | bold italic strikethrough underline backcolor | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | removeformat | table image codesample",skin:`${this.skin}`,content_css:`${this.contentCss}`},disabled:n.isReadOnly,modelValue:e.rfcImplementationPlanModel,"onUpdate:modelValue":t[0]||(t[0]=t=>e.rfcImplementationPlanModel=t)},null,8,["init","disabled","modelValue"])])])}]])},8542:(e,t,n)=>{n.d(t,{Z:()=>M});var a=n(6252);const i={class:"row"},o=(0,a._)("div",{class:"col-md-4"},[(0,a._)("h2",null,"Risk"),(0,a._)("p",{class:"text-instructions"}," Please outline all risks associated with this Request for Change. A detail list of all risks should be noted. ")],-1),l={class:"col-md-8",style:{"min-height":"610px"}},r={class:"row"},s={class:"col-md-4"},d={class:"col-md-4"},u={class:"col-md-4"},c=(0,a._)("br",null,null,-1),m=(0,a._)("br",null,null,-1);var p=n(5705),h=n(760),f=n(7939),g=n(2001),v=n(7267),b=n(2299),y=n(4758),_=n(989);const k={name:"RfcRisk",setup:()=>({v$:(0,p.ZP)()}),components:{editor:v.Z,NSelect:g.Z,ValidationRendering:f.Z},props:{isReadOnly:{type:Boolean,default:!1},rfcResults:{type:Array,default:()=>[]},uuid:{type:String,default:""}},computed:{...(0,_.Se)({contentCss:"getContentCss",skin:"getSkin"})},mixins:[b.Z,y.Z],data:()=>({rfcPriority:[{label:"Critical",value:4},{label:"High",value:3},{label:"Medium",value:2},{label:"Low",value:1}],rfcPriorityModel:"",rfcRisk:[{label:"Very High",value:5},{label:"High",value:4},{label:"Moderate",value:3},{label:"Low",value:2},{label:"None",value:1}],rfcRiskModel:"",rfcRiskSummaryModel:"",rfcImpact:[{label:"High",value:3},{label:"Medium",value:2},{label:"Low",value:1}],rfcImpactModel:""}),validations:{rfcPriorityModel:{required:h.C1},rfcRiskModel:{required:h.C1},rfcRiskSummaryModel:{required:h.C1,maxLength:(0,h.BS)(63e4)},rfcImpactModel:{required:h.C1}},methods:{handleUploadImage(e,t){return""===this.uuid?this.uploadImage(e,t):this.newObjectUploadImage(e,t)},updateValidation(){console.log("VALIDATING RISK"),this.v$.$touch(),this.$emit("update_validation",{tab:"tab_2",value:!this.v$.$invalid})},updateValues(e,t){this.$emit("update_values",{modelName:e,modelValue:t})}},watch:{rfcPriority(){this.updateValues("rfcPriority",this.rfcPriority),this.updateValidation()},rfcPriorityModel(){this.updateValues("rfcPriorityModel",this.rfcPriorityModel),this.updateValidation()},rfcRisk(){this.updateValues("rfcRisk",this.rfcRisk),this.updateValidation()},rfcRiskModel(){this.updateValues("rfcRiskModel",this.rfcRiskModel),this.updateValidation()},rfcRiskSummaryModel(){this.updateValues("rfcRiskSummaryModel",this.rfcRiskSummaryModel),this.updateValidation()},rfcImpact(){this.updateValues("rfcImpact",this.rfcImpact),this.updateValidation()},rfcImpactModel(){this.updateValues("rfcImpactModel",this.rfcImpactModel),this.updateValidation()}},mounted(){this.rfcResults.length>0&&(this.rfcPriorityModel=this.rfcResults[0].fields.rfc_priority,this.rfcRiskModel=this.rfcResults[0].fields.rfc_risk,this.rfcRiskSummaryModel=this.rfcResults[0].fields.rfc_risk_and_impact_analysis,this.rfcImpactModel=this.rfcResults[0].fields.rfc_impact),this.v$.$touch()}},M=(0,n(3744).Z)(k,[["render",function(e,t,n,p,h,f){const g=(0,a.up)("validation-rendering"),v=(0,a.up)("n-select"),b=(0,a.up)("editor");return(0,a.wg)(),(0,a.iD)("div",i,[o,(0,a._)("div",l,[(0,a._)("div",r,[(0,a._)("div",s,[(0,a._)("label",null,[(0,a.Uk)(" Priority of Change "),(0,a.Wm)(g,{"error-list":p.v$.rfcPriorityModel.$errors},null,8,["error-list"])]),(0,a.Wm)(v,{options:e.rfcPriority,disabled:n.isReadOnly,value:e.rfcPriorityModel,"onUpdate:value":t[0]||(t[0]=t=>e.rfcPriorityModel=t)},null,8,["options","disabled","value"])]),(0,a._)("div",d,[(0,a._)("label",null,[(0,a.Uk)(" Risk of Change "),(0,a.Wm)(g,{"error-list":p.v$.rfcRiskModel.$errors},null,8,["error-list"])]),(0,a.Wm)(v,{options:e.rfcRisk,disabled:n.isReadOnly,value:e.rfcRiskModel,"onUpdate:value":t[1]||(t[1]=t=>e.rfcRiskModel=t)},null,8,["options","disabled","value"])]),(0,a._)("div",u,[(0,a._)("label",null,[(0,a.Uk)(" Impact of Change "),(0,a.Wm)(g,{"error-list":p.v$.rfcImpactModel.$errors},null,8,["error-list"])]),(0,a.Wm)(v,{options:e.rfcImpact,disabled:n.isReadOnly,value:e.rfcImpactModel,"onUpdate:value":t[2]||(t[2]=t=>e.rfcImpactModel=t)},null,8,["options","disabled","value"])])]),c,(0,a.kq)(" RFC SUMMARY "),(0,a._)("label",null,[(0,a.Uk)(" Risk Association: "),(0,a.Wm)(g,{"error-list":p.v$.rfcRiskSummaryModel.$errors},null,8,["error-list"])]),m,(0,a.Wm)(b,{init:{file_picker_types:"image",height:500,images_upload_handler:f.handleUploadImage,menubar:!1,paste_data_images:!0,plugins:["lists","image","codesample","table"],toolbar:"undo redo | blocks | bold italic strikethrough underline backcolor | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | removeformat | table image codesample",skin:`${this.skin}`,content_css:`${this.contentCss}`},disabled:n.isReadOnly,modelValue:e.rfcRiskSummaryModel,"onUpdate:modelValue":t[3]||(t[3]=t=>e.rfcRiskSummaryModel=t)},null,8,["init","disabled","modelValue"])])])}]])},170:(e,t,n)=>{n.d(t,{Z:()=>g});var a=n(6252);const i={class:"row"},o=(0,a._)("div",{class:"col-md-4"},[(0,a._)("h2",null,"Test Plan"),(0,a._)("p",{class:"text-instructions"}," Outline your test plan. How will you test the Request for Change once it has been implemented. ")],-1),l={class:"col-md-8",style:{"min-height":"610px"}},r=(0,a._)("br",null,null,-1);var s=n(5705),d=n(760),u=n(7939),c=n(7267),m=n(2299),p=n(4758),h=n(989);const f={name:"RfcTestPlan",setup:()=>({v$:(0,s.ZP)()}),components:{editor:c.Z,ValidationRendering:u.Z},props:{isReadOnly:{type:Boolean,default:!1},rfcResults:{type:Array,default:()=>[]},uuid:{type:String,default:""}},computed:{...(0,h.Se)({contentCss:"getContentCss",skin:"getSkin"})},mixins:[m.Z,p.Z],data:()=>({rfcTestPlanModel:""}),validations:{rfcTestPlanModel:{required:d.C1,maxLength:(0,d.BS)(63e4)}},methods:{handleUploadImage(e,t){return""===this.uuid?this.uploadImage(e,t):this.newObjectUploadImage(e,t)},updateValidation(){this.v$.$touch(),this.$emit("update_validation",{tab:"tab_5",value:!this.v$.$invalid})},updateValues(e,t){this.$emit("update_values",{modelName:e,modelValue:t})}},watch:{rfcTestPlanModel(){this.updateValues("rfcTestPlanModel",this.rfcTestPlanModel),this.updateValidation()}},mounted(){this.rfcResults.length>0&&(this.rfcTestPlanModel=this.rfcResults[0].fields.rfc_test_plan),this.v$.$touch()}},g=(0,n(3744).Z)(f,[["render",function(e,t,n,s,d,u){const c=(0,a.up)("validation-rendering"),m=(0,a.up)("editor");return(0,a.wg)(),(0,a.iD)("div",i,[o,(0,a._)("div",l,[(0,a._)("label",null,[(0,a.Uk)(" Test Plan: "),(0,a.Wm)(c,{"error-list":s.v$.rfcTestPlanModel.$errors},null,8,["error-list"])]),r,(0,a.Wm)(m,{init:{file_picker_types:"image",height:500,images_upload_handler:u.handleUploadImage,menubar:!1,paste_data_images:!0,plugins:["lists","image","codesample","table"],toolbar:"undo redo | blocks | bold italic strikethrough underline backcolor | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | removeformat | table image codesample",skin:`${this.skin}`,content_css:`${this.contentCss}`},disabled:n.isReadOnly,modelValue:e.rfcTestPlanModel,"onUpdate:modelValue":t[0]||(t[0]=t=>e.rfcTestPlanModel=t)},null,8,["init","disabled","modelValue"])])])}]])},7939:(e,t,n)=>{n.d(t,{Z:()=>l});var a=n(6252),i=n(3577);const o={name:"ValidationRendering",props:{errorList:{type:Array,default:()=>[]}}},l=(0,n(3744).Z)(o,[["render",function(e,t,n,o,l,r){return(0,a.wg)(!0),(0,a.iD)(a.HY,null,(0,a.Ko)(n.errorList,(e=>((0,a.wg)(),(0,a.iD)("span",{class:"error",key:e.$uid},(0,i.toDisplayString)(e.$message),1)))),128)}]])},624:(e,t,n)=>{n.d(t,{Z:()=>i});var a=n(7449);const i={data:()=>({darkTheme:a.$}),methods:{getTheme:e=>"dark"===e?a.$:null}}},4758:(e,t,n)=>{n.d(t,{Z:()=>a});const a={methods:{newObjectUploadImage(e,t){const n=new FormData;n.set("document",e.blob(),e.filename()),n.set("document_description",e.filename()),n.set("uuid",this.uuid);const a={onUploadProgress:e=>{parseFloat(e.loaded),parseFloat(e.total)}};return this.axios.post(`${this.rootUrl}documentation/new_object_upload/`,n,a).then((e=>`/private/${e.data[0].document_key_id}`)).catch((e=>{this.$store.dispatch("newToast",{header:"Error uploading image",message:`Error uploading image. Error -> ${e}`,extra_classes:"bg-danger",delay:0})}))},replaceIncorrectImageUrl:e=>e.replace(new RegExp(''),(e=>e.replace("../","/")))}}},2299:(e,t,n)=>{n.d(t,{Z:()=>o});var a=n(9669),i=n.n(a);const o={computed:{...(0,n(989).Se)({destination:"getDestination",locationId:"getLocationId",rootUrl:"getRootUrl"})},methods:{uploadImage(e,t){const n=new FormData;n.set("document",e.blob(),e.filename()),n.set("document_description",e.filename());const a={onUploadProgress:e=>{parseFloat(e.loaded),parseFloat(e.total)}};return this.axios.post(`${this.rootUrl}documentation/${this.destination}/${this.locationId}/upload/`,n,a).then((e=>`/private/${e.data[0].document_key_id}`)).catch((e=>{this.$store.dispatch("newToast",{header:"Failed to upload image",message:`Sorry, could not upload image. Error -> ${e}`,extra_classes:"bg-danger",delay:0})}))},newObjectUploadImage(e,t){const n=new FormData;n.set("document",e.blob(),e.filename()),n.set("document_description",e.filename()),n.set("uuid",this.uuid);const a={onUploadProgress:e=>{parseFloat(e.loaded),parseFloat(e.total)}};return i().post(`${this.rootUrl}documentation/new_object_upload/`,n,a).then((e=>`/private/${e.data[0].document_key_id}`)).catch((e=>{this.$store.dispatch("newToast",{header:"Failed to upload image",message:`Sorry, could not upload image. Error -> ${e}`,extra_classes:"bg-danger",delay:0})}))}}}}}]); \ No newline at end of file diff --git a/NearBeach/static/NearBeach/31.min.js.gz b/NearBeach/static/NearBeach/31.min.js.gz new file mode 100644 index 000000000..9120ff07f Binary files /dev/null and b/NearBeach/static/NearBeach/31.min.js.gz differ diff --git a/NearBeach/static/NearBeach/7022.min.js b/NearBeach/static/NearBeach/7022.min.js new file mode 100644 index 000000000..0faff5278 --- /dev/null +++ b/NearBeach/static/NearBeach/7022.min.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunknearbeach=self.webpackChunknearbeach||[]).push([[7022],{8838:(t,e,o)=>{o.d(e,{A:()=>f});var n,s=o(641),a=["onActivate","onAddUndo","onBeforeAddUndo","onBeforeExecCommand","onBeforeGetContent","onBeforeRenderUI","onBeforeSetContent","onBeforePaste","onBlur","onChange","onClearUndos","onClick","onContextMenu","onCopy","onCut","onDblclick","onDeactivate","onDirty","onDrag","onDragDrop","onDragEnd","onDragGesture","onDragOver","onDrop","onExecCommand","onFocus","onFocusIn","onFocusOut","onGetContent","onHide","onInit","onKeyDown","onKeyPress","onKeyUp","onLoadContent","onMouseDown","onMouseEnter","onMouseLeave","onMouseMove","onMouseOut","onMouseOver","onMouseUp","onNodeChange","onObjectResizeStart","onObjectResized","onObjectSelected","onPaste","onPostProcess","onPostRender","onPreProcess","onProgressState","onRedo","onRemove","onReset","onSaveContent","onSelectionChange","onSetAttrib","onSetContent","onShow","onSubmit","onUndo","onVisualAid"],i=function(t){return-1!==a.map((function(t){return t.toLowerCase()})).indexOf(t.toLowerCase())},r=0,l=function(t){var e=Date.now();return t+"_"+Math.floor(1e9*Math.random())+ ++r+String(e)},c=function(t){return void 0===t||""===t?[]:Array.isArray(t)?t:t.split(" ")},d=function(){return{listeners:[],scriptId:l("tiny-script"),scriptLoaded:!1}},u=(n=d(),{load:function(t,e,o){n.scriptLoaded?o():(n.listeners.push(o),t.getElementById(n.scriptId)||function(t,e,o,s){var a=e.createElement("script");a.referrerPolicy="origin",a.type="application/javascript",a.id=t,a.src=o;var i=function(){a.removeEventListener("load",i),n.listeners.forEach((function(t){return t()})),n.scriptLoaded=!0};a.addEventListener("load",i),e.head&&e.head.appendChild(a)}(n.scriptId,t,e))},reinitialize:function(){n=d()}}),m=function(){var t="undefined"!=typeof window?window:o.g;return t&&t.tinymce?t.tinymce:null},g={apiKey:String,cloudChannel:String,id:String,init:Object,initialValue:String,inline:Boolean,modelEvents:[String,Array],plugins:[String,Array],tagName:String,toolbar:[String,Array],modelValue:String,disabled:Boolean,tinymceScriptSrc:String,outputFormat:{type:String,validator:function(t){return"html"===t||"text"===t}}},p=o(953),h=function(){return h=Object.assign||function(t){for(var e,o=1,n=arguments.length;o{o.d(e,{A:()=>E});var n=o(641),s=o(33);const a={class:"customer-list"},i=["src"],r={class:"customer-card--details"},l={class:"customer-card--name"},c=["href"],d={class:"customer-card--email"},u={key:0,class:"customer-card--remove"};var m=o(9336),g=o(2321);const p={class:"modal fade",id:"confirmCustomerRemoveModal",tabindex:"-1","data-bs-backdrop":"static","data-bs-keyboard":"false","aria-labelledby":"confirmCustomerRemove","aria-hidden":"true"},h={class:"modal-dialog"},v={class:"modal-content"},f=(0,n.Lk)("div",{class:"modal-header"},[(0,n.Lk)("h5",{class:"modal-title",id:"confirmCustomerRemove"}," Please confirm Customer Removal "),(0,n.Q3)(" TASK INFORMATION "),(0,n.Lk)("button",{type:"button",class:"btn-close","data-bs-dismiss":"modal","aria-label":"Close",id:"confirmCustomerRemoveButton"})],-1),b={class:"modal-body"},y={class:"customer-card--details"},L={class:"customer-card--name"},k=["href"],C={class:"customer-card--email"},_={class:"modal-footer"};var I=o(2124);const S={name:"ConfirmCustomerRemoval",emits:["remove_customer"],props:{customerObject:{type:Object,default:()=>({customer_id:0,customer_email:"",customer_first_name:"",customer_last_name:"",customer_profile_picture:""})}},computed:{...(0,I.L8)({destination:"getDestination",locationId:"getLocationId",rootUrl:"getRootUrl"})},methods:{closeModal(){document.getElementById("confirmCustomerRemoveButton").click()},removeCustomer(){const t=new FormData;t.set("customer_id",this.customerObject.customer_id);let e=`${this.rootUrl}object_data/${this.destination}/${this.locationId}/remove_customer/`;"organisation"===this.destination&&(e=`${this.rootUrl}customer_information/${this.locationId}/delete/`),this.axios.post(e,t).then((()=>{this.$emit("remove_customer",this.customerObject.customer_id)})).catch((t=>{this.$store.dispatch("newToast",{header:"Can't remove customer",message:`Sorry, could not remove customer. Error -> ${t}`,extra_classes:"bg-warning text-dark",delay:0})})),this.closeModal()}}};var A=o(6262);const w=(0,A.A)(S,[["render",function(t,e,o,a,i,r){return(0,n.uX)(),(0,n.CE)("div",p,[(0,n.Lk)("div",h,[(0,n.Lk)("div",v,[f,(0,n.Lk)("div",b,[(0,n.Lk)("div",y,[(0,n.Lk)("div",L,[(0,n.Lk)("a",{href:`${t.rootUrl}customer_information/${o.customerObject.customer_id}/`,target:"_blank"},(0,s.toDisplayString)(o.customerObject.customer_first_name)+" "+(0,s.toDisplayString)(o.customerObject.customer_last_name),9,k)]),(0,n.Lk)("div",C,(0,s.toDisplayString)(o.customerObject.customer_email),1)])]),(0,n.Lk)("div",_,[(0,n.Lk)("button",{type:"button",class:"btn btn-secondary",onClick:e[0]||(e[0]=(...t)=>r.closeModal&&r.closeModal(...t))}," No "),(0,n.Lk)("button",{type:"button",class:"btn btn-primary",onClick:e[1]||(e[1]=(...t)=>r.removeCustomer&&r.removeCustomer(...t))}," Yes ")])])])])}]]);var T=o(2243);const D={name:"CustomersListModule",components:{ConfirmCustomerRemoval:w,Icon:g.In},props:{customerResults:{type:Array,default:()=>[]}},computed:{...(0,I.L8)({destination:"getDestination",locationId:"getLocationId",rootUrl:"getRootUrl",staticUrl:"getStaticUrl",userLevel:"getUserLevel"}),defaultCustomerImage(){return`${this.staticUrl}/NearBeach/images/placeholder/people_tax.svg`}},mixins:[T.A],data:()=>({customerObject:{customer_id:0,customer_email:"",customer_first_name:"",customer_last_name:"",customer_profile_picture:""}}),emits:["remove_customer"],methods:{confirmRemoveCustomer(t){const e=this.customerResults.filter((e=>parseInt(e.pk)===parseInt(t)));1===e.length?(this.customerObject=e.map((t=>({customer_id:t.pk,customer_email:t.fields.customer_email,customer_first_name:t.fields.customer_first_name,customer_last_name:t.fields.customer_last_name,customer_profile_picture:t.fields.customer_profile_picture})))[0],new m.aF(document.getElementById("confirmCustomerRemoveModal")).show()):this.$store.dispatch("newToast",{header:"Error Deleting Customer",message:"Could not select the correct ID of the customer. Something went wrong",extra_classes:"bg-danger",delay:0})},getCustomerImage(t){const e=t.fields.customer_profile_picture;return""===e||null===e?this.defaultCustomerImage:`${this.rootUrl}private/${e}`},removeCustomer(t){this.$emit("remove_customer",t)}}},E=(0,A.A)(D,[["render",function(t,e,o,m,g,p){const h=(0,n.g2)("Icon"),v=(0,n.g2)("confirm-customer-removal");return(0,n.uX)(),(0,n.CE)(n.FK,null,[(0,n.Lk)("div",a,[((0,n.uX)(!0),(0,n.CE)(n.FK,null,(0,n.pI)(o.customerResults,(e=>((0,n.uX)(),(0,n.CE)("div",{key:e.pk,class:"customer-card"},[(0,n.Q3)(" CUSOMER PROFILE "),(0,n.Lk)("img",{src:p.getCustomerImage(e),alt:"default profile picture"},null,8,i),(0,n.Q3)(" CUSTOMER DETAILS "),(0,n.Lk)("div",r,[(0,n.Lk)("div",l,[(0,n.Lk)("a",{href:`${t.rootUrl}customer_information/${e.pk}/`},(0,s.toDisplayString)(e.fields.customer_first_name)+" "+(0,s.toDisplayString)(e.fields.customer_last_name),9,c)]),(0,n.Lk)("div",d,[(0,n.bF)(h,{icon:t.icons.mailIcon},null,8,["icon"]),(0,n.eW)(" "+(0,s.toDisplayString)(e.fields.customer_email),1)])]),t.userLevel>=2?((0,n.uX)(),(0,n.CE)("div",u,[(0,n.bF)(h,{icon:t.icons.trashCan,onClick:t=>p.confirmRemoveCustomer(e.pk)},null,8,["icon","onClick"])])):(0,n.Q3)("v-if",!0)])))),128))]),(0,n.bF)(v,{"customer-object":g.customerObject,onRemove_customer:e[0]||(e[0]=t=>p.removeCustomer(t))},null,8,["customer-object"])],64)}]])},2458:(t,e,o)=>{o.d(e,{A:()=>x});var n=o(641),s=o(33);const a=(0,n.Lk)("h2",null,"Assigned Tags",-1),i={class:"text-instructions"},r={class:"tag-list"},l=["onClick"],c={class:"row submit-row"},d={class:"col-md-12"};var u=o(9336),m=o(2321),g=o(2243);const p={class:"modal fade",id:"addTagModal",tabindex:"-1","aria-labelledby":"exampleModalLabel","aria-hidden":"true"},h={class:"modal-dialog"},v={class:"modal-content"},f={class:"modal-header"},b=(0,n.Lk)("button",{type:"button",class:"btn-close","data-bs-dismiss":"modal","aria-label":"Close",id:"addTagsCloseButton"},[(0,n.Lk)("span",{"aria-hidden":"true"})],-1),y={class:"modal-body"},L={class:"row"},k={class:"col-md-4"},C=(0,n.Lk)("strong",null,"Add Tag",-1),_={class:"text-instructions"},I={class:"col-md-8"},S=(0,n.Lk)("label",null,"All Tag List",-1),A={class:"modal-footer"},w=(0,n.Lk)("button",{type:"button",class:"btn btn-secondary","data-bs-dismiss":"modal"}," Close ",-1);var T=o(1080),D=o(2124);const E={name:"AddTagWizard",components:{Icon:m.In,NSelect:T.A},props:{assignedTags:{type:Array,default:()=>[]},destination:{type:String,default:""},locationId:{type:Number,default:0}},mixins:[g.A],data:()=>({allTagList:[],tagModel:[]}),computed:{...(0,D.L8)({rootUrl:"getRootUrl"}),tagList(){return this.allTagList.filter((t=>this.assignedTags.findIndex((e=>e.pk===parseInt(t.value)))<0))}},methods:{addTag(){const t=new FormData;this.tagModel.forEach((e=>{t.append("tag_id",e)})),this.axios.post(`${this.rootUrl}object_data/${this.destination}/${this.locationId}/add_tags/`,t).then((t=>{this.$emit("add_tags",t.data),document.getElementById("addTagsCloseButton").click(),this.tagModel=[]})).catch((t=>{this.$store.dispatch("newToast",{header:"Failed to add tag",message:`Sorry, we could not add tag. Errors -> ${t}`,extra_classes:"bg-danger",delay:0})}))},getTagList(){this.axios.post(`${this.rootUrl}object_data/tag_list_all/`).then((t=>{this.allTagList=t.data.map((t=>({value:t.pk,label:t.fields.tag_name})))})).catch((t=>{this.$store.dispatch("newToast",{header:"Failed to get tag list",message:`Sorry, we could not get the tag list. Errors -> ${t}`,extra_classes:"bg-danger",delay:0})}))}},mounted(){["requirement_item"].indexOf(this.destination)>=0||this.$nextTick((()=>{this.getTagList()}))}};var $=o(6262);const U={name:"ListTagsModule",components:{AddTagWizard:(0,$.A)(E,[["render",function(t,e,o,a,i,r){const l=(0,n.g2)("Icon"),c=(0,n.g2)("n-select");return(0,n.uX)(),(0,n.CE)("div",p,[(0,n.Lk)("div",h,[(0,n.Lk)("div",v,[(0,n.Lk)("div",f,[(0,n.Lk)("h2",null,[(0,n.bF)(l,{icon:t.icons.usersIcon},null,8,["icon"]),(0,n.eW)(" Add Tags Wizard ")]),b]),(0,n.Lk)("div",y,[(0,n.Lk)("div",L,[(0,n.Lk)("div",k,[C,(0,n.Lk)("p",_," Use the dropdown to select one or many lables to add to the "+(0,s.toDisplayString)(o.destination)+". ",1)]),(0,n.Lk)("div",I,[S,(0,n.bF)(c,{label:"tag",multiple:"",options:r.tagList,value:i.tagModel,"onUpdate:value":e[0]||(e[0]=t=>i.tagModel=t)},null,8,["options","value"])])])]),(0,n.Lk)("div",A,[w,(0,n.Lk)("button",{type:"button",class:"btn btn-primary",onClick:e[1]||(e[1]=(...t)=>r.addTag&&r.addTag(...t))}," Add Tag ")])])])])}]]),Icon:m.In},data:()=>({tagList:[]}),mixins:[g.A],computed:{...(0,D.L8)({destination:"getDestination",locationId:"getLocationId",rootUrl:"getRootUrl",userLevel:"getUserLevel"})},methods:{addTags(t){this.tagList=t},createNewTag(){new u.aF(document.getElementById("addTagModal")).show()},getAssignedTags(){this.axios.post(`${this.rootUrl}object_data/${this.destination}/${this.locationId}/tag_list/`).then((t=>{this.tagList=t.data})).catch((t=>{}))},removeTag(t){const e=new FormData;e.set("tag",t),e.set("object_enum",this.destination),e.set("object_id",this.locationId),this.axios.post(`${this.rootUrl}object_data/delete_tag/`,e).then((e=>{this.tagList=this.tagList.filter((e=>e.pk!==t))})).catch((t=>{}))}},mounted(){["requirement_item"].indexOf(this.destination)>=0||this.$nextTick((()=>{this.getAssignedTags()}))}},x=(0,$.A)(U,[["render",function(t,e,o,u,m,g){const p=(0,n.g2)("Icon"),h=(0,n.g2)("add-tag-wizard");return(0,n.uX)(),(0,n.CE)("div",null,[a,(0,n.Lk)("p",i," Here are all tags associated with this "+(0,s.toDisplayString)(t.destination)+'. You can add more tags by clicking on the "Add Tag" button. ',1),(0,n.Lk)("div",r,[((0,n.uX)(!0),(0,n.CE)(n.FK,null,(0,n.pI)(m.tagList,(e=>((0,n.uX)(),(0,n.CE)("div",{key:e.pk,class:"single-tag",style:(0,s.normalizeStyle)(`background-color: ${e.fields.tag_colour};color: ${e.fields.tag_text_colour};`)},[(0,n.eW)((0,s.toDisplayString)(e.fields.tag_name)+" ",1),t.userLevel>1?((0,n.uX)(),(0,n.CE)("span",{key:0,onClick:t=>g.removeTag(e.pk)},[(0,n.bF)(p,{icon:t.icons.xCircle},null,8,["icon"])],8,l)):(0,n.Q3)("v-if",!0)],4)))),128))]),(0,n.Q3)(" ADD TAG BUTTON "),(0,n.Lk)("div",c,[(0,n.Lk)("div",d,[t.userLevel>1?((0,n.uX)(),(0,n.CE)("a",{key:0,href:"javascript:void(0)",class:"btn btn-primary save-changes",onClick:e[0]||(e[0]=(...t)=>g.createNewTag&&g.createNewTag(...t))},"Add Tag to "+(0,s.toDisplayString)(t.destination),1)):(0,n.Q3)("v-if",!0)])]),(0,n.Q3)(" ADD TAG MODULE "),(0,n.bF)(h,{destination:t.destination,"location-id":t.locationId,"assigned-tags":m.tagList,onAdd_tags:e[1]||(e[1]=t=>g.addTags(t))},null,8,["destination","location-id","assigned-tags"])])}]])},7889:(t,e,o)=>{o.d(e,{A:()=>v});var n=o(641),s=o(33);const a={class:"text-instructions"},i=(0,n.Lk)("hr",null,null,-1),r={class:"row submit-row"},l={class:"col-md-12"};var c=o(9336),d=o(2243),u=o(2321),m=o(6449),g=o(5319),p=o(2124);const h={name:"NotesModule",components:{Icon:u.In,ListNotes:m.A,NewHistoryNoteWizard:g.A},mixins:[d.A],computed:{...(0,p.L8)({destination:"getDestination",locationId:"getLocationId",userLevel:"getUserLevel",rootUrl:"getRootUrl"})},methods:{createNewNote(){new c.aF(document.getElementById("newNoteModal")).show()},getNoteHistoryResults(){let t="note_list";"organisation"===this.destination&&(t="organisation_note_list"),this.axios.post(`${this.rootUrl}object_data/${this.destination}/${this.locationId}/${t}/`).then((t=>{this.$store.commit({type:"initNoteList",noteList:t.data})})).catch((t=>{this.$store.dispatch("newToast",{header:"Error Getting Note History",message:`Can not retrieve the note history. Error -> ${t}`,extra_classes:"bg-danger",delay:0})}))}},mounted(){this.$nextTick((()=>{this.getNoteHistoryResults()}))}},v=(0,o(6262).A)(h,[["render",function(t,e,o,c,d,u){const m=(0,n.g2)("Icon"),g=(0,n.g2)("list-notes");return(0,n.uX)(),(0,n.CE)("div",null,[(0,n.Lk)("h2",null,[(0,n.bF)(m,{icon:t.icons.noteAdd},null,8,["icon"]),(0,n.eW)(" Note History ")]),(0,n.Lk)("p",a," The following are saved notes against this "+(0,s.toDisplayString)(t.destination)+". Add notes by clicking on the button below. ",1),(0,n.bF)(g,{destination:t.destination},null,8,["destination"]),(0,n.Q3)(" ADD NOTE HISTORY "),(0,n.Q3)(" TO DO - limit it to certain users "),i,(0,n.Lk)("div",r,[(0,n.Lk)("div",l,[t.userLevel>1?((0,n.uX)(),(0,n.CE)("button",{key:0,class:"btn btn-primary save-changes",onClick:e[0]||(e[0]=(...t)=>u.createNewNote&&u.createNewNote(...t))}," Add Note to "+(0,s.toDisplayString)(t.destination),1)):(0,n.Q3)("v-if",!0)])])])}]])},469:(t,e,o)=>{o.d(e,{A:()=>f});var n=o(641),s=o(33);const a={class:"object-card-list"},i={class:"object-card--detail"},r=["href"],l={class:"object-card--detail--link"},c={class:"object-card--detail--description"},d={class:"object-card--status"},u=["href"],m={class:"object-card--status--status"},g={class:"small-text"};var p=o(8083),h=o(2124);const v={name:"RenderObjectCard",props:{destination:{type:String,default:""},importVariables:{type:Object,default:()=>({header:"",prefix:"",id:0,title:"",status:""})},searchResults:{type:Array,default:()=>[]}},mixins:[p.A],computed:{...(0,h.L8)({rootUrl:"getRootUrl"})}},f=(0,o(6262).A)(v,[["render",function(t,e,o,p,h,v){return(0,n.uX)(),(0,n.CE)("div",a,[(0,n.Lk)("h2",null,(0,s.toDisplayString)(o.importVariables.header),1),((0,n.uX)(!0),(0,n.CE)(n.FK,null,(0,n.pI)(o.searchResults,(e=>((0,n.uX)(),(0,n.CE)("div",{class:"object-card",key:e.pk},[(0,n.Lk)("div",i,[(0,n.Lk)("a",{href:`${t.rootUrl}${o.destination}_information/${e[o.importVariables.id]}/`},[(0,n.Lk)("div",l,(0,s.toDisplayString)(o.importVariables.prefix)+(0,s.toDisplayString)(e[o.importVariables.id]),1),(0,n.Lk)("div",c,(0,s.toDisplayString)(e[o.importVariables.title]),1)],8,r)]),(0,n.Lk)("div",d,[(0,n.Lk)("a",{href:`${t.rootUrl}${o.destination}_information/${e[o.importVariables.id]}/`},[(0,n.Lk)("div",m,(0,s.toDisplayString)(e[o.importVariables.status]),1),(0,n.Lk)("p",g,(0,s.toDisplayString)(t.getNiceDatetime(e[o.importVariables.end_date])),1)],8,u)])])))),128))])}]])}}]); \ No newline at end of file diff --git a/NearBeach/static/NearBeach/7022.min.js.gz b/NearBeach/static/NearBeach/7022.min.js.gz new file mode 100644 index 000000000..c44820595 Binary files /dev/null and b/NearBeach/static/NearBeach/7022.min.js.gz differ diff --git a/NearBeach/static/NearBeach/8413.min.js b/NearBeach/static/NearBeach/8413.min.js new file mode 100644 index 000000000..4a7030a82 --- /dev/null +++ b/NearBeach/static/NearBeach/8413.min.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunknearbeach=self.webpackChunknearbeach||[]).push([[8413],{8737:(e,t,o)=>{o.d(t,{Z:()=>F});var i=o(6252),n=o(3577);const d={class:"text-instructions"},s={key:0,class:"module-spacer"},a=[(0,i._)("div",{class:"alert alert-dark"}," Sorry - there are no documents or folders uploaded. ",-1)],l={key:1,class:"document--widget"},r=(0,i._)("p",{class:"text-instructions"},"Go to Parent Directory...",-1),c=["onClick"],u={class:"text-instructions"},m={key:0,class:"document--remove"},p=["href"],h={class:"text-instructions"},g={key:0,class:"document--remove"},b=(0,i._)("hr",null,null,-1),_={key:2,class:"btn-group save-changes"},y={key:0,class:"btn btn-primary dropdown-toggle",type:"button","data-bs-toggle":"dropdown","aria-expanded":"false"},f={class:"dropdown-menu"};var D=o(3138),v=o(6542),k=o(5808),w=o(989);const I={name:"DocumentsModule",components:{Icon:v.JO},props:{overrideDestination:{type:String,default:""},overrideLocationId:{type:Number,default:0},readOnly:{type:Boolean,default:!1}},mixins:[k.Z],computed:{...(0,w.Se)({currentFolder:"getCurrentFolder",destination:"getDestination",documentFilteredList:"getDocumentFilteredList",documentObjectCount:"getDocumentObjectCount",folderFilteredList:"getFolderFilteredList",locationId:"getLocationId",userLevel:"getUserLevel",rootUrl:"getRootUrl"})},watch:{overrideLocationId(){this.getDocumentList(),this.getFolderList()}},methods:{addFolder(){const e=document.getElementById("cardInformationModalCloseButton");null!==e&&e.click(),new D.u_(document.getElementById("addFolderModal")).show()},addLink(){const e=document.getElementById("cardInformationModalCloseButton");null!==e&&e.click(),new D.u_(document.getElementById("addLinkModal")).show()},confirmFileDelete(e){this.$store.commit({type:"updateDocumentRemoveKey",documentRemoveKey:e});const t=document.getElementById("cardInformationModalCloseButton");null!==t&&t.click(),new D.u_(document.getElementById("confirmFileDeleteModal")).show()},confirmFolderDelete(e){this.$store.commit({type:"updateFolderRemoveId",folderRemoveId:e});const t=document.getElementById("cardInformationModalCloseButton");null!==t&&t.click(),new D.u_(document.getElementById("confirmFolderDeleteModal")).show()},getDestination(){return""!==this.overrideDestination?this.overrideDestination:this.destination},getDocumentList(){0!==this.getLocationId()&&this.axios.post(`${this.rootUrl}documentation/${this.getDestination()}/${this.getLocationId()}/list/files/`).then((e=>{this.$store.commit({type:"updateDocumentList",documentList:e.data})})).catch((e=>{this.$store.dispatch("newToast",{header:"Error getting Document List",message:`Can not retrieve document list. Error -> ${e}`,extra_classes:"bg-danger",delay:0})}))},getFolderList(){0!==this.getLocationId()&&this.axios.post(`${this.rootUrl}documentation/${this.getDestination()}/${this.getLocationId()}/list/folders/`).then((e=>{this.$store.commit({type:"updateFolderList",folderList:e.data})}))},getIcon(e){if(""!==e.document_key__document_url_location&&null!==e.document_key__document_url_location)return this.icons.linkOut;const t=e.document_key__document.split(".");switch(t[t.length-1]){case"jpg":case"png":case"bmp":return this.icons.imageIcon;case"doc":case"docx":return this.icons.microsoftWord;case"xls":case"xlsx":return this.icons.microsoftExcel;case"ppt":case"pptx":return this.icons.microsoftPowerpoint;case"pdf":return this.icons.documentPdf;default:return this.icons.documentText}},getLocationId(){return""!==this.overrideDestination?this.overrideLocationId:this.locationId},goToParentDirectory(){this.$store.dispatch("goToParentDirectory",{})},shortName:e=>e.length<=50?e:`${e.substring(0,47)}...`,updateCurrentFolder(e){this.$store.commit({type:"updateCurrentFolder",currentFolder:e})},uploadDocument(){const e=document.getElementById("cardInformationModalCloseButton");null!==e&&e.click(),new D.u_(document.getElementById("uploadDocumentModal")).show()}},mounted(){this.$nextTick((()=>{this.getDocumentList(),this.getFolderList()}))}},F=(0,o(3744).Z)(I,[["render",function(e,t,o,D,v,k){const w=(0,i.up)("Icon");return(0,i.wg)(),(0,i.iD)("div",null,[(0,i._)("h2",null,[(0,i.Wm)(w,{icon:e.icons.bxBriefcase},null,8,["icon"]),(0,i.Uk)(" Documents ")]),(0,i._)("p",d," The following is a folder structure of all documents uploaded to this "+(0,n.toDisplayString)(this.getDestination()),1),(0,i.kq)(" DOCUMENT FOLDER TREE "),0===parseInt(e.documentObjectCount)?((0,i.wg)(),(0,i.iD)("div",s,a)):((0,i.wg)(),(0,i.iD)("div",l,[(0,i.kq)(" GO TO PARENT DIRECTORY "),0!==this.currentFolder?((0,i.wg)(),(0,i.iD)("div",{key:0,onClick:t[0]||(t[0]=e=>k.goToParentDirectory()),class:"document--child"},[(0,i.Wm)(w,{icon:e.icons.arrowUp,width:"80px",height:"80px"},null,8,["icon"]),r])):(0,i.kq)("v-if",!0),(0,i.kq)(" RENDER THE FOLDERS "),((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)(e.folderFilteredList,(t=>((0,i.wg)(),(0,i.iD)("div",{key:t.pk,class:"document--child"},[(0,i._)("a",{href:"javascript:void(0)",onClick:e=>k.updateCurrentFolder(t.pk)},[(0,i.Wm)(w,{icon:e.icons.folderIcon,width:"80px",height:"80px"},null,8,["icon"]),(0,i._)("p",u,(0,n.toDisplayString)(k.shortName(t.fields.folder_description)),1)],8,c),(0,i.kq)(" REMOVE FOLDER "),e.userLevel>=2?((0,i.wg)(),(0,i.iD)("div",m,[(0,i.Wm)(w,{icon:e.icons.trashCan,onClick:e=>k.confirmFolderDelete(t.pk)},null,8,["icon","onClick"])])):(0,i.kq)("v-if",!0)])))),128)),(0,i.kq)(" RENDER THE FILES "),((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)(e.documentFilteredList,(t=>((0,i.wg)(),(0,i.iD)("div",{key:t.document_key_id,class:"document--child"},[(0,i._)("a",{href:`/private/${t.document_key_id}/`,rel:"noopener noreferrer",target:"_blank"},[(0,i.Wm)(w,{icon:k.getIcon(t),width:"80px",height:"80px"},null,8,["icon"]),(0,i._)("p",h,(0,n.toDisplayString)(k.shortName(t.document_key__document_description)),1)],8,p),(0,i.kq)(" REMOVE DOCUMENT "),e.userLevel>=2?((0,i.wg)(),(0,i.iD)("div",g,[(0,i.Wm)(w,{icon:e.icons.trashCan,onClick:e=>k.confirmFileDelete(t.document_key_id)},null,8,["icon","onClick"])])):(0,i.kq)("v-if",!0)])))),128))])),(0,i.kq)(" ADD DOCUMENTS AND FOLDER BUTTON "),b,!1===o.readOnly?((0,i.wg)(),(0,i.iD)("div",_,[e.userLevel>1?((0,i.wg)(),(0,i.iD)("button",y," New Document/File ")):(0,i.kq)("v-if",!0),(0,i._)("ul",f,[(0,i._)("li",null,[(0,i._)("a",{class:"dropdown-item",href:"javascript:void(0)",onClick:t[1]||(t[1]=(...e)=>k.uploadDocument&&k.uploadDocument(...e))}," Upload Document ")]),(0,i._)("li",null,[(0,i._)("a",{class:"dropdown-item",href:"javascript:void(0)",onClick:t[2]||(t[2]=(...e)=>k.addLink&&k.addLink(...e))}," Add Link ")]),(0,i._)("li",null,[(0,i._)("a",{class:"dropdown-item",href:"javascript:void(0)",onClick:t[3]||(t[3]=(...e)=>k.addFolder&&k.addFolder(...e))}," Add Folder ")])])])):(0,i.kq)("v-if",!0)])}]])},5007:(e,t,o)=>{o.d(t,{Z:()=>v});var i=o(6252),n=o(3577);const d={key:0,class:"module-spacer"},s={class:"alert alert-dark"},a={key:1,class:"note-history"},l={class:"note-history--profile"},r=["src"],c={class:"note-history--username"},u={class:"note-history--date"},m={key:0,class:"note-history--edit-button"},p=["onClick"],h=["onClick"],g={class:"note-history--note"};var b=o(7267),_=o(3138),y=o(989),f=o(431);const D={name:"ListNotes",components:{editor:b.Z},mixins:[f.Z],props:{destination:{type:String,default:""}},computed:{...(0,y.Se)({contentCss:"getContentCss",noteList:"getNoteList",rootUrl:"getRootUrl",staticUrl:"getStaticUrl",skin:"getSkin"})},methods:{deleteNote(e){if(this.$store.dispatch({type:"updateNoteId",noteId:e}),new _.u_(document.getElementById("confirmNoteDeleteModal")).show(),"card"===this.destination){const e=document.getElementById("cardInformationModalCloseButton");void 0!==e&&e.click()}},editNote(e){if(this.$store.dispatch({type:"updateNoteId",noteId:e}),new _.u_(document.getElementById("editNoteModal")).show(),"card"===this.destination){const e=document.getElementById("cardInformationModalCloseButton");void 0!==e&&e.click()}},profilePicture(e){return null!==e&&""!==e?`${this.rootUrl}private/${e}/`:`${this.staticUrl}NearBeach/images/placeholder/people_tax.svg`}}},v=(0,o(3744).Z)(D,[["render",function(e,t,o,b,_,y){const f=(0,i.up)("editor");return(0,i.wg)(),(0,i.iD)("div",null,[(0,i.kq)(" NOTE HISTORY "),0===e.noteList.length?((0,i.wg)(),(0,i.iD)("div",d,[(0,i._)("div",s," Sorry - but there are no notes for this "+(0,n.toDisplayString)(o.destination)+". ",1)])):((0,i.wg)(),(0,i.iD)("div",a,[((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)(e.noteList,(t=>((0,i.wg)(),(0,i.iD)("div",{class:"note-history--row",key:t.object_note_id},[(0,i._)("div",l,[(0,i._)("img",{src:y.profilePicture(t.profile_picture),alt:"default profile",class:"note-history--profile-picture"},null,8,r),(0,i._)("div",c,(0,n.toDisplayString)(t.first_name)+" "+(0,n.toDisplayString)(t.last_name),1),(0,i._)("div",u,(0,n.toDisplayString)(e.getNiceDatetime(t.date_modified)),1),"true"===t.can_edit?((0,i.wg)(),(0,i.iD)("div",m,[(0,i._)("button",{type:"button",class:"btn btn-outline-secondary",onClick:e=>y.editNote(t.object_note_id)}," Edit Note ",8,p),(0,i._)("button",{type:"button",class:"btn btn-outline-danger",onClick:e=>y.deleteNote(t.object_note_id)}," Delete Note ",8,h)])):(0,i.kq)("v-if",!0)]),(0,i._)("div",g,[(0,i.Wm)(f,{init:{height:250,menubar:!1,plugins:["lists","image","codesample","table"],toolbar:[],skin:`${this.skin}`,content_css:`${this.contentCss}`},modelValue:t.object_note,"onUpdate:modelValue":e=>t.object_note=e,disabled:!0},null,8,["init","modelValue","onUpdate:modelValue"])])])))),128))]))])}]])},9401:(e,t,o)=>{o.d(t,{Z:()=>I});var i=o(6252),n=o(9963);const d={class:"modal fade",id:"addFolderModal",tabindex:"-1","aria-labelledby":"exampleModalLabel","aria-hidden":"true"},s={class:"modal-dialog modal-lg"},a={class:"modal-content"},l={class:"modal-header"},r=(0,i._)("button",{type:"button",class:"btn-close","data-bs-dismiss":"modal","aria-label":"Close",id:"addFolderCloseButton"},[(0,i._)("span",{"aria-hidden":"true"})],-1),c={class:"modal-body"},u={class:"row"},m=(0,i._)("div",{class:"col-md-4"},[(0,i._)("strong",null,"Creating a folder"),(0,i._)("p",{class:"text-instructions"},' Give the folder an appropriate name. When done, click on the "Save" button. It will be added to the current folder. ')],-1),p={class:"col-md-8"},h={class:"form-group"},g=(0,i._)("label",{for:"folder_description"},"Folder Name",-1),b={class:"modal-footer"},_=(0,i._)("button",{type:"button",class:"btn btn-secondary","data-bs-dismiss":"modal"}," Close ",-1),y=["disabled"];var f=o(6542),D=(o(3138),o(989)),v=o(5808),k=o(1295);const w={name:"AddFolderWizard",components:{Icon:f.JO},props:{destination:{type:String,default:"/"},locationId:{type:Number,default:0}},mixins:[v.Z,k.Z],data:()=>({disableAddFolderButton:!0,folderDescriptionModel:""}),computed:{...(0,D.Se)({existingFolders:"getFolderFilteredList",currentFolder:"getCurrentFolder",rootUrl:"getRootUrl"})},methods:{addFolder(){const e=new FormData;e.set("folder_description",this.folderDescriptionModel),this.currentFolder>0&&e.set("parent_folder",this.currentFolder),this.axios.post(`${this.rootUrl}documentation/${this.destination}/${this.locationId}/add_folder/`,e).then((e=>{this.$store.dispatch("appendFolderList",{folderList:e.data[0]}),this.folderDescriptionModel="",document.getElementById("addFolderCloseButton").click(),this.reopenCardInformation()})).catch((e=>{this.$store.dispatch("newToast",{header:"Failed to add folder",message:`Failed to add folder. Error -> ${e}`,extra_classes:"bg-danger",delay:0})}))}},updated(){const e=this.existingFolders.filter((e=>e.fields.folder_description===this.folderDescriptionModel));this.disableAddFolderButton=e.length>0||""===this.folderDescriptionModel||null===this.folderDescriptionModel}},I=(0,o(3744).Z)(w,[["render",function(e,t,o,f,D,v){const k=(0,i.up)("Icon");return(0,i.wg)(),(0,i.iD)("div",d,[(0,i._)("div",s,[(0,i._)("div",a,[(0,i._)("div",l,[(0,i._)("h2",null,[(0,i.Wm)(k,{icon:e.icons.userIcon},null,8,["icon"]),(0,i.Uk)(" Add Folder Wizard ")]),r]),(0,i._)("div",c,[(0,i._)("div",u,[m,(0,i._)("div",p,[(0,i._)("div",h,[g,(0,i.wy)((0,i._)("input",{type:"text","onUpdate:modelValue":t[0]||(t[0]=e=>D.folderDescriptionModel=e),class:"form-control",id:"folder_description",maxlength:"50"},null,512),[[n.vModelText,D.folderDescriptionModel]])])])])]),(0,i._)("div",b,[_,(0,i._)("button",{type:"button",class:"btn btn-primary",disabled:D.disableAddFolderButton,onClick:t[1]||(t[1]=(...e)=>v.addFolder&&v.addFolder(...e))}," Add Folder ",8,y)])])])])}]])},9601:(e,t,o)=>{o.d(t,{Z:()=>L});var i=o(6252),n=o(9963);const d={class:"modal fade",id:"addLinkModal",tabindex:"-1","aria-labelledby":"exampleModalLabel","aria-hidden":"true"},s={class:"modal-dialog modal-lg"},a={class:"modal-content"},l={class:"modal-header"},r=(0,i._)("button",{type:"button",class:"btn-close","data-bs-dismiss":"modal","aria-label":"Close",id:"addLinkCloseButton"},[(0,i._)("span",{"aria-hidden":"true"})],-1),c={class:"modal-body"},u={class:"row"},m=(0,i._)("div",{class:"col-md-4"},[(0,i._)("strong",null,"Add Link"),(0,i._)("p",{class:"text-instruction"}," Add hyperlinks to other documents and sources located in on the internet/cloud. ")],-1),p={class:"col-md-8"},h={class:"form-group"},g={for:"document_description"},b={key:0,class:"error"},_={class:"form-group"},y={for:"document_url_location"},f={class:"modal-footer"},D=(0,i._)("button",{type:"button",class:"btn btn-secondary","data-bs-dismiss":"modal"}," Close ",-1),v=["disabled"];var k=o(6542),w=o(989),I=o(5808),F=o(5705),x=o(760),M=o(7939);o(3138),o(1295);const U={name:"AddLinkWizard",setup:()=>({v$:(0,F.ZP)()}),components:{Icon:k.JO,ValidationRendering:M.Z},props:{destination:{type:String,default:"/"},locationId:{type:Number,default:0}},mixins:[I.Z],data:()=>({linkModel:"",disableAddButton:!0,documentDescriptionModel:"",documentUrlLocationModel:"",duplicateDescription:!1}),validations:{documentDescriptionModel:{required:x.C1},documentUrlLocationModel:{required:x.C1,url:x.HQ}},computed:{...(0,w.Se)({currentFolder:"getCurrentFolder",excludeDocuments:"getDocumentFilteredList",rootUrl:"getRootUrl"})},methods:{addLink(){const e=new FormData;e.set("document_description",this.documentDescriptionModel),e.set("document_url_location",this.documentUrlLocationModel),this.currentFolder>0&&e.set("parent_folder",this.currentFolder),this.axios.post(`${this.rootUrl}documentation/${this.destination}/${this.locationId}/add_link/`,e).then((e=>{this.$store.dispatch("appendDocumentList",{documentList:e.data[0]}),this.documentDescriptionModel="",this.documentUrlLocationModel="",document.getElementById("addLinkCloseButton").click(),this.reopenCardInformation()})).catch((e=>{this.$store.dispatch("newToast",{header:"Error Adding Link",message:`Sorry, could not add the link for you. Error - ${e}`,extra_classes:"bg-danger",delay:0})}))}},updated(){const e=this.excludeDocuments.filter((e=>e.document_key__document_description===this.documentDescriptionModel));this.duplicateDescription=e.length>0,this.v$.$touch(),this.disableAddButton=this.v$.$invalid||e.length>0}},L=(0,o(3744).Z)(U,[["render",function(e,t,o,k,w,I){const F=(0,i.up)("Icon"),x=(0,i.up)("validation-rendering");return(0,i.wg)(),(0,i.iD)("div",d,[(0,i._)("div",s,[(0,i._)("div",a,[(0,i._)("div",l,[(0,i._)("h2",null,[(0,i.Wm)(F,{icon:e.icons.userIcon},null,8,["icon"]),(0,i.Uk)(" Add Link Wizard ")]),r]),(0,i._)("div",c,[(0,i._)("div",u,[m,(0,i._)("div",p,[(0,i._)("div",h,[(0,i._)("label",g,[(0,i.Uk)(" Document Description "),(0,i.Wm)(x,{"error-list":k.v$.documentDescriptionModel.$errors},null,8,["error-list"]),w.duplicateDescription?((0,i.wg)(),(0,i.iD)("span",b," Sorry - but this is a duplicated description.")):(0,i.kq)("v-if",!0)]),(0,i.wy)((0,i._)("input",{id:"document_description","onUpdate:modelValue":t[0]||(t[0]=e=>w.documentDescriptionModel=e),class:"form-control",maxlength:"50",placeholder:"NearBeach Homepage"},null,512),[[n.vModelText,w.documentDescriptionModel]])]),(0,i._)("div",_,[(0,i._)("label",y,[(0,i.Uk)(" Document URL "),(0,i.Wm)(x,{"error-list":k.v$.documentUrlLocationModel.$errors},null,8,["error-list"])]),(0,i.wy)((0,i._)("input",{id:"document_url_location","onUpdate:modelValue":t[1]||(t[1]=e=>w.documentUrlLocationModel=e),class:"form-control",placeholder:"https://nearbeach.org"},null,512),[[n.vModelText,w.documentUrlLocationModel]])])])])]),(0,i._)("div",f,[D,(0,i._)("button",{type:"button",class:"btn btn-primary",onClick:t[2]||(t[2]=(...e)=>I.addLink&&I.addLink(...e)),disabled:w.disableAddButton}," Add Link ",8,v)])])])])}]])},5014:(e,t,o)=>{o.d(t,{Z:()=>m});var i=o(6252);const n={class:"modal fade",id:"confirmFileDeleteModal",tabindex:"-1","data-bs-backdrop":"static","data-bs-keyboard":"false","aria-labelledby":"confirmFileDelete","aria-hidden":"true"},d={class:"modal-dialog"},s={class:"modal-content"},a=(0,i._)("div",{class:"modal-header"},[(0,i._)("h5",{class:"modal-title",id:"confirmFileDelete"}," Please confirm File Deletion "),(0,i.kq)(" TASK INFORMATION "),(0,i._)("button",{type:"button",class:"btn-close","data-bs-dismiss":"modal","aria-label":"Close",id:"confirmFileDeleteButton"})],-1),l=(0,i._)("div",{class:"modal-body"}," Are you sure you want to delete the file? ",-1),r={class:"modal-footer"};var c=o(989);o(3138);const u={name:"ConfirmFileDelete",mixins:[o(1295).Z],computed:{...(0,c.Se)({destination:"getDestination",documentRemoveKey:"getDocumentRemoveKey",locationId:"getLocationId",rootUrl:"getRootUrl"})},methods:{deleteFile(){if(""===this.documentRemoveKey)return;const e=this.documentRemoveKey,t=new FormData;t.set("document_key",this.documentRemoveKey),this.axios.post(`${this.rootUrl}documentation/${this.destination}/${this.locationId}/remove/`,t).then((()=>{this.$store.dispatch("removeDocument",{document_key:e}),this.closeModal()})).catch((e=>{this.$store.dispatch("newToast",{header:"Error removing file",message:`We could not remove your file. Error - ${e}`,extra_classes:"bg-danger",delay:0})})),this.closeModal()},closeModal(){this.$store.commit({type:"updateDocumentRemoveKey",documentRemoveKey:""}),document.getElementById("confirmFileDeleteButton").click(),this.reopenCardInformation()}}},m=(0,o(3744).Z)(u,[["render",function(e,t,o,c,u,m){return(0,i.wg)(),(0,i.iD)("div",n,[(0,i._)("div",d,[(0,i._)("div",s,[a,l,(0,i._)("div",r,[(0,i._)("button",{type:"button",class:"btn btn-secondary",onClick:t[0]||(t[0]=(...e)=>m.closeModal&&m.closeModal(...e))}," No "),(0,i._)("button",{type:"button",class:"btn btn-primary",onClick:t[1]||(t[1]=(...e)=>m.deleteFile&&m.deleteFile(...e))}," Yes ")])])])])}]])},3027:(e,t,o)=>{o.d(t,{Z:()=>f});var i=o(6252);const n={class:"modal fade",id:"newNoteModal",tabindex:"-1",role:"dialog","aria-labelledby":"exampleModalLabel","aria-hidden":"true"},d={class:"modal-dialog modal-lg",role:"document"},s={class:"modal-content"},a={class:"modal-header"},l=(0,i._)("button",{type:"button",class:"btn-close","data-bs-dismiss":"modal","aria-label":"Close",id:"newNoteCloseButton"},[(0,i._)("span",{"aria-hidden":"true"})],-1),r={class:"modal-body"},c=(0,i._)("p",{class:"text-instructions"}," Use the text editor to type out your note. Click on the submit button to submit the note. ",-1),u={class:"modal-footer"},m=["disabled"],p=(0,i._)("button",{type:"button",class:"btn btn-secondary","data-bs-dismiss":"modal"}," Close ",-1);var h=o(5808),g=o(6542),b=o(7267),_=o(989);const y={name:"NewHistoryNoteWizard",components:{editor:b.Z,Icon:g.JO},props:{destination:{type:String,default:""},locationId:{type:Number,default:0}},mixins:[h.Z],data:()=>({newNoteModel:""}),computed:{...(0,_.Se)({contentCss:"getContentCss",rootUrl:"getRootUrl",skin:"getSkin"})},methods:{submitNote(){this.$store.dispatch("newToast",{header:"Submitting new note",message:"Please wait. Submitting new note",extra_classes:"bg-warning text-dark",delay:0,unique_type:"submit_note"});const e=new FormData;e.set("destination",this.destination),e.set("location_id",`${this.locationId}`),e.set("note",this.newNoteModel);let t="add_notes";"organisation"===this.destination&&(t="organisation_add_notes"),this.axios.post(`${this.rootUrl}object_data/${this.destination}/${this.locationId}/${t}/`,e).then((e=>{this.$store.dispatch("newToast",{header:"New Note Submitted",message:"The new note submitted successfully.",extra_classes:"bg-success",unique_type:"submit_note"}),this.$store.commit({type:"addNote",newNote:e.data[0]}),this.newNoteModel="",document.getElementById("newNoteCloseButton").click()})).catch((e=>{this.$store.dispatch("newToast",{header:"Error Submitting Note",message:`Sorry, the note did not submit. Error -> ${e}`,extra_classes:"bg-danger",delay:0,unique_type:"submit_note"})}))}}},f=(0,o(3744).Z)(y,[["render",function(e,t,o,h,g,b){const _=(0,i.up)("Icon"),y=(0,i.up)("editor");return(0,i.wg)(),(0,i.iD)(i.HY,null,[(0,i.kq)(" NEW HISTORY NOTE "),(0,i._)("div",n,[(0,i._)("div",d,[(0,i._)("div",s,[(0,i._)("div",a,[(0,i._)("h2",null,[(0,i.Wm)(_,{icon:e.icons.noteAdd},null,8,["icon"]),(0,i.Uk)(" New Note ")]),l]),(0,i._)("div",r,[c,(0,i.Wm)(y,{init:{height:300,menubar:!1,plugins:["lists","codesample","table"],toolbar:"undo redo | blocks | bold italic strikethrough underline backcolor | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | removeformat | table image codesample",skin:`${this.skin}`,content_css:`${this.contentCss}`},modelValue:g.newNoteModel,"onUpdate:modelValue":t[0]||(t[0]=e=>g.newNoteModel=e)},null,8,["init","modelValue"])]),(0,i._)("div",u,[(0,i._)("button",{type:"button",class:"btn btn-primary",disabled:""==g.newNoteModel,onClick:t[1]||(t[1]=(...e)=>b.submitNote&&b.submitNote(...e))}," Submit Note ",8,m),p])])])])],2112)}]])},4657:(e,t,o)=>{o.d(t,{Z:()=>q});var i=o(6252),n=o(3577),d=o(9963);const s={class:"modal fade",id:"uploadDocumentModal","data-bs-backdrop":"static","data-bs-keyboard":"false",tabindex:"-1","aria-labelledby":"exampleModalLabel","aria-hidden":"true"},a={class:"modal-dialog modal-lg"},l={class:"modal-content"},r={class:"modal-header"},c=(0,i._)("button",{type:"button",class:"btn-close","data-bs-dismiss":"modal","aria-label":"Close",id:"uploadDocumentCloseButton"},[(0,i._)("span",{"aria-hidden":"true"})],-1),u={class:"modal-body"},m={class:"row"},p={class:"col-md-4"},h=(0,i._)("strong",null,"Uploading File",-1),g={class:"text-instructions"},b={key:0},_={key:1},y={key:2},f={class:"col-md-8"},D={key:0,class:"form-file"},v={class:"mb-3"},k={for:"document",class:"form-label"},w=(0,i._)("br",null,null,-1),I={key:0,class:"alert alert-warning"},F=["accept"],x={key:1,class:"form-group"},M={class:"form-group"},U=(0,i._)("label",{for:"documentDescription"},"Document Description",-1),L=(0,i._)("br",null,null,-1),C={class:"form-row"},$={key:2},E={key:0,class:"alert alert-warning"},N=(0,i._)("div",{class:"spinner-border text-primary",role:"status"},[(0,i._)("span",{class:"sr-only"},"Loading...")],-1),S=(0,i._)("div",{class:"alert alert-success"}," The document has been uploaded. The server is currently writing the file to disk. Please be patient - this modal will close automatically. Thank you ",-1),B={class:"modal-footer"},T=(0,i._)("button",{type:"button",class:"btn btn-secondary","data-bs-dismiss":"modal"}," Close ",-1),Z=["disabled"];var R=o(6542),O=(o(3138),o(989)),W=o(5808),A=o(1295);const P={name:"UploadDocumentWizard",components:{Icon:R.JO},props:{overrideDestination:{type:String,default:""},overrideLocationId:{type:Number,default:0}},mixins:[W.Z,A.Z],data:()=>({disableUploadButton:!0,documentModel:[],documentDescriptionModel:"",uploadPercentage:"",maxUploadSize:0,maxUploadString:"No Upload Limit",maxUploadWarning:!1}),computed:{...(0,O.Se)({acceptedDocuments:"getAcceptedDocuments",currentFolder:"getCurrentFolder",destination:"getDestination",excludeDocuments:"getDocumentFilteredList",locationId:"getLocationId",staticUrl:"getStaticUrl",rootUrl:"getRootUrl"})},methods:{getDestination(){return""!==this.overrideDestination?this.overrideDestination:this.destination},getLocationId(){return""!==this.overrideDestination?this.overrideLocationId:this.locationId},handleFileUploads(e){e[0].size*(0!==this.maxUploadSize)>this.maxUploadSize?this.maxUploadWarning=!0:(this.maxUploadWarning=!1,this.documentModel=e[0],this.documentDescriptionModel=e[0].name)},resetForm(){this.documentModel="",this.documentDescriptionModel="",this.uploadPercentage=""},uploadFile(){const e=new FormData;e.set("document",this.documentModel,this.documentDescriptionModel),e.set("document_description",this.documentDescriptionModel),this.currentFolder>0&&e.set("parent_folder",this.currentFolder);const t={onUploadProgress:e=>{this.uploadPercentage=parseFloat(e.loaded)/parseFloat(e.total)}};this.axios.post(`${this.rootUrl}documentation/${this.getDestination()}/${this.getLocationId()}/upload/`,e,t).then((e=>{this.$store.dispatch("appendDocumentList",{documentList:e.data[0]}),document.getElementById("uploadDocumentCloseButton").click(),this.resetForm(),this.reopenCardInformation()})).catch((e=>{this.$store.dispatch("newToast",{header:"Failed to upload documentation",message:`Can not upload the documentation. ${e}`,extra_classes:"bg-danger",delay:0})}))}},watch:{maxUploadSize(){if(0===this.maxUploadSize)return"No Upload Limit";const e=Math.floor(Math.log(this.maxUploadSize)/Math.log(1024));this.maxUploadString=`Max Upload Size: ${parseFloat((this.maxUploadSize/Math.pow(1024,e)).toFixed(2))} ${["Bytes","KB","MB","GB","TB","PB","EB","ZB","YB"][e]}`}},updated(){const e=this.excludeDocuments.filter((e=>e.document_key__document_description===this.documentDescriptionModel));this.disableUploadButton=""===this.documentModel||0===this.documentDescriptionModel.length||e.length>0},mounted(){this.$nextTick((()=>{this.axios.post(`${this.rootUrl}documentation/get/max_upload/`).then((e=>{this.maxUploadSize=e.data.max_upload_size})).catch((()=>{this.$store.dispatch("newToast",{header:"Failed to get the max upload size",message:`Had an issue getting data from backend. ${this.maxUploadString}`,extra_classes:"bg-danger",delay:0})}))}))}},q=(0,o(3744).Z)(P,[["render",function(e,t,o,R,O,W){const A=(0,i.up)("Icon");return(0,i.wg)(),(0,i.iD)("div",s,[(0,i._)("div",a,[(0,i._)("div",l,[(0,i._)("div",r,[(0,i._)("h2",null,[(0,i.Wm)(A,{icon:e.icons.userIcon},null,8,["icon"]),(0,i.Uk)(" Upload Document Wizard ")]),c]),(0,i._)("div",u,[(0,i._)("div",m,[(0,i._)("div",p,[h,(0,i._)("p",g," You will be able to upload a file against this "+(0,n.toDisplayString)(W.getDestination)+". It will appear in the current folder. ",1),0===O.documentModel.length?((0,i.wg)(),(0,i.iD)("p",b,' 1. Please click on "Upload File" button to upload a file ')):""===O.uploadPercentage?((0,i.wg)(),(0,i.iD)("p",_,' 2. Please modify the document descript to be more human readable. Or click the "Reset" button to remove the uploaded file. ')):((0,i.wg)(),(0,i.iD)("p",y," 3. Document is currently uploading. Please be patient. "))]),(0,i._)("div",f,[0===O.documentModel.length?((0,i.wg)(),(0,i.iD)("div",D,[(0,i._)("div",v,[(0,i._)("label",k,[(0,i.Uk)(" Please upload a file"),w,(0,i.Uk)(" "+(0,n.toDisplayString)(O.maxUploadString)+" ",1),O.maxUploadWarning?((0,i.wg)(),(0,i.iD)("div",I," Sorry - file too large ")):(0,i.kq)("v-if",!0)]),(0,i._)("input",{type:"file",class:"form-control",id:"document",accept:e.acceptedDocuments,onChange:t[0]||(t[0]=e=>W.handleFileUploads(e.target.files))},null,40,F)])])):""==O.uploadPercentage?((0,i.wg)(),(0,i.iD)("div",x,[(0,i.kq)(" DOCUMENT DESCRIPTION "),(0,i._)("div",M,[U,(0,i.wy)((0,i._)("input",{id:"documentDescription","onUpdate:modelValue":t[1]||(t[1]=e=>O.documentDescriptionModel=e),type:"text",class:"form-control"},null,512),[[d.vModelText,O.documentDescriptionModel]])]),(0,i.kq)(" RESET FORM BUTTON "),L,(0,i._)("div",C,[(0,i._)("button",{onClick:t[2]||(t[2]=(...e)=>W.resetForm&&W.resetForm(...e)),class:"btn btn-warning"}," Reset Form ")])])):((0,i.wg)(),(0,i.iD)("div",$,[(0,i.kq)(" THE UPLOAD SPINNER "),parseFloat(O.uploadPercentage).toFixed(0)<1?((0,i.wg)(),(0,i.iD)("div",E,[(0,i.Uk)(" Uploading "+(0,n.toDisplayString)((100*parseFloat(O.uploadPercentage)).toFixed(2))+"% ",1),N])):((0,i.wg)(),(0,i.iD)(i.HY,{key:1},[(0,i.kq)(" THE FINAL WRITING "),S],2112))]))])])]),(0,i._)("div",B,[T,(0,i._)("button",{type:"button",class:"btn btn-primary",disabled:O.disableUploadButton,onClick:t[3]||(t[3]=(...e)=>W.uploadFile&&W.uploadFile(...e))}," Upload File ",8,Z)])])])])}]])},7939:(e,t,o)=>{o.d(t,{Z:()=>s});var i=o(6252),n=o(3577);const d={name:"ValidationRendering",props:{errorList:{type:Array,default:()=>[]}}},s=(0,o(3744).Z)(d,[["render",function(e,t,o,d,s,a){return(0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)(o.errorList,(e=>((0,i.wg)(),(0,i.iD)("span",{class:"error",key:e.$uid},(0,n.toDisplayString)(e.$message),1)))),128)}]])},431:(e,t,o)=>{o.d(t,{Z:()=>n});var i=o(7126);const n={methods:{getNiceDatetime:e=>""===e||null==e?"":i.ou.fromISO(e).toLocaleString(i.ou.DATETIME_MED),getNiceDate:e=>""===e||null==e?"":i.ou.fromISO(e).toLocaleString(i.ou.DATE_MED_WITH_WEEKDAY),disableDate(e){const t=new Date;return t.setMilliseconds(0),t.setSeconds(0),t.setHours(0),e<=t.getTime()-36e5}}}},624:(e,t,o)=>{o.d(t,{Z:()=>n});var i=o(7449);const n={data:()=>({darkTheme:i.$}),methods:{getTheme:e=>"dark"===e?i.$:null}}},5808:(e,t,o)=>{o.d(t,{Z:()=>U});var i=o(3985),n=o(5555),d=o(1826),s=o(6443),a=o(1327),l=o(8521),r=o(1056),c=o(4324),u=o(9672),m=o(9867),p=o(1239),h=o(5004),g=o(1321),b=o(1216),_=o(5550),y=o(7702),f=o(7903),D=o(2606),v=o(3843),k=o(2393),w=o(3360),I=o(9714),F=o(1323),x=o(2610),M=o(5968);const U={data:()=>({icons:{arrowUp:i.Z,bugIcon:n.Z,bxBriefcase:d.Z,cardChecklist:s.Z,clipboardIcon:a.Z,documentPdf:l.Z,documentText:r.Z,folderIcon:c.Z,groupPresentation:u.Z,imageIcon:m.Z,infoCircle:p.Z,linkIcon:h.Z,linkIcon2:g.Z,linkOut:b.Z,mailIcon:_.Z,microsoftExcel:y.Z,microsoftPowerpoint:f.Z,microsoftWord:D.Z,noteAdd:v.Z,objectStorage:k.Z,passwordIcon:w.Z,trashCan:I.Z,userIcon:F.Z,usersIcon:x.Z,xCircle:M.Z}})}},1295:(e,t,o)=>{o.d(t,{Z:()=>n});var i=o(3138);const n={methods:{reopenCardInformation(){let e=document.getElementById("cardInformationModal");null!==e&&(e=new i.u_(e),e.show()),setTimeout((()=>{const e=document.getElementsByClassName("modal-backdrop fade show");e.length>1&&e[0].remove()}),200)}}}}}]); \ No newline at end of file diff --git a/NearBeach/static/NearBeach/8413.min.js.gz b/NearBeach/static/NearBeach/8413.min.js.gz new file mode 100644 index 000000000..2e09f2502 Binary files /dev/null and b/NearBeach/static/NearBeach/8413.min.js.gz differ diff --git a/NearBeach/static/NearBeach/9906.min.js b/NearBeach/static/NearBeach/9906.min.js new file mode 100644 index 000000000..80283d406 --- /dev/null +++ b/NearBeach/static/NearBeach/9906.min.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunknearbeach=self.webpackChunknearbeach||[]).push([[9906],{7110:(e,t,i)=>{i.d(t,{Z:()=>D});var o=i(6252),s=i(3577);const a=(0,o._)("h2",null,"Public Links",-1),n=(0,o._)("p",{class:"text-instructions"}," The following will be public links you can send to clients. The links will contain certain information of the current object. i.e. it's status and description. Becareful who you send the links too! ",-1),l={key:0,class:"alert alert-info"},d={key:1,class:"alert alert-info"},r={key:2,class:"table table-striped"},c=(0,o._)("td",null,"Public Link",-1),u=(0,o._)("td",{style:{"text-align":"center",width:"100px"}},"Is Active",-1),h={key:0,style:{width:"10px"}},b=["onClick"],p={style:{"text-align":"center"}},g=["checked","data-public-link-id"],m={key:0},_={class:"remove-link"},k={key:3,class:"row submit-row"},y={class:"col-md-12"};var f=i(989),v=i(6542),w=i(5808);const $={name:"ListPublicLinks",props:{isReadOnly:{type:Boolean,default:!1},overrideDestination:{type:String,default:""},overrideLocationId:{type:Number,default:0}},data:()=>({isFetchingData:!0,publicLinkResults:[]}),watch:{overrideLocationId(){this.getPublicLinks()}},components:{Icon:v.JO},computed:{...(0,f.Se)({destination:"getDestination",locationId:"getLocationId",rootUrl:"getRootUrl",userLevel:"getUserLevel"})},mixins:[w.Z],methods:{async copyPublicLink(e){const t=`${window.location.origin}${this.rootUrl}public/${this.getDestination()}/${this.getLocationId()}/${e}/`;try{await navigator.clipboard.writeText(t),this.$store.dispatch("newToast",{header:"Public Link Copied",message:"Public Link has successfully copied to the clipboard",extra_classes:"bg-success"})}catch(e){this.$store.dispatch("newToast",{header:"Can not copy public link",message:"Sorry, we failed to copy the public link",extra_classes:"bg-danger",delay:0})}},createPublicLink(){this.$store.dispatch("newToast",{header:"Creating New Toast",message:"Please wait whilst we create the toast",extra_classes:"bg-warning text-dark",delay:0,unique_type:"create_public_link"}),this.axios.post(`${this.rootUrl}public_data/${this.getDestination()}/${this.getLocationId()}/create/`).then((e=>{this.$store.dispatch("newToast",{header:"Successful new Public Link",message:"We have been able to create a new public link",extra_classes:"bg-success",unique_type:"create_public_link"}),this.publicLinkResults=e.data})).catch((e=>{this.$store.dispatch("newToast",{header:"Can not create new public link",message:`Sorry, we failed to create the new public link. Error -> ${e}`,extra_classes:"bg-danger",delay:0,unique_type:"create_public_link"})}))},deletePublicLink(e){const t=new FormData;t.set("public_link_id",e),this.$store.dispatch("newToast",{header:"Deleting Public Link",message:"Deleting Public Link",extra_classes:"bg-warning text-dark",delay:0,unique_type:"public_link_delete"}),this.axios.post(`${this.rootUrl}public_data/${this.getDestination()}/${this.getLocationId()}/delete/`,t).then((()=>{this.publicLinkResults=this.publicLinkResults.filter((t=>t.public_link_id!==e)),this.$store.dispatch("newToast",{header:"Successfully Deleted Public Link",message:"Successfully Deleted Public Link",extra_classes:"bg-success",unique_type:"public_link_delete"})})).catch((e=>{this.$store.dispatch("newToast",{header:"Error Deleting Public Link",message:`Error - could not delete link. Error -> ${e}`,extra_classes:"bg-danger",delay:0,unique_type:"public_link_delete"})}))},formatUrl(e){if(""===e||void 0===e)return"Data error!";const t=e.slice(0,7);return`${window.location.origin}${this.rootUrl}public/${this.getDestination()}/${this.getLocationId()}/${t}...`},getDestination(){return""!==this.overrideDestination?this.overrideDestination:this.destination},getLocationId(){return""!==this.overrideDestination?this.overrideLocationId:this.locationId},getPublicLinks(){0!==this.getLocationId()&&this.axios(`${this.rootUrl}public_data/${this.getDestination()}/${this.getLocationId()}/get_links/`).then((e=>{this.publicLinkResults=e.data,this.isFetchingData=!1})).catch((e=>{this.$store.dispatch("newToast",{header:"Error fetching Public Links",message:`We had an issue fetching the public links for this object. Error -> ${e}`,extra_classes:"bg-danger",delay:0})}))},updateIsActive(e){const t=e.target.dataset.publicLinkId;this.$store.dispatch("newToast",{header:"Updating Active Status for Private Link",message:"Please wait - we are updating the status",extra_classes:"bg-warning text-dark",delay:0,unique_type:`is_active-${t}`});let i="False";e.target.checked&&(i="True");const o=new FormData;o.set("public_link_id",t),o.set("public_link_is_active",i),this.axios.post(`${this.rootUrl}public_data/${this.destination}/${this.locationId}/update_link/`,o).then((()=>{this.$store.dispatch("newToast",{header:"Successfully Updated",message:"We have updated the is active status for the link",extra_classes:"bg-success",unique_type:`is_active-${t}`})})).catch((e=>{this.$store.dispatch("newToast",{header:"Error Updating Active Status for Private Link",message:`We are sorry, something went wrong. Error -> ${e}`,extra_classes:"bg-danger",delay:0,unique_type:`is_active-${t}`})}))}},mounted(){this.$nextTick((()=>{this.getPublicLinks()}))}},D=(0,i(3744).Z)($,[["render",function(e,t,i,f,v,w){const $=(0,o.up)("Icon");return(0,o.wg)(),(0,o.iD)(o.HY,null,[a,n,v.isFetchingData?((0,o.wg)(),(0,o.iD)("div",l,"Currently loading data...")):(0,o.kq)("v-if",!0),!1===v.isFetchingData&&0===v.publicLinkResults.length?((0,o.wg)(),(0,o.iD)("div",d," Sorry. There are no public links setup for this object. ")):((0,o.wg)(),(0,o.iD)("table",r,[(0,o._)("thead",null,[(0,o._)("tr",null,[c,u,e.userLevel>1?((0,o.wg)(),(0,o.iD)("td",h)):(0,o.kq)("v-if",!0)])]),(0,o._)("tbody",null,[((0,o.wg)(!0),(0,o.iD)(o.HY,null,(0,o.Ko)(v.publicLinkResults,(i=>((0,o.wg)(),(0,o.iD)("tr",{key:i.public_link_id},[(0,o._)("td",null,[(0,o._)("button",{type:"button",class:"btn btn-link",onClick:e=>w.copyPublicLink(i.public_link_id)},(0,s.toDisplayString)(w.formatUrl(i.public_link_id)),9,b)]),(0,o._)("td",p,[(0,o._)("input",{class:"form-check-input",type:"checkbox",checked:i.public_link_is_active,"data-public-link-id":i.public_link_id,onChange:t[0]||(t[0]=(...e)=>w.updateIsActive&&w.updateIsActive(...e))},null,40,g)]),e.userLevel>1?((0,o.wg)(),(0,o.iD)("td",m,[(0,o._)("span",_,[(0,o.Wm)($,{icon:e.icons.trashCan,onClick:e=>w.deletePublicLink(i.public_link_id)},null,8,["icon","onClick"])])])):(0,o.kq)("v-if",!0)])))),128))])])),!1===i.isReadOnly&&e.userLevel>1?((0,o.wg)(),(0,o.iD)("div",k,[(0,o._)("div",y,[(0,o._)("button",{class:"btn btn-primary save-changes",onClick:t[1]||(t[1]=(...e)=>w.createPublicLink&&w.createPublicLink(...e))}," Create Public Link ")])])):(0,o.kq)("v-if",!0)],64)}]])},6505:(e,t,i)=>{i.d(t,{Z:()=>h});var o=i(6252);const s={class:"modal fade",id:"confirmFolderDeleteModal",tabindex:"-1","data-bs-backdrop":"static","data-bs-keyboard":"false","aria-labelledby":"confirmFolderDelete","aria-hidden":"true"},a={class:"modal-dialog"},n={class:"modal-content"},l=(0,o._)("div",{class:"modal-header"},[(0,o._)("h5",{class:"modal-title",id:"confirmFolderDelete"}," Please confirm Folder Deletion "),(0,o.kq)(" TASK INFORMATION "),(0,o._)("button",{type:"button",class:"btn-close","data-bs-dismiss":"modal","aria-label":"Close",id:"confirmFolderDeleteButton"})],-1),d=(0,o._)("div",{class:"modal-body"}," Are you sure you want to delete the folder? All files under this folder will be deleted also. ",-1),r={class:"modal-footer"};var c=i(989);i(3138);const u={name:"ConfirmFolderDelete",mixins:[i(1295).Z],computed:{...(0,c.Se)({destination:"getDestination",folderRemoveId:"getFolderRemoveId",locationId:"getLocationId",rootUrl:"getRootUrl"})},methods:{deleteFolder(){if(""===this.folderRemoveId)return;const e=this.folderRemoveId,t=new FormData;t.set("folder_id",this.folderRemoveId),this.axios.post(`${this.rootUrl}documentation/${this.destination}/${this.locationId}/remove_folder/`,t).then((()=>{this.$store.dispatch("removeFolder",{folder_id:e}),this.closeModal()})).catch((e=>{this.$store.dispatch("newToast",{header:"Error removing folder",message:`We could not remove your folder. Error - ${e}`,extra_classes:"bg-danger",delay:0})})),this.closeModal()},closeModal(){this.$store.commit({type:"updateFolderRemoveId",documentRemoveKey:""}),document.getElementById("confirmFolderDeleteButton").click(),this.reopenCardInformation()}}},h=(0,i(3744).Z)(u,[["render",function(e,t,i,c,u,h){return(0,o.wg)(),(0,o.iD)("div",s,[(0,o._)("div",a,[(0,o._)("div",n,[l,d,(0,o._)("div",r,[(0,o._)("button",{type:"button",class:"btn btn-secondary",onClick:t[0]||(t[0]=(...e)=>h.closeModal&&h.closeModal(...e))}," No "),(0,o._)("button",{type:"button",class:"btn btn-primary",onClick:t[1]||(t[1]=(...e)=>h.deleteFolder&&h.deleteFolder(...e))}," Yes ")])])])])}]])},9159:(e,t,i)=>{i.d(t,{Z:()=>b});var o=i(6252);const s={class:"modal fade",id:"confirmNoteDeleteModal",tabindex:"-1","data-bs-backdrop":"static","data-bs-keyboard":"false","aria-labelledby":"confirmLinkDelete","aria-hidden":"true"},a={class:"modal-dialog"},n={class:"modal-content"},l=(0,o._)("div",{class:"modal-header"},[(0,o._)("h5",{class:"modal-title",id:"confirmNoteDelete"}," Please confirm Note Deletion "),(0,o._)("button",{type:"button",class:"btn-close","data-bs-dismiss":"modal","aria-label":"Close",id:"confirmNoteDeleteButton"})],-1),d=(0,o._)("div",{class:"modal-body"}," Are you sure you want to delete the note? ",-1),r={class:"modal-footer"};var c=i(989),u=(i(3138),i(1295));const h={name:"ConfirmNoteDelete",props:{},computed:{...(0,c.Se)({destination:"getDestination",noteId:"getSingleNoteId",rootUrl:"getRootUrl"})},mixins:[u.Z],methods:{deleteNote(){this.$store.dispatch("newToast",{header:"Deleting Note",message:"Currently deleting note",extra_classes:"bg-warning text-dark",delay:0,unique_type:"delete_note"});let e=`${this.rootUrl}note/delete/${this.noteId}/`;this.destination&&(e=`${this.rootUrl}note/organisation/delete/${this.noteId}/`),this.axios.post(e).then((()=>{this.$store.dispatch("newToast",{header:"Note is deleted",message:"Successfully Deleted Note",extra_classes:"bg-success",unique_type:"delete_note"}),this.$store.commit({type:"removeNote",noteId:this.noteId}),this.closeModal(),this.reopenCardInformation()})).catch((e=>{this.$store.dispatch("newToast",{header:"Failed to Delete Note",message:`Sorry, we failed to delete the note. Error -> ${e}`,extra_classes:"bg-danger",delay:0,unique_type:"delete_note"})}))},closeModal(){document.getElementById("confirmNoteDeleteButton").click(),this.reopenCardInformation()}}},b=(0,i(3744).Z)(h,[["render",function(e,t,i,c,u,h){return(0,o.wg)(),(0,o.iD)("div",s,[(0,o._)("div",a,[(0,o._)("div",n,[l,d,(0,o._)("div",r,[(0,o._)("button",{type:"button",class:"btn btn-secondary",onClick:t[0]||(t[0]=(...e)=>h.closeModal&&h.closeModal(...e))}," No "),(0,o._)("button",{type:"button",class:"btn btn-primary",onClick:t[1]||(t[1]=(...e)=>h.deleteNote&&h.deleteNote(...e))}," Yes ")])])])])}]])},8576:(e,t,i)=>{i.d(t,{Z:()=>y});var o=i(6252);const s={class:"modal fade",id:"editNoteModal",tabindex:"-1",role:"dialog","aria-labelledby":"exampleModalLabel","aria-hidden":"true"},a={class:"modal-dialog modal-lg",role:"document"},n={class:"modal-content"},l={class:"modal-header"},d=(0,o._)("button",{type:"button",class:"btn-close","data-bs-dismiss":"modal","aria-label":"Close",id:"editNoteCloseButton"},[(0,o._)("span",{"aria-hidden":"true"})],-1),r={class:"modal-body"},c=(0,o._)("p",{class:"text-instructions"},' Use the text editor to edit your note. Click on the "Update" button to submit the changes. ',-1),u={class:"modal-footer"},h=["disabled"];var b=i(5808),p=i(1295),g=i(6542),m=i(7267),_=i(989);i(3138);const k={name:"EditHistoryNoteWizard",components:{editor:m.Z,Icon:g.JO},mixins:[b.Z,p.Z],data:()=>({noteModel:""}),computed:{...(0,_.Se)({description:"getSingleNoteDescription",destination:"getDestination",contentCss:"getContentCss",noteDescription:"getSingleNoteDescription",noteId:"getSingleNoteId",rootUrl:"getRootUrl",skin:"getSkin"})},watch:{noteDescription(){this.noteModel=this.noteDescription}},methods:{closeModal(){document.getElementById("editNoteCloseButton").click(),this.reopenCardInformation()},updateNote(){const e=new FormData;e.set("object_note_id",`${this.noteId}`),e.set("object_note",this.noteModel),this.$store.dispatch("newToast",{header:"Updating Note",message:"Please wait - updating your note",extra_classes:"bg-warning text-dark",delay:0,unique_type:"save_note"});let t=`${this.rootUrl}note/update/${this.noteId}/`;"organisation"===this.destination&&(t=`${this.rootUrl}note/organisation/update/${this.noteId}/`),this.axios.post(t,e).then((()=>{this.$store.dispatch("newToast",{header:"Updated Note",message:"The note updated successfully.",extra_classes:"bg-success",unique_type:"save_note"}),this.$store.dispatch({type:"editSingleNote",noteId:this.noteId,noteDescription:this.noteModel}),document.getElementById("editNoteCloseButton").click(),this.reopenCardInformation()})).catch((e=>{this.$store.dispatch("newToast",{header:"Failed Updating Note",message:`Failed to update note - Error -> ${e}`,extra_classes:"bg-danger",delay:0,unique_type:"save_note"})}))}}},y=(0,i(3744).Z)(k,[["render",function(e,t,i,b,p,g){const m=(0,o.up)("Icon"),_=(0,o.up)("editor");return(0,o.wg)(),(0,o.iD)(o.HY,null,[(0,o.kq)(" EDIT HISTORY NOTE "),(0,o._)("div",s,[(0,o._)("div",a,[(0,o._)("div",n,[(0,o._)("div",l,[(0,o._)("h2",null,[(0,o.Wm)(m,{icon:e.icons.noteAdd},null,8,["icon"]),(0,o.Uk)(" Edit Note ")]),d]),(0,o._)("div",r,[c,(0,o.Wm)(_,{init:{height:300,menubar:!1,plugins:["lists","codesample","table"],toolbar:"undo redo | blocks | bold italic strikethrough underline backcolor | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | removeformat | table image codesample",skin:`${this.skin}`,content_css:`${this.contentCss}`},modelValue:p.noteModel,"onUpdate:modelValue":t[0]||(t[0]=e=>p.noteModel=e)},null,8,["init","modelValue"])]),(0,o._)("div",u,[(0,o._)("button",{type:"button",class:"btn btn-primary",disabled:""==p.noteModel,onClick:t[1]||(t[1]=(...e)=>g.updateNote&&g.updateNote(...e))}," Update Note ",8,h),(0,o._)("button",{type:"button",class:"btn btn-secondary",onClick:t[2]||(t[2]=(...e)=>g.closeModal&&g.closeModal(...e))}," Close ")])])])])],2112)}]])}}]); \ No newline at end of file diff --git a/NearBeach/static/NearBeach/9906.min.js.gz b/NearBeach/static/NearBeach/9906.min.js.gz new file mode 100644 index 000000000..b205d4f8f Binary files /dev/null and b/NearBeach/static/NearBeach/9906.min.js.gz differ diff --git a/NearBeach/static/NearBeach/NearBeach.min.js b/NearBeach/static/NearBeach/NearBeach.min.js index 3a64b7595..6e371c6d2 100644 --- a/NearBeach/static/NearBeach/NearBeach.min.js +++ b/NearBeach/static/NearBeach/NearBeach.min.js @@ -1,2 +1,2 @@ /*! For license information please see NearBeach.min.js.LICENSE.txt */ -(()=>{"use strict";var t,e,r={6795:(t,e,r)=>{r.d(e,{A:()=>o});const o=function(t){for(var e,r=0,o=0,n=t.length;n>=4;++o,n-=4)e=1540483477*(65535&(e=255&t.charCodeAt(o)|(255&t.charCodeAt(++o))<<8|(255&t.charCodeAt(++o))<<16|(255&t.charCodeAt(++o))<<24))+(59797*(e>>>16)<<16),r=1540483477*(65535&(e^=e>>>24))+(59797*(e>>>16)<<16)^1540483477*(65535&r)+(59797*(r>>>16)<<16);switch(n){case 3:r^=(255&t.charCodeAt(o+2))<<16;case 2:r^=(255&t.charCodeAt(o+1))<<8;case 1:r=1540483477*(65535&(r^=255&t.charCodeAt(o)))+(59797*(r>>>16)<<16)}return(((r=1540483477*(65535&(r^=r>>>13))+(59797*(r>>>16)<<16))^r>>>15)>>>0).toString(36)}},8764:(t,e,r)=>{r.r(e),r.d(e,{BASE_TRANSITION:()=>l,BindingTypes:()=>wo,CAMELIZE:()=>R,CAPITALIZE:()=>L,CREATE_BLOCK:()=>d,CREATE_COMMENT:()=>u,CREATE_ELEMENT_BLOCK:()=>p,CREATE_ELEMENT_VNODE:()=>b,CREATE_SLOTS:()=>E,CREATE_STATIC:()=>g,CREATE_TEXT:()=>f,CREATE_VNODE:()=>m,CompilerDeprecationTypes:()=>Et,ConstantTypes:()=>W,DOMDirectiveTransforms:()=>qo,DOMErrorCodes:()=>Fo,DOMErrorMessages:()=>zo,DOMNodeTransforms:()=>Xo,ElementTypes:()=>q,ErrorCodes:()=>Lt,FRAGMENT:()=>n,GUARD_REACTIVE_PROPS:()=>N,IS_MEMO_SAME:()=>$,IS_REF:()=>B,KEEP_ALIVE:()=>s,MERGE_PROPS:()=>A,NORMALIZE_CLASS:()=>T,NORMALIZE_PROPS:()=>O,NORMALIZE_STYLE:()=>C,Namespaces:()=>G,NodeTypes:()=>X,OPEN_BLOCK:()=>c,POP_SCOPE_ID:()=>D,PUSH_SCOPE_ID:()=>M,RENDER_LIST:()=>_,RENDER_SLOT:()=>k,RESOLVE_COMPONENT:()=>h,RESOLVE_DIRECTIVE:()=>x,RESOLVE_DYNAMIC_COMPONENT:()=>v,RESOLVE_FILTER:()=>y,SET_BLOCK_TRACKING:()=>j,SUSPENSE:()=>a,TELEPORT:()=>i,TO_DISPLAY_STRING:()=>S,TO_HANDLERS:()=>I,TO_HANDLER_KEY:()=>P,TRANSITION:()=>Io,TRANSITION_GROUP:()=>Ro,TS_NODE_TYPES:()=>Gt,UNREF:()=>z,V_MODEL_CHECKBOX:()=>Eo,V_MODEL_DYNAMIC:()=>To,V_MODEL_RADIO:()=>ko,V_MODEL_SELECT:()=>Ao,V_MODEL_TEXT:()=>So,V_ON_WITH_KEYS:()=>Oo,V_ON_WITH_MODIFIERS:()=>Co,V_SHOW:()=>No,WITH_CTX:()=>F,WITH_DIRECTIVES:()=>w,WITH_MEMO:()=>U,advancePositionWithClone:()=>oe,advancePositionWithMutation:()=>ne,assert:()=>ie,baseCompile:()=>yo,baseParse:()=>rr,buildDirectiveArgs:()=>Qr,buildProps:()=>Kr,buildSlots:()=>$r,checkCompatEnabled:()=>Ct,compile:()=>Wo,convertToBlock:()=>gt,createArrayExpression:()=>Q,createAssignmentExpression:()=>pt,createBlockStatement:()=>lt,createCacheExpression:()=>st,createCallExpression:()=>nt,createCompilerError:()=>Rt,createCompoundExpression:()=>ot,createConditionalExpression:()=>at,createDOMCompilerError:()=>Do,createForLoopParams:()=>Dr,createFunctionExpression:()=>it,createIfStatement:()=>dt,createInterpolation:()=>rt,createObjectExpression:()=>Z,createObjectProperty:()=>tt,createReturnStatement:()=>bt,createRoot:()=>Y,createSequenceExpression:()=>mt,createSimpleExpression:()=>et,createStructuralDirectiveTransform:()=>fr,createTemplateLiteral:()=>ct,createTransformContext:()=>mr,createVNodeCall:()=>J,errorMessages:()=>Pt,extractIdentifiers:()=>Ut,findDir:()=>ae,findProp:()=>se,forAliasRE:()=>we,generate:()=>vr,generateCodeFrame:()=>o.generateCodeFrame,getBaseTransformPreset:()=>xo,getConstantType:()=>ar,getMemoedVNodeCall:()=>ye,getVNodeBlockHelper:()=>ft,getVNodeHelper:()=>ut,hasDynamicKeyVBind:()=>ce,hasScopeRef:()=>xe,helperNameMap:()=>V,injectProp:()=>ge,isCoreComponent:()=>Wt,isFunctionType:()=>$t,isInDestructureAssignment:()=>Dt,isInNewExpression:()=>Ft,isMemberExpression:()=>re,isMemberExpressionBrowser:()=>te,isMemberExpressionNode:()=>ee,isReferencedIdentifier:()=>Mt,isSimpleIdentifier:()=>Yt,isSlotOutlet:()=>be,isStaticArgOf:()=>le,isStaticExp:()=>qt,isStaticProperty:()=>Vt,isStaticPropertyKey:()=>Ht,isTemplateNode:()=>me,isText:()=>de,isVSlot:()=>pe,locStub:()=>K,noopDirectiveTransform:()=>_o,parse:()=>Ko,parserOptions:()=>Po,processExpression:()=>Tr,processFor:()=>jr,processIf:()=>Nr,processSlotOutlet:()=>eo,registerRuntimeHelpers:()=>H,resolveComponentType:()=>Wr,stringifyExpression:()=>Cr,toValidAssetId:()=>ve,trackSlotScopes:()=>zr,trackVForSlotScopes:()=>Br,transform:()=>br,transformBind:()=>no,transformElement:()=>qr,transformExpression:()=>Ar,transformModel:()=>co,transformOn:()=>oo,transformStyle:()=>jo,traverseNode:()=>ur,unwrapTSNode:()=>Xt,walkBlockDeclarations:()=>Bt,walkFunctionParams:()=>zt,walkIdentifiers:()=>jt,warnDeprecation:()=>Ot});var o=r(33);const n=Symbol(""),i=Symbol(""),a=Symbol(""),s=Symbol(""),l=Symbol(""),c=Symbol(""),d=Symbol(""),p=Symbol(""),m=Symbol(""),b=Symbol(""),u=Symbol(""),f=Symbol(""),g=Symbol(""),h=Symbol(""),v=Symbol(""),x=Symbol(""),y=Symbol(""),w=Symbol(""),_=Symbol(""),k=Symbol(""),E=Symbol(""),S=Symbol(""),A=Symbol(""),T=Symbol(""),C=Symbol(""),O=Symbol(""),N=Symbol(""),I=Symbol(""),R=Symbol(""),L=Symbol(""),P=Symbol(""),j=Symbol(""),M=Symbol(""),D=Symbol(""),F=Symbol(""),z=Symbol(""),B=Symbol(""),U=Symbol(""),$=Symbol(""),V={[n]:"Fragment",[i]:"Teleport",[a]:"Suspense",[s]:"KeepAlive",[l]:"BaseTransition",[c]:"openBlock",[d]:"createBlock",[p]:"createElementBlock",[m]:"createVNode",[b]:"createElementVNode",[u]:"createCommentVNode",[f]:"createTextVNode",[g]:"createStaticVNode",[h]:"resolveComponent",[v]:"resolveDynamicComponent",[x]:"resolveDirective",[y]:"resolveFilter",[w]:"withDirectives",[_]:"renderList",[k]:"renderSlot",[E]:"createSlots",[S]:"toDisplayString",[A]:"mergeProps",[T]:"normalizeClass",[C]:"normalizeStyle",[O]:"normalizeProps",[N]:"guardReactiveProps",[I]:"toHandlers",[R]:"camelize",[L]:"capitalize",[P]:"toHandlerKey",[j]:"setBlockTracking",[M]:"pushScopeId",[D]:"popScopeId",[F]:"withCtx",[z]:"unref",[B]:"isRef",[U]:"withMemo",[$]:"isMemoSame"};function H(t){Object.getOwnPropertySymbols(t).forEach((e=>{V[e]=t[e]}))}const G={HTML:0,0:"HTML",SVG:1,1:"SVG",MATH_ML:2,2:"MATH_ML"},X={ROOT:0,0:"ROOT",ELEMENT:1,1:"ELEMENT",TEXT:2,2:"TEXT",COMMENT:3,3:"COMMENT",SIMPLE_EXPRESSION:4,4:"SIMPLE_EXPRESSION",INTERPOLATION:5,5:"INTERPOLATION",ATTRIBUTE:6,6:"ATTRIBUTE",DIRECTIVE:7,7:"DIRECTIVE",COMPOUND_EXPRESSION:8,8:"COMPOUND_EXPRESSION",IF:9,9:"IF",IF_BRANCH:10,10:"IF_BRANCH",FOR:11,11:"FOR",TEXT_CALL:12,12:"TEXT_CALL",VNODE_CALL:13,13:"VNODE_CALL",JS_CALL_EXPRESSION:14,14:"JS_CALL_EXPRESSION",JS_OBJECT_EXPRESSION:15,15:"JS_OBJECT_EXPRESSION",JS_PROPERTY:16,16:"JS_PROPERTY",JS_ARRAY_EXPRESSION:17,17:"JS_ARRAY_EXPRESSION",JS_FUNCTION_EXPRESSION:18,18:"JS_FUNCTION_EXPRESSION",JS_CONDITIONAL_EXPRESSION:19,19:"JS_CONDITIONAL_EXPRESSION",JS_CACHE_EXPRESSION:20,20:"JS_CACHE_EXPRESSION",JS_BLOCK_STATEMENT:21,21:"JS_BLOCK_STATEMENT",JS_TEMPLATE_LITERAL:22,22:"JS_TEMPLATE_LITERAL",JS_IF_STATEMENT:23,23:"JS_IF_STATEMENT",JS_ASSIGNMENT_EXPRESSION:24,24:"JS_ASSIGNMENT_EXPRESSION",JS_SEQUENCE_EXPRESSION:25,25:"JS_SEQUENCE_EXPRESSION",JS_RETURN_STATEMENT:26,26:"JS_RETURN_STATEMENT"},q={ELEMENT:0,0:"ELEMENT",COMPONENT:1,1:"COMPONENT",SLOT:2,2:"SLOT",TEMPLATE:3,3:"TEMPLATE"},W={NOT_CONSTANT:0,0:"NOT_CONSTANT",CAN_SKIP_PATCH:1,1:"CAN_SKIP_PATCH",CAN_HOIST:2,2:"CAN_HOIST",CAN_STRINGIFY:3,3:"CAN_STRINGIFY"},K={start:{line:1,column:1,offset:0},end:{line:1,column:1,offset:0},source:""};function Y(t,e=""){return{type:0,source:e,children:t,helpers:new Set,components:[],directives:[],hoists:[],imports:[],cached:0,temps:0,codegenNode:void 0,loc:K}}function J(t,e,r,o,n,i,a,s=!1,l=!1,d=!1,p=K){return t&&(s?(t.helper(c),t.helper(ft(t.inSSR,d))):t.helper(ut(t.inSSR,d)),a&&t.helper(w)),{type:13,tag:e,props:r,children:o,patchFlag:n,dynamicProps:i,directives:a,isBlock:s,disableTracking:l,isComponent:d,loc:p}}function Q(t,e=K){return{type:17,loc:e,elements:t}}function Z(t,e=K){return{type:15,loc:e,properties:t}}function tt(t,e){return{type:16,loc:K,key:(0,o.isString)(t)?et(t,!0):t,value:e}}function et(t,e=!1,r=K,o=0){return{type:4,loc:r,content:t,isStatic:e,constType:e?3:o}}function rt(t,e){return{type:5,loc:e,content:(0,o.isString)(t)?et(t,!1,e):t}}function ot(t,e=K){return{type:8,loc:e,children:t}}function nt(t,e=[],r=K){return{type:14,loc:r,callee:t,arguments:e}}function it(t,e=void 0,r=!1,o=!1,n=K){return{type:18,params:t,returns:e,newline:r,isSlot:o,loc:n}}function at(t,e,r,o=!0){return{type:19,test:t,consequent:e,alternate:r,newline:o,loc:K}}function st(t,e,r=!1){return{type:20,index:t,value:e,isVNode:r,loc:K}}function lt(t){return{type:21,body:t,loc:K}}function ct(t){return{type:22,elements:t,loc:K}}function dt(t,e,r){return{type:23,test:t,consequent:e,alternate:r,loc:K}}function pt(t,e){return{type:24,left:t,right:e,loc:K}}function mt(t){return{type:25,expressions:t,loc:K}}function bt(t){return{type:26,returns:t,loc:K}}function ut(t,e){return t||e?m:b}function ft(t,e){return t||e?d:p}function gt(t,{helper:e,removeHelper:r,inSSR:o}){t.isBlock||(t.isBlock=!0,r(ut(o,t.isComponent)),e(c),e(ft(o,t.isComponent)))}const ht=new Uint8Array([123,123]),vt=new Uint8Array([125,125]);function xt(t){return t>=97&&t<=122||t>=65&&t<=90}function yt(t){return 32===t||10===t||9===t||12===t||13===t}function wt(t){return 47===t||62===t||yt(t)}function _t(t){const e=new Uint8Array(t.length);for(let r=0;r`.sync modifier for v-bind has been removed. Use v-model with argument instead. \`v-bind:${t}.sync\` should be changed to \`v-model:${t}\`.`,link:"https://v3-migration.vuejs.org/breaking-changes/v-model.html"},COMPILER_V_BIND_OBJECT_ORDER:{message:'v-bind="obj" usage is now order sensitive and behaves like JavaScript object spread: it will now overwrite an existing non-mergeable attribute that appears before v-bind in the case of conflict. To retain 2.x behavior, move v-bind to make it the first attribute. You can also suppress this warning if the usage is intended.',link:"https://v3-migration.vuejs.org/breaking-changes/v-bind.html"},COMPILER_V_ON_NATIVE:{message:".native modifier for v-on has been removed as is no longer necessary.",link:"https://v3-migration.vuejs.org/breaking-changes/v-on-native-modifier-removed.html"},COMPILER_V_IF_V_FOR_PRECEDENCE:{message:"v-if / v-for precedence when used on the same element has changed in Vue 3: v-if now takes higher precedence and will no longer have access to v-for scope variables. It is best to avoid the ambiguity with