delete app
This commit is contained in:
@@ -51,6 +51,20 @@
|
||||
ok-btn-label="選択">
|
||||
<version-history ref="versionDialog" :app="targetRow" />
|
||||
</show-dialog>
|
||||
|
||||
<q-dialog v-model="deleteDialog" persistent>
|
||||
<q-card>
|
||||
<q-card-section class="row items-center">
|
||||
<q-icon name="warning" color="warning" size="2em" />
|
||||
<span class="q-ml-sm">削除してもよろしいですか?</span>
|
||||
</q-card-section>
|
||||
|
||||
<q-card-actions align="right">
|
||||
<q-btn flat label="Cancel" color="primary" v-close-popup />
|
||||
<q-btn flat label="OK" color="primary" :loading="deleteUserLoading" @click="deleteApp" />
|
||||
</q-card-actions>
|
||||
</q-card>
|
||||
</q-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -96,6 +110,8 @@ const versionDialog = ref();
|
||||
const showSelectApp=ref(false);
|
||||
const showVersionHistory=ref(false);
|
||||
const isAdding = ref(false);
|
||||
const deleteDialog = ref(false);
|
||||
const deleteUserLoading = ref(false);
|
||||
|
||||
const actionList = [
|
||||
{ label: '設定', icon: 'account_tree', action: toEditFlowPage },
|
||||
@@ -153,7 +169,24 @@ const closeSelectAppDialog = async (val: 'OK'|'Cancel') => {
|
||||
|
||||
function removeRow(app:IAppDisplay) {
|
||||
targetRow.value = app;
|
||||
return
|
||||
deleteDialog.value = true;
|
||||
}
|
||||
|
||||
const deleteApp = async () => {
|
||||
deleteUserLoading.value = true;
|
||||
try {
|
||||
await api.delete(`api/apps/${targetRow.value?.id}`);
|
||||
await getApps();
|
||||
} catch (error) {
|
||||
$q.notify({
|
||||
icon: 'error',
|
||||
color: 'negative',
|
||||
message: 'アプリの削除に失敗しました'
|
||||
});
|
||||
} finally {
|
||||
deleteUserLoading.value = false;
|
||||
deleteDialog.value = false;
|
||||
}
|
||||
}
|
||||
|
||||
function showHistory(app:IAppDisplay) {
|
||||
|
||||
Reference in New Issue
Block a user