⚝
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: 168.a3f49e.js
/*! For license information please see 168.a3f49e.js.LICENSE.txt */ (window.webpackJsonp=window.webpackJsonp||[]).push([[168],{554:function(t,e,r){"use strict";r.r(e);var o=r(5),a=r(3),n=r.n(a);function i(t){return(i="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:{},n=a.iterator||"@@iterator",c=a.asyncIterator||"@@asyncIterator",l=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 d?e:d,i=Object.create(n.prototype),s=new E(a||[]);return o(i,"_invoke",{value:C(t,r,s)}),i}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 p={};function d(){}function v(){}function h(){}var y={};u(y,n,(function(){return this}));var g=Object.getPrototypeOf,_=g&&g(g(k([])));_&&_!==e&&r.call(_,n)&&(y=_);var b=h.prototype=d.prototype=Object.create(y);function w(t){["next","throw","return"].forEach((function(e){u(t,e,(function(t){return this._invoke(e,t)}))}))}function x(t,e){var a;o(this,"_invoke",{value:function(o,n){function s(){return new e((function(a,s){!function o(a,n,s,c){var l=f(t[a],t,n);if("throw"!==l.type){var u=l.arg,m=u.value;return m&&"object"==i(m)&&r.call(m,"__await")?e.resolve(m.__await).then((function(t){o("next",t,s,c)}),(function(t){o("throw",t,s,c)})):e.resolve(m).then((function(t){u.value=t,s(u)}),(function(t){return o("throw",t,s,c)}))}c(l.arg)}(o,n,a,s)}))}return a=a?a.then(s,s):s()}})}function C(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 S()}for(r.method=a,r.arg=n;;){var i=r.delegate;if(i){var s=N(i,r);if(s){if(s===p)continue;return s}}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 c=f(t,e,r);if("normal"===c.type){if(o=r.done?"completed":"suspendedYield",c.arg===p)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(o="completed",r.method="throw",r.arg=c.arg)}}}function N(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,N(t,e),"throw"===e.method)||"return"!==r&&(e.method="throw",e.arg=new TypeError("The iterator does not provide a '"+r+"' method")),p;var a=f(o,t.iterator,e.arg);if("throw"===a.type)return e.method="throw",e.arg=a.arg,e.delegate=null,p;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,p):n:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,p)}function $(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 L(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function E(t){this.tryEntries=[{tryLoc:"root"}],t.forEach($,this),this.reset(!0)}function k(t){if(t){var e=t[n];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:S}}function S(){return{value:void 0,done:!0}}return v.prototype=h,o(b,"constructor",{value:h,configurable:!0}),o(h,"constructor",{value:v,configurable:!0}),v.displayName=u(h,l,"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,l,"GeneratorFunction")),t.prototype=Object.create(b),t},t.awrap=function(t){return{__await:t}},w(x.prototype),u(x.prototype,c,(function(){return this})),t.AsyncIterator=x,t.async=function(e,r,o,a,n){void 0===n&&(n=Promise);var i=new x(m(e,r,o,a),n);return t.isGeneratorFunction(r)?i:i.next().then((function(t){return t.done?t.value:i.next()}))},w(b),u(b,l,"Generator"),u(b,n,(function(){return this})),u(b,"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=k,E.prototype={constructor:E,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(L),!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 i.type="throw",i.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],i=n.completion;if("root"===n.tryLoc)return o("end");if(n.tryLoc<=this.prev){var s=r.call(n,"catchLoc"),c=r.call(n,"finallyLoc");if(s&&c){if(this.prev<n.catchLoc)return o(n.catchLoc,!0);if(this.prev<n.finallyLoc)return o(n.finallyLoc)}else if(s){if(this.prev<n.catchLoc)return o(n.catchLoc,!0)}else{if(!c)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 i=n?n.completion:{};return i.type=t,i.arg=e,n?(this.method="next",this.next=n.finallyLoc,p):this.complete(i)},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),p},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),L(r),p}},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;L(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:k(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),p}},t}function c(t,e,r,o,a,n,i){try{var s=t[n](i),c=s.value}catch(t){return void r(t)}s.done?e(c):Promise.resolve(c).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 i(t){c(n,o,a,i,s,"next",t)}function s(t){c(n,o,a,i,s,"throw",t)}i(void 0)}))}}var u={middleware:["auth","check-permissions"],metaInfo:function(){return{title:this.$t("suppliers.edit.page_title")}},data:function(){return{breadcrumbsCurrent:"suppliers.edit.breadcrumbs_current",breadcrumbs:[{name:"suppliers.edit.breadcrumbs_first",url:"home"},{name:"suppliers.edit.breadcrumbs_second",url:"suppliers.index"},{name:"suppliers.edit.breadcrumbs_active",url:""}],form:new o.a({name:"",email:"",phoneNumber:"",companyName:"",address:"",image:"",status:1}),url:null,loading:!0}},mounted:function(){this.getSupplier()},methods:{getSupplier: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,n.a.get(window.location.origin+"/api/suppliers/"+t.$route.params.slug);case 2:r=e.sent,o=r.data,t.form.name=o.data.name,t.form.email=o.data.email,t.form.phoneNumber=o.data.phoneNumber,t.form.companyName=o.data.companyName,t.form.address=o.data.address,t.form.status=o.data.status,t.url=o.data.image;case 11: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")},updateSupplier: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/suppliers/"+t.$route.params.slug).then((function(e){toast.fire({type:"success",title:t.$t("suppliers.edit.success_msg")}),t.$router.push({name:"suppliers.index"})})).catch((function(){toast.fire({type:"error",title:t.$t("common.error_msg")})}));case 2:case"end":return e.stop()}}),e)})))()}}},m=r(1),f=Object(m.a)(u,(function(){var t=this,e=t._self._c;return e("div",[e("breadcrumbs",{attrs:{items:t.breadcrumbs,current:t.breadcrumbsCurrent}}),t._v(" "),e("div",{staticClass:"row"},[e("div",{staticClass:"col-lg-12"},[e("div",{staticClass:"card"},[e("div",{staticClass:"card-header"},[e("h3",{staticClass:"card-title"},[t._v(t._s(t.$t("suppliers.edit.form_title")))]),t._v(" "),e("router-link",{staticClass:"btn btn-dark float-right",attrs:{to:{name:"suppliers.index"}}},[e("i",{staticClass:"fas fa-long-arrow-alt-left"}),t._v(" "+t._s(t.$t("common.back"))+"\n ")])],1),t._v(" "),e("form",{attrs:{role:"form"},on:{submit:function(e){return e.preventDefault(),t.updateSupplier.apply(null,arguments)},keydown:function(e){return t.form.onKeydown(e)}}},[e("div",{staticClass:"card-body"},[e("div",{staticClass:"row"},[e("div",{staticClass:"form-group col-md-6"},[e("label",{attrs:{for:"name"}},[t._v(t._s(t.$t("common.name"))+"\n "),e("span",{staticClass:"required"},[t._v("*")])]),t._v(" "),e("input",{directives:[{name:"model",rawName:"v-model",value:t.form.name,expression:"form.name"}],staticClass:"form-control",class:{"is-invalid":t.form.errors.has("name")},attrs:{id:"name",type:"text",name:"name",placeholder:t.$t("common.name_placeholder")},domProps:{value:t.form.name},on:{input:function(e){e.target.composing||t.$set(t.form,"name",e.target.value)}}}),t._v(" "),e("has-error",{attrs:{form:t.form,field:"name"}})],1),t._v(" "),e("div",{staticClass:"form-group col-md-6"},[e("label",{attrs:{for:"companyName"}},[t._v(t._s(t.$t("common.company_name")))]),t._v(" "),e("input",{directives:[{name:"model",rawName:"v-model",value:t.form.companyName,expression:"form.companyName"}],staticClass:"form-control",class:{"is-invalid":t.form.errors.has("companyName")},attrs:{id:"companyName",type:"companyName",name:"companyName",placeholder:t.$t("common.company_name_placeholder")},domProps:{value:t.form.companyName},on:{input:function(e){e.target.composing||t.$set(t.form,"companyName",e.target.value)}}}),t._v(" "),e("has-error",{attrs:{form:t.form,field:"companyName"}})],1)]),t._v(" "),e("div",{staticClass:"row"},[e("div",{staticClass:"form-group col-md-6"},[e("label",{attrs:{for:"phoneNumber"}},[t._v(t._s(t.$t("common.contact_number"))+"\n "),e("span",{staticClass:"required"},[t._v("*")])]),t._v(" "),e("input",{directives:[{name:"model",rawName:"v-model",value:t.form.phoneNumber,expression:"form.phoneNumber"}],staticClass:"form-control",class:{"is-invalid":t.form.errors.has("phoneNumber")},attrs:{id:"phoneNumber",type:"text",name:"phoneNumber",placeholder:t.$t("common.contact_number_placeholder")},domProps:{value:t.form.phoneNumber},on:{input:function(e){e.target.composing||t.$set(t.form,"phoneNumber",e.target.value)}}}),t._v(" "),e("has-error",{attrs:{form:t.form,field:"phoneNumber"}})],1),t._v(" "),e("div",{staticClass:"form-group col-md-6"},[e("label",{attrs:{for:"email"}},[t._v(t._s(t.$t("common.email")))]),t._v(" "),e("input",{directives:[{name:"model",rawName:"v-model",value:t.form.email,expression:"form.email"}],staticClass:"form-control",class:{"is-invalid":t.form.errors.has("email")},attrs:{id:"email",type:"email",name:"email",placeholder:t.$t("common.email_placeholder")},domProps:{value:t.form.email},on:{input:function(e){e.target.composing||t.$set(t.form,"email",e.target.value)}}}),t._v(" "),e("has-error",{attrs:{form:t.form,field:"email"}})],1)]),t._v(" "),e("div",{staticClass:"form-group"},[e("label",{attrs:{for:"address"}},[t._v(t._s(t.$t("common.address")))]),t._v(" "),e("textarea",{directives:[{name:"model",rawName:"v-model",value:t.form.address,expression:"form.address"}],staticClass:"form-control",class:{"is-invalid":t.form.errors.has("address")},attrs:{id:"address",placeholder:t.$t("common.address_placeholder")},domProps:{value:t.form.address},on:{input:function(e){e.target.composing||t.$set(t.form,"address",e.target.value)}}}),t._v(" "),e("has-error",{attrs:{form:t.form,field:"address"}})],1),t._v(" "),e("div",{staticClass:"row"},[e("div",{staticClass:"form-group col-md-6"},[e("label",{attrs:{for:"image"}},[t._v(t._s(t.$t("common.image")))]),t._v(" "),e("div",{staticClass:"custom-file"},[e("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(" "),e("label",{staticClass:"custom-file-label",attrs:{for:"image"}},[t._v(t._s(t.$t("common.choose_file")))])]),t._v(" "),e("has-error",{attrs:{form:t.form,field:"image"}}),t._v(" "),e("div",{staticClass:"bg-light mt-4 w-25"},[t.url?e("img",{staticClass:"img-fluid",attrs:{src:t.url,alt:t.$t("common.image_alt")}}):t._e()])],1),t._v(" "),e("div",{staticClass:"form-group col-md-6"},[e("label",{attrs:{for:"status"}},[t._v(t._s(t.$t("common.status")))]),t._v(" "),e("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])}}},[e("option",{attrs:{value:"1"}},[t._v(t._s(t.$t("common.active")))]),t._v(" "),e("option",{attrs:{value:"0"}},[t._v(t._s(t.$t("common.in_active")))])]),t._v(" "),e("has-error",{attrs:{form:t.form,field:"status"}})],1)])]),t._v(" "),e("div",{staticClass:"card-footer"},[e("v-button",{staticClass:"btn btn-primary",attrs:{loading:t.form.busy}},[e("i",{staticClass:"fas fa-edit"}),t._v(" "+t._s(t.$t("common.save_changes"))+"\n ")]),t._v(" "),e("button",{staticClass:"btn btn-secondary float-right",attrs:{type:"reset"},on:{click:function(e){return t.form.reset()}}},[e("i",{staticClass:"fas fa-power-off"}),t._v(" "+t._s(t.$t("common.reset"))+"\n ")])],1)])])])])],1)}),[],!1,null,null,null);e.default=f.exports}}]);
Simpan