initial commit

This commit is contained in:
Kukks
2023-01-16 10:31:48 +01:00
parent 136273406c
commit 25ccd99558
171 changed files with 10592 additions and 0 deletions

View File

@@ -0,0 +1,36 @@
Vue.component("AOPP", {
props: ["srvModel"],
methods: {
onaoppChange: function(){
this.aoppAddressInputDirty = true;
this.aoppAddressInputInvalid = false;
},
onSubmit : function(){
var self = this;
if (this.aoppAddressInput && this.aoppAddressInput.startsWith("aopp:?")) {
this.aoppAddressFormSubmitting = true;
// Push the email to a server, once the reception is confirmed move on
$.ajax({
url: "/plugins/"+this.srvModel.storeId+"/AOPP/" +this.srvModel.invoiceId,
type: "POST",
data: JSON.stringify({ aopp: this.aoppAddressInput }),
contentType: "application/json; charset=utf-8"
})
.done(function () {
}).always(function () {
self.aoppAddressFormSubmitting = false;
});
} else {
this.aoppAddressInputInvalid = true;
}
}
},
data: function () {
return {
aoppAddressInput: "",
aoppAddressInputDirty: false,
aoppAddressInputInvalid: false,
aoppAddressFormSubmitting: false
}
}
});