Action button notification only includes name if given
This commit is contained in:
parent
d2e19142df
commit
59618ccfbf
1 changed files with 7 additions and 1 deletions
|
|
@ -349,7 +349,13 @@ export default {
|
||||||
this.$emit("completed", response.data.output);
|
this.$emit("completed", response.data.output);
|
||||||
} else if (response.data.status == "cancelled") {
|
} else if (response.data.status == "cancelled") {
|
||||||
this.$emit("cancelled", response.data);
|
this.$emit("cancelled", response.data);
|
||||||
this.modalNotify(`The action '${this.submitLabel}' was cancelled.`);
|
let cancelMessage;
|
||||||
|
if (this.submitLabel != "") {
|
||||||
|
cancelMessage = ` "${this.submitLabel}" `;
|
||||||
|
} else {
|
||||||
|
cancelMessage = " ";
|
||||||
|
}
|
||||||
|
this.modalNotify(`The action ${cancelMessage} was cancelled.`);
|
||||||
} else if (response.data.status == "error") {
|
} else if (response.data.status == "error") {
|
||||||
const err_msg = this.log?.[0]?.message ?? "Unknown error";
|
const err_msg = this.log?.[0]?.message ?? "Unknown error";
|
||||||
this.$emit("error", err_msg);
|
this.$emit("error", err_msg);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue