Skip to content

Commit

Permalink
Merge branch 'main' of https://github.com/hotwax/launchpad into impro…
Browse files Browse the repository at this point in the history
…vments
  • Loading branch information
k2maan committed Nov 10, 2023
2 parents 98511a5 + 8db67d2 commit 63cdf2a
Show file tree
Hide file tree
Showing 9 changed files with 88 additions and 61 deletions.
6 changes: 3 additions & 3 deletions .firebaserc
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
{
"projects": {
"dev": "hotwax-digital-commerce",
"default": "digital-commerce-71eb8",
"default": "hotwax-digital-commerce",
"production": "digital-commerce-71eb8"
},
"targets": {
"digital-commerce-71eb8": {
"hosting": {
"hotwax-launchpad": [
"prod": [
"hotwax-launchpad"
]
}
},
"hotwax-digital-commerce": {
"hosting": {
"hotwax-launchpad-dev": [
"dev": [
"hotwax-launchpad-dev"
]
}
Expand Down
27 changes: 7 additions & 20 deletions .github/workflows/firebase-hosting-merge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,23 +7,10 @@ name: Deploy to Firebase Hosting on merge
branches:
- main
jobs:
build_and_deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- 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:hotwax-launchpad
env:
HOTWAX_PUBLIC_SECRET: ${{ secrets.HOTWAX_PUBLIC_SECRET }}
call-workflow-in-another-repo:
uses: hotwax/dxp-components/.github/workflows/common-firebase-hosting-merge.yml@main
with:
config-path: .github/labeler.yml
secrets:
envPAT: ${{ secrets.envPAT }}
HOTWAX_PUBLIC_SECRET: ${{ secrets.HOTWAX_PUBLIC_SECRET }}
4 changes: 2 additions & 2 deletions firebase.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"hosting": [
{
"target": "hotwax-launchpad",
"target": "prod",
"public": "dist",
"ignore": [
"firebase.json",
Expand All @@ -15,7 +15,7 @@

},
{
"target": "hotwax-launchpad-dev",
"target": "dev",
"public": "dist",
"ignore": [
"firebase.json",
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "Launchpad",
"version": "0.0.1",
"version": "2.0.0",
"private": true,
"scripts": {
"serve": "vue-cli-service serve",
Expand Down
29 changes: 29 additions & 0 deletions src/assets/images/UserManagement.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 2 additions & 3 deletions src/locales/en.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
{
"Already active session": "Already active session",
"A session for is already active for. Do you want to continue or login again?": "A session for {partyName} is already active for {oms}. Do you want to continue or login again?",
"Continue": "Continue",
"Re-login": "Re-login",
"Launch Pad": "Launch Pad",
"Login": "Login",
"Logout": "Logout",
Expand All @@ -12,7 +9,9 @@
"Please fill in the OMS": "Please fill in the OMS",
"Please fill in the user details": "Please fill in the user details",
"Processing": "Processing",
"Resume": "Resume",
"Something went wrong while login. Please contact administrator.": "Something went wrong while login. Please contact administrator.",
"Sorry, your username or password is incorrect. Please try again.": "Sorry, your username or password is incorrect. Please try again.",
"There is an already active session on for. Do you want to resume it, or would you prefer to log in again?": "There is an already active session on {oms} for {partyName}. Do you want to resume it, or would you prefer to log in again?",
"Username": "Username"
}
64 changes: 38 additions & 26 deletions src/views/Home.vue
Original file line number Diff line number Diff line change
@@ -1,27 +1,26 @@
<template>
<ion-page>
<ion-content>
<main>
<ion-item lines="none">
<h1 class="title" slot="start">
{{ $t('Launch Pad') }}
<ion-icon color="danger" :icon="rocketOutline" />
</h1>

<ion-item v-if="authStore.isAuthenticated" slot="end" lines="none">
<ion-icon slot="start" :icon="lockClosedOutline"/>
<ion-label>
<p class="overline">{{ authStore.getOMS }}</p>
<h2>{{ authStore.current?.partyName ? authStore.current?.partyName : authStore.current.userLoginId }}</h2>
</ion-label>
<ion-button fill="outline" color="medium" slot="end" @click="logout()">{{ $t('Logout') }}</ion-button>
</ion-item>
<ion-button v-else slot="end" fill="outline" color="danger" @click="login()">
<ion-icon slot="start" :icon="personCircleOutline"/>
{{ $t('Login') }}
</ion-button>
<header>
<h1 class="title">
{{ $t('Launch Pad') }}
<ion-icon color="danger" :icon="rocketOutline" />
</h1>

<ion-item v-if="authStore.isAuthenticated" lines="none">
<ion-icon slot="start" :icon="lockClosedOutline"/>
<ion-label>
<p class="overline">{{ authStore.getOMS }}</p>
<h2>{{ authStore.current?.partyName ? authStore.current?.partyName : authStore.current.userLoginId }}</h2>
</ion-label>
<ion-button fill="outline" color="medium" slot="end" @click="authStore.logout()">{{ $t('Logout') }}</ion-button>
</ion-item>

<ion-button v-else fill="outline" color="danger" @click="router.push('/login')">
<ion-icon slot="start" :icon="personCircleOutline"/>
{{ $t('Login') }}
</ion-button>
</header>
<main>
<div class="type" v-for="category in Object.keys(appCategory)" :key="category">
<h3>{{ category }}</h3>
<div class="apps">
Expand Down Expand Up @@ -115,17 +114,17 @@ export default defineComponent({
name: 'BOPIS',
resource: require('../assets/images/BOPIS.svg'),
type: 'Orders'
}, {
handle: 'preorder',
name: 'Pre-Order Management',
resource: require('../assets/images/PreOrder.svg'),
type: 'Orders'
}, {
handle: 'fulfillment',
name: 'Fulfillment',
resource: require('../assets/images/Fulfillment.svg'),
type: 'Orders'
}, {
handle: 'preorder',
name: 'Pre-Orders',
resource: require('../assets/images/PreOrder.svg'),
type: 'Orders'
}, {
handle: 'threshold-management',
name: 'Threshold Management',
resource: require('../assets/images/Threshold.svg'),
Expand Down Expand Up @@ -155,6 +154,11 @@ export default defineComponent({
name: 'Import',
resource: require('../assets/images/Import.svg'),
type: 'Workflow'
}, {
handle: 'users',
name: 'User Management',
resource: require('../assets/images/UserManagement.svg'),
type: 'Administration'
}]
const appCategory = appInfo.reduce((obj: any, app: any) => {
Expand Down Expand Up @@ -192,8 +196,16 @@ export default defineComponent({

<style>
header {
display: flex;
justify-content: space-between;
padding-inline: var(--spacer-lg);
align-items: center;
flex-wrap: wrap;
}
.title {
font-size: 50px;
font-size: clamp(0px, 11vw, 50px);
font-weight: 700;
padding-top: var(--spacer-lg);
margin-bottom: var(--spacer-xl);
Expand Down
8 changes: 4 additions & 4 deletions src/views/Login.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<ion-page>
<ion-content>
<div class="flex" v-if="!hideBackground && !isConfirmingForActiveSession">
<form class="login-container" @keyup.enter="handleSubmit()" @submit.prevent="handleSubmit()">
<form class="login-container" @keyup.enter="handleSubmit()" @submit.prevent>
<Logo />
<section v-if="showOmsInput">
<ion-item lines="full">
Expand Down Expand Up @@ -268,15 +268,15 @@ export default defineComponent({
translucent: true,
backdropDismiss: false,
header: translate('Already active session'),
message: translate(`A session for is already active for. Do you want to continue or login again?`, { partyName: this.authStore.current.partyName, oms: this.authStore.getOMS }),
message: translate(`There is an already active session on for. Do you want to resume it, or would you prefer to log in again?`, { partyName: this.authStore.current.partyName, oms: this.authStore.getOMS }),
buttons: [{
text: translate('Continue'),
text: translate('Resume'),
handler: () => {
window.location.href = `${this.authStore.getRedirectUrl}?oms=${this.authStore.oms}&token=${this.authStore.token.value}&expirationTime=${this.authStore.token.expiration}`
this.isConfirmingForActiveSession = false;
}
}, {
text: translate('Re-login'),
text: translate('Login'),
handler: async () => {
const redirectUrl = this.authStore.getRedirectUrl
await this.authStore.logout()
Expand Down

0 comments on commit 63cdf2a

Please sign in to comment.