Skip to content

Commit

Permalink
FSADT1-722 (#435)
Browse files Browse the repository at this point in the history
* fix(be):
- Changed the version of the jacobo plugin as the version 0.8.9 was failing locally

* fix(fe):
- Fixed deprecation warning message indicating that the 'importsNotUsedAsValues' option will be removed in TypeScript 5.5, and we should use the 'verbatimModuleSyntax' instead.

* Partial commit to get changes from Paulo

* This code is not longer needed

* Reverted changed. Done for testing purposes.

* Changed named to legal name as the current one is misleading as we are using both client type and legal type

* feat(fe):
- Draft for https://apps.nrs.gov.bc.ca/int/jira/browse/FSADT1-722

* Changed named to legal name as the current one is misleading as we are using both client type and legal type #2

* Changed named to legal name as the current one is misleading as we are using both client type and legal type #3

* Uncommented out code

* feat(fe):
- Completed FSADT1-722

* chore: fixing tests

---------

Co-authored-by: Paulo Gomes da Cruz Junior <[email protected]>
  • Loading branch information
mamartinezmejia and Paulo Gomes da Cruz Junior committed Apr 19, 2023
1 parent 5e89c02 commit 2e9490c
Show file tree
Hide file tree
Showing 12 changed files with 166 additions and 103 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"code": "00000002",
"name": "BAXTER",
"status": "ACTIVE",
"clientType": "SP"
"legalType": "SP"
}"""
)
public record ClientLookUpDto(
Expand All @@ -22,7 +22,7 @@ public record ClientLookUpDto(
@Schema(description = "The status of the client, could be ACTIVE or INACTIVE",
example = "ACTIVE")
String status,
@Schema(description = "The type of the client", example = "SP")
String clientType
@Schema(description = "The legal type of the client", example = "SP")
String legalType
) {
}
Original file line number Diff line number Diff line change
Expand Up @@ -198,9 +198,6 @@ insert into nrfc.client_type_code (client_type_code, description, effective_date
insert into nrfc.client_type_code (client_type_code, description, effective_date, create_user) values ('S', 'Society', current_timestamp, 'mariamar') on conflict (client_type_code) do nothing;
insert into nrfc.client_type_code (client_type_code, description, effective_date, create_user) values ('T', 'First Nation Tribal Council', current_timestamp, 'mariamar') on conflict (client_type_code) do nothing;
insert into nrfc.client_type_code (client_type_code, description, effective_date, create_user) values ('U', 'Unregistered Company', current_timestamp, 'mariamar') on conflict (client_type_code) do nothing;
insert into nrfc.client_type_code (client_type_code, description, effective_date, create_user) values ('Z', 'Sole Proprietorship', current_timestamp, 'mariamar') on conflict (client_type_code) do nothing;

update nrfc.client_type_code set expiry_date = current_timestamp where client_type_code not in ('C', 'Z');

insert into nrfc.contact_type_code (contact_type_code, description, effective_date, create_user) values ('AP', 'Accounts Payable', current_timestamp, 'mariamar') on conflict (contact_type_code) do nothing;
insert into nrfc.contact_type_code (contact_type_code, description, effective_date, create_user) values ('AR', 'Accounts Receivable', current_timestamp, 'mariamar') on conflict (contact_type_code) do nothing;
Expand Down
4 changes: 2 additions & 2 deletions backend/src/test/java/ca/bc/gov/app/TestConstants.java
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ public class TestConstants {
"code": "BC0772006",
"name": "U3 POWER CORP.",
"status": "ACTIVE",
"clientType": "SP"
"legalType": "SP"
}
]""";

Expand Down Expand Up @@ -153,7 +153,7 @@ public class TestConstants {
"code": "BC0772006",
"name": "U3 POWER CORP.",
"status": "ACTIVE",
"clientType": "SP"
"legalType": "SP"
}""";

public static final String OPENMAPS_OK = """
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,10 +68,10 @@ void shouldListCodesAsExpected() {
.expectStatus().isOk()
.expectBody()
.jsonPath("$[0].code").isNotEmpty()
.jsonPath("$[0].code").isEqualTo("C")
.jsonPath("$[0].code").isEqualTo("A")

.jsonPath("$[1].code").isNotEmpty()
.jsonPath("$[1].code").isEqualTo("Z");
.jsonPath("$[1].code").isEqualTo("C");

}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ class ClientServiceIntegrationTest extends AbstractTestContainerIntegrationTest
void shouldListCodeAsExpected(LocalDate date) {
StepVerifier
.create(service.findActiveClientTypeCodes(date))
.assertNext(results -> assertEquals("C", results.code()))
.expectNextCount(1)
.assertNext(results -> assertEquals("A", results.code()))
.expectNextCount(11)
.verifyComplete();
}

Expand Down
4 changes: 2 additions & 2 deletions frontend/components.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,13 @@ declare module '@vue/runtime-core' {
BCardHeader: typeof import('bootstrap-vue-3')['BCardHeader']
BCol: typeof import('bootstrap-vue-3')['BCol']
BCollapse: typeof import('bootstrap-vue-3')['BCollapse']
BFormGroup: typeof import('bootstrap-vue-3')['BFormGroup']
BFormInput: typeof import('bootstrap-vue-3')['BFormInput']
BFormRadio: typeof import('bootstrap-vue-3')['BFormRadio']
BFormSelect: typeof import('bootstrap-vue-3')['BFormSelect']
BPopover: typeof import('bootstrap-vue-3')['BPopover']
BRow: typeof import('bootstrap-vue-3')['BRow']
BTab: typeof import('bootstrap-vue-3')['BTab']
BTabs: typeof import('bootstrap-vue-3')['BTabs']
RouterLink: typeof import('vue-router')['RouterLink']
RouterView: typeof import('vue-router')['RouterView']
}
}
11 changes: 9 additions & 2 deletions frontend/src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,11 @@
:title="tab.title"
:key="index"
:active="index == 0"
><component :is="tab.content"
/></b-tab>
>
<component :is="tab.content"
:businessName="bceidBusinessName"
:userId="userId"/>
</b-tab>
</b-tabs>
</div>
</div>
Expand All @@ -26,6 +29,8 @@ import { navBlue, navSelectBlue } from "./utils/color";
const keycloak: KeycloakInstance | undefined = inject("keycloak");
let tabs: Ref<Array<{ title: string; content: DefineComponent }>> = ref([]);
let bceidBusinessName = ref();
let userId = ref();
if (keycloak &&
keycloak.tokenParsed &&
Expand All @@ -34,6 +39,8 @@ if (keycloak &&
}
else {
tabs.value = [{ title: "Apply a New Client", content: ApplyClientNumber }];
bceidBusinessName = keycloak && keycloak.tokenParsed ? keycloak.tokenParsed.displayed : "Dev Test Client Name";
userId = keycloak && keycloak.tokenParsed ? keycloak.subject : "[email protected]";
}
</script>

Expand Down
23 changes: 15 additions & 8 deletions frontend/src/common/LabelComponent.vue
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,21 @@
<label>{{ label }}</label>
<!-- <bi-asterisk v-if="required"
style="font-size: 8px; color: red; margin-top: 2px; margin-right: 6px" /> -->
<bi-question-circle-fill :id="'form-field-label-' + id"
v-if="tooltip"
style="font-size: 12px; color: #6c757d" />
<b-popover :target="'form-field-label-' + id"
triggers="hover"
placement="top"
:content="tooltip">
</b-popover>
<div v-if="tooltip">
&nbsp;
<!-- <bi-question-circle-fill :id="'popover' + id"
style="font-size: 12px;
color: #6c757d;
vertical-align: top;" /> -->
<bi-question-circle-fill :id="'popover' + id"
style="font-size: 12px;
color: #6c757d;
vertical-align: top;" />
<b-popover :target="'popover' + id"
placement="right">
<span v-html="tooltip" />
</b-popover>
</div>
</div>
</template>

Expand Down
14 changes: 8 additions & 6 deletions frontend/src/dto/ApplyClientNumberDto.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
import type { CodeDescrType } from "@/core/CommonTypes";

export interface FormDataDto {
businessType: {
clientType: CodeDescrType;
};
userId: string,
businessInformation: {
businessType: string,
legalType: string,
clientType: string;
incorporationNumber: string;
businessName: null | string;
goodStanding: string;
Expand Down Expand Up @@ -42,10 +43,11 @@ export interface Contact {
}

export const formDataDto: FormDataDto = {
businessType: {
clientType: { value: "", text: "" },
},
userId: "",
businessInformation: {
businessType: "",
legalType: "",
clientType: "",
incorporationNumber: "",
businessName: "",
goodStanding: "",
Expand Down
Loading

0 comments on commit 2e9490c

Please sign in to comment.