fix: delete one or more expeditions
gitea/salix/pipeline/head Something is wrong with the build of this commit
Details
gitea/salix/pipeline/head Something is wrong with the build of this commit
Details
This commit is contained in:
parent
26d04ce2d2
commit
a3a432c753
|
@ -17,8 +17,9 @@
|
||||||
ng-show="$ctrl.totalChecked">
|
ng-show="$ctrl.totalChecked">
|
||||||
</vn-button>
|
</vn-button>
|
||||||
<vn-button
|
<vn-button
|
||||||
|
ng-show="$ctrl.checked.length > 0"
|
||||||
|
ng-click="removeConfirm.show()"
|
||||||
icon="delete"
|
icon="delete"
|
||||||
ng-click="deleteExpedition.show(expedition.id)"
|
|
||||||
vn-tooltip="Delete expedition">
|
vn-tooltip="Delete expedition">
|
||||||
</vn-button>
|
</vn-button>
|
||||||
</vn-tool-bar>
|
</vn-tool-bar>
|
||||||
|
@ -89,10 +90,10 @@
|
||||||
vn-id="worker-descriptor">
|
vn-id="worker-descriptor">
|
||||||
</vn-worker-descriptor-popover>
|
</vn-worker-descriptor-popover>
|
||||||
<vn-confirm
|
<vn-confirm
|
||||||
vn-id="delete-expedition"
|
vn-id="removeConfirm"
|
||||||
on-accept="$ctrl.onDialogAccept($data)"
|
message="Are you sure you want to delete this expedition?"
|
||||||
question="Delete expedition"
|
question="Delete expedition"
|
||||||
message="Are you sure you want to delete this expedition?">
|
on-accept="$ctrl.onRemove()">
|
||||||
</vn-confirm>
|
</vn-confirm>
|
||||||
|
|
||||||
<vn-popup vn-id="statusLog">
|
<vn-popup vn-id="statusLog">
|
||||||
|
|
|
@ -27,6 +27,20 @@ class Controller extends Section {
|
||||||
return this.checked.length;
|
return this.checked.length;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
async onRemove() {
|
||||||
|
const params = [];
|
||||||
|
for (let expedition of this.checked)
|
||||||
|
params.push(expedition.id);
|
||||||
|
|
||||||
|
for (let id of params) {
|
||||||
|
await this.$http.delete(`Expeditions/${id}`)
|
||||||
|
.then(() => {
|
||||||
|
this.vnApp.showSuccess(this.$t('Expedition removed'));
|
||||||
|
this.$state.reload();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
createTicket(routeFk) {
|
createTicket(routeFk) {
|
||||||
const tomorrow = new Date();
|
const tomorrow = new Date();
|
||||||
const params = {
|
const params = {
|
||||||
|
|
|
@ -1 +1,2 @@
|
||||||
Status log: Hitorial de estados
|
Status log: Hitorial de estados
|
||||||
|
Expedition removed: Expedición eliminada
|
Loading…
Reference in New Issue