Skip to content

Commit

Permalink
15081 add restoration extension and conversion (#449) - v3.10.3
Browse files Browse the repository at this point in the history
  • Loading branch information
jonathan-longe authored Mar 2, 2023
1 parent 41eb157 commit 6c16987
Show file tree
Hide file tree
Showing 11 changed files with 451 additions and 173 deletions.
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": "business-edit-ui",
"version": "3.10.2",
"version": "3.10.3",
"private": true,
"appName": "Edit UI",
"sbcName": "SBC Common Components",
Expand Down
15 changes: 10 additions & 5 deletions src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ import { ConfirmDialog as ConfirmDialogShared } from '@bcrs-shared-components/co
import * as Views from '@/views/'
import * as Dialogs from '@/dialogs/'
import { AuthServices, LegalServices } from '@/services/'
import { CommonMixin, DateMixin, FilingTemplateMixin } from '@/mixins/'
import { CommonMixin, FilingTemplateMixin } from '@/mixins/'
import { FilingDataIF, ActionBindingIF, ConfirmDialogType, FlagsReviewCertifyIF, FlagsCompanyInfoIF,
AlterationFilingIF, ChgRegistrationFilingIF, ConversionFilingIF, SpecialResolutionFilingIF }
from '@/interfaces/'
Expand All @@ -170,6 +170,7 @@ import { ComponentsCompanyInfo, ComponentsReviewCertify, RouteNames } from '@/en
import { FeeSummaryActions } from '@bcrs-shared-components/enums/'
import { getEntityDashboardBreadcrumb, getMyBusinessRegistryBreadcrumb, getRegistryDashboardBreadcrumb,
getStaffDashboardBreadcrumb } from '@/resources/BreadCrumbResources'
import DateUtilities from '@/services/date-utilities'
@Component({
components: {
Expand All @@ -184,9 +185,13 @@ import { getEntityDashboardBreadcrumb, getMyBusinessRegistryBreadcrumb, getRegis
SbcFeeSummary,
...Dialogs,
...Views
}
},
mixins: [
CommonMixin,
FilingTemplateMixin
]
})
export default class App extends Mixins(CommonMixin, DateMixin, FilingTemplateMixin) {
export default class App extends Vue {
// Refs
$refs!: {
confirm: ConfirmDialogType
Expand Down Expand Up @@ -444,7 +449,7 @@ export default class App extends Mixins(CommonMixin, DateMixin, FilingTemplateMi
/** Fetches and stores the current JS date. */
private async updateCurrentJsDate (): Promise<void> {
const jsDate = await this.getServerDate()
const jsDate = await DateUtilities.getServerDate()
this.setCurrentJsDate(jsDate)
}
Expand Down Expand Up @@ -494,7 +499,7 @@ export default class App extends Mixins(CommonMixin, DateMixin, FilingTemplateMi
this.resetFlags()
// set current date from "real time" date from server
this.setCurrentDate(this.dateToYyyyMmDd(this.getCurrentJsDate))
this.setCurrentDate(DateUtilities.dateToYyyyMmDd(this.getCurrentJsDate))
// get and store keycloak roles
try {
Expand Down
67 changes: 67 additions & 0 deletions src/components/Restoration/YourCompanySummary.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
<template>
<v-card flat id="restoration-summary">
<!-- Section Header -->
<div class="summary-header px-4 mb-2 rounded-t">
<v-row no-gutters>
<v-col cols="9">
<img class="header-icon" src="@/assets/images/currency-usd-circle.svg">
<label class="summary-title pl-2">Your Company</label>
</v-col>
</v-row>
</div>
<!-- Business Name -->
<template>
<v-divider class="mx-4" />
<div class="section-container business-name-summary">
<v-row no-gutters>
<v-col cols="3">
<label><strong>Restoration Type</strong></label>
</v-col>
<v-col cols="8" class="mt-n1" v-if="isLimitedExtendRestorationFiling">
<div class="font-weight-bold">Limited Restoration Extension</div>
<div>Extension Time: {{ getFormattedExpiryText() }}</div>
</v-col>
<v-col cols="8" class="mt-n1" v-if="isLimitedConversionRestorationFiling">
<div class="font-weight-bold">Conversion to Full Restoration</div>
<div>[TODO - Applicant's relationship: Director, Shareholder]</div>
</v-col>
</v-row>
<v-row no-gutters class="mt-3" v-if="hasFileNumber">
<v-col cols="3">
<label><strong>Approval Type</strong></label>
</v-col>
<v-col cols="8" class="mt-n1">
<div class="font-weight-bold">Approved by Court Order</div>
<div>Court Order Number: {{ getFileNumber }}</div>
</v-col>
</v-row>
</div>
</template>
</v-card>
</template>

<script lang="ts">
import { mapGetters } from 'vuex'
export default {
computed: {
...mapGetters(['isLimitedConversionRestorationFiling', 'isLimitedExtendRestorationFiling',
'hasFileNumber', 'getFileNumber', 'getFormattedExpiryText'])
}
}
</script>

<style lang="scss" scoped>
@import '@/assets/styles/theme.scss';
.summary-header {
display: flex;
background-color: $BCgovBlue5O;
padding: 1.25rem;
}
// hide first v-divider
.v-divider:first-of-type {
display: none;
}
</style>
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
</v-col>

<!-- Actions -->
<v-col cols="2" class="mt-n2" v-if="!hasNameTranslationChange && !isSummaryMode">
<v-col cols="2" class="mt-n2" v-if="isEditNameTranslationButtonVisible">
<div class="actions mr-4">
<v-btn
class="correct-name-translation"
Expand Down Expand Up @@ -178,6 +178,8 @@ export default class NameTranslation extends Mixins(CommonMixin) {
// Global getter
@Getter getNameTranslations!: NameTranslationIF[]
@Getter isLimitedExtendRestorationFiling!: boolean
@Getter isLimitedConversionRestorationFiling!: boolean
// Global actions
@Action setEditingNameTranslations!: ActionBindingIF
Expand Down Expand Up @@ -218,6 +220,16 @@ export default class NameTranslation extends Mixins(CommonMixin) {
return this.draftTranslations.filter(x => x.action !== ActionTypes.REMOVED)
}
/** Returns true when the user can edit the name translations */
get isEditNameTranslationButtonVisible (): boolean {
return !(
this.hasNameTranslationChange ||
this.isSummaryMode ||
this.isLimitedConversionRestorationFiling ||
this.isLimitedExtendRestorationFiling
)
}
protected saveNameTranslations (): void {
this.setNameTranslations(this.draftTranslations)
this.isEditing = false
Expand Down
12 changes: 7 additions & 5 deletions src/components/common/YourCompany/YourCompany.vue
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@
<span>Undo</span>
</v-btn>
<v-btn
v-else-if="!isFirmConversionFiling"
v-else-if="!isFirmConversionFiling && !isLimitedExtendRestorationFiling"
text color="primary"
id="btn-correct-company-name"
@click="isEditingNames = true"
Expand Down Expand Up @@ -317,6 +317,7 @@ import { CommonMixin, DateMixin, NameRequestMixin } from '@/mixins/'
import { CoopTypes, NameChangeOptions } from '@/enums/'
import { CorpTypeCd, GetCorpFullDescription } from '@bcrs-shared-components/corp-type-module/'
import { ConversionNOB } from '@/components/Conversion'
import DateUtilities from '@/services/date-utilities'
@Component({
components: {
Expand Down Expand Up @@ -360,6 +361,7 @@ export default class YourCompany extends Mixins(
@Getter isRestorationFiling!: boolean
@Getter getEntityType!: CorpTypeCd
@Getter getAssociationType!: CoopTypes
@Getter isLimitedExtendRestorationFiling!: boolean
// Alteration flag getters
@Getter hasBusinessNameChanged!: boolean
Expand Down Expand Up @@ -453,7 +455,7 @@ export default class YourCompany extends Mixins(
get expiryDate (): string {
const expiry = this.getNameRequest?.expiry
if (expiry) {
return this.apiToPacificDateTime(expiry)
return DateUtilities.apiToPacificDateTime(expiry)
}
return null
}
Expand All @@ -467,15 +469,15 @@ export default class YourCompany extends Mixins(
get recognitionDateTime (): string {
if (this.isBenBcCccUlcCorrectionFiling || this.isRestorationFiling) {
if (this.getBusinessFoundingDateTime) {
return this.apiToPacificDateTime(this.getBusinessFoundingDateTime)
return DateUtilities.apiToPacificDateTime(this.getBusinessFoundingDateTime)
}
if (this.getCorrectedFilingDate) {
return this.apiToPacificDateTime(this.getCorrectedFilingDate)
return DateUtilities.apiToPacificDateTime(this.getCorrectedFilingDate)
}
}
if (this.isAlterationFiling) {
if (this.getBusinessFoundingDateTime) {
return this.apiToPacificDateTime(this.getBusinessFoundingDateTime)
return DateUtilities.apiToPacificDateTime(this.getBusinessFoundingDateTime)
}
}
return null
Expand Down
Loading

0 comments on commit 6c16987

Please sign in to comment.