![]() Server : Apache System : Linux server2.corals.io 4.18.0-348.2.1.el8_5.x86_64 #1 SMP Mon Nov 15 09:17:08 EST 2021 x86_64 User : corals ( 1002) PHP Version : 7.4.33 Disable Function : exec,passthru,shell_exec,system Directory : /home/corals/ts.corals.io/frontend/dist/_nuxt/ |
(window.webpackJsonp=window.webpackJsonp||[]).push([[23,3],{295:function(t,e,o){"use strict";o.r(e);var r=o(55),n=(o(33),o(47),o(44),o(18),o(116),{name:"CoralsSelect",props:{form:{type:Object,required:!0},label:{type:[String,Boolean],default:"",required:!1},type:{type:String,default:"text"},field:{type:String,required:!0},options:{required:!0},required:{type:Boolean,default:!1}},computed:{getOptions:function(){var t=[];for(var e in this.options)"object"==Object(r.a)(this.options[e])&&this.options[e].hasOwnProperty("label")||Array.isArray(this.options)?t.push(this.options[e]):t.push({value:e,label:this.options[e]});return t},labelValue:function(){if(!1===this.label)return"";if(this.label)return this.label;var label=this.field.replace("_"," ");return label.charAt(0).toUpperCase()+label.slice(1)},idValue:function(){return this.$attrs.id?this.$attrs.id:this.field},fieldDescription:function(){return this.$attrs.description||""},isMultiple:function(){return!!this.$attrs.multiple}}}),l=(o(729),o(88)),component=Object(l.a)(n,(function(){var t=this,e=t.$createElement,o=t._self._c||e;return o("b-form-group",{attrs:{"invalid-feedback":t.form.error(t.field),label:t.labelValue,"label-for":t.idValue,"label-class":{"required-field":t.required},description:t.fieldDescription,state:t.form.state(t.field)}},[o("v-select",t._b({attrs:{id:t.idValue,options:t.getOptions,reduce:function(t){return t.value},placeholder:"Select "+t.labelValue,selectable:function(option){return!option.hasOwnProperty("notSelectable")}},on:{input:function(e){return t.$emit("input",e)}},scopedSlots:t._u([{key:"selected-option",fn:function(e){var label=e.label,r=e.group_label;return[o("div",{staticClass:"selected-option"},[o("div",{staticClass:"selected-option-group"},[r?o("span",{staticClass:"selected-group",class:t.isMultiple?"multi":""},[t._v("\n "+t._s(r)+"\n ")]):t._e(),t._v(" "),o("span",{class:{"has-group":r}},[t._v("\n "+t._s(label)+"\n ")])])])]}},{key:"option",fn:function(e){e.group;var label=e.label,r=e.is_group_empty,n=e.notSelectable,l=e.empty_group_message;return[o("div",{class:{"font-weight-bold text-dark":n}},[t._v("\n "+t._s(label)+"\n ")]),t._v(" "),r?o("div",[t._v("\n "+t._s(l)+"\n ")]):t._e()]}}]),model:{value:t.form[t.field],callback:function(e){t.$set(t.form,t.field,e)},expression:"form[field]"}},"v-select",t.$attrs,!1))],1)}),[],!1,null,null,null);e.default=component.exports},719:function(t,e,o){"use strict";var r={name:"COverlay",props:{show:{default:!1,type:Boolean}}},n=o(88),component=Object(n.a)(r,(function(){var t=this,e=t.$createElement;return(t._self._c||e)("b-overlay",{attrs:{show:t.show,rounded:"sm","spinner-variant":"primary",variant:"transparent",blur:"1px"}},[t._t("default")],2)}),[],!1,null,"5a577948",null);e.a=component.exports},720:function(t,e,o){var content=o(725);content.__esModule&&(content=content.default),"string"==typeof content&&(content=[[t.i,content,""]]),content.locals&&(t.exports=content.locals);(0,o(95).default)("7c8b2224",content,!0,{sourceMap:!1})},722:function(t,e,o){"use strict";o(33),o(47),o(41),o(19),o(18),o(14),o(12),o(20),o(15),o(21);var r=o(2);o(39);function n(object,t){var e=Object.keys(object);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(object);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(object,t).enumerable}))),e.push.apply(e,o)}return e}function l(t){for(var i=1;i<arguments.length;i++){var source=null!=arguments[i]?arguments[i]:{};i%2?n(Object(source),!0).forEach((function(e){Object(r.a)(t,e,source[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(source)):n(Object(source)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(source,e))}))}return t}var c={data:function(){var t=this;return{formModalId:"",deleteRecordId:null,editRecordId:null,cloneRecordId:null,showRecordId:null,listFilters:null,filterBy:[],defaultOptions:{hideCreate:!1,headings:{},columnsDropdown:!1,initialPage:1,perPageValues:[],perPage:25,debounce:1e3,filterByColumn:!0,responseAdapter:function(t){var data=t.data;return{data:data.data,count:data.meta.pagination.total}},requestAdapter:function(data){return t.$router.replace({query:l(l({},t.$route.query),{},{page:data.page})}).catch((function(){})),data.query=Object.assign(data.query,t.filterBy),data},sortIcon:{base:"ts-ico",up:"ts-up",down:"ts-down",is:"ts-sort"},sortable:[],filterable:[],customColumns:[],requestKeys:{query:"query",limit:"limit",orderBy:"orderBy",ascending:"ascending",page:"page",byColumn:"byColumn"},initFilters:{},templates:{},listColumns:{}},listTableRefs:"listTable"}},beforeMount:function(){var t=this.$route.query;this.defaultOptions.initialPage=t.page?parseInt(t.page):1},mounted:function(){this.formModalId="".concat(this.resourceURL,"Table")},computed:{deleteURL:function(){return this.deleteHref||this.resourceURL},editURL:function(){return this.editHref||this.resourceURL},cloneURL:function(){return this.cloneHref||this.resourceURL}},methods:{onSubmit:function(){var t=this;this.editRecordId?this.form.put("".concat(this.editURL,"/").concat(this.editRecordId)).then((function(e){t.handleFormHidden(),t.$emit("formUpdated",e.data)})):this.form.post("".concat(this.resourceURL)).then((function(e){t.handleFormHidden(),t.$emit("formStored",e.data)}))},tableOptions:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=this.defaultOptions;return Object.assign(e,t)},showDeleteModal:function(t,e){var o=this;this.deleteRecordId=t,this.$swal.fire({title:"Are you sure?",text:"You won't be able to revert this!",icon:"warning",showCancelButton:!0,confirmButtonColor:"#d33",cancelButtonColor:"#d7d7d7",confirmButtonText:"Yes, delete it!"}).then((function(t){t.value&&o.doDeleteRecord()}))},doDeleteRecord:function(){var t=this;this.$axios.delete("".concat(this.deleteURL,"/").concat(this.deleteRecordId)).then((function(e){t.refresh(),e.data.message&&t.$toast.success(e.data.message)})).catch((function(e){var o=e.message;e.response&&e.response.data&&e.response.data.message&&(o=e.response.data.message),t.$toast.error(o)}))},refresh:function(){this.$refs[this.listTableRefs].refresh()},showFormModal:function(){this.$bvModal.show(this.formModalId)},handleFormHidden:function(){this.editRecordId=null,this.$bvModal.hide(this.formModalId),this.refresh()},handleShowHidden:function(){this.showRecordId=null},cloneRecord:function(t,e){var o=this;this.$axios.get("".concat(this.cloneURL,"/").concat(t,"?edit=1")).then((function(r){var n=r.data;o.cloneRecordId=t,o.form.cloneReplace(n.data,e),o.showFormModal()})).catch((function(t){o.$toast.error(t.message)}))},editRecord:function(t){var e=this;this.$axios.get("".concat(this.editURL,"/").concat(t,"?edit=1")).then((function(o){var r=o.data;e.editRecordId=t,e.form.replace(r.data),e.showFormModal()})).catch((function(t){e.$toast.error(t.message)}))},replace:function(data,object){for(var t in data)object[t]=data[t];return object},showRecord:function(t){this.showRecordId=t}}},d=c,f=o(723),m=o(719),h=o(293),v=o.n(h),_={mixins:[d],components:{COverlay:m.a,PageSection:f.a},inject:{handleBulkAction:{default:[]}},props:{columns:{required:!0},bulkActionOptions:{required:!1,default:function(){return[]}},resourceURL:{required:!0},deleteHref:{required:!1},editHref:{required:!1},cloneHref:{required:!1},cloneAttr:{required:!1},options:{required:!0},form:{required:!1},formSize:{required:!1,default:""},labels:{required:!0},rowColumns:{required:!1,default:"col-md-12"},nameClickable:{required:!1},compact:{required:!1},onDataLoaded:{required:!1,default:function(){return function(){}}}},name:"CrudIndex",data:function(){return{selectedIds:[]}},beforeMount:function(){this.$eventBus.$on("setSelectedIds",this.setSelectedIds)},methods:{setSelectedIds:function(t){this.selectedIds=t},onModalShow:function(){this.editRecordId||this.cloneRecordId||(this.form.replace(this.form.originalData),this.editRecordId=null,this.cloneRecordId=null,this.form.errors.purge())},onModalHidden:function(){this.form.replace(this.form.originalData),this.editRecordId=null,this.cloneRecordId=null,this.form.errors.purge(),this.$emit("edit-form-closed")},getTableData:function(){var table=this.$refs[this.listTableRefs];return v.a.get(table,"data")},selectAll:function(t){var data=this.getTableData();this.selectedIds=t?data.map((function(t){return t.id})):[],this.$refs.checkbox_header__table.checked=t}},computed:{modalTitle:function(){return(this.editRecordId?"Update ":this.cloneRecordId?"Clone ":"Create ")+this.labels.singularTitle}},watch:{selectedIds:function(t){this.$refs.checkbox_header__table.checked=this.getTableData().length===v.a.uniq(t).length}},beforeDestroy:function(){}},y=(o(724),o(88)),component=Object(y.a)(_,(function(){var t=this,e=t.$createElement,o=t._self._c||e;return o("div",{staticClass:"crud-index"},[o("div",{staticClass:"row"},[o("div",{staticClass:"col-md-4"},[o("PageSection",{attrs:{title:t.labels.title}})],1),t._v(" "),o("div",{staticClass:"col-md-8 text-right"},[t.bulkActionOptions.length?o("b-dropdown",{staticClass:"m-2",attrs:{id:"dropdown-left",text:"Actions",variant:"primary",size:"sm"}},[t._l(t.bulkActionOptions,(function(e){return[o("b-dropdown-item",{staticStyle:{"text-transform":"capitalize"},attrs:{href:"#"},on:{click:function(o){return o.preventDefault(),t.handleBulkAction(e,t.selectedIds)}}},[t._v("\n "+t._s(e)+"\n ")])]}))],2):t._e(),t._v(" "),t._t("extraButtons"),t._v(" "),t.options.hideCreate?t._e():o("b-button",{attrs:{variant:"primary",size:"sm",type:"button"},on:{click:function(e){return e.preventDefault(),t.showFormModal.apply(null,arguments)}}},[o("fa",{attrs:{icon:"plus"}}),t._v("\n Create\n ")],1),t._v(" "),o("b-button",{attrs:{variant:"warning",size:"sm",type:"button"},on:{click:function(e){return e.preventDefault(),t.refresh.apply(null,arguments)}}},[o("fa",{attrs:{icon:"redo"}})],1)],2)]),t._v(" "),o("div",{staticClass:"row mt-3"},[o("div",{class:t.rowColumns},[o("v-server-table",{ref:"listTable",attrs:{columns:t.columns,url:t.resourceURL,options:t.tableOptions(t.options)},on:{loaded:t.onDataLoaded},scopedSlots:t._u([{key:"checkbox",fn:function(e){return t.$isAdmin()&&t.bulkActionOptions.length?o("div",{staticClass:"text-center"},[o("b-form-checkbox",{key:e.row.id+"__checkbox_record",attrs:{value:e.row.id},model:{value:t.selectedIds,callback:function(e){t.selectedIds=e},expression:"selectedIds"}})],1):t._e()}},t._l(t.options.customColumns,(function(e){return{key:e,fn:function(o){return[t._t(e,null,{object:o})]}}})),{key:"actions",fn:function(e){return o("div",{},[e.row.edit&&Object.keys(e.row.edit).length?o("b-link",{directives:[{name:"b-tooltip",rawName:"v-b-tooltip.hover",modifiers:{hover:!0}}],attrs:{title:"Edit"},on:{click:function(o){return o.preventDefault(),t.editRecord(e.row.id)}}},[o("fa",{attrs:{icon:"edit"}})],1):t._e(),t._v(" "),e.row.delete&&Object.keys(e.row.delete).length?o("b-link",{directives:[{name:"b-tooltip",rawName:"v-b-tooltip.hover",modifiers:{hover:!0}}],staticClass:"text-danger",attrs:{title:"Delete"},on:{click:function(o){return o.preventDefault(),t.showDeleteModal(e.row.id,e.index)}}},[o("fa",{attrs:{icon:"trash"}})],1):t._e(),t._v(" "),e.row.clone&&Object.keys(e.row.clone).length?o("b-link",{directives:[{name:"b-tooltip",rawName:"v-b-tooltip.hover",modifiers:{hover:!0}}],staticClass:"text-warning",attrs:{title:"Clone"},on:{click:function(o){return o.preventDefault(),t.cloneRecord(e.row.id,t.cloneAttr)}}},[o("fa",{attrs:{icon:"clone"}})],1):t._e(),t._v(" "),t._t("extra-actions",null,{object:e.row})],2)}}],null,!0)},[o("div",{staticClass:"text-center",attrs:{slot:"h__checkbox"},slot:"h__checkbox"},[t.$isAdmin()&&t.bulkActionOptions.length?o("div",{staticClass:"custom-control custom-checkbox"},[o("input",{key:"checkbox_header__table",ref:"checkbox_header__table",staticClass:"custom-control-input",attrs:{type:"checkbox","true-value":1,"false-value":0,id:"checkbox_header__table"},on:{change:function(e){return t.selectAll(e.target.checked)}}}),t._v(" "),o("label",{staticClass:"custom-control-label",attrs:{for:"checkbox_header__table"}})]):t._e()])])],1)]),t._v(" "),o("b-modal",{attrs:{"hide-footer":"",size:t.formSize,"content-class":"shadow",title:t.modalTitle,"no-close-on-backdrop":"",id:t.formModalId},on:{hidden:t.onModalHidden,show:t.onModalShow}},[t.form?o("div",{staticClass:"row"},[o("div",{staticClass:"col-md-12"},[o("c-overlay",{attrs:{show:!t.form.isReady}},[o("form",{on:{submit:function(e){return e.preventDefault(),t.onSubmit()}}},[t._t("default",null,{form:t.form}),t._v(" "),o("div",{staticClass:"text-right"},[o("button",{staticClass:"btn btn-sm btn-primary",attrs:{type:"submit",disabled:!t.form.isReady}},[t._v("\n "+t._s(t.modalTitle)+"\n ")]),t._v(" "),o("button",{staticClass:"btn btn-sm btn-secondary",attrs:{disabled:!t.form.isReady},on:{click:function(e){return e.preventDefault(),t.$bvModal.hide(t.formModalId)}}},[t._v("Close\n ")])])],2)])],1)]):t._e()])],1)}),[],!1,null,null,null);e.a=component.exports},723:function(t,e,o){"use strict";var r={name:"PageSection",props:{title:{required:!0}}},n=o(88),component=Object(n.a)(r,(function(){var t=this,e=t.$createElement,o=t._self._c||e;return o("div",{staticClass:"row"},[o("div",{staticClass:"col-md-12"},[o("div",{staticClass:"border-bottom mb-3"},[o("h4",[t._v(t._s(t.title))]),t._v(" "),t._t("default")],2)])])}),[],!1,null,"019ca8fe",null);e.a=component.exports},724:function(t,e,o){"use strict";o(720)},725:function(t,e,o){var r=o(94)(!1);r.push([t.i,".form-modal-header{padding:0!important}",""]),t.exports=r},726:function(t,e,o){"use strict";var r=o(55);o(53);e.a={methods:{yesNoOptions:function(){return[{id:!1,text:"No"},{id:!0,text:"Yes"}]},objectAsQueryString:function(t){var p,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,o=[];for(p in t)if(t.hasOwnProperty(p)){var n=e?e+"["+p+"]":p,l=t[p];o.push(null!==l&&"object"===Object(r.a)(l)?this.objectAsQueryString(l,n):encodeURIComponent(n)+"="+encodeURIComponent(l))}return o.join("&")}}}},727:function(t,e,o){var content=o(730);content.__esModule&&(content=content.default),"string"==typeof content&&(content=[[t.i,content,""]]),content.locals&&(t.exports=content.locals);(0,o(95).default)("1556abca",content,!0,{sourceMap:!1})},729:function(t,e,o){"use strict";o(727)},730:function(t,e,o){var r=o(94)(!1);r.push([t.i,".vs__dropdown-option{padding:3px 2px 3px 10px}.vs__dropdown-option:not(.vs__dropdown-option--disabled){padding-left:20px!important}.vs__search{color:#d3d3d3!important}.selected-group{overflow:hidden;pointer-events:none;text-overflow:ellipsis;white-space:nowrap;font-size:12px!important;position:absolute;top:-9px;left:-5px;color:grey}.selected-group.multi{background-color:var(--vs-selected-bg);font-size:9px!important;top:-7px;left:-5px}.selected-option-group{position:relative}.selected-option .has-group{top:12px}",""]),t.exports=r},807:function(t,e,o){"use strict";o.r(e);var r=o(55),n=(o(41),o(14),o(12),o(15),o(722)),l=o(726),c={name:"index",components:{CoralsSelect:o(295).default,CRUDIndex:n.a},middleware:"Authorization",mixins:[l.a],provide:function(){return{handleBulkAction:this.handleBulkAction}},data:function(){var t=this;return{active_options:1,filePath:null,resourceUrl:"timesheet/incomes",labels:{title:"Incomes",singularTitle:"Income"},cloneAttr:{category_id:null,project_id:null,client_id:null,notes:null,amount:null,income_date:new Date,status:null,currency:null,payment_method:null,reference:null},options:{listColumns:{status:[],payment_method:[],category_id:[]},hideCreate:this.$cant("create","income"),customColumns:["status","project","client","payment_method","file","category_id"],filterable:["status","income_date","payment_method","category_id","project","client","notes","reference"],headings:{payment_method:"Payment Method",category_id:"Category"}},form:this.$form({id:null,category_id:"",project_id:"",client_id:"",notes:"",amount:"",status:"paid",file:null,clear:0,income_date:new Date,currency:"usd",payment_method:"paypal",reference:""},{fetchFormDataURL:"/timesheet/incomes/get-form-data",model:"income",loadFormDataCallBack:function(){t.options.listColumns.status=t.getOptions(t.form.formData.status_options);var e=JSON.parse(JSON.stringify(t.form.formData.categories));e.shift(),t.options.listColumns.category_id=t.getOptions(e),t.options.listColumns.payment_method=t.getOptions(t.form.formData.payment_method_options)}})}},methods:{getOptions:function(t){var e=[];return e.push({id:"",text:"All"}),t.map((function(t){var o;e.push({id:null!==(o=t.id)&&void 0!==o?o:t.value,text:t.label})})),e},getCategoriesOrProjectsOptions:function(t){var e=[],o=[],r=[];return this.active_options?(r=t.filter((function(object){return(1===object.is_active||"active"===object.status)&&!0!==object.group})),o=t.filter((function(t){return!0===t.group&&"active"===t.status}))):(r=t.filter((function(object){return!0!==object.group})),o=t.filter((function(t){return!0===t.group}))),o.forEach((function(t){t.is_group_empty=!0,e.push(t),r.filter((function(o){t.code===o.group&&(t.is_group_empty=!1,e.push(o))}))})),e},handleBulkAction:function(t,e){var o=this;this.$bvModal.msgBoxConfirm("Are you sure?",{size:"md",buttonSize:"sm",okVariant:"danger",footerClass:"p-2",hideHeaderClose:!1,centered:!0}).then((function(r){!0===r&&o.$axios.post("timesheet/incomes/bulk-action",{selection:e,action:t}).then((function(t){var e=t.data.data.level,r=t.data.data.message;"success"===e?o.$toast.success(r):o.$toast.error(r),o.$eventBus.$emit("setSelectedIds",[]),o.$refs.incomesTable.refresh()})).catch((function(t){o.$toast.error(t.response.data.message)}))})).catch((function(t){}))}},watch:{"form.id":function(){this.filePath=null,null!==this.form.file&&"object"!==Object(r.a)(this.form.file)&&(this.filePath=this.form.file,this.form.file=null)}},computed:{columns:function(){var t=[];return this.$isAdmin()&&this.bulkActionOptions.length&&t.push("checkbox"),t.push("income_date","amount","file","status","payment_method","category_id","project","client","reference","notes","actions"),this.$notAdmin()&&t.pop(),t},bulkActionOptions:function(){var t=["delete","paid","pending","voided"];return this.$notAdmin()&&t.pop(),t}}},d=o(88),component=Object(d.a)(c,(function(){var t=this,e=t.$createElement,o=t._self._c||e;return o("div",[o("CRUDIndex",{ref:"incomesTable",attrs:{columns:t.columns,resourceURL:t.resourceUrl,options:t.options,form:t.form,"bulk-action-options":t.bulkActionOptions,labels:t.labels,cloneAttr:t.cloneAttr,"form-size":"lg"},scopedSlots:t._u([{key:"project",fn:function(e){var object=e.object;return[o("nuxt-link",{attrs:{to:"/clients/"+object.row.client_id+"/projects/"+object.row.project_id}},[t._v("\n "+t._s(object.row.project)+"\n ")])]}},{key:"client",fn:function(e){var object=e.object;return[o("nuxt-link",{attrs:{to:"/clients/"+object.row.client_id}},[t._v("\n "+t._s(object.row.client)+"\n ")])]}},{key:"status",fn:function(e){var object=e.object;return[o("span",{domProps:{innerHTML:t._s(object.row.status)}})]}},{key:"payment_method",fn:function(e){var object=e.object;return[t._v("\n "+t._s(object.row.payment_method)+"\n ")]}},{key:"category_id",fn:function(e){var object=e.object;return[t._v("\n "+t._s(object.row.category)+"\n ")]}},{key:"file",fn:function(e){var object=e.object;return[object.row.file?o("a",{attrs:{href:object.row.file,target:"_blank"}},[t._v("File")]):o("span",[t._v("-")])]}},{key:"default",fn:function(e){var form=e.form;return[form.id?t._e():o("div",{},[o("div",{staticClass:"custom-control custom-checkbox mb-2"},[o("input",{directives:[{name:"model",rawName:"v-model",value:t.active_options,expression:"active_options"}],staticClass:"custom-control-input",attrs:{type:"checkbox",id:"active_options"},domProps:{checked:Array.isArray(t.active_options)?t._i(t.active_options,null)>-1:t.active_options},on:{change:function(e){var o=t.active_options,r=e.target,n=!!r.checked;if(Array.isArray(o)){var l=t._i(o,null);r.checked?l<0&&(t.active_options=o.concat([null])):l>-1&&(t.active_options=o.slice(0,l).concat(o.slice(l+1)))}else t.active_options=n}}}),t._v(" "),o("label",{staticClass:"custom-control-label",attrs:{for:"active_options"}},[o("small",[t._v("Show Active Options")])])])]),t._v(" "),o("div",{staticClass:"row sm-gutters"},[o("div",{staticClass:"col-md-5"},[o("corals-datepicker",{attrs:{form:form,required:"",field:"income_date",label:"Income Date"}})],1),t._v(" "),o("div",{staticClass:"col-md-4"},[o("corals-input",{attrs:{form:form,type:"number",field:"amount",step:"0.1",required:"",min:"0"}})],1),t._v(" "),o("div",{staticClass:"col-md-3"},[o("corals-select",{attrs:{form:form,field:"currency",options:form.getFormData("currency_options"),required:""}})],1)]),t._v(" "),o("div",{staticClass:"row sm-gutters"},[o("div",{staticClass:"col-md-5"},[o("corals-select",{attrs:{form:form,required:"",label:"Category",field:"category_id",options:t.getCategoriesOrProjectsOptions(form.getFormData("categories"))}})],1),t._v(" "),o("div",{staticClass:"col-md-7"},[o("corals-textarea",{attrs:{field:"notes",required:"",rows:"3",form:form}})],1)]),t._v(" "),o("div",{staticClass:"row sm-gutters"},[o("div",{staticClass:"col-md-5"},[o("corals-select",{attrs:{form:form,label:"Project",field:"project_id",options:t.getCategoriesOrProjectsOptions(form.getFormData("projects"))}})],1),t._v(" "),o("div",{staticClass:"col-md-4"},[o("corals-input",{attrs:{form:form,field:"reference"}})],1)]),t._v(" "),o("div",{staticClass:"row sm-gutters"},[o("div",{staticClass:"col-md-6"},[o("corals-radio",{attrs:{form:form,label:"Payment Method",field:"payment_method",list:form.getFormData("payment_method_options"),required:""}})],1),t._v(" "),o("div",{staticClass:"col-md-6"},[o("corals-radio",{attrs:{form:form,field:"status",required:"",label:"Status",list:form.getFormData("status_options")}})],1)]),t._v(" "),o("div",{staticClass:"row sm-gutters"},[o("div",{staticClass:"col-md-6"},[o("label",[t._v("Attachment")]),t._v(" "),t.filePath?o("div",[o("a",{attrs:{href:t.filePath,target:"_blank"}},[t._v("Show File")]),t._v(" "),o("corals-checkbox",{attrs:{field:"clear",form:form}})],1):t._e(),t._v(" "),o("div",{staticClass:"mb-2"},[o("b-form-file",{attrs:{placeholder:"Upload File..."},model:{value:form.file,callback:function(e){t.$set(form,"file",e)},expression:"form.file"}}),t._v(" "),t.filePath&&form.file?o("span",{staticClass:"text-muted small"},[t._v("Note: when a new file is uploaded, the existing file is automatically deleted")]):t._e()],1)])])]}}])})],1)}),[],!1,null,"43448fee",null);e.default=component.exports}}]);