Skip to content

Commit

Permalink
Frontend improvements (#400)
Browse files Browse the repository at this point in the history
* no message

* feat(fe):
- First draft of the FE without JSON schema

* feat(fe):
- Draft of the FE without JSON schema #2

* feat(fe/be):
- Draft of the FE without JSON schema #3
- Changed data model

* feat(fe/be):
- Draft of the FE without JSON schema #4

* feat(fe/be):
- Draft of the FE without JSON schema #5

* feat(fe/be):
- Draft of the FE without JSON schema #5
- Completed Autocomplete
- Renamed some files

* feat(fe/be):
- Draft of the FE without JSON schema #6

* fix(fe/be):
- Fixed some issues in the SQL scripts and the unit test

* feat(fe/be):
- Draft of the FE without JSON schema #7
- Added missing validation components

* Dropped example

* fix(fe):
- Fixed some issues in the unit test

* feat(fe):
- Draft of the FE without JSON schema #8
- Improved code and made code reviews

* fix: fixing tests

* feat(fe):
- Cleaned up code
- Improved code and made code reviews

* feat(fe):
- Cleaned up code
- Improved code and made code reviews
- Changed some names as per naming conventions

* no message

* feat(be):
- Dropped and added some columns

* Fixed typo

* feat(fe):
- Added missing logic to add the incorporation number

* fix(be):
- Fixed unit tests after recent changes

* fix: adding missing field to the database

* feat(fe):
- Aligned id names to dto keys for validations practicity

* feat(fe):
- Added the vue mask library

* feat(fe):
- Removed unneeded column
- Added responsiveness in the table
- Beautified code

* fix(fe):
- Fixed some issues in the unit test

* fix(fe):
- Fixed some issues in the unit test

---------

Co-authored-by: Paulo Gomes da Cruz Junior <[email protected]>
  • Loading branch information
mamartinezmejia and Paulo Gomes da Cruz Junior authored Mar 15, 2023
1 parent 2e4b455 commit 3e42c55
Show file tree
Hide file tree
Showing 9 changed files with 27 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ public record ClientAddressDto(
String city,
String postalCode,
String businessPhone,
String email,
int index,
List<ClientContactDto> clientContactDtoList
) {
Expand Down
3 changes: 1 addition & 2 deletions backend/src/main/java/ca/bc/gov/app/util/ClientMapper.java
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,7 @@ public static SubmissionLocationEntity mapToSubmissionLocationEntity(
.withCountryCode(clientAddressDto.country())
.withProvinceCode(clientAddressDto.province())
.withCityName(clientAddressDto.city())
.withPostalCode(clientAddressDto.postalCode())
.withEmailAddress(clientAddressDto.email());
.withPostalCode(clientAddressDto.postalCode());
}

public static SubmissionLocationContactEntity mapToSubmissionLocationContactEntity(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,6 @@ create table if not exists nrfc.submission_location (
city_name varchar(100) not null,
postal_code varchar(10) not null,
main_address_ind varchar(1) not null default 'N',
email_address varchar(50) not null,
constraint submission_location_id_pk primary key (submission_location_id),
constraint submission_id_fk foreign key (submission_id) references nrfc.submission(submission_id),
constraint submission_location_country_code_fk foreign key (country_code) references nrfc.country_code(country_code),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,6 @@ void shouldSubmitClientData() {
"Las Vegas",
"89109",
"007",
"[email protected]",
0,
List.of(
new ClientContactDto(
Expand Down
11 changes: 11 additions & 0 deletions frontend/package-lock.json

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

1 change: 1 addition & 0 deletions frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@
"vite": "^2.8.6",
"vue": "^3.2.47",
"vue-axios": "^3.4.1",
"vue-the-mask": "^0.11.1",
"vue-tsc": "^1.1.5"
},
"devDependencies": {
Expand Down
2 changes: 2 additions & 0 deletions frontend/src/main.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { createApp } from "vue";
import VueTheMask from 'vue-the-mask';
import App from "./App.vue";
import VueKeycloakJs from "@dsb-norge/vue-keycloak-js";
import type { KeycloakInstance } from "keycloak-js";
Expand All @@ -10,6 +11,7 @@ import "bootstrap/dist/css/bootstrap.css";
import "bootstrap-vue-3/dist/bootstrap-vue-3.css";

const app = createApp(App);
app.use(VueTheMask);

if (nodeEnv && nodeEnv == "openshift-dev") {
// disable the login authentication for the deployment in the openshift dev namespace
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -154,8 +154,8 @@ const displayCommonSections = computed(() => {
else {
if (null !== formData.value.businessType.clientType &&
null !== formData.value.businessInformation &&
null !== formData.value.businessInformation.businessName &&
"" !== formData.value.businessInformation.businessName) {
null !== formData.value.businessInformation.incorporationNumber &&
"" !== formData.value.businessInformation.incorporationNumber) {
return true;
}
else {
Expand Down
17 changes: 10 additions & 7 deletions frontend/src/pages/applyclientnumber/ContactSectionComponent.vue
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<template>
<div class="table-responsive">
<table class="table">
<thead>
<tr>
Expand Down Expand Up @@ -36,7 +37,8 @@
</td>
<td>
<b-form-input :id="'contactPhoneNumberId' + itemIndex"
v-model="item.contactPhoneNumber">
v-model="item.contactPhoneNumber"
v-mask="'##########'">
</b-form-input>
<ValidationMessages :fieldId = "'contactPhoneNumberId' + itemIndex"
:validationMessages="validationMessages" />
Expand All @@ -46,23 +48,24 @@
v-model="item.contactEmail">
</b-form-input>
<ValidationMessages :fieldId = "'contactEmailId' + itemIndex"
:validationMessages="validationMessages" />
:validationMessages="validationMessages" />
</td>
<td>
<b-button enabled="contacts.length > 1"
@click="deleteContact(itemIndex)">
@click="deleteContact(itemIndex)">
<bi-x-circle></bi-x-circle>
</b-button>
</td>
</tr>
</tbody>
</table>
</div>

<b-button class="chefsBlue"
<b-button class="chefsBlue"
@click="addContact()">
<bi-plus-lg></bi-plus-lg>
Add another person for this address
</b-button>
<bi-plus-lg></bi-plus-lg>
Add another person for this address
</b-button>
</template>

<script setup lang="ts">
Expand Down

0 comments on commit 3e42c55

Please sign in to comment.