Skip to content

Commit

Permalink
Merge branch 'main' into #188
Browse files Browse the repository at this point in the history
  • Loading branch information
ymaheshwari1 authored Jul 18, 2024
2 parents ead5498 + 478d441 commit 47b93cc
Show file tree
Hide file tree
Showing 57 changed files with 1,505 additions and 16,098 deletions.
2 changes: 1 addition & 1 deletion .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@ VUE_APP_PERMISSION_ID="FACILITIES_APP_VIEW"
VUE_APP_LOCALES={"en-US": "English"}
VUE_APP_DEFAULT_LOG_LEVEL="error"
VUE_APP_LOGIN_URL="http://launchpad.hotwax.io/login"
VUE_APP_USERS_APPLICATION_URL="http://users.hotwax.io"
VUE_APP_USERS_LOGIN_URL="http://users.hotwax.io/login"
2 changes: 1 addition & 1 deletion .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
### Related Issues
<!-- Put related issue number which this PR is closing. For example #123 -->

Closes #
#

### Short Description and Why It's Useful
<!-- Describe in a few words what is this Pull Request changing and why it's useful -->
Expand Down
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,7 @@ npm-debug.log*

.env
.env.*
!.env.example
!.env.example

.history
.firebase
15,620 changes: 472 additions & 15,148 deletions package-lock.json

Large diffs are not rendered by default.

22 changes: 9 additions & 13 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,27 +1,26 @@
{
"name": "facilities",
"version": "1.3.1",
"version": "1.8.2",
"private": true,
"description": "App to manage facilities",
"scripts": {
"serve": "vue-cli-service serve",
"build": "vue-cli-service build",
"test:unit": "vue-cli-service test:unit",
"test:e2e": "vue-cli-service test:e2e",
"lint": "vue-cli-service lint",
"i18n:report": "vue-cli-service i18n:report --src \"./src/**/*.?(js|vue)\" --locales \"./src/locales/**/*.json\""
"lint": "vue-cli-service lint"
},
"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.4",
"@hotwax/dxp-components": "^1.11.0",
"@hotwax/oms-api": "^1.12.0",
"@ionic/core": "^6.7.5",
"@ionic/vue": "^6.7.5",
"@ionic/vue-router": "^6.7.5",
"@hotwax/apps-theme": "^1.2.6",
"@hotwax/dxp-components": "^1.13.0",
"@hotwax/oms-api": "^1.14.0",
"@ionic/core": "^7.8.1",
"@ionic/vue": "^7.8.1",
"@ionic/vue-router": "^7.8.1",
"@types/file-saver": "^2.0.4",
"@types/papaparse": "^5.3.1",
"boon-js": "^2.0.3",
Expand All @@ -31,15 +30,13 @@
"mitt": "^2.1.0",
"register-service-worker": "^1.7.1",
"vue": "^3.3.8",
"vue-i18n": "~9.1.6",
"vue-logger-plugin": "^2.2.3",
"vue-router": "^4.2.5",
"vuex": "^4.0.1",
"vuex-persistedstate": "^4.0.0-beta.3"
},
"devDependencies": {
"@capacitor/cli": "^2.4.7",
"@intlify/vue-i18n-loader": "^2.1.0",
"@types/luxon": "^2.0.9",
"@typescript-eslint/eslint-plugin": "~5.26.0",
"@typescript-eslint/parser": "~5.26.0",
Expand All @@ -57,7 +54,6 @@
"eslint": "^7.32.0",
"eslint-plugin-vue": "^8.0.3",
"papaparse": "^5.3.1",
"typescript": "~4.7.4",
"vue-cli-plugin-i18n": "^1.0.1"
"typescript": "~4.7.4"
}
}
6 changes: 4 additions & 2 deletions src/adapter/index.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
import { api, client, getConfig, getTelecomCountryCode, getUserFacilities, hasError, initialise, logout, resetConfig, setUserLocale, updateInstanceUrl, updateToken } from '@hotwax/oms-api'
import { api, client, getAvailableTimeZones, getConfig, getTelecomCountryCode, getUserFacilities, hasError, initialise, logout, resetConfig, setUserLocale, updateInstanceUrl, updateToken, setUserTimeZone } from '@hotwax/oms-api'

export {
api,
client,
getConfig,
getAvailableTimeZones,
getTelecomCountryCode,
getUserFacilities,
hasError,
Expand All @@ -12,5 +13,6 @@ export {
resetConfig,
setUserLocale,
updateInstanceUrl,
updateToken
updateToken,
setUserTimeZone
}
5 changes: 1 addition & 4 deletions src/components/AddFacilityGroupModal.vue
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,7 @@
<ion-item-group v-for="(groups, typeId) in filteredFacilityGroupsByType" :key="typeId">
<ion-item-divider color="medium">{{ getFacilityGroupTypeDesc(typeId) }}</ion-item-divider>
<ion-item v-for="group in groups" :key="group.facilityGroupId">
<ion-label>{{ group.facilityGroupName }}</ion-label>
<ion-checkbox :checked="isFacilityGroupLinked(group.facilityGroupId)" @ion-change="updateGroupsForFacility(group.facilityGroupId)"/>
<ion-checkbox :checked="isFacilityGroupLinked(group.facilityGroupId)" @ion-change="updateGroupsForFacility(group.facilityGroupId)">{{ group.facilityGroupName }}</ion-checkbox>
</ion-item>
</ion-item-group>
</ion-list>
Expand All @@ -45,7 +44,6 @@ import {
IonItem,
IonItemDivider,
IonItemGroup,
IonLabel,
IonList,
IonSearchbar,
IonTitle,
Expand Down Expand Up @@ -77,7 +75,6 @@ export default defineComponent({
IonItem,
IonItemDivider,
IonItemGroup,
IonLabel,
IonList,
IonSearchbar,
IonTitle,
Expand Down
25 changes: 14 additions & 11 deletions src/components/AddFacilityToGroupModal.vue
Original file line number Diff line number Diff line change
Expand Up @@ -22,16 +22,17 @@
</div>
<div v-else>
<ion-item v-for="(facility, index) in facilities" :key="index" @click="updateSelectedFacilities(facility.facilityId)" lines="none">
<ion-label>
{{ facility.facilityName }}
<p>{{ facility.facilityId }}</p>
</ion-label>
<ion-checkbox :checked="isFacilitySelected(facility.facilityId)" />
<ion-checkbox :checked="isFacilitySelected(facility.facilityId)">
<ion-label>
{{ facility.facilityName }}
<p>{{ facility.facilityId }}</p>
</ion-label>
</ion-checkbox>
</ion-item>
</div>
</ion-list>
<ion-fab vertical="bottom" horizontal="end" slot="fixed">
<ion-fab-button @click="confirmSave()">
<ion-fab-button :disabled="!areFacilitiesUpdated()" @click="confirmSave()">
<ion-icon :icon="saveOutline" />
</ion-fab-button>
</ion-fab>
Expand Down Expand Up @@ -122,13 +123,10 @@ export default defineComponent({
"inputFields": {
...filters
},
"entityName": "FacilityView",
"entityName": "Facility",
"noConditionFind": "Y",
"distinct": "Y",
"fromDateName": "facilityGroupFromDate",
"thruDateName": "facilityGroupThruDate",
"filterByDate": "Y",
"fieldList": ["facilityId", "facilityName", "fromDate"],
"fieldList": ["facilityId", "facilityName"],
// By default we show only 20 facilities, others get rendered on search query.
"viewSize": 20
}
Expand Down Expand Up @@ -219,6 +217,11 @@ export default defineComponent({
};
await this.store.dispatch('facility/fetchFacilityGroups', payload)
},
areFacilitiesUpdated() {
if(this.selectedFacilities.length !== this.selectedFacilityValues.length) return true;
return this.selectedFacilityValues.some((selectedFacility: any) => !this.selectedFacilities.find((facility: any) => facility.facilityId === selectedFacility.facilityId))
}
},
setup() {
const store = useStore();
Expand Down
28 changes: 14 additions & 14 deletions src/components/AddLocationModal.vue
Original file line number Diff line number Diff line change
Expand Up @@ -15,30 +15,32 @@
<!-- Using stop for enter key as when using keyboard for opening the select we need to use enter and the same key submits the form
so to prevent form submission on using enter key on select used stop -->
<ion-item @keyup.enter.stop>
<ion-label position="floating">{{ translate("Type") }}</ion-label>
<ion-select interface="popover" :placeholder="translate('Select')" v-model="locationInfo.locationTypeEnumId">
<ion-select label-placement="floating" :label="translate('Type')" interface="popover" :placeholder="translate('Select')" v-model="locationInfo.locationTypeEnumId">
<ion-select-option v-for="(description, type) in locationTypes" :key="type" :value="type">{{ description }}</ion-select-option>
</ion-select>
</ion-item>
<ion-item>
<ion-label position="floating">{{ translate("Area") }} <ion-text color="danger">*</ion-text></ion-label>
<ion-input v-model="locationInfo.areaId"/>
<ion-input label-placement="floating" v-model="locationInfo.areaId">
<div slot="label">{{ translate("Area") }} <ion-text color="danger">*</ion-text></div>
</ion-input>
</ion-item>
<ion-item>
<ion-label position="floating">{{ translate("Aisle") }} <ion-text color="danger">*</ion-text></ion-label>
<ion-input v-model="locationInfo.aisleId"/>
<ion-input label-placement="floating" v-model="locationInfo.aisleId">
<div slot="label">{{ translate("Aisle") }} <ion-text color="danger">*</ion-text></div>
</ion-input>
</ion-item>
<ion-item>
<ion-label position="floating">{{ translate("Section") }} <ion-text color="danger">*</ion-text></ion-label>
<ion-input v-model="locationInfo.sectionId"/>
<ion-input label-placement="floating" v-model="locationInfo.sectionId">
<div slot="label">{{ translate("Section") }} <ion-text color="danger">*</ion-text></div>
</ion-input>
</ion-item>
<ion-item>
<ion-label position="floating">{{ translate("Level") }} <ion-text color="danger">*</ion-text></ion-label>
<ion-input v-model="locationInfo.levelId"/>
<ion-input label-placement="floating" v-model="locationInfo.levelId">
<div slot="label">{{ translate("Level") }} <ion-text color="danger">*</ion-text></div>
</ion-input>
</ion-item>
<ion-item>
<ion-label position="floating">{{ translate("Sequence") }}</ion-label>
<ion-input v-model="locationInfo.positionId"/>
<ion-input :label="translate('Sequence')" label-placement="floating" v-model="locationInfo.positionId" />
</ion-item>

<ion-fab vertical="bottom" horizontal="end" slot="fixed">
Expand All @@ -61,7 +63,6 @@ import {
IonIcon,
IonInput,
IonItem,
IonLabel,
IonSelect,
IonSelectOption,
IonText,
Expand Down Expand Up @@ -91,7 +92,6 @@ export default defineComponent({
IonIcon,
IonInput,
IonItem,
IonLabel,
IonSelect,
IonSelectOption,
IonText,
Expand Down
9 changes: 5 additions & 4 deletions src/components/AddOperatingHoursModal.vue
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,11 @@
<ion-radio-group v-model="selectedCalendarId">
<ion-accordion v-for="calendar in calendars" :key="calendar.calendarId" :value="calendar.calendarId">
<ion-item slot="header">
<ion-radio :value="calendar.calendarId" slot="start" />
<ion-label class="ion-text-wrap">
{{ calendar.description ? calendar.description : calendar.calendarId }}
</ion-label>
<ion-radio label-placement="end" justify="start" :value="calendar.calendarId">
<ion-label class="ion-text-wrap">
{{ calendar.description ? calendar.description : calendar.calendarId }}
</ion-label>
</ion-radio>
</ion-item>
<div class="ion-padding" slot="content">
<ion-list lines="none">
Expand Down
Loading

0 comments on commit 47b93cc

Please sign in to comment.