Skip to content

Commit

Permalink
Revert "Updated Assets Staff Tile and Configurations (#1972)" (#1973)
Browse files Browse the repository at this point in the history
This reverts commit 2c2d397.
  • Loading branch information
seeker25 authored May 31, 2022
1 parent 2c2d397 commit 3bd29f2
Show file tree
Hide file tree
Showing 8 changed files with 55 additions and 139 deletions.
5 changes: 0 additions & 5 deletions auth-web/babel.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,5 @@ module.exports = {
}
]
],
'env': {
'test': {
'plugins': ['transform-require-context']
}
},
'compact': true
}
65 changes: 38 additions & 27 deletions auth-web/package-lock.json

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

4 changes: 1 addition & 3 deletions auth-web/package.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
{
"name": "auth-web",
"version": "1.0.3",
"version": "1.0.2",
"private": true,
"scripts": {
"serve": "vue-cli-service serve",
"build": "vue-cli-service build --mode production",
"test:unit": "vue-cli-service test:unit --coverage",
"test:e2e": "vue-cli-service test:e2e",
"clear_jest": "jest --clearCache",
"lint": "vue-cli-service lint",
"lint:fix": "vue-cli-service lint --fix",
"lint:nofix": "vue-cli-service lint --no-fix",
Expand All @@ -21,7 +20,6 @@
"@sentry/browser": "^5.27.2",
"@sentry/integrations": "^5.27.2",
"axios": "^0.21.1",
"babel-plugin-transform-require-context": "^0.1.1",
"core-js": "^3.3.3",
"fas-ui": "git+https://github.com/bcgov/fas-ui.git#v1.0.3",
"http-status-codes": "^2.1.4",
Expand Down
Binary file not shown.
Binary file not shown.
45 changes: 6 additions & 39 deletions auth-web/src/components/auth/staff/PPRLauncher.vue
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@
<v-row align="center" no-gutters>
<v-col cols="auto">
<!-- to use a dynamic src use 'require(<path>)' -->
<img class="product-img" :src="getImgUrl(img)" />
<img class="product-img" src="@/assets/img/PPR_dashboard_thumbnail_image.jpg" />
</v-col>
<v-col class="product-info">
<h2>{{ title }}</h2>
<p class="pt-3 ma-0">{{ text }}</p>
<h2>{{ $t('pprLauncherTitle') }}</h2>
<p class="pt-3 ma-0">{{ $t('pprLauncherText') }}</p>
<v-btn class="primary action-btn px-5">
Open
<v-icon>mdi-chevron-right</v-icon>
Expand All @@ -17,53 +17,20 @@
</v-card>
</template>
<script lang="ts">
import { Component, Watch } from 'vue-property-decorator'
import { Component } from 'vue-property-decorator'
import ConfigHelper from '@/util/config-helper'
import { KCUserProfile } from 'sbc-common-components/src/models/KCUserProfile'
import Vue from 'vue'
import { namespace } from 'vuex-class'
const userModule = namespace('user')
// FUTURE: import this from shared components once built
// - this is converted statically from UserProduct.vue in bcgov/bcregistry repo
@Component({})
export default class PPRLauncher extends Vue {
@userModule.State('currentUser') public currentUser!: KCUserProfile
private title = ''
private text = ''
private img = ''
private text = 'Register or search for legal claims on personal property.'
private title = 'Staff Personal Property Registry'
private get pprUrl (): string {
return ConfigHelper.getPPRWebUrl()
}
private getImgUrl (img) {
const images = require.context('@/assets/img/')
return images('./' + img)
}
@Watch('currentUser', { deep: true, immediate: true })
assignAssetContent (): void {
const roles = this.currentUser?.roles
switch (true) {
case roles.includes('ppr_staff') && roles.includes('mhr_staff'):
this.img = 'AssetsRegistries_dashboard.jpg'
this.title = this.$t('assetLauncherTitle').toString()
this.text = this.$t('assetLauncherText').toString()
break
case roles.includes('mhr_staff'):
this.img = 'ManufacturedHomeRegistry_dashboard.jpg'
this.title = this.$t('mhrLauncherTitle').toString()
this.text = this.$t('mhrLauncherText').toString()
break
default:
this.img = 'PPR_dashboard_thumbnail_image.jpg'
this.title = this.$t('pprLauncherTitle').toString()
this.text = this.$t('pprLauncherText').toString()
break
}
}
}
</script>

Expand Down
Loading

0 comments on commit 3bd29f2

Please sign in to comment.