diff --git a/manifest.json b/manifest.json
index e11ed86..bc83ff8 100644
--- a/manifest.json
+++ b/manifest.json
@@ -1,6 +1,6 @@
{
"name": "HotWax Commerce Import",
- "short_name": "User Management",
+ "short_name": "Users",
"theme_color": "#FFFFFF",
"icons": [{
"src": "public/img/icons/favicon-16x16.png",
diff --git a/package-lock.json b/package-lock.json
index a366c4b..1f735b8 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -1,20 +1,20 @@
{
"name": "users",
- "version": "1.7.0",
+ "version": "1.8.0",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "users",
- "version": "1.7.0",
+ "version": "1.8.0",
"dependencies": {
"@capacitor/android": "^2.4.7",
"@capacitor/core": "^2.4.7",
"@casl/ability": "^6.0.0",
"@hotwax/app-version-info": "^1.0.0",
"@hotwax/apps-theme": "^1.2.6",
- "@hotwax/dxp-components": "^1.12.2",
- "@hotwax/oms-api": "^1.13.0",
+ "@hotwax/dxp-components": "1.13.0",
+ "@hotwax/oms-api": "1.14.0",
"@ionic/core": "^7.6.0",
"@ionic/vue": "^7.6.0",
"@ionic/vue-router": "^7.6.0",
@@ -2800,9 +2800,9 @@
"integrity": "sha512-zpUjGoY7LBlKeiP0V7tonrmoey8HQ5THQmyixQ+IDtrjmEJNBjynW/Ef3gC0FUNNPuVqxWPZdT5CVgaETLGTwg=="
},
"node_modules/@hotwax/dxp-components": {
- "version": "1.12.2",
- "resolved": "https://registry.npmjs.org/@hotwax/dxp-components/-/dxp-components-1.12.2.tgz",
- "integrity": "sha512-4t5hrLrwibsEPaKwMtFadUFEQe7IyXgcuCpL/6OZZ1+p5T7f++GR5/jlBEnfYWr8lapvFvRlkGM6q7IXyXSgzQ==",
+ "version": "1.13.0",
+ "resolved": "https://registry.npmjs.org/@hotwax/dxp-components/-/dxp-components-1.13.0.tgz",
+ "integrity": "sha512-AkzHpGIWYFURIAKaqioNZdkaeJBaJHs+ep+5ibLyEj+Ex+GsyMsI9L1NVO+tl91ECkCNx02QjHPhMfpo0osQ3w==",
"dependencies": {
"@hotwax/oms-api": "^1.8.1",
"@ionic/core": "^7.6.0",
@@ -2817,9 +2817,9 @@
}
},
"node_modules/@hotwax/oms-api": {
- "version": "1.13.0",
- "resolved": "https://registry.npmjs.org/@hotwax/oms-api/-/oms-api-1.13.0.tgz",
- "integrity": "sha512-D7bdS1XBfEu9fT23+mViC4FbyhFfg9GN95Epp/5V85Xcl8udxqOjHI9xcRMxANgrMjPNksshT1rm7F/TfEi/+g==",
+ "version": "1.14.0",
+ "resolved": "https://registry.npmjs.org/@hotwax/oms-api/-/oms-api-1.14.0.tgz",
+ "integrity": "sha512-dYkrFEi0oJHKiJ/VctKmyIY4WTVV2lmljm1EflgQ/LM7BTJ9jVEeT1zgYJ5vO906kW7SWM4pl7mZI3dDCt1YCQ==",
"dependencies": {
"@types/node-json-transform": "^1.0.0",
"axios": "^0.21.1",
@@ -2892,12 +2892,12 @@
}
},
"node_modules/@ionic/core": {
- "version": "7.6.2",
- "resolved": "https://registry.npmjs.org/@ionic/core/-/core-7.6.2.tgz",
- "integrity": "sha512-PEeCAjKrtKkc7PqCF7WlXn36PmowBbswnMADmoJ75ozyheRMe+v+GY2a75dGsBxB8nMZP9X9wYBXvZ3BgYUdLw==",
+ "version": "7.8.3",
+ "resolved": "https://registry.npmjs.org/@ionic/core/-/core-7.8.3.tgz",
+ "integrity": "sha512-5pFoE8gbhbCuyQlZ7BlRk4+S4PmmqgkALw4IAhtUK1TuzsKJ2KLFBlp0rdlWS+VcKEyrec/ptVki8oN5335vRA==",
"dependencies": {
- "@stencil/core": "^4.8.2",
- "ionicons": "^7.2.1",
+ "@stencil/core": "^4.12.2",
+ "ionicons": "^7.2.2",
"tslib": "^2.1.0"
}
},
@@ -2907,20 +2907,20 @@
"integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q=="
},
"node_modules/@ionic/vue": {
- "version": "7.6.2",
- "resolved": "https://registry.npmjs.org/@ionic/vue/-/vue-7.6.2.tgz",
- "integrity": "sha512-+qamnvbplyPN0RASemYvxMCPcwJ+lrJVJeDQ8Cw14OIuItVkMsidM2pF4hzZaxXyS+aHqCaVTewvLJ2/cUpzTw==",
+ "version": "7.8.3",
+ "resolved": "https://registry.npmjs.org/@ionic/vue/-/vue-7.8.3.tgz",
+ "integrity": "sha512-GzHhSus8RT8TGOER6fgpcz29fbMgNn/R65waAPKvO3Kks9ZITtPOtTYM9xNGOHPTKAA5yfAoSch944lmAjMNLg==",
"dependencies": {
- "@ionic/core": "7.6.2",
+ "@ionic/core": "7.8.3",
"ionicons": "^7.0.0"
}
},
"node_modules/@ionic/vue-router": {
- "version": "7.6.2",
- "resolved": "https://registry.npmjs.org/@ionic/vue-router/-/vue-router-7.6.2.tgz",
- "integrity": "sha512-/9vAMfRxteM2lEeBCSTkeuhdcAbAcSK2CCMgvSI36rZquQDUDi+qH8ugrvhjW1JE9p2npCIl108haW0VcHk3Lw==",
+ "version": "7.8.3",
+ "resolved": "https://registry.npmjs.org/@ionic/vue-router/-/vue-router-7.8.3.tgz",
+ "integrity": "sha512-xcXW8Af0HmhHBcCY1+iPVQzQoq77m2SFEL1MpTHmfZvh/ouB/AOLtBbup2btY8lOJ+W66S/V8xA/gBgbW0S4Kw==",
"dependencies": {
- "@ionic/vue": "7.6.2"
+ "@ionic/vue": "7.8.3"
}
},
"node_modules/@isaacs/cliui": {
@@ -3412,9 +3412,9 @@
"dev": true
},
"node_modules/@stencil/core": {
- "version": "4.9.0",
- "resolved": "https://registry.npmjs.org/@stencil/core/-/core-4.9.0.tgz",
- "integrity": "sha512-aWSkhBmk3yPwRAkUwBbzRwmdhb8hKiQ/JMr9m5jthpBZLjtppYbzz6PN2MhSMDfRp6K93eQw5WogSEH4HHuB6w==",
+ "version": "4.14.1",
+ "resolved": "https://registry.npmjs.org/@stencil/core/-/core-4.14.1.tgz",
+ "integrity": "sha512-pTOxF0pYx+ripKGotmrWrn74El1SlfZPzrcHfifGPAYwyfxUPcKyoiVR7rvDaVLqgkGlRI4Lg04riEIfVGwH8Q==",
"bin": {
"stencil": "bin/stencil"
},
@@ -9474,20 +9474,6 @@
"integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==",
"dev": true
},
- "node_modules/fsevents": {
- "version": "2.3.3",
- "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz",
- "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==",
- "dev": true,
- "hasInstallScript": true,
- "optional": true,
- "os": [
- "darwin"
- ],
- "engines": {
- "node": "^8.16.0 || ^10.6.0 || >=11.0.0"
- }
- },
"node_modules/function-bind": {
"version": "1.1.2",
"resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz",
@@ -10388,9 +10374,9 @@
}
},
"node_modules/ionicons": {
- "version": "7.2.2",
- "resolved": "https://registry.npmjs.org/ionicons/-/ionicons-7.2.2.tgz",
- "integrity": "sha512-I3iYIfc9Q9FRifWyFSwTAvbEABWlWY32i0sAVDDPGYnaIZVugkLCZFbEcrphW6ixVPg8tt1oLwalo/JJwbEqnA==",
+ "version": "7.3.1",
+ "resolved": "https://registry.npmjs.org/ionicons/-/ionicons-7.3.1.tgz",
+ "integrity": "sha512-1boG4EQTBBpQ4/0PU60Yi78Iw/k8iNtKu9c0NmsbzHGnWAcwpiovG9Wi/rk5UlF+DC+CR4XDCxKo91YqvAxkww==",
"dependencies": {
"@stencil/core": "^4.0.3"
}
diff --git a/package.json b/package.json
index 01c7146..7126007 100644
--- a/package.json
+++ b/package.json
@@ -1,8 +1,8 @@
{
"name": "users",
- "version": "1.7.0",
+ "version": "1.8.0",
"private": true,
- "description": "User Management App",
+ "description": "Users",
"scripts": {
"serve": "vue-cli-service serve",
"build": "vue-cli-service build",
@@ -17,8 +17,8 @@
"@casl/ability": "^6.0.0",
"@hotwax/app-version-info": "^1.0.0",
"@hotwax/apps-theme": "^1.2.6",
- "@hotwax/dxp-components": "^1.12.2",
- "@hotwax/oms-api": "^1.13.0",
+ "@hotwax/dxp-components": "1.13.0",
+ "@hotwax/oms-api": "1.14.0",
"@ionic/core": "^7.6.0",
"@ionic/vue": "^7.6.0",
"@ionic/vue-router": "^7.6.0",
diff --git a/public/index.html b/public/index.html
index 5ca5aef..2d28ffb 100644
--- a/public/index.html
+++ b/public/index.html
@@ -2,7 +2,7 @@
- User Management - HotWax Commerce
+ Users - HotWax Commerce
diff --git a/src/adapter/index.ts b/src/adapter/index.ts
index 26eba4a..d0baed2 100644
--- a/src/adapter/index.ts
+++ b/src/adapter/index.ts
@@ -8,7 +8,9 @@ import {
resetConfig,
setUserLocale,
updateToken,
- updateInstanceUrl
+ updateInstanceUrl,
+ setUserTimeZone,
+ getAvailableTimeZones
} from '@hotwax/oms-api'
export {
@@ -21,5 +23,7 @@ export {
resetConfig,
setUserLocale,
updateToken,
- updateInstanceUrl
+ updateInstanceUrl,
+ setUserTimeZone,
+ getAvailableTimeZones
}
\ No newline at end of file
diff --git a/src/components/FilterMenu.vue b/src/components/FilterMenu.vue
index 1e280ec..f480940 100644
--- a/src/components/FilterMenu.vue
+++ b/src/components/FilterMenu.vue
@@ -12,7 +12,7 @@
{{ translate("All") }}
- {{ securityGroup.groupName }}
+ {{ securityGroup.groupName || securityGroup.groupId }}
diff --git a/src/components/PermissionItems.vue b/src/components/PermissionItems.vue
index 8a6d9b8..2c38e8e 100644
--- a/src/components/PermissionItems.vue
+++ b/src/components/PermissionItems.vue
@@ -7,17 +7,26 @@
{{ translate("Only selected permissions") }}
+
+
+
+ {{ translate("All") }}
+
+ {{ classificationSecurityGroup.groupName }}
+
+
+
-
+
- {{ group.groupName }}
+ {{ group.groupName || group.groupId }}
-
+
@@ -49,11 +58,13 @@ import {
IonItemDivider,
IonLabel,
IonSearchbar,
+ IonSelect,
+ IonSelectOption,
IonToggle
} from '@ionic/vue';
import { defineComponent } from 'vue';
import { translate } from '@hotwax/dxp-components';
-import { shieldCheckmarkOutline } from 'ionicons/icons';
+import { optionsOutline, shieldCheckmarkOutline } from 'ionicons/icons';
import { mapGetters, useStore } from 'vuex';
import { PermissionService } from '@/services/PermissionService';
import { showToast } from '@/utils';
@@ -75,6 +86,8 @@ export default defineComponent({
IonItemDivider,
IonLabel,
IonSearchbar,
+ IonSelect,
+ IonSelectOption,
IonToggle,
},
computed: {
@@ -82,7 +95,8 @@ export default defineComponent({
query: 'permission/getQuery',
currentGroupPermissions: 'permission/getCurrentGroupPermissions',
currentGroup: "permission/getCurrentGroup",
- filteredPermissions: "permission/getFilteredPermissions"
+ filteredPermissions: "permission/getFilteredPermissions",
+ classificationSecurityGroups: 'util/getClassificationSecurityGroups'
})
},
methods: {
@@ -154,6 +168,7 @@ export default defineComponent({
return {
Actions,
hasPermission,
+ optionsOutline,
shieldCheckmarkOutline,
store,
translate
diff --git a/src/components/ProductStoreActionsPopover.vue b/src/components/ProductStoreActionsPopover.vue
index bf6b5cc..e9d6bfc 100644
--- a/src/components/ProductStoreActionsPopover.vue
+++ b/src/components/ProductStoreActionsPopover.vue
@@ -1,7 +1,7 @@
- {{ productStore.storeName }}
+ {{ productStore.storeName || productStore.productStoreId }}
{{ translate("Edit") }}
diff --git a/src/components/ResetPasswordModal.vue b/src/components/ResetPasswordModal.vue
index f80158e..04e890f 100644
--- a/src/components/ResetPasswordModal.vue
+++ b/src/components/ResetPasswordModal.vue
@@ -28,7 +28,8 @@
v-model="newPassword"
id="newPassword"
:type="showNewPassword ? 'text' : 'password'"
- :error-text="translate('Password requirements not fulfilled.')"/>
+ :error-text="translate('Password requirements not fulfilled.')"
+ autocomplete="new-password"/>
diff --git a/src/components/SelectFacilityModal.vue b/src/components/SelectFacilityModal.vue
index fa5774d..b12391c 100644
--- a/src/components/SelectFacilityModal.vue
+++ b/src/components/SelectFacilityModal.vue
@@ -15,7 +15,7 @@
- {{ facility.facilityName }}
+ {{ facility.facilityName || facility.facilityId }}
{{ facility.facilityId }}
@@ -27,7 +27,7 @@
- {{ facility.facilityName }}
+ {{ facility.facilityName || facility.facilityId }}
{{ facility.facilityId }}
diff --git a/src/components/SelectProductStoreModal.vue b/src/components/SelectProductStoreModal.vue
index 14388ca..a79cd07 100644
--- a/src/components/SelectProductStoreModal.vue
+++ b/src/components/SelectProductStoreModal.vue
@@ -15,7 +15,7 @@
- {{ productStore.storeName }}
+ {{ productStore.storeName || productStore.productStoreId }}
{{ productStore.productStoreId }}
diff --git a/src/locales/en.json b/src/locales/en.json
index e5396f6..e638388 100644
--- a/src/locales/en.json
+++ b/src/locales/en.json
@@ -23,6 +23,8 @@
"Block login": "Block login",
"Block user login": "Block user login",
"Block this user from logging into HotWax Commerce. Login can be re-enabled by disabling this setting": "Block this user from logging into HotWax Commerce. Login can be re-enabled by disabling this setting",
+ "Browser TimeZone": "Browser TimeZone",
+ "Browser time zone": "Browser time zone",
"Cancel": "Cancel",
"Change": "Change",
"Clearance": "Clearance",
@@ -181,7 +183,9 @@
"Select template": "Select template",
"Select your favorites to preselect them across all applications": "Select your favorites to preselect them across all applications",
"Select your preferred language.": "Select your preferred language.",
+ "Selected TimeZone": "Selected TimeZone",
"Select time zone": "Select time zone",
+ "Select a different time zone": "Select a different time zone",
"selected": "{storeCount} selected",
"Send reset password email instead": "Send reset password email instead",
"Settings": "Settings",
@@ -207,6 +211,7 @@
"Update user facilities": "Update user facilities",
"Update Security Group": "Update Security Group",
"Upload": "Upload",
+ "User created successfully": "User created successfully",
"User details": "User details",
"User disabled": "User disabled",
"User login status updated successfully.": "User login status updated successfully.",
diff --git a/src/main.ts b/src/main.ts
index c76bc76..df65852 100644
--- a/src/main.ts
+++ b/src/main.ts
@@ -34,7 +34,7 @@ import permissionActions from '@/authorization/Actions';
import { dxpComponents } from '@hotwax/dxp-components'
import { login, logout, loader } from '@/utils/user';
import localeMessages from '@/locales';
-import { getConfig, initialise, setUserLocale } from '@/adapter';
+import { getConfig, initialise, setUserLocale, setUserTimeZone, getAvailableTimeZones } from '@/adapter';
const app = createApp(App)
@@ -60,6 +60,8 @@ const app = createApp(App)
logout,
localeMessages,
setUserLocale,
+ setUserTimeZone,
+ getAvailableTimeZones
});
router.isReady().then(() => {
diff --git a/src/store/modules/permission/PermissionState.ts b/src/store/modules/permission/PermissionState.ts
index e37d09d..55f06cc 100644
--- a/src/store/modules/permission/PermissionState.ts
+++ b/src/store/modules/permission/PermissionState.ts
@@ -2,7 +2,8 @@ export default interface PermissionState {
permissionsByClassificationGroups: any;
query: {
queryString: string,
- showSelected: boolean
+ showSelected: boolean,
+ classificationSecurityGroupId: string
};
currentGroup: any;
permissionsByGroup: any;
diff --git a/src/store/modules/permission/actions.ts b/src/store/modules/permission/actions.ts
index 8f1e849..1cea095 100644
--- a/src/store/modules/permission/actions.ts
+++ b/src/store/modules/permission/actions.ts
@@ -53,9 +53,7 @@ const actions: ActionTree = {
viewSize: 250,
viewIndex: viewIndex,
inputFields: {
- groupTypeEnumId: "PRM_CLASS_TYPE",
- groupId: "SGC_HIDDEN",
- groupId_op: "notEqual"
+ groupTypeEnumId: "PRM_CLASS_TYPE"
}
})
@@ -93,6 +91,20 @@ const actions: ActionTree = {
})
})
+ const otherPermissions = JSON.parse(JSON.stringify(state.allPermissions))
+ Object.values(groupTypes).map((group: any) => {
+ group.permissions.map((permission: any) => {
+ delete otherPermissions[permission.permissionId]
+ })
+ })
+
+ // Others category for permissions not in any internal group.
+ groupTypes['OTHERS'] = {
+ groupId: 'OTHERS',
+ groupName: 'Others',
+ permissions: Object.values(otherPermissions)
+ }
+
commit(types.PERMISSION_BY_CLASSIFICATION_GROUPS_UPDATED, groupTypes)
},
diff --git a/src/store/modules/permission/getters.ts b/src/store/modules/permission/getters.ts
index fec5df7..b1e9c38 100644
--- a/src/store/modules/permission/getters.ts
+++ b/src/store/modules/permission/getters.ts
@@ -7,9 +7,17 @@ const getters: GetterTree = {
return state.permissionsByClassificationGroups
},
getFilteredPermissions(state) {
- const groupType = JSON.parse(JSON.stringify(state.permissionsByClassificationGroups))
+ let groupType = JSON.parse(JSON.stringify(state.permissionsByClassificationGroups))
const query = state.query
+ if (query.classificationSecurityGroupId) {
+ const filteredGroupType = {} as any;
+ if (groupType[query.classificationSecurityGroupId]) {
+ filteredGroupType[query.classificationSecurityGroupId] = groupType[query.classificationSecurityGroupId];
+ }
+ groupType = filteredGroupType;
+ }
+
if(query.showSelected) {
Object.values(groupType).map((group: any) => {
groupType[group.groupId] = {
diff --git a/src/store/modules/permission/index.ts b/src/store/modules/permission/index.ts
index 830fee1..4eefa8e 100644
--- a/src/store/modules/permission/index.ts
+++ b/src/store/modules/permission/index.ts
@@ -11,7 +11,8 @@ const permissionModule: Module = {
permissionsByClassificationGroups: {},
query: {
queryString: '',
- showSelected: false
+ showSelected: false,
+ classificationSecurityGroupId: ''
},
currentGroup: {},
permissionsByGroup: {},
diff --git a/src/store/modules/user/actions.ts b/src/store/modules/user/actions.ts
index 45ebd24..2e441ff 100644
--- a/src/store/modules/user/actions.ts
+++ b/src/store/modules/user/actions.ts
@@ -149,15 +149,11 @@ const actions: ActionTree = {
/**
* Update user timeZone
*/
- async setUserTimeZone({ state, commit }, payload) {
- const resp = await UserService.setUserTimeZone(payload)
- if (resp.status === 200 && !hasError(resp)) {
- const current: any = state.current;
- current.userTimeZone = payload.timeZoneId;
- commit(types.USER_INFO_UPDATED, current);
- Settings.defaultZone = current.userTimeZone;
- showToast(translate("Time zone updated successfully"));
- }
+ async setUserTimeZone ( { state, commit }, timeZoneId) {
+ const current: any = state.current;
+ current.userTimeZone = timeZoneId;
+ commit(types.USER_INFO_UPDATED, current);
+ Settings.defaultZone = current.userTimeZone;
},
async getSelectedUserDetails({ commit, state }, payload) {
@@ -349,20 +345,23 @@ const actions: ActionTree = {
"viewSize": payload.viewSize
}
- let users = [], total = 0;
+ let users = JSON.parse(JSON.stringify(state.users.list)), total = 0;
try {
- const resp = await UserService.fetchUsers(params)
+ const resp = await UserService.fetchUsers(params);
- if(!hasError(resp) && resp.data.count) {
- users = resp.data.docs
- if(payload.viewIndex && payload.viewIndex > 0) users = JSON.parse(JSON.stringify(state.users.list)).concat(resp.data.docs)
- total = resp.data.count
+ if (!hasError(resp) && resp.data.count) {
+ if (payload.viewIndex && payload.viewIndex > 0) {
+ users = users.concat(resp.data.docs);
+ } else {
+ users = resp.data.docs;
+ }
+ total = resp.data.count;
} else {
- throw resp.data
+ throw resp.data;
}
} catch(error) {
- logger.error(error)
+ logger.error(error);
}
emitter.emit("dismissLoader");
diff --git a/src/store/modules/util/UtilState.ts b/src/store/modules/util/UtilState.ts
index 71234bd..f585f05 100644
--- a/src/store/modules/util/UtilState.ts
+++ b/src/store/modules/util/UtilState.ts
@@ -2,6 +2,7 @@ export default interface UtilState {
roles: any[];
productStores: any[];
securityGroups: any[];
+ classificationSecurityGroups: any[];
facilities: any[];
shopifyShops: any[];
}
\ No newline at end of file
diff --git a/src/store/modules/util/actions.ts b/src/store/modules/util/actions.ts
index b3489d2..4962c3a 100644
--- a/src/store/modules/util/actions.ts
+++ b/src/store/modules/util/actions.ts
@@ -116,6 +116,35 @@ const actions: ActionTree = {
}
commit(types.UTIL_SECURITY_GROUPS_UPDATED, securityGroups);
},
+ async getClassificationSecurityGroups({ commit }) {
+ const payload = {
+ entityName: "SecurityGroup",
+ viewSize: 250,
+ distinct: "Y",
+ noConditionFind: "Y",
+ fieldList: ["description", "groupId", "groupName"],
+ orderBy: 'groupName ASC',
+ inputFields: {
+ groupTypeEnumId: "PRM_CLASS_TYPE",
+ groupId: "SGC_HIDDEN",
+ groupId_op: "notEqual"
+ }
+ }
+ let securityGroups = []
+
+ try {
+ const resp = await UtilService.getSecurityGroups(payload)
+
+ if(!hasError(resp)) {
+ securityGroups = resp.data.docs
+ } else {
+ throw resp.data
+ }
+ } catch(error) {
+ logger.error(error);
+ }
+ commit(types.UTIL_CLASSIFICATION_SECURITY_GROUPS_UPDATED, securityGroups);
+ },
async fetchFacilities({ commit }) {
let facilities = [];
diff --git a/src/store/modules/util/getters.ts b/src/store/modules/util/getters.ts
index 71c9327..4add2dc 100644
--- a/src/store/modules/util/getters.ts
+++ b/src/store/modules/util/getters.ts
@@ -15,6 +15,9 @@ const getters: GetterTree = {
getSecurityGroups(state) {
return state.securityGroups
},
+ getClassificationSecurityGroups(state) {
+ return state.classificationSecurityGroups
+ },
getFacilities(state) {
return state.facilities
},
diff --git a/src/store/modules/util/index.ts b/src/store/modules/util/index.ts
index 5f281a4..f3b7445 100644
--- a/src/store/modules/util/index.ts
+++ b/src/store/modules/util/index.ts
@@ -11,6 +11,7 @@ const utilModule: Module = {
roles: [],
productStores: [],
securityGroups: [],
+ classificationSecurityGroups: [],
facilities: [],
shopifyShops: []
},
diff --git a/src/store/modules/util/mutation-types.ts b/src/store/modules/util/mutation-types.ts
index cf0399a..176b370 100644
--- a/src/store/modules/util/mutation-types.ts
+++ b/src/store/modules/util/mutation-types.ts
@@ -4,3 +4,4 @@ export const UTIL_PRODUCT_STORES_UPDATED = SN_UTIL + '/PRODUCT_STORES_UPDATED'
export const UTIL_SECURITY_GROUPS_UPDATED = SN_UTIL + '/SECURITY_GROUPS_UPDATED'
export const UTIL_FACILITIES_UPDATED = SN_UTIL + '/FACILITIES_UPDATED'
export const UTIL_SHOPIFY_SHOPS_UPDATED = SN_UTIL + '/SHOPIFY_SHOPS_UPDATED'
+export const UTIL_CLASSIFICATION_SECURITY_GROUPS_UPDATED = SN_UTIL + '/CLASSIFICATION_SECURITY_GROUPS_UPDATED'
diff --git a/src/store/modules/util/mutations.ts b/src/store/modules/util/mutations.ts
index 723b05d..5d2c04e 100644
--- a/src/store/modules/util/mutations.ts
+++ b/src/store/modules/util/mutations.ts
@@ -17,6 +17,8 @@ const mutations: MutationTree = {
},
[types.UTIL_SHOPIFY_SHOPS_UPDATED](state, payload) {
state.shopifyShops = payload
+ },[types.UTIL_CLASSIFICATION_SECURITY_GROUPS_UPDATED](state, payload) {
+ state.classificationSecurityGroups = payload
}
}
export default mutations;
\ No newline at end of file
diff --git a/src/theme/variables.css b/src/theme/variables.css
index 66c1d64..996b3c7 100644
--- a/src/theme/variables.css
+++ b/src/theme/variables.css
@@ -276,7 +276,7 @@ http://ionicframework.com/docs/theming/ */
.search-permissions {
display: grid;
- grid-template-columns: repeat(auto-fit, minmax(343px, 1fr));
+ grid-template-columns: repeat(auto-fit, minmax(228px, 1fr));
gap: var(--spacer-xs);
align-items: start;
margin-bottom: var(--spacer-lg);
diff --git a/src/views/CreateUser.vue b/src/views/CreateUser.vue
index dbf7745..c3f85cb 100644
--- a/src/views/CreateUser.vue
+++ b/src/views/CreateUser.vue
@@ -18,7 +18,7 @@
{{ translate("Select facility") }} *
- {{ facility.facilityName }}
+ {{ facility.facilityName || facility.facilityId }}
@@ -206,6 +206,7 @@ export default defineComponent({
if (partyTypeId === "PARTY_GROUP" ) {
await UserService.addPartyToFacility({"partyId": partyId, "facilityId": payload.facilityId, "roleTypeId": "WAREHOUSE_MANAGER"});
}
+ showToast(translate("User created successfully"));
this.$router.replace({ path: `/user-confirmation/${partyId}` })
} else {
throw resp.data;
diff --git a/src/views/Permissions.vue b/src/views/Permissions.vue
index 21f6faa..4408f2d 100644
--- a/src/views/Permissions.vue
+++ b/src/views/Permissions.vue
@@ -20,8 +20,8 @@
{{ group.groupId }}
- {{ group?.groupName }}
-
+ {{ group?.groupName || group?.groupId }}
+
@@ -36,7 +36,7 @@
{{ currentGroup.groupId }}
- {{ currentGroup.groupName }}
+ {{ currentGroup.groupName || currentGroup.groupId }}
{{ currentGroup.description }}
{{ translate("Edit") }}
@@ -122,6 +122,7 @@ export default defineComponent({
},
async mounted() {
await this.store.dispatch('util/getSecurityGroups')
+ await this.store.dispatch('util/getClassificationSecurityGroups')
if(!this.allPermissions.length) await this.store.dispatch('permission/getAllPermissions')
if(!Object.keys(this.permissionsByClassificationGroups).length) await this.store.dispatch('permission/getPermissionsByClassificationGroups')
if(this.currentGroup.groupId) await this.store.dispatch('permission/getPermissionsByGroup', this.currentGroup.groupId)
@@ -136,7 +137,7 @@ export default defineComponent({
await this.store.dispatch('permission/getPermissionsByGroup', this.currentGroup.groupId)
await this.store.dispatch('permission/checkAssociated')
await this.getUsersCount()
- await this.store.dispatch('permission/updateQuery', {queryString: '', showAllSelected: false})
+ await this.store.dispatch('permission/updateQuery', {queryString: '', showAllSelected: false, classificationSecurityGroupId: ''})
emitter.emit('dismissLoader')
},
async editSecurityGroup() {
diff --git a/src/views/Settings.vue b/src/views/Settings.vue
index d93c727..f2cb57d 100644
--- a/src/views/Settings.vue
+++ b/src/views/Settings.vue
@@ -47,21 +47,7 @@
-
-
-
- {{ translate('Timezone') }}
-
-
-
- {{ translate('The timezone you select is used to ensure automations you schedule are always accurate to the time you select.') }}
-
-
- {{ userProfile && userProfile.userTimeZone ? userProfile.userTimeZone : '-' }}
- {{ translate("Change") }}
-
-
-
+
@@ -73,7 +59,6 @@ import {
IonAvatar,
IonButton,
IonCard,
- IonCardContent,
IonCardHeader,
IonCardSubtitle,
IonCardTitle,
@@ -81,11 +66,9 @@ import {
IonHeader,
IonIcon,
IonItem,
- IonLabel,
IonPage,
IonTitle,
IonToolbar,
- modalController,
} from '@ionic/vue';
import { defineComponent } from 'vue';
import {
@@ -102,7 +85,6 @@ import Image from '@/components/Image.vue';
import { translate } from "@hotwax/dxp-components";
import { Actions, hasPermission } from '@/authorization'
import { DateTime } from 'luxon';
-import TimezoneModal from '@/components/TimezoneModal.vue';
export default defineComponent({
name: 'Settings',
@@ -110,7 +92,6 @@ export default defineComponent({
IonAvatar,
IonButton,
IonCard,
- IonCardContent,
IonCardHeader,
IonCardSubtitle,
IonCardTitle,
@@ -118,7 +99,6 @@ export default defineComponent({
IonHeader,
IonIcon,
IonItem,
- IonLabel,
IonPage,
IonTitle,
IonToolbar,
@@ -166,12 +146,9 @@ export default defineComponent({
getDateTime(time: any) {
return DateTime.fromMillis(time).toLocaleString(DateTime.DATETIME_MED);
},
- async changeTimeZone() {
- const timeZoneModal = await modalController.create({
- component: TimezoneModal,
- });
- return timeZoneModal.present();
- }
+ async timeZoneUpdated(tzId: string) {
+ await this.store.dispatch("user/setUserTimeZone", tzId)
+ },
},
setup () {
const store = useStore();
diff --git a/src/views/UserDetails.vue b/src/views/UserDetails.vue
index 6a554e0..16ed46e 100644
--- a/src/views/UserDetails.vue
+++ b/src/views/UserDetails.vue
@@ -265,7 +265,7 @@
- {{ securityGroup.groupName }}
+ {{ securityGroup.groupName || securityGroup.groupId}}
{{ translate("None") }}
@@ -284,7 +284,7 @@
- {{ store.storeName }}
+ {{ store.storeName || store.productStoreId }}
{{ getRoleTypeDesc(store.roleTypeId) }}
@@ -354,17 +354,17 @@
-
-
- {{ productStore.storeName }}
+
+
+ {{ productStore.storeName || productStore.productStoreId}}
{{ translate("None") }}
-
+
- {{ shopifyShop.name }}
+ {{ shopifyShop.name || shopifyShop.shopId }}
{{ translate("None") }}
@@ -414,6 +414,7 @@ import {
IonSelect,
IonSelectOption,
IonSkeletonText,
+ IonSpinner,
IonText,
IonTitle,
IonToggle,
@@ -476,6 +477,7 @@ export default defineComponent({
IonSelect,
IonSelectOption,
IonSkeletonText,
+ IonSpinner,
IonText,
IonTitle,
IonToggle,
@@ -490,7 +492,6 @@ export default defineComponent({
securityGroups: 'util/getSecurityGroups',
userProfile: 'user/getUserProfile',
baseUrl: 'user/getBaseUrl',
- productStores: 'util/getProductStores',
shopifyShops: 'util/getShopifyShops'
})
},
diff --git a/src/views/UserQuickSetup.vue b/src/views/UserQuickSetup.vue
index 1e36aff..dff0875 100644
--- a/src/views/UserQuickSetup.vue
+++ b/src/views/UserQuickSetup.vue
@@ -73,12 +73,12 @@
- {{ facility.facilityName }}
+ {{ facility.facilityName || facility.facilityId }}
{{ facility.facilityId }}
- {{ facility.facilityName }}
+ {{ facility.facilityName || facility.facilityId }}
{{ facility.facilityId }}
diff --git a/src/views/Users.vue b/src/views/Users.vue
index 9d78888..3f06071 100644
--- a/src/views/Users.vue
+++ b/src/views/Users.vue
@@ -11,7 +11,7 @@
-