Merged in feature/PMCORE-3112 (pull request #8029)

PMCORE-3112
This commit is contained in:
Fabio Guachalla
2021-08-09 20:29:41 +00:00
committed by Rodrigo Quelca
5 changed files with 102 additions and 1 deletions

View File

@@ -0,0 +1,63 @@
<template>
<div>
<b-modal
ref="modal-delete-list"
hide-footer
size="md"
>
<template v-slot:modal-title>
{{ $t('ID_DELETE_CUSTOM_CASE_LIST') }}
</template>
<b-container fluid>
<p>
{{ $t("ID_ARE_YOU_SURE_DELETE_CUSTOM_CASE_LIST") }}
</p>
</b-container>
<div class="modal-footer">
<div class="float-right">
<b-button
variant="danger"
data-dismiss="modal"
@click="hide"
>
{{ $t("ID_NO") }}
</b-button>
<b-button
variant="success"
@click="deleteCustomCaseList"
>
{{ $t("ID_YES") }}
</b-button>
</div>
</div>
</b-modal>
</div>
</template>
<script>
import api from "./../settings/customCaseList/Api/CaseList";
export default {
name: "ModalDeleteCaseList",
data() {
return {
data: null
}
},
methods: {
show() {
this.$refs["modal-delete-list"].show();
},
hide() {
this.$refs["modal-delete-list"].hide();
},
deleteCustomCaseList() {
api.deleteCaseList(this.data).then((response) => {
if (response.statusText == "OK") {
that.$refs["modal-pause-case"].hide();
that.$parent.$refs["vueTable"].getData();
}
});
}
}
}
</script>

View File

@@ -36,6 +36,19 @@ class caseListApi extends Api {
keys: {} keys: {}
}); });
} }
deleteCaseList(data) {
return axios.delete(
window.config.SYS_SERVER_API +
'/api/1.0/' +
window.config.SYS_WORKSPACE +
'/caseList/' + data.id, {
headers: {
'Authorization': 'Bearer ' + window.config.SYS_CREDENTIALS.accessToken,
"Accept-Language": window.config.SYS_LANG
}
}
);
}
} }
let api = new caseListApi(Services); let api = new caseListApi(Services);

View File

@@ -1,5 +1,6 @@
<template> <template>
<div id="people"> <div id="people">
<ModalDeleteCaseList ref="modal-delete-list"></ModalDeleteCaseList>
<button-fleft :data="newList"></button-fleft> <button-fleft :data="newList"></button-fleft>
<button-fleft :data="importList"></button-fleft> <button-fleft :data="importList"></button-fleft>
<v-server-table <v-server-table
@@ -27,13 +28,15 @@ import ButtonFleft from "../../../components/home/ButtonFleft.vue";
import Ellipsis from "../../../components/utils/ellipsis.vue"; import Ellipsis from "../../../components/utils/ellipsis.vue";
import utils from "../../../utils/utils"; import utils from "../../../utils/utils";
import OwnerCell from "../../../components/vuetable/OwnerCell"; import OwnerCell from "../../../components/vuetable/OwnerCell";
import ModalDeleteCaseList from "./../../Modals/ModalDeleteCaseList.vue"
export default { export default {
name: "Tables", name: "Tables",
props: ["module"], props: ["module"],
components: { components: {
ButtonFleft, ButtonFleft,
Ellipsis, Ellipsis,
OwnerCell OwnerCell,
ModalDeleteCaseList
}, },
data() { data() {
return { return {
@@ -180,6 +183,14 @@ export default {
data.push(v); data.push(v);
}); });
return data; return data;
},
/**
* Show modal to delete a custom case list
* @param {object} data
*/
showModalDelete(data) {
this.$refs["modal-delete-list"].data = data;
this.$refs["modal-delete-list"].show();
} }
} }
}; };

View File

@@ -2359,6 +2359,12 @@ msgstr "App Uid"
msgid "Are you sure want to claim the task?" msgid "Are you sure want to claim the task?"
msgstr "Are you sure want to claim the task?" msgstr "Are you sure want to claim the task?"
# TRANSLATION
# LABEL/ID_ARE_YOU_SURE_DELETE_CUSTOM_CASE_LIST
#: LABEL/ID_ARE_YOU_SURE_DELETE_CUSTOM_CASE_LIST
msgid "Are you sure to delete the Case List {CUSTOM_NAME}, please confirm?"
msgstr "Are you sure to delete the Case List {CUSTOM_NAME}, please confirm?"
# TRANSLATION # TRANSLATION
# LABEL/ID_ARE_YOU_SURE_RESEND # LABEL/ID_ARE_YOU_SURE_RESEND
#: LABEL/ID_ARE_YOU_SURE_RESEND #: LABEL/ID_ARE_YOU_SURE_RESEND
@@ -6149,6 +6155,12 @@ msgstr "Delete Category"
msgid "Delete the connection?" msgid "Delete the connection?"
msgstr "Delete the connection?" msgstr "Delete the connection?"
# TRANSLATION
# LABEL/ID_DELETE_CUSTOM_CASE_LIST
#: LABEL/ID_DELETE_CUSTOM_CASE_LIST
msgid "Delete Custom Case List"
msgstr "Delete Custom Case List"
# TRANSLATION # TRANSLATION
# LABEL/ID_DELETE_DASHLET_INSTANCE # LABEL/ID_DELETE_DASHLET_INSTANCE
#: LABEL/ID_DELETE_DASHLET_INSTANCE #: LABEL/ID_DELETE_DASHLET_INSTANCE

View File

@@ -57196,6 +57196,7 @@ INSERT INTO TRANSLATION (TRN_CATEGORY,TRN_ID,TRN_LANG,TRN_VALUE,TRN_UPDATE_DATE
( 'LABEL','ID_APP_MSG_BODY','en','Body','2014-01-15') , ( 'LABEL','ID_APP_MSG_BODY','en','Body','2014-01-15') ,
( 'LABEL','ID_APP_UID','en','App Uid','2015-09-15') , ( 'LABEL','ID_APP_UID','en','App Uid','2015-09-15') ,
( 'LABEL','ID_ARE_YOU_SURE_CLAIM_TASK','en','Are you sure want to claim the task?','2021-01-26') , ( 'LABEL','ID_ARE_YOU_SURE_CLAIM_TASK','en','Are you sure want to claim the task?','2021-01-26') ,
( 'LABEL','ID_ARE_YOU_SURE_DELETE_CUSTOM_CASE_LIST','en','Are you sure to delete the Case List {CUSTOM_NAME}, please confirm?','2021-08-05') ,
( 'LABEL','ID_ARE_YOU_SURE_RESEND','en','Are you sure that you want to resend this message','2014-01-15') , ( 'LABEL','ID_ARE_YOU_SURE_RESEND','en','Are you sure that you want to resend this message','2014-01-15') ,
( 'LABEL','ID_ARE_YOU_SURE_TO_DELETE_ATTRIBUTE_PLEASE_CONFIRM','en','Are you sure to delete the matched attribute "{0}", please confirm?','2020-12-10') , ( 'LABEL','ID_ARE_YOU_SURE_TO_DELETE_ATTRIBUTE_PLEASE_CONFIRM','en','Are you sure to delete the matched attribute "{0}", please confirm?','2020-12-10') ,
( 'LABEL','ID_ARE_YOU_SURE_TO_DELETE_CONNECTION_PLEASE_CONFIRM','en','Are you sure to delete the connection "{0}", please confirm?','2020-12-10') , ( 'LABEL','ID_ARE_YOU_SURE_TO_DELETE_CONNECTION_PLEASE_CONFIRM','en','Are you sure to delete the connection "{0}", please confirm?','2020-12-10') ,
@@ -57851,6 +57852,7 @@ INSERT INTO TRANSLATION (TRN_CATEGORY,TRN_ID,TRN_LANG,TRN_VALUE,TRN_UPDATE_DATE
INSERT INTO TRANSLATION (TRN_CATEGORY,TRN_ID,TRN_LANG,TRN_VALUE,TRN_UPDATE_DATE ) VALUES INSERT INTO TRANSLATION (TRN_CATEGORY,TRN_ID,TRN_LANG,TRN_VALUE,TRN_UPDATE_DATE ) VALUES
( 'LABEL','ID_DELETE_CONNECTION','en','Delete the connection?','2014-01-15') , ( 'LABEL','ID_DELETE_CONNECTION','en','Delete the connection?','2014-01-15') ,
( 'LABEL','ID_DELETE_CUSTOM_CASE_LIST','en','Delete Custom Case List','2021-08-05') ,
( 'LABEL','ID_DELETE_DASHLET_INSTANCE','en','Delete Dashlet Instance','2014-10-10') , ( 'LABEL','ID_DELETE_DASHLET_INSTANCE','en','Delete Dashlet Instance','2014-10-10') ,
( 'LABEL','ID_DELETE_DATABASES','en','Delete database if it exists','2015-02-23') , ( 'LABEL','ID_DELETE_DATABASES','en','Delete database if it exists','2015-02-23') ,
( 'LABEL','ID_DELETE_DATABASE_CONNECTION','en','Delete Database Connection','2015-02-20') , ( 'LABEL','ID_DELETE_DATABASE_CONNECTION','en','Delete Database Connection','2015-02-20') ,