diff --git a/public/js/components/Cis/ProfilUpdate/ProfilUpdateView.js b/public/js/components/Cis/ProfilUpdate/ProfilUpdateView.js
index cede054ff..052520e42 100644
--- a/public/js/components/Cis/ProfilUpdate/ProfilUpdateView.js
+++ b/public/js/components/Cis/ProfilUpdate/ProfilUpdateView.js
@@ -7,10 +7,10 @@ import Loading from "../../../components/Loader.js";
const sortProfilUpdates = (ele1, ele2) => {
let result = 0;
- if (ele1.status === "pending") {
+ if (ele1.status === this.$p.t('profilUpdate','pending')) {
result = -1;
- } else if (ele1.status === "accepted") {
- result = ele2.status === "rejected" ? -1 : 1;
+ } else if (ele1.status === this.$p.t('profilUpdate','accepted')) {
+ result = ele2.status === this.$p.t('profilUpdate','rejected') ? -1 : 1;
} else {
result = 1;
}
@@ -95,10 +95,10 @@ export default{
},
rowContextMenu: (e, component) => {
let menu = [];
- if (component.getData().status === "pending") {
+ if (component.getData().status === this.$p.t('profilUpdate','pending')) {
menu.push(
{
- label: "
Accept Request",
+ label: `
${this.$p.t('profilUpdate','acceptUpdate')}`,
action: (e, column) => {
Vue.$fhcapi.ProfilUpdate.acceptProfilRequest(column.getData())
.then((res) => {
@@ -114,7 +114,7 @@ export default{
},
{
label:
- "
Deny Request",
+ `
${this.$p.t('profilUpdate','denyUpdate')}`,
action: (e, column) => {
Vue.$fhcapi.ProfilUpdate.denyProfilRequest(
column.getData()
@@ -129,7 +129,7 @@ export default{
separator: true,
},
{
- label: "
Show Request",
+ label: `
${this.$p.t('profilUpdate','showRequest')}`,
action: (e, column) => {
this.showAcceptDenyModal(column.getData());
@@ -138,7 +138,7 @@ export default{
);
} else {
menu.push({
- label: "
Show Request",
+ label: `
${this.$p.t('profilUpdate','showRequest')}`,
action: (e, column) => {
this.showAcceptDenyModal(column.getData());
},
@@ -188,17 +188,19 @@ export default{
field: "status",
hozAlign: "center",
headerFilter: true,
- formatter: function (cell, para) {
- switch (cell.getValue()) {
- case "pending":
- return "
";
- case "accepted":
- return "
";
- case "rejected":
- return "
";
- default:
- return "
default
";
+ formatter: (cell, para) => {
+ let iconClasses ="fa fa-lg"
+ if(cell.getValue() == this.$p.t('profilUpdate','pending')) {
+ iconClasses += " fa-circle-info text-info "
}
+ else if(cell.getValue() == this.$p.t('profilUpdate','accepted')) {
+ iconClasses += " fa-circle-check text-success "
+ }
+ else if(cell.getValue() == this.$p.t('profilUpdate','rejected')) {
+ iconClasses += " fa-circle-xmark text-danger "
+ }
+
+ return `
`;
},
resizable: true,
@@ -269,18 +271,7 @@ export default{
this.$refs.AcceptDenyModal.show();
});
},
- /* showModal: function (value) {
- AcceptDenyUpdate.popup({ value: value, setLoading:this.setLoading })
- .then((res) => {
-
- //? refetches the data, if any request was denied or accepted
- //* setData will call the ajaxURL again to refresh the data
- this.$refs.UpdatesTable.tabulator.setData();
- }).catch(err=>{
-
- })
-
- }, */
+
updateData: function (event) {
this.$refs.UpdatesTable.tabulator.setData();
//? store the selected view in the session storage of the browser
diff --git a/system/phrasesupdate.php b/system/phrasesupdate.php
index 4c9bec056..8b8bd5dd6 100755
--- a/system/phrasesupdate.php
+++ b/system/phrasesupdate.php
@@ -25640,6 +25640,66 @@ array(
)
)
),
+ array(
+ 'app' => 'core',
+ 'category' => 'profilUpdate',
+ 'phrase' => 'acceptUpdate',
+ 'insertvon' => 'system',
+ 'phrases' => array(
+ array(
+ 'sprache' => 'German',
+ 'text' => 'Änderung annehmen',
+ 'description' => '',
+ 'insertvon' => 'system'
+ ),
+ array(
+ 'sprache' => 'English',
+ 'text' => 'Accept Request',
+ 'description' => '',
+ 'insertvon' => 'system'
+ )
+ )
+ ),
+ array(
+ 'app' => 'core',
+ 'category' => 'profilUpdate',
+ 'phrase' => 'denyUpdate',
+ 'insertvon' => 'system',
+ 'phrases' => array(
+ array(
+ 'sprache' => 'German',
+ 'text' => 'Änderung ablehnen',
+ 'description' => '',
+ 'insertvon' => 'system'
+ ),
+ array(
+ 'sprache' => 'English',
+ 'text' => 'Deny Request',
+ 'description' => '',
+ 'insertvon' => 'system'
+ )
+ )
+ ),
+ array(
+ 'app' => 'core',
+ 'category' => 'profilUpdate',
+ 'phrase' => 'showRequest',
+ 'insertvon' => 'system',
+ 'phrases' => array(
+ array(
+ 'sprache' => 'German',
+ 'text' => 'Änderung anzeigen',
+ 'description' => '',
+ 'insertvon' => 'system'
+ ),
+ array(
+ 'sprache' => 'English',
+ 'text' => 'Show request',
+ 'description' => '',
+ 'insertvon' => 'system'
+ )
+ )
+ ),