diff --git a/.firebaserc b/.firebaserc index d050b813..cc7aba5d 100644 --- a/.firebaserc +++ b/.firebaserc @@ -15,6 +15,9 @@ "hosting": { "job-manager-dev": [ "job-manager-dev" + ], + "job-manager-uat": [ + "job-manager-uat" ] } } diff --git a/.github/workflows/firebase-hosting-release.yml b/.github/workflows/firebase-hosting-release.yml new file mode 100644 index 00000000..3919af21 --- /dev/null +++ b/.github/workflows/firebase-hosting-release.yml @@ -0,0 +1,32 @@ +# This file was auto-generated by the Firebase CLI +# https://github.com/firebase/firebase-tools + +name: Deploy to Firebase Hosting on release +'on': + push: + tags: + - '*' # Push events to every tag not containing / Refer https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#patterns-to-match-branches-and-tags +jobs: + build_and_deploy: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: Checkout to latest release tag + run: | + git checkout $(git describe --tags `git rev-list --tags --max-count=1`) + - name: Install Dependencies + run: npm install + - name: Generate .env file + run: cp .env.example .env + - name: Build + run: npm run build + - name: Install Firebase + run: npm install -g firebase-tools + - name: Set Firebase project + run: firebase use default --token "$HOTWAX_PUBLIC_SECRET" + env: + HOTWAX_PUBLIC_SECRET: ${{ secrets.HOTWAX_PUBLIC_SECRET }} + - name: Deploy + run: firebase deploy --token "$HOTWAX_PUBLIC_SECRET" -m "Deploying via GitHub actions" --only hosting:job-manager-uat + env: + HOTWAX_PUBLIC_SECRET: ${{ secrets.HOTWAX_PUBLIC_SECRET }} diff --git a/firebase.json b/firebase.json index d49b9ad4..6a4d8236 100644 --- a/firebase.json +++ b/firebase.json @@ -26,6 +26,19 @@ "source": "**", "destination": "/index.html" }] + }, + { + "target": "job-manager-uat", + "public": "dist", + "ignore": [ + "firebase.json", + "**/.*", + "**/node_modules/**" + ], + "rewrites": [ { + "source": "**", + "destination": "/index.html" + }] } ] } diff --git a/package-lock.json b/package-lock.json index cac6860c..271a5a52 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1781,30 +1781,30 @@ } }, "@ionic/core": { - "version": "6.1.15", - "resolved": "https://registry.npmjs.org/@ionic/core/-/core-6.1.15.tgz", - "integrity": "sha512-NvBlHR7O4kfp9KYz6oLsghFzGZImA7hM4qS4tFRUI62R+Q5iCJEY4OmXE5bif5K+SQkMhQY+x1l2Nq20waLzLg==", + "version": "6.2.9", + "resolved": "https://registry.npmjs.org/@ionic/core/-/core-6.2.9.tgz", + "integrity": "sha512-d2KBXYUKBND2AD8aMgash3O/t04IDc/DHHMshcOydfNJ5qqAxwJYzZR7hs96UknCcIlhHk1pb5C29epkv7gOcQ==", "requires": { - "@stencil/core": "^2.16.0", - "ionicons": "^6.0.2", + "@stencil/core": "^2.18.0", + "ionicons": "^6.0.3", "tslib": "^2.1.0" } }, "@ionic/vue": { - "version": "6.1.15", - "resolved": "https://registry.npmjs.org/@ionic/vue/-/vue-6.1.15.tgz", - "integrity": "sha512-rw4QuojW0MQc9qajMmaQ/nsTRrLkkpII27omJHB2ZobcdS9tsSdKMHnNQJGKnucwwyFU5gAuqOYkoxUcQROp0Q==", + "version": "6.2.9", + "resolved": "https://registry.npmjs.org/@ionic/vue/-/vue-6.2.9.tgz", + "integrity": "sha512-B0/T5MvVVQU+j+N4AoY/TLpOgPH9Fx/lWLK+BnOpkWHawmTNrw//iWgl1ypg7gOeRHAQIbKgmcyDpPhY7neo/w==", "requires": { - "@ionic/core": "^6.1.15", + "@ionic/core": "^6.2.9", "ionicons": "^6.0.2" } }, "@ionic/vue-router": { - "version": "6.1.15", - "resolved": "https://registry.npmjs.org/@ionic/vue-router/-/vue-router-6.1.15.tgz", - "integrity": "sha512-TgmRyRu4ITEl+UkrR8vnMBVJclZYwpA49Y0L5u6KHt5PbBU9/IQ5RQeDTMkBt/1UA3AoIDu9EiWDaIvDWZYQ3A==", + "version": "6.2.9", + "resolved": "https://registry.npmjs.org/@ionic/vue-router/-/vue-router-6.2.9.tgz", + "integrity": "sha512-u9y8fJ9kHQrGVvDoit6tDbKJLa4jpvvYBZIgULmx9d3pN8D5TH3oPDOU0OGJR8noXbh/9WR0O34Tl68TGSqsRQ==", "requires": { - "@ionic/vue": "^6.1.15" + "@ionic/vue": "^6.2.9" } }, "@istanbuljs/load-nyc-config": { @@ -3084,9 +3084,9 @@ "dev": true }, "@stencil/core": { - "version": "2.18.1", - "resolved": "https://registry.npmjs.org/@stencil/core/-/core-2.18.1.tgz", - "integrity": "sha512-/fXkh1lwZ+X9JQCw50mPjhBogzEHOBvVC5pLoDLZqodVYK0DGWILM2YLV4dcIUBNEK8/HMDpO/Rq81/rS3mNOw==" + "version": "2.19.2", + "resolved": "https://registry.npmjs.org/@stencil/core/-/core-2.19.2.tgz", + "integrity": "sha512-TK3sHqyQAACwcac4fWntypFtN9c/y+y9ioZojeCnNDY3dxF33Ax70lL9ZLDyQnWWR+aTh1WFoqB5sYOnZIUKMA==" }, "@tootallnate/once": { "version": "1.1.2", diff --git a/package.json b/package.json index 4c74f04f..ab3ed986 100644 --- a/package.json +++ b/package.json @@ -17,9 +17,9 @@ "@capacitor/ios": "^2.4.7", "@casl/ability": "^5.4.4", "@casl/vue": "^2.1.2", - "@ionic/core": "6.1.15", - "@ionic/vue": "6.1.15", - "@ionic/vue-router": "6.1.15", + "@ionic/core": "6.2.9", + "@ionic/vue": "6.2.9", + "@ionic/vue-router": "6.2.9", "@types/file-saver": "^2.0.4", "@types/papaparse": "^5.3.1", "axios": "^0.21.1", diff --git a/release-notes.md b/release-notes.md index 83a1362c..1bc0fa04 100644 --- a/release-notes.md +++ b/release-notes.md @@ -1,3 +1,38 @@ +# Release 1.2.0 +## What's Changed +* Implemented: filters on pipeline page (#2uw73h5) by @k2maan in https://github.com/hotwax/job-manager/pull/246 and @shashwatbangar in https://github.com/hotwax/job-manager/pull/272 +* Feature: Add confirmation buttons to date pickers by @franciscoemanuel in https://github.com/hotwax/job-manager/pull/256 and @k2maan in https://github.com/hotwax/job-manager/pull/269 +* Fixed build fail by removing 'show-default-buttons = true' error in InititalJobConfiguration and JobConfiguration (#2zb7dhk) by @k2maan in https://github.com/hotwax/job-manager/pull/277 +* Upgraded Ionic to 6.2(#2w9wz26) by @disha1202 in https://github.com/hotwax/job-manager/pull/273 +* Implemented filter icon color update based on the type of filters applied and the segment selected (#2zb6ver) by @k2maan in https://github.com/hotwax/job-manager/pull/278 + +## New Contributors +* @franciscoemanuel made their first contribution in https://github.com/hotwax/job-manager/pull/256 + +**Full Changelog**: https://github.com/hotwax/job-manager/compare/v1.1.0...v1.2.0 +# Release 1.1.0 +## What's Changed +* Updated logic to fetch shopify config using fallback api for backward compatibility(#2r65b1c) by @disha1202 in https://github.com/hotwax/job-manager/pull/234 +* Fixed: shop should be honored while fetching jobs (#2te9p7v) by @adityasharma7 in https://github.com/hotwax/job-manager/pull/236 +* Improved: shop grp to be initially from 1 sequence and simlified query (#2te9p7v) by @adityasharma7 in https://github.com/hotwax/job-manager/pull/237 +* Improved: Code to display message on miscellaneous page when no jobs found(#364ttxy) by @shashwatbangar in https://github.com/hotwax/job-manager/pull/235 +* Improved: Add a message on miscellaneous page when no jobs found(#2t2wdhn) by @shashwatbangar in https://github.com/hotwax/job-manager/pull/239 +* Fixed: error in console due to empty shopify configuration on logout(#2tky1f3) by @disha1202 in https://github.com/hotwax/job-manager/pull/238 +* Implemented static UI for bulk editors page(#2vjxd96) by @disha1202 in https://github.com/hotwax/job-manager/pull/244 +* Refactored: setEcomStore and setShopifyConfig actions to accept ID. (#2tzh44d) by @k2maan in https://github.com/hotwax/job-manager/pull/241 +* Implemented: Validation to set only future date and time on setting runtime. (#2tzb5w4) by @k2maan in https://github.com/hotwax/job-manager/pull/240 +* Upgraded version of ionic to 6.1.15(#2uaz29u) by @disha1202 in https://github.com/hotwax/job-manager/pull/248 +* Fixed: used console.error instead of console.log by @divyanshugour in https://github.com/hotwax/job-manager/pull/252 +* Implemented: Validation to set only future date and time on setting job runtime. (#2tzb5w4) by @k2maan in https://github.com/hotwax/job-manager/pull/255 +* Fixed: runTime being set to current time while setting/updating time (#266) by @adityasharma7 in https://github.com/hotwax/job-manager/pull/267 +* Refactored: removed extra API call when setting the same timezone again from the settings page. (#2yma7df) by @k2maan in https://github.com/hotwax/job-manager/pull/265 + +## New Contributors +* @k2maan made their first contribution in https://github.com/hotwax/job-manager/pull/241 +* @divyanshugour made their first contribution in https://github.com/hotwax/job-manager/pull/252 + +**Full Changelog**: https://github.com/hotwax/job-manager/compare/v1.0.11...v1.1.0 + # Release 1.0.11 ## What's Changed diff --git a/src/components/Filters.vue b/src/components/Filters.vue new file mode 100644 index 00000000..33d3ad3d --- /dev/null +++ b/src/components/Filters.vue @@ -0,0 +1,199 @@ + + + \ No newline at end of file diff --git a/src/components/InitialJobConfiguration.vue b/src/components/InitialJobConfiguration.vue index 2bfbcbdd..5487321a 100644 --- a/src/components/InitialJobConfiguration.vue +++ b/src/components/InitialJobConfiguration.vue @@ -20,10 +20,10 @@ @@ -53,7 +53,8 @@ {{ currentJob?.runTime ? getTime(currentJob.runTime) : $t('Select run time') }} - ion-label:nth-child(3) { .mobile-only { display: none; } + + ion-modal { + --width: 290px; + --height: 440px; + --border-radius: 8px; + } } ion-modal { diff --git a/src/components/JobConfiguration.vue b/src/components/JobConfiguration.vue index 8cef84cd..51405fe9 100644 --- a/src/components/JobConfiguration.vue +++ b/src/components/JobConfiguration.vue @@ -24,11 +24,11 @@ - @@ -300,6 +300,7 @@ export default defineComponent({ async updateJob() { const job = this.currentJob; job['jobStatus'] = this.jobStatus !== 'SERVICE_DRAFT' ? this.jobStatus : 'HOURLY'; + job.runTime = this.runTime; if (job?.statusId === 'SERVICE_DRAFT') { this.store.dispatch('job/scheduleService', job).then((job: any) => { @@ -452,7 +453,6 @@ ion-label:nth-child(3) { cursor: pointer; } - ion-modal { --width: 290px; --height: 440px; diff --git a/src/components/Menu.vue b/src/components/Menu.vue index 775f7e11..c251b43e 100644 --- a/src/components/Menu.vue +++ b/src/components/Menu.vue @@ -155,7 +155,7 @@ export default defineComponent({ mdIcon: libraryOutline, dependsOnBaseURL: false }, - { + /* { title: "Bulk editor" }, { @@ -164,7 +164,7 @@ export default defineComponent({ iosIcon: terminalOutline, mdIcon: terminalOutline, dependsOnBaseURL: false - }, + }, */ { title: "Settings", url: "/settings", diff --git a/src/locales/en.json b/src/locales/en.json index 83560fd5..5d3d5336 100644 --- a/src/locales/en.json +++ b/src/locales/en.json @@ -24,14 +24,16 @@ "Before importing historical orders in bulk, make sure all products are set up or else order import will not run correctly.": "Before importing historical orders in bulk, make sure all products are set up or else order import will not run correctly.", "Blank": "Blank", "BOPIS corrections": "BOPIS corrections", + "Brokering": "Brokering", "Bulk editor": "Bulk editor", "Bulk schedule": "Bulk schedule", "Brokering queue": "Brokering queue", "By default only open and unshipped orders will be imported.": "By default only open and unshipped orders will be imported.", "Cancel": "Cancel", - "Canceled": "Canceled", + "Cancelled": "Cancelled", "Cancel job": "Cancel job", "Canceling this job will cancel this occurrence and all following occurrences. This job will have to be re-enabled manually to run it again.": "Canceling this job will cancel this occurrence and all following occurrences. This job will have to be re-enabled manually to run it again.", + "Category": "Category", "Change": "Change", "Change time zone": "Change time zone", "Configuration missing": "Configuration missing", @@ -61,8 +63,12 @@ "Every 5 minutes": "Every 5 minutes", "Every 15 minutes": "Every 15 minutes", "Every 30 minutes": "Every 30 minutes", + "Failed": "Failed", + "Filters": "Filters", + "Finished": "Finished", "File upload status": "File upload status", "Fulfilled": "Fulfilled", + "Fulfillment": "Fulfillment", "Fulfillment status": "Fulfillment status", "Hard sync": "Hard sync", "History": "History", @@ -112,6 +118,7 @@ "Pre-order parking": "Pre-order parking", "Pre-orders": "Pre-orders", "Pin job": "Pin job", + "Pinned": "Pinned", "Pinned jobs": "Pinned jobs", "Pipeline": "Pipeline", "Provide a future date and time": "Provide a future date and time", @@ -173,6 +180,7 @@ "Skip once": "Skip once", "Skipping will run this job at the next occurrence based on the temporal expression.": "Skipping will run this job at the next occurrence based on the temporal expression.", "Start with Ionic": "Start with Ionic", + "Status": "Status", "Store": "Store", "Stores": "Stores", "store name": "store name", diff --git a/src/store/modules/job/JobState.ts b/src/store/modules/job/JobState.ts index 3eeacaa7..412920d9 100644 --- a/src/store/modules/job/JobState.ts +++ b/src/store/modules/job/JobState.ts @@ -19,4 +19,9 @@ export default interface JobState { current: any; temporalExp: any; enumIds: any; + pipelineFilters: { + status: any, + category: any, + enum: any + } } \ No newline at end of file diff --git a/src/store/modules/job/actions.ts b/src/store/modules/job/actions.ts index af0321b1..ba5bc533 100644 --- a/src/store/modules/job/actions.ts +++ b/src/store/modules/job/actions.ts @@ -51,13 +51,17 @@ const actions: ActionTree = { "shopId_fld1_grp": "2", "shopId_fld1_op": "empty" } as any, - "fieldList": [ "systemJobEnumId", "runTime", "tempExprId", "parentJobId", "serviceName", "jobId", "jobName", "statusId", "cancelDateTime", "finishDateTime", "startDateTime" ], + "fieldList": [ "systemJobEnumId", "runTime", "tempExprId", "parentJobId", "serviceName", "jobId", "jobName", "statusId", "cancelDateTime", "finishDateTime", "startDateTime" , "enumTypeId" ], "noConditionFind": "Y", "viewSize": payload.viewSize, "viewIndex": payload.viewIndex, "orderBy": "runTime DESC" } + if(payload.statusId.length > 0) { + params.inputFields["statusId"] = payload.statusId; + } + if(payload.systemJobEnumId && payload.systemJobEnumId.length > 0) { params.inputFields["systemJobEnumId"] = payload.systemJobEnumId params.inputFields["systemJobEnumId_op"] = "in" @@ -69,6 +73,11 @@ const actions: ActionTree = { params.inputFields["productStoreId_op"] = "empty" } + if(payload.enumTypeId && payload.enumTypeId.length > 0) { + params.inputFields["enumTypeId"] = payload.enumTypeId; + params.inputFields["enumTypeId_op"] = "in" + } + if (payload.queryString) { params.inputFields["description_value"] = payload.queryString params.inputFields["description_op"] = "contains" @@ -120,7 +129,7 @@ const actions: ActionTree = { "shopId_fld1_grp": "2", "shopId_fld1_op": "empty" } as any, - "fieldList": [ "systemJobEnumId", "runTime", "tempExprId", "parentJobId", "serviceName", "jobId", "jobName", "statusId" ], + "fieldList": [ "systemJobEnumId", "runTime", "tempExprId", "parentJobId", "serviceName", "jobId", "jobName", "statusId", "enumTypeId" ], "noConditionFind": "Y", "viewSize": payload.viewSize, "viewIndex": payload.viewIndex, @@ -138,6 +147,11 @@ const actions: ActionTree = { params.inputFields["productStoreId_op"] = "empty" } + if(payload.enumTypeId && payload.enumTypeId.length > 0) { + params.inputFields["enumTypeId"] = payload.enumTypeId; + params.inputFields["enumTypeId_op"] = "in" + } + if (payload.queryString) { params.inputFields["description_value"] = payload.queryString params.inputFields["description_op"] = "contains" @@ -187,7 +201,7 @@ const actions: ActionTree = { "shopId_fld1_grp": "2", "shopId_fld1_op": "empty", } as any, - "fieldList": [ "systemJobEnumId", "runTime", "tempExprId", "parentJobId", "serviceName", "jobId", "jobName", "currentRetryCount", "statusId", "productStoreId", "runtimeDataId", "shopId", "description" ], + "fieldList": [ "systemJobEnumId", "runTime", "tempExprId", "parentJobId", "serviceName", "jobId", "jobName", "currentRetryCount", "statusId", "productStoreId", "runtimeDataId", "shopId", "description", "enumTypeId" ], "noConditionFind": "Y", "viewSize": payload.viewSize, "viewIndex": payload.viewIndex, @@ -205,6 +219,11 @@ const actions: ActionTree = { params.inputFields["productStoreId_op"] = "empty" } + if(payload.enumTypeId && payload.enumTypeId.length > 0) { + params.inputFields["enumTypeId"] = payload.enumTypeId; + params.inputFields["enumTypeId_op"] = "in" + } + if (payload.queryString) { params.inputFields["description_value"] = payload.queryString params.inputFields["description_op"] = "contains" @@ -734,6 +753,18 @@ const actions: ActionTree = { } catch (err) { console.error(err); } + }, + setPipelineFilters({ commit, state }, payload) { + const pipelineFilters = JSON.parse(JSON.stringify(state.pipelineFilters)); + const pipelineFilter = (pipelineFilters as any)[payload.type] + pipelineFilter.includes(payload.value) + ? pipelineFilter.splice(pipelineFilter.indexOf(payload.value), 1) + : pipelineFilter.push(payload.value); + + commit(types.JOB_PIPELINE_FILTERS_UPDATED, { pipelineFilters }); + }, + clearPipelineFilters({ commit }) { + commit(types.JOB_PIPELINE_FILTERS_CLEARED); } } export default actions; diff --git a/src/store/modules/job/getters.ts b/src/store/modules/job/getters.ts index d27fa45f..56ee3a15 100644 --- a/src/store/modules/job/getters.ts +++ b/src/store/modules/job/getters.ts @@ -57,6 +57,9 @@ const getters: GetterTree = { isMiscellaneousJobsScrollable: (state) => { return state.miscellaneous.list?.length > 0 && state.miscellaneous.list?.length < state.miscellaneous.total }, + getPipelineFilters: (state) => { + return state.pipelineFilters; + }, } export default getters; \ No newline at end of file diff --git a/src/store/modules/job/index.ts b/src/store/modules/job/index.ts index 83fba826..646642f0 100644 --- a/src/store/modules/job/index.ts +++ b/src/store/modules/job/index.ts @@ -28,6 +28,11 @@ const jobModule: Module = { temporalExp: [], enumIds: {}, current: {}, + pipelineFilters: { + status: [], + category: [], + enum: [], + }, }, getters, actions, diff --git a/src/store/modules/job/mutation-types.ts b/src/store/modules/job/mutation-types.ts index 3311ab80..33f32967 100644 --- a/src/store/modules/job/mutation-types.ts +++ b/src/store/modules/job/mutation-types.ts @@ -7,4 +7,6 @@ export const JOB_DESCRIPTION_UPDATED = SN_JOB + '/DESCRIPTION_UPDATED' export const JOB_HISTORY_UPDATED = SN_JOB + '/HISTORY_UPDATED' export const JOB_RUNNING_UPDATED = SN_JOB + '/RUNNING_UPDATED' export const JOB_CURRENT_UPDATED = SN_JOB + '/CURRENT_UPDATED' -export const JOB_MISCELLANEOUS_UPDATED = SN_JOB + '/MISCELLANEOUS_UPDATED' \ No newline at end of file +export const JOB_MISCELLANEOUS_UPDATED = SN_JOB + '/MISCELLANEOUS_UPDATED' +export const JOB_PIPELINE_FILTERS_UPDATED = SN_JOB + '/PIPELINE_FILTERS_UPDATED' +export const JOB_PIPELINE_FILTERS_CLEARED = SN_JOB + '/PIPELINE_FILTERS_CLEARED' \ No newline at end of file diff --git a/src/store/modules/job/mutations.ts b/src/store/modules/job/mutations.ts index 7d5dcad2..57bd6d47 100644 --- a/src/store/modules/job/mutations.ts +++ b/src/store/modules/job/mutations.ts @@ -44,6 +44,16 @@ const mutations: MutationTree = { [types.JOB_MISCELLANEOUS_UPDATED] (state, payload){ state.miscellaneous.list = payload.jobs; state.miscellaneous.total = payload.total; + }, + [types.JOB_PIPELINE_FILTERS_UPDATED] (state, payload){ + state.pipelineFilters = payload.pipelineFilters; + }, + [types.JOB_PIPELINE_FILTERS_CLEARED] (state){ + state.pipelineFilters = { + status: [], + category: [], + enum: [] + } } } export default mutations; \ No newline at end of file diff --git a/src/store/modules/user/actions.ts b/src/store/modules/user/actions.ts index ca97de9f..75c90cfa 100644 --- a/src/store/modules/user/actions.ts +++ b/src/store/modules/user/actions.ts @@ -153,13 +153,16 @@ 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.tzId; - commit(types.USER_INFO_UPDATED, current); - Settings.defaultZone = current.userTimeZone; - showToast(translate("Time zone updated successfully")); + const current: any = state.current; + // if set the same timezone again, no API call should happen + if(current.userTimeZone !== payload.tzId) { + const resp = await UserService.setUserTimeZone(payload) + if (resp.status === 200 && !hasError(resp)) { + current.userTimeZone = payload.tzId; + commit(types.USER_INFO_UPDATED, current); + Settings.defaultZone = current.userTimeZone; + showToast(translate("Time zone updated successfully")); + } } }, diff --git a/src/views/BulkEditor.vue b/src/views/BulkEditor.vue index c39b5f69..978e3f10 100644 --- a/src/views/BulkEditor.vue +++ b/src/views/BulkEditor.vue @@ -70,7 +70,8 @@ {{ $t('Select run time') }} - @@ -118,7 +119,8 @@ {{ $t('Select run time') }} - @@ -238,4 +240,10 @@ export default defineComponent({ ion-button { margin: var(--spacer-base) var(--spacer-xs); } + + ion-modal { + --width: 290px; + --height: 440px; + --border-radius: 8px; + } diff --git a/src/views/Pipeline.vue b/src/views/Pipeline.vue index bf69a53c..cd97826b 100644 --- a/src/views/Pipeline.vue +++ b/src/views/Pipeline.vue @@ -1,9 +1,16 @@