-
Notifications
You must be signed in to change notification settings - Fork 32
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' of https://github.com/hotwax/job-manager into #2e…
…bg32y
- Loading branch information
Showing
20 changed files
with
441 additions
and
59 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,6 +15,9 @@ | |
"hosting": { | ||
"job-manager-dev": [ | ||
"job-manager-dev" | ||
], | ||
"job-manager-uat": [ | ||
"job-manager-uat" | ||
] | ||
} | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,199 @@ | ||
<template> | ||
<ion-menu side="end" content-id="main-content" type="overlay"> | ||
<ion-header> | ||
<ion-toolbar> | ||
<ion-title>{{ $t("Filters") }}</ion-title> | ||
</ion-toolbar> | ||
</ion-header> | ||
|
||
<ion-content> | ||
<ion-list> | ||
<section v-if="segmentSelected === 'history'"> | ||
<ion-item> | ||
<ion-label class="ion-text-wrap"> | ||
<p>{{ $t("Status") }}</p> | ||
</ion-label> | ||
</ion-item> | ||
<ion-item button v-for="(filter, index) in statusFilters" :key="index" @click="applyFilter(filter.statusId, 'status')"> | ||
<ion-icon slot="start" :ios="filter.iosIcon" :md="filter.mdIcon" /> | ||
<ion-label>{{ $t(filter.name) }}</ion-label> | ||
<ion-checkbox slot="end" :checked="pipelineFilters.status.includes(filter.statusId)" /> | ||
</ion-item> | ||
</section> | ||
|
||
<section> | ||
<ion-item> | ||
<ion-label class="ion-text-wrap"> | ||
<p>{{ $t("Category") }}</p> | ||
</ion-label> | ||
</ion-item> | ||
<ion-item button v-for="(filter, index) in categoryFilters" :key="index" @click="applyFilter(filter.enumTypeId, 'category')"> | ||
<ion-icon slot="start" :ios="filter.iosIcon" :md="filter.mdIcon" /> | ||
<ion-label>{{ $t(filter.name) }}</ion-label> | ||
<ion-checkbox slot="end" :checked="pipelineFilters.category.includes(filter.enumTypeId)" /> | ||
</ion-item> | ||
</section> | ||
|
||
<section v-if="pinnedJobs && pinnedJobs.length"> | ||
<ion-item> | ||
<ion-label class="ion-text-wrap"> | ||
<p>{{ $t("Pinned") }}</p> | ||
</ion-label> | ||
</ion-item> | ||
<ion-item button v-for="(job, index) in pinnedJobs" :key="index" @click="applyFilter(job, 'enum')"> | ||
<ion-label>{{ getEnumName(job) }}</ion-label> | ||
<ion-checkbox slot="end" :checked="pipelineFilters.enum.includes(job)" /> | ||
</ion-item> | ||
</section> | ||
</ion-list> | ||
</ion-content> | ||
</ion-menu> | ||
</template> | ||
|
||
<script lang="ts"> | ||
import { | ||
IonCheckbox, | ||
IonContent, | ||
IonHeader, | ||
IonIcon, | ||
IonItem, | ||
IonLabel, | ||
IonList, | ||
IonMenu, | ||
IonTitle, | ||
IonToolbar | ||
} from "@ionic/vue"; | ||
import { defineComponent } from "vue"; | ||
import { albumsOutline, banOutline, calendarNumberOutline, checkmarkDoneOutline, closeOutline, compassOutline, filterOutline, iceCreamOutline, libraryOutline, pulseOutline, sendOutline, settings, shirtOutline, ticketOutline } from "ionicons/icons"; | ||
import { mapGetters, useStore } from 'vuex' | ||
export default defineComponent({ | ||
name: "Filters", | ||
components: { | ||
IonCheckbox, | ||
IonContent, | ||
IonHeader, | ||
IonIcon, | ||
IonItem, | ||
IonLabel, | ||
IonList, | ||
IonMenu, | ||
IonTitle, | ||
IonToolbar | ||
}, | ||
props: ["segmentSelected", "queryString"], | ||
setup() { | ||
const store = useStore(); | ||
const statusFilters = [ | ||
{ | ||
name: "Finished", | ||
statusId: "SERVICE_FINISHED", | ||
iosIcon: checkmarkDoneOutline, | ||
mdIcon: checkmarkDoneOutline, | ||
}, | ||
{ | ||
name: "Cancelled", | ||
statusId: "SERVICE_CANCELLED", | ||
iosIcon: banOutline, | ||
mdIcon: banOutline, | ||
}, | ||
{ | ||
name: "Failed", | ||
statusId: "SERVICE_FAILED", | ||
iosIcon: closeOutline, | ||
mdIcon: closeOutline, | ||
}, | ||
]; | ||
const categoryFilters = [ | ||
{ | ||
name: "Orders", | ||
iosIcon: ticketOutline, | ||
mdIcon: ticketOutline, | ||
enumTypeId: "ORDER_SYS_JOB" | ||
}, | ||
{ | ||
name: "Pre-orders", | ||
iosIcon: calendarNumberOutline, | ||
mdIcon: calendarNumberOutline, | ||
enumTypeId: "PRE_ORD_SYS_JOB" | ||
}, | ||
{ | ||
name: "Inventory", | ||
iosIcon: albumsOutline, | ||
mdIcon: albumsOutline, | ||
enumTypeId: "INVENTORY_SYS_JOB" | ||
}, | ||
{ | ||
name: "Brokering", | ||
iosIcon: compassOutline, | ||
mdIcon: compassOutline, | ||
enumTypeId: "BROKERING_SYS_JOB" | ||
}, | ||
{ | ||
name: "Fulfillment", | ||
iosIcon: sendOutline, | ||
mdIcon: sendOutline, | ||
enumTypeId: "FULFILLMENT_SYS_JOB" | ||
}, | ||
{ | ||
name: "Product", | ||
iosIcon: shirtOutline, | ||
mdIcon: shirtOutline, | ||
enumTypeId: "PRODUCT_SYS_JOB" | ||
}, | ||
{ | ||
name: "Miscellaneous", | ||
iosIcon: libraryOutline, | ||
mdIcon: libraryOutline, | ||
enumTypeId: "MISC_SYS_JOB" | ||
}, | ||
]; | ||
return { | ||
albumsOutline, | ||
banOutline, | ||
calendarNumberOutline, | ||
checkmarkDoneOutline, | ||
categoryFilters, | ||
closeOutline, | ||
filterOutline, | ||
iceCreamOutline, | ||
libraryOutline, | ||
pulseOutline, | ||
settings, | ||
shirtOutline, | ||
statusFilters, | ||
store, | ||
ticketOutline | ||
}; | ||
}, | ||
computed: { | ||
...mapGetters({ | ||
getEnumName: 'job/getEnumName', | ||
currentEComStore: 'user/getCurrentEComStore', | ||
pinnedJobs: 'user/getPinnedJobs', | ||
pipelineFilters: 'job/getPipelineFilters' | ||
}) | ||
}, | ||
unmounted() { | ||
this.store.dispatch('job/clearPipelineFilters'); | ||
}, | ||
methods: { | ||
applyFilter(value: any, type: string) { | ||
this.store.dispatch('job/setPipelineFilters', { type, value }); | ||
this.segmentSelected === 'pending' ? this.getFilteredPendingJobs() : | ||
this.segmentSelected === 'running' ? this.getFilteredRunningJobs() : | ||
this.getFilteredJobHistory(); | ||
}, | ||
async getFilteredPendingJobs(viewSize = process.env.VUE_APP_VIEW_SIZE, viewIndex = '0') { | ||
await this.store.dispatch('job/fetchPendingJobs', { eComStoreId: this.currentEComStore.productStoreId, viewSize, viewIndex, queryString: this.queryString, enumTypeId: this.pipelineFilters.category, systemJobEnumId: this.pipelineFilters.enum, statusId: this.pipelineFilters.status }); | ||
}, | ||
async getFilteredRunningJobs(viewSize = process.env.VUE_APP_VIEW_SIZE, viewIndex = '0') { | ||
await this.store.dispatch('job/fetchRunningJobs', { eComStoreId: this.currentEComStore.productStoreId, viewSize, viewIndex, queryString: this.queryString, enumTypeId: this.pipelineFilters.category, systemJobEnumId: this.pipelineFilters.enum, statusId: this.pipelineFilters.status }); | ||
}, | ||
async getFilteredJobHistory(viewSize = process.env.VUE_APP_VIEW_SIZE, viewIndex = '0') { | ||
await this.store.dispatch('job/fetchJobHistory', { eComStoreId: this.currentEComStore.productStoreId, viewSize, viewIndex, queryString: this.queryString, enumTypeId: this.pipelineFilters.category, systemJobEnumId: this.pipelineFilters.enum, statusId: this.pipelineFilters.status }); | ||
}, | ||
}, | ||
}); | ||
</script> |
Oops, something went wrong.