⚝
One Hat Cyber Team
⚝
Your IP:
216.73.216.1
Server IP:
185.238.29.86
Server:
Linux server2 6.8.12-6-pve #1 SMP PREEMPT_DYNAMIC PMX 6.8.12-6 (2024-12-19T19:05Z) x86_64
Server Software:
nginx/1.18.0
PHP Version:
8.1.31
Buat File
|
Buat Folder
Eksekusi
Dir :
~
/
var
/
www
/
makarnacimmix.xyz
/
public
/
dist
/
js
/
Edit File: 91.e2e772.js
/*! For license information please see 91.e2e772.js.LICENSE.txt */ (window.webpackJsonp=window.webpackJsonp||[]).push([[91],{4:function(t,e,r){"use strict";var o=r(7),a=r.n(o),n=Object.defineProperty,s=Object.prototype.hasOwnProperty,i=Object.getOwnPropertySymbols,l=Object.prototype.propertyIsEnumerable,c=(t,e,r)=>e in t?n(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,u=(t,e)=>{for(var r in e||(e={}))s.call(e,r)&&c(t,r,e[r]);if(i)for(var r of i(e))l.call(e,r)&&c(t,r,e[r]);return t};const m=t=>void 0===t,f=t=>Array.isArray(t),d=t=>t&&"number"==typeof t.size&&"string"==typeof t.type&&"function"==typeof t.slice,p=(t,e,r,o)=>((e=e||{}).indices=!m(e.indices)&&e.indices,e.nullsAsUndefineds=!m(e.nullsAsUndefineds)&&e.nullsAsUndefineds,e.booleansAsIntegers=!m(e.booleansAsIntegers)&&e.booleansAsIntegers,e.allowEmptyArrays=!m(e.allowEmptyArrays)&&e.allowEmptyArrays,r=r||new FormData,m(t)||(null===t?e.nullsAsUndefineds||r.append(o,""):(t=>"boolean"==typeof t)(t)?e.booleansAsIntegers?r.append(o,t?1:0):r.append(o,t):f(t)?t.length?t.forEach((t,a)=>{const n=o+"["+(e.indices?a:"")+"]";p(t,e,r,n)}):e.allowEmptyArrays&&r.append(o+"[]",""):(t=>t instanceof Date)(t)?r.append(o,t.toISOString()):!(t=>t===Object(t))(t)||(t=>d(t)&&"string"==typeof t.name&&("object"==typeof t.lastModifiedDate||"number"==typeof t.lastModified))(t)||d(t)?r.append(o,t):Object.keys(t).forEach(a=>{const n=t[a];if(f(n))for(;a.length>2&&a.lastIndexOf("[]")===a.length-2;)a=a.substring(0,a.length-2);p(n,e,r,o?o+"["+a+"]":a)})),r);var v={serialize:p};function h(t){if(null===t||"object"!=typeof t)return t;const e=Array.isArray(t)?[]:{};return Object.keys(t).forEach(r=>{e[r]=h(t[r])}),e}function y(t){return Array.isArray(t)?t:[t]}class g{constructor(){this.errors={},this.errors={}}set(t,e){"object"==typeof t?this.errors=t:this.set(u(u({},this.errors),{[t]:y(e)}))}all(){return this.errors}has(t){return Object.prototype.hasOwnProperty.call(this.errors,t)}hasAny(...t){return t.some(t=>this.has(t))}any(){return Object.keys(this.errors).length>0}get(t){if(this.has(t))return this.getAll(t)[0]}getAll(t){return y(this.errors[t]||[])}only(...t){const e=[];return t.forEach(t=>{const r=this.get(t);r&&e.push(r)}),e}flatten(){return Object.values(this.errors).reduce((t,e)=>t.concat(e),[])}clear(t){const e={};t&&Object.keys(this.errors).forEach(r=>{r!==t&&(e[r]=this.errors[r])}),this.set(e)}}class b{constructor(t={}){this.originalData={},this.busy=!1,this.successful=!1,this.recentlySuccessful=!1,this.recentlySuccessfulTimeoutId=void 0,this.errors=new g,this.progress=void 0,this.update(t)}static make(t){return new this(t)}update(t){this.originalData=Object.assign({},this.originalData,h(t)),Object.assign(this,t)}fill(t={}){this.keys().forEach(e=>{this[e]=t[e]})}data(){return this.keys().reduce((t,e)=>u(u({},t),{[e]:this[e]}),{})}keys(){return Object.keys(this).filter(t=>!b.ignore.includes(t))}startProcessing(){this.errors.clear(),this.busy=!0,this.successful=!1,this.progress=void 0,this.recentlySuccessful=!1,clearTimeout(this.recentlySuccessfulTimeoutId)}finishProcessing(){this.busy=!1,this.successful=!0,this.progress=void 0,this.recentlySuccessful=!0,this.recentlySuccessfulTimeoutId=setTimeout(()=>{this.recentlySuccessful=!1},b.recentlySuccessfulTimeout)}clear(){this.errors.clear(),this.successful=!1,this.recentlySuccessful=!1,this.progress=void 0,clearTimeout(this.recentlySuccessfulTimeoutId)}reset(){Object.keys(this).filter(t=>!b.ignore.includes(t)).forEach(t=>{this[t]=h(this.originalData[t])})}get(t,e={}){return this.submit("get",t,e)}post(t,e={}){return this.submit("post",t,e)}patch(t,e={}){return this.submit("patch",t,e)}put(t,e={}){return this.submit("put",t,e)}delete(t,e={}){return this.submit("delete",t,e)}submit(t,e,r={}){return this.startProcessing(),r=u({data:{},params:{},url:this.route(e),method:t,onUploadProgress:this.handleUploadProgress.bind(this)},r),"get"===t.toLowerCase()?r.params=u(u({},this.data()),r.params):(r.data=u(u({},this.data()),r.data),function t(e){return e instanceof File||e instanceof Blob||e instanceof FileList||"object"==typeof e&&null!==e&&void 0!==Object.values(e).find(e=>t(e))}(r.data)&&!r.transformRequest&&(r.transformRequest=[t=>v.serialize(t)])),new Promise((t,e)=>{(b.axios||a.a).request(r).then(e=>{this.finishProcessing(),t(e)}).catch(t=>{this.handleErrors(t),e(t)})})}handleErrors(t){this.busy=!1,this.progress=void 0,t.response&&this.errors.set(this.extractErrors(t.response))}extractErrors(t){return t.data&&"object"==typeof t.data?t.data.errors?u({},t.data.errors):t.data.message?{error:t.data.message}:u({},t.data):{error:b.errorMessage}}handleUploadProgress(t){this.progress={total:t.total,loaded:t.loaded,percentage:Math.round(100*t.loaded/t.total)}}route(t,e={}){let r=t;return Object.prototype.hasOwnProperty.call(b.routes,t)&&(r=decodeURI(b.routes[t])),"object"!=typeof e&&(e={id:e}),Object.keys(e).forEach(t=>{r=r.replace(`{${t}}`,e[t])}),r}onKeydown(t){const e=t.target;e.name&&this.errors.clear(e.name)}}b.routes={},b.errorMessage="Something went wrong. Please try again.",b.recentlySuccessfulTimeout=2e3,b.ignore=["busy","successful","errors","progress","originalData","recentlySuccessful","recentlySuccessfulTimeoutId"],e.a=b},412:function(t,e,r){"use strict";r.r(e);var o=r(3),a=r(4);function n(t){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function s(){s=function(){return t};var t={},e=Object.prototype,r=e.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},a="function"==typeof Symbol?Symbol:{},i=a.iterator||"@@iterator",l=a.asyncIterator||"@@asyncIterator",c=a.toStringTag||"@@toStringTag";function u(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{u({},"")}catch(t){u=function(t,e,r){return t[e]=r}}function m(t,e,r,a){var n=e&&e.prototype instanceof p?e:p,s=Object.create(n.prototype),i=new O(a||[]);return o(s,"_invoke",{value:x(t,r,i)}),s}function f(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=m;var d={};function p(){}function v(){}function h(){}var y={};u(y,i,(function(){return this}));var g=Object.getPrototypeOf,b=g&&g(g(j([])));b&&b!==e&&r.call(b,i)&&(y=b);var _=h.prototype=p.prototype=Object.create(y);function w(t){["next","throw","return"].forEach((function(e){u(t,e,(function(t){return this._invoke(e,t)}))}))}function C(t,e){var a;o(this,"_invoke",{value:function(o,s){function i(){return new e((function(a,i){!function o(a,s,i,l){var c=f(t[a],t,s);if("throw"!==c.type){var u=c.arg,m=u.value;return m&&"object"==n(m)&&r.call(m,"__await")?e.resolve(m.__await).then((function(t){o("next",t,i,l)}),(function(t){o("throw",t,i,l)})):e.resolve(m).then((function(t){u.value=t,i(u)}),(function(t){return o("throw",t,i,l)}))}l(c.arg)}(o,s,a,i)}))}return a=a?a.then(i,i):i()}})}function x(t,e,r){var o="suspendedStart";return function(a,n){if("executing"===o)throw new Error("Generator is already running");if("completed"===o){if("throw"===a)throw n;return L()}for(r.method=a,r.arg=n;;){var s=r.delegate;if(s){var i=$(s,r);if(i){if(i===d)continue;return i}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===o)throw o="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);o="executing";var l=f(t,e,r);if("normal"===l.type){if(o=r.done?"completed":"suspendedYield",l.arg===d)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(o="completed",r.method="throw",r.arg=l.arg)}}}function $(t,e){var r=e.method,o=t.iterator[r];if(void 0===o)return e.delegate=null,"throw"===r&&t.iterator.return&&(e.method="return",e.arg=void 0,$(t,e),"throw"===e.method)||"return"!==r&&(e.method="throw",e.arg=new TypeError("The iterator does not provide a '"+r+"' method")),d;var a=f(o,t.iterator,e.arg);if("throw"===a.type)return e.method="throw",e.arg=a.arg,e.delegate=null,d;var n=a.arg;return n?n.done?(e[t.resultName]=n.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,d):n:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,d)}function P(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function A(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function O(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(P,this),this.reset(!0)}function j(t){if(t){var e=t[i];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,a=function e(){for(;++o<t.length;)if(r.call(t,o))return e.value=t[o],e.done=!1,e;return e.value=void 0,e.done=!0,e};return a.next=a}}return{next:L}}function L(){return{value:void 0,done:!0}}return v.prototype=h,o(_,"constructor",{value:h,configurable:!0}),o(h,"constructor",{value:v,configurable:!0}),v.displayName=u(h,c,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===v||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,h):(t.__proto__=h,u(t,c,"GeneratorFunction")),t.prototype=Object.create(_),t},t.awrap=function(t){return{__await:t}},w(C.prototype),u(C.prototype,l,(function(){return this})),t.AsyncIterator=C,t.async=function(e,r,o,a,n){void 0===n&&(n=Promise);var s=new C(m(e,r,o,a),n);return t.isGeneratorFunction(r)?s:s.next().then((function(t){return t.done?t.value:s.next()}))},w(_),u(_,c,"Generator"),u(_,i,(function(){return this})),u(_,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=Object(t),r=[];for(var o in e)r.push(o);return r.reverse(),function t(){for(;r.length;){var o=r.pop();if(o in e)return t.value=o,t.done=!1,t}return t.done=!0,t}},t.values=j,O.prototype={constructor:O,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(A),!t)for(var e in this)"t"===e.charAt(0)&&r.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function o(r,o){return s.type="throw",s.arg=t,e.next=r,o&&(e.method="next",e.arg=void 0),!!o}for(var a=this.tryEntries.length-1;a>=0;--a){var n=this.tryEntries[a],s=n.completion;if("root"===n.tryLoc)return o("end");if(n.tryLoc<=this.prev){var i=r.call(n,"catchLoc"),l=r.call(n,"finallyLoc");if(i&&l){if(this.prev<n.catchLoc)return o(n.catchLoc,!0);if(this.prev<n.finallyLoc)return o(n.finallyLoc)}else if(i){if(this.prev<n.catchLoc)return o(n.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<n.finallyLoc)return o(n.finallyLoc)}}}},abrupt:function(t,e){for(var o=this.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o];if(a.tryLoc<=this.prev&&r.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var n=a;break}}n&&("break"===t||"continue"===t)&&n.tryLoc<=e&&e<=n.finallyLoc&&(n=null);var s=n?n.completion:{};return s.type=t,s.arg=e,n?(this.method="next",this.next=n.finallyLoc,d):this.complete(s)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),d},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),A(r),d}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var o=r.completion;if("throw"===o.type){var a=o.arg;A(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:j(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),d}},t}function i(t,e,r,o,a,n,s){try{var i=t[n](s),l=i.value}catch(t){return void r(t)}i.done?e(l):Promise.resolve(l).then(o,a)}function l(t){return function(){var e=this,r=arguments;return new Promise((function(o,a){var n=t.apply(e,r);function s(t){i(n,o,a,s,l,"next",t)}function l(t){i(n,o,a,s,l,"throw",t)}s(void 0)}))}}function c(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);e&&(o=o.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,o)}return r}function u(t,e,r){return(e=function(t){var e=function(t,e){if("object"!==n(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var o=r.call(t,e||"default");if("object"!==n(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"===n(e)?e:String(e)}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var m={middleware:["auth","check-permissions"],metaInfo:function(){return{title:this.$t("loans.list.edit.page_title")}},data:function(){return{breadcrumbsCurrent:"loans.list.edit.breadcrumbs_current",breadcrumbs:[{name:"loans.list.edit.breadcrumbs_first",url:"home"},{name:"loans.list.edit.breadcrumbs_second",url:"loans.index"},{name:"loans.list.edit.breadcrumbs_active",url:""}],form:new a.a({reason:"",authority:"",referenceNo:"",account:"",loanType:1,amount:"",interest:"",payableAmount:"",rowPayableAMount:0,interestAmount:0,paymentType:1,duration:"",payReturn:"",due:"",date:(new Date).toISOString().slice(0,10),note:"",status:1,image:""}),url:null,options:[],accounts:""}},computed:function(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?c(Object(r),!0).forEach((function(e){u(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):c(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}({},Object(o.b)("operations",["items"])),created:function(){this.getAuthorities(),this.getAccounts(),this.getLoan()},methods:{getAuthorities:function(){var t=this;return l(s().mark((function e(){return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,t.$store.dispatch("operations/allData",{path:"/api/all-loan-authorities"});case 2:case"end":return e.stop()}}),e)})))()},getAccounts:function(){var t=this;return l(s().mark((function e(){var r,o;return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,t.form.get(window.location.origin+"/api/all-accounts");case 2:r=e.sent,o=r.data,t.accounts=o.data;case 5:case"end":return e.stop()}}),e)})))()},getLoan:function(){var t=this;return l(s().mark((function e(){var r,o;return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,t.form.get(window.location.origin+"/api/loans/"+t.$route.params.slug);case 2:r=e.sent,o=r.data,t.form.reason=o.data.reason,t.form.referenceNo=o.data.reference,t.form.authority=o.data.authority,t.form.account=o.data.account,t.form.amount=o.data.transaction.amount,t.form.loanType=o.data.loanType,t.form.interest=o.data.interestRate,t.form.paymentType=o.data.paymentType,t.form.duration=o.data.duration,t.form.payReturn=o.data.perMonth,t.form.payableAmount=Number(o.data.payable),t.form.rowPayableAMount=Number(o.data.payable),t.form.due=Number(o.data.due),t.form.interestAmount=Number(o.data.interestAmount),t.form.date=o.data.date,t.form.note=o.data.note,t.form.status=o.data.status,t.url=o.data.image;case 22:case"end":return e.stop()}}),e)})))()},onFileChange:function(t){var e=this,r=t.target.files[0],o=new FileReader;r.size<2111775&&("image/jpeg"===r.type||"image/png"===r.type||"image/gif"===r.type)?(o.onloadend=function(t){e.form.image=o.result},o.readAsDataURL(r),this.url=URL.createObjectURL(r)):Swal.fire(this.$t("common.error"),this.$t("common.image_error"),"error")},generatePayable:function(){var t=Number(this.form.amount),e=Number(this.form.interest),r=Number(this.form.duration);if(this.form.payableAmount=0,0==this.form.loanType)return this.form.rowPayableAMount=t+e,this.form.payableAmount=t+" + "+e+" = "+this.form.rowPayableAMount;var o=0,a=0,n=e/100,s=0;return e&&r?(s=0==this.form.paymentType?r/365:1==this.form.paymentType?r/12:r,a=Number((n/12*t/(1-Math.pow(1+n/12,-12*s))).toFixed(2)),o=Number((a*(12*s)-t).toFixed(2)),this.form.rowPayableAMount=Number((t+o).toFixed(2)),this.form.payableAmount=t+" + "+o+" = "+this.form.rowPayableAMount,this.form.payReturn=Number((this.form.rowPayableAMount/r).toFixed(2))):void 0},updateLoan:function(){var t=this;return l(s().mark((function e(){return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,t.form.patch(window.location.origin+"/api/loans/"+t.$route.params.slug).then((function(e){toast.fire({type:"success",title:t.$t("loans.list.edit.success_msg")}),t.$router.push({name:"loans.index"})})).catch((function(){toast.fire({type:"error",title:t.$t("common.error_msg")})}));case 2:case"end":return e.stop()}}),e)})))()}}},f=r(1),d=Object(f.a)(m,(function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("div",[r("breadcrumbs",{attrs:{items:t.breadcrumbs,current:t.breadcrumbsCurrent}}),t._v(" "),r("div",{staticClass:"row"},[r("div",{staticClass:"col-lg-12"},[r("div",{staticClass:"card"},[r("div",{staticClass:"card-header"},[r("h3",{staticClass:"card-title"},[t._v(t._s(t.$t("loans.list.edit.form_title")))]),t._v(" "),r("router-link",{staticClass:"btn btn-dark float-right",attrs:{to:{name:"loans.index"}}},[r("i",{staticClass:"fas fa-long-arrow-alt-left"}),t._v(" "+t._s(t.$t("common.back"))+"\n ")])],1),t._v(" "),r("form",{attrs:{role:"form"},on:{submit:function(e){return e.preventDefault(),t.updateLoan.apply(null,arguments)},keydown:function(e){return t.form.onKeydown(e)}}},[r("div",{staticClass:"card-body"},[t.items&&t.accounts?r("div",{staticClass:"row"},[r("div",{staticClass:"form-group col-md-6"},[r("label",{attrs:{for:"authority"}},[t._v(t._s(t.$t("loans.common.loan_authority"))+"\n "),r("span",{staticClass:"required"},[t._v("*")])]),t._v(" "),r("v-select",{class:{"is-invalid":t.form.errors.has("authority")},attrs:{options:t.items,label:"name",name:"authority",placeholder:t.$t("loans.common.authority_placeholder")},model:{value:t.form.authority,callback:function(e){t.$set(t.form,"authority",e)},expression:"form.authority"}}),t._v(" "),r("has-error",{attrs:{form:t.form,field:"authority"}})],1),t._v(" "),r("div",{staticClass:"form-group col-md-6"},[r("label",{attrs:{for:"account"}},[t._v(t._s(t.$t("common.account"))+"\n "),r("span",{staticClass:"required"},[t._v("*")])]),t._v(" "),r("v-select",{class:{"is-invalid":t.form.errors.has("account")},attrs:{options:t.accounts,label:"label",name:"account",placeholder:t.$t("common.account_placeholder"),disabled:""},model:{value:t.form.account,callback:function(e){t.$set(t.form,"account",e)},expression:"form.account"}}),t._v(" "),r("has-error",{attrs:{form:t.form,field:"account"}})],1)]):t._e(),t._v(" "),r("div",{staticClass:"row"},[r("div",{staticClass:"form-group col-md-4"},[r("label",{attrs:{for:"reason"}},[t._v(t._s(t.$t("loans.common.loan_reason"))),r("span",{staticClass:"required"},[t._v("*")])]),t._v(" "),r("input",{directives:[{name:"model",rawName:"v-model",value:t.form.reason,expression:"form.reason"}],staticClass:"form-control",class:{"is-invalid":t.form.errors.has("reason")},attrs:{id:"reason",type:"text",name:"reason",placeholder:t.$t("common.return_reason_placeholder")},domProps:{value:t.form.reason},on:{input:function(e){e.target.composing||t.$set(t.form,"reason",e.target.value)}}}),t._v(" "),r("has-error",{attrs:{form:t.form,field:"reason"}})],1),t._v(" "),r("div",{staticClass:"form-group col-md-4"},[r("label",{attrs:{for:"referenceNo"}},[t._v(t._s(t.$t("common.reference"))+"\n "),r("span",{staticClass:"required"},[t._v("*")])]),t._v(" "),r("input",{directives:[{name:"model",rawName:"v-model",value:t.form.referenceNo,expression:"form.referenceNo"}],staticClass:"form-control",class:{"is-invalid":t.form.errors.has("referenceNo")},attrs:{id:"referenceNo",type:"text",name:"referenceNo",placeholder:t.$t("common.reference_placeholder")},domProps:{value:t.form.referenceNo},on:{input:function(e){e.target.composing||t.$set(t.form,"referenceNo",e.target.value)}}}),t._v(" "),r("has-error",{attrs:{form:t.form,field:"referenceNo"}})],1),t._v(" "),r("div",{staticClass:"form-group col-md-4"},[r("label",{attrs:{for:"loanType"}},[t._v(t._s(t.$t("loans.common.loan_type")))]),t._v(" "),r("select",{directives:[{name:"model",rawName:"v-model",value:t.form.loanType,expression:"form.loanType"}],staticClass:"form-control",class:{"is-invalid":t.form.errors.has("loanType")},attrs:{id:"loanType",name:"loanType",disabled:""},on:{change:function(e){var r=Array.prototype.filter.call(e.target.options,(function(t){return t.selected})).map((function(t){return"_value"in t?t._value:t.value}));t.$set(t.form,"loanType",e.target.multiple?r:r[0])}}},[r("option",{attrs:{value:"1"}},[t._v("\n "+t._s(t.$t("loans.common.term_loan"))+"\n ")]),t._v(" "),r("option",{attrs:{value:"0"}},[t._v("\n "+t._s(t.$t("loans.common.cash_credit_loan"))+"\n ")])]),t._v(" "),r("has-error",{attrs:{form:t.form,field:"loanType"}})],1)]),t._v(" "),t.form.authority&&0==t.form.loanType?r("div",{staticClass:"row"},[r("div",{staticClass:"form-group col-md-6"},[r("label",{attrs:{for:"ccLoanLimit"}},[t._v(t._s(t.$t("loans.common.cc_limit"))+"\n "),r("span",{staticClass:"required"},[t._v("*")])]),t._v(" "),r("input",{directives:[{name:"model",rawName:"v-model",value:t.form.authority.ccLimit,expression:"form.authority.ccLimit"}],staticClass:"form-control",attrs:{id:"ccLoanLimit",type:"text",name:"ccLoanLimit",readonly:""},domProps:{value:t.form.authority.ccLimit},on:{input:function(e){e.target.composing||t.$set(t.form.authority,"ccLimit",e.target.value)}}})]),t._v(" "),r("div",{staticClass:"form-group col-md-6"},[r("label",{attrs:{for:"availableAmount"}},[t._v(t._s(t.$t("loans.common.available_amount"))+"\n "),r("span",{staticClass:"required"},[t._v("*")])]),t._v(" "),r("input",{directives:[{name:"model",rawName:"v-model",value:t.form.authority.availableCCLoan,expression:"form.authority.availableCCLoan"}],staticClass:"form-control",attrs:{id:"availableAmount",type:"text",name:"availableAmount",readonly:""},domProps:{value:t.form.authority.availableCCLoan},on:{input:function(e){e.target.composing||t.$set(t.form.authority,"availableCCLoan",e.target.value)}}})])]):t._e(),t._v(" "),0==t.form.loanType?r("div",{staticClass:"row"},[r("div",{staticClass:"form-group col-md-6"},[r("label",{attrs:{for:"amount"}},[t._v(t._s(t.$t("common.amount"))+"\n "),r("span",{staticClass:"required"},[t._v("*")])]),t._v(" "),r("input",{directives:[{name:"model",rawName:"v-model",value:t.form.amount,expression:"form.amount"}],staticClass:"form-control",class:{"is-invalid":t.form.errors.has("amount")},attrs:{id:"amount",type:"number",step:"any",name:"amount",placeholder:t.$t("common.amount_placeholder"),min:t.form.due,max:0==t.form.loanType?t.form.authority.availableCCLoan+t.form.rowPayableAMount:""},domProps:{value:t.form.amount},on:{change:t.generatePayable,keyup:t.generatePayable,input:function(e){e.target.composing||t.$set(t.form,"amount",e.target.value)}}}),t._v(" "),r("has-error",{attrs:{form:t.form,field:"amount"}})],1),t._v(" "),r("div",{staticClass:"form-group col-md-6"},[r("label",{attrs:{for:"date"}},[t._v(t._s(t.$t("common.date")))]),t._v(" "),r("input",{directives:[{name:"model",rawName:"v-model",value:t.form.date,expression:"form.date"}],staticClass:"form-control",class:{"is-invalid":t.form.errors.has("date")},attrs:{id:"date",type:"date",name:"date"},domProps:{value:t.form.date},on:{input:function(e){e.target.composing||t.$set(t.form,"date",e.target.value)}}}),t._v(" "),r("has-error",{attrs:{form:t.form,field:"date"}})],1)]):r("div",{staticClass:"row"},[r("div",{staticClass:"form-group col-md-6"},[r("label",{attrs:{for:"amount"}},[t._v(t._s(t.$t("common.amount"))+"\n "),r("span",{staticClass:"required"},[t._v("*")])]),t._v(" "),r("input",{directives:[{name:"model",rawName:"v-model",value:t.form.amount,expression:"form.amount"}],staticClass:"form-control",class:{"is-invalid":t.form.errors.has("amount")},attrs:{id:"amount",type:"number",step:"any",name:"amount",placeholder:t.$t("common.amount_placeholder"),min:t.form.due-t.form.interestAmount,max:0==t.form.loanType?t.form.authority.availableAmount:""},domProps:{value:t.form.amount},on:{change:t.generatePayable,keyup:t.generatePayable,input:function(e){e.target.composing||t.$set(t.form,"amount",e.target.value)}}}),t._v(" "),r("has-error",{attrs:{form:t.form,field:"amount"}})],1),t._v(" "),r("div",{staticClass:"form-group col-md-6"},[r("label",{attrs:{for:"interest"}},[t._v(t._s(t.$t("common.interest"))+" (%)")]),t._v(" "),r("input",{directives:[{name:"model",rawName:"v-model",value:t.form.interest,expression:"form.interest"}],staticClass:"form-control",class:{"is-invalid":t.form.errors.has("interest")},attrs:{id:"interest",type:"number",step:"any",min:"0",max:"100",name:"interest",placeholder:t.$t("loans.common.interest_rate_placeholder")},domProps:{value:t.form.interest},on:{change:t.generatePayable,keyup:t.generatePayable,input:function(e){e.target.composing||t.$set(t.form,"interest",e.target.value)}}})]),t._v(" "),r("div",{staticClass:"form-group col-md-4"},[r("label",{attrs:{for:"paymentType"}},[t._v(t._s(t.$t("common.payment_type")))]),t._v(" "),r("select",{directives:[{name:"model",rawName:"v-model",value:t.form.paymentType,expression:"form.paymentType"}],staticClass:"form-control",class:{"is-invalid":t.form.errors.has("paymentType")},attrs:{id:"paymentType"},on:{change:[function(e){var r=Array.prototype.filter.call(e.target.options,(function(t){return t.selected})).map((function(t){return"_value"in t?t._value:t.value}));t.$set(t.form,"paymentType",e.target.multiple?r:r[0])},t.generatePayable]}},[r("option",{attrs:{value:"0"}},[t._v(t._s(t.$t("common.daily")))]),t._v(" "),r("option",{attrs:{value:"1"}},[t._v(t._s(t.$t("common.monthly")))]),t._v(" "),r("option",{attrs:{value:"2"}},[t._v(t._s(t.$t("common.yearly")))])]),t._v(" "),r("has-error",{attrs:{form:t.form,field:"paymentType"}})],1),t._v(" "),r("div",{staticClass:"form-group col-md-4"},[r("label",{attrs:{for:"duration"}},[t._v(t._s(t.$t("loans.common.duration"))+"\n "),r("span",{staticClass:"required"},[t._v("*")])]),t._v(" "),r("input",{directives:[{name:"model",rawName:"v-model",value:t.form.duration,expression:"form.duration"}],staticClass:"form-control",class:{"is-invalid":t.form.errors.has("duration")},attrs:{id:"duration",type:"number",step:"1",name:"duration",placeholder:t.$t("loans.common.duration_placeholder"),min:"1",max:"255"},domProps:{value:t.form.duration},on:{change:t.generatePayable,keyup:t.generatePayable,input:function(e){e.target.composing||t.$set(t.form,"duration",e.target.value)}}}),t._v(" "),r("has-error",{attrs:{form:t.form,field:"duration"}})],1),t._v(" "),r("div",{staticClass:"form-group col-md-4"},[r("label",{attrs:{for:"payReturn"}},[t._v("\n "+t._s(t.$t("common.per"))+"\n "),0==t.form.paymentType?r("span",[t._v(t._s(t.$t("common.day")))]):1==t.form.paymentType?r("span",[t._v(t._s(t.$t("common.month")))]):r("span",[t._v(t._s(t.$t("common.year")))])]),t._v(" "),r("input",{directives:[{name:"model",rawName:"v-model",value:t.form.payReturn,expression:"form.payReturn"}],staticClass:"form-control",class:{"is-invalid":t.form.errors.has("payReturn")},attrs:{id:"payReturn",type:"text",name:"payReturn",readonly:""},domProps:{value:t.form.payReturn},on:{input:function(e){e.target.composing||t.$set(t.form,"payReturn",e.target.value)}}}),t._v(" "),r("has-error",{attrs:{form:t.form,field:"payReturn"}})],1),t._v(" "),r("div",{staticClass:"form-group col-md-6"},[r("label",{attrs:{for:"payableAmount"}},[t._v(t._s(t.$t("loans.common.payable_amount")))]),t._v(" "),r("input",{directives:[{name:"model",rawName:"v-model.lazy",value:t.form.payableAmount,expression:"form.payableAmount",modifiers:{lazy:!0}}],staticClass:"form-control",class:{"is-invalid":t.form.errors.has("payableAmount")},attrs:{id:"payableAmount",type:"text",name:"payableAmount",readonly:""},domProps:{value:t.form.payableAmount},on:{change:function(e){return t.$set(t.form,"payableAmount",e.target.value)}}})]),t._v(" "),r("div",{staticClass:"form-group col-md-6"},[r("label",{attrs:{for:"date"}},[t._v(t._s(t.$t("common.date")))]),t._v(" "),r("input",{directives:[{name:"model",rawName:"v-model",value:t.form.date,expression:"form.date"}],staticClass:"form-control",class:{"is-invalid":t.form.errors.has("date")},attrs:{id:"date",type:"date",name:"date"},domProps:{value:t.form.date},on:{input:function(e){e.target.composing||t.$set(t.form,"date",e.target.value)}}}),t._v(" "),r("has-error",{attrs:{form:t.form,field:"date"}})],1)]),t._v(" "),r("div",{staticClass:"form-group"},[r("label",{attrs:{for:"note"}},[t._v(t._s(t.$t("common.note")))]),t._v(" "),r("textarea",{directives:[{name:"model",rawName:"v-model",value:t.form.note,expression:"form.note"}],staticClass:"form-control",class:{"is-invalid":t.form.errors.has("note")},attrs:{id:"note",placeholder:t.$t("common.note_placeholder")},domProps:{value:t.form.note},on:{input:function(e){e.target.composing||t.$set(t.form,"note",e.target.value)}}}),t._v(" "),r("has-error",{attrs:{form:t.form,field:"note"}})],1),t._v(" "),r("div",{staticClass:"row"},[r("div",{staticClass:"form-group col-md-6"},[r("label",{attrs:{for:"status"}},[t._v(t._s(t.$t("common.status")))]),t._v(" "),r("select",{directives:[{name:"model",rawName:"v-model",value:t.form.status,expression:"form.status"}],staticClass:"form-control",class:{"is-invalid":t.form.errors.has("status")},attrs:{id:"status"},on:{change:function(e){var r=Array.prototype.filter.call(e.target.options,(function(t){return t.selected})).map((function(t){return"_value"in t?t._value:t.value}));t.$set(t.form,"status",e.target.multiple?r:r[0])}}},[r("option",{attrs:{value:"1"}},[t._v(t._s(t.$t("common.active")))]),t._v(" "),r("option",{attrs:{value:"0"}},[t._v(t._s(t.$t("common.in_active")))])]),t._v(" "),r("has-error",{attrs:{form:t.form,field:"status"}})],1),t._v(" "),r("div",{staticClass:"form-group col-md-6"},[r("label",{attrs:{for:"image"}},[t._v(t._s(t.$t("common.image")))]),t._v(" "),r("div",{staticClass:"custom-file"},[r("input",{staticClass:"custom-file-input",class:{"is-invalid":t.form.errors.has("image")},attrs:{id:"image",type:"file",name:"image"},on:{change:t.onFileChange}}),t._v(" "),r("label",{staticClass:"custom-file-label",attrs:{for:"image"}},[t._v(t._s(t.$t("common.choose_file")))])]),t._v(" "),r("has-error",{attrs:{form:t.form,field:"image"}}),t._v(" "),r("div",{staticClass:"bg-light mt-4 w-25"},[t.url?r("img",{staticClass:"img-fluid",attrs:{src:t.url,alt:t.$t("common.image_alt")}}):t._e()])],1)])]),t._v(" "),r("div",{staticClass:"card-footer"},[r("v-button",{staticClass:"btn btn-primary",attrs:{loading:t.form.busy}},[r("i",{staticClass:"fas fa-edit"}),t._v(" "+t._s(t.$t("common.save_changes"))+"\n ")]),t._v(" "),r("button",{staticClass:"btn btn-secondary float-right",attrs:{type:"reset"},on:{click:function(e){return t.form.reset()}}},[r("i",{staticClass:"fas fa-power-off"}),t._v(" "+t._s(t.$t("common.reset"))+"\n ")])],1)])])])])],1)}),[],!1,null,null,null);e.default=d.exports}}]);
Simpan