Skip to content

Commit

Permalink
feat(fe:FSADT1-1487): Client number screen - clickable client number (#…
Browse files Browse the repository at this point in the history
…1252)

* Cleaned up code

* feat(fe:FSADT1-1487): Client number screen - clickable client number

* Added ID attribute
  • Loading branch information
mamartinezmejia authored Oct 21, 2024
1 parent 1aa6c59 commit b27f866
Show file tree
Hide file tree
Showing 12 changed files with 39 additions and 27 deletions.
8 changes: 4 additions & 4 deletions frontend/src/assets/styles/global.scss
Original file line number Diff line number Diff line change
Expand Up @@ -803,7 +803,7 @@ cds-actionable-notification * {
gap: 1rem;
}

.form-footer-group-buttons {
.form-group-buttons {
display: flex;
gap: 1rem;
}
Expand Down Expand Up @@ -1762,7 +1762,7 @@ div.internal-grouping-01:has(svg.warning) span.body-compact-01 {
align-self: stretch;
}

.form-footer-group-buttons {
.form-group-buttons {
flex-direction: column-reverse;
justify-content: flex-end;
align-items: stretch;
Expand Down Expand Up @@ -2041,11 +2041,11 @@ div.internal-grouping-01:has(svg.warning) span.body-compact-01 {
margin-left: 16rem;
}

div.form-footer-group-buttons {
div.form-group-buttons {
gap: 0.5rem;
}

div.form-footer-group-buttons cds-button {
div.form-group-buttons cds-button {
margin-top: 1rem;
}

Expand Down
2 changes: 1 addition & 1 deletion frontend/src/pages/FormBCeIDPage.vue
Original file line number Diff line number Diff line change
Expand Up @@ -606,7 +606,7 @@ watch(submissionLimitError, () => {
v-if="!isLast && !progressData[currentTab].valid">
All fields must be filled out correctly to enable the "Next" button below
</span>
<div class="form-footer-group-buttons">
<div class="form-group-buttons">
<cds-button
v-if="!isFirst"
kind="secondary"
Expand Down
29 changes: 23 additions & 6 deletions frontend/src/pages/FormStaffConfirmationPage.vue
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,20 @@
import useSvg from "@/composables/useSvg";
// @ts-ignore
import badgePictogram from "@carbon/pictograms/es/badge";
import { greenDomain } from "@/CoreConstants";
defineProps<{
clientNumber: string;
clientEmail: string;
}>();
const SVG = useSvg(badgePictogram);
const openClientDetails = (clientNumber: string) => {
if (clientNumber) {
const url = `https://${greenDomain}/int/client/client02MaintenanceAction.do?bean.clientNumber=${clientNumber}`;
window.open(url, "_blank", "noopener");
}
};
</script>

<template>
Expand All @@ -20,12 +27,22 @@ const SVG = useSvg(badgePictogram);
<p class="fluid-paragraph-01">
We’ll send the client number and details submitted to <strong>{{ clientEmail }}</strong>
</p>
<cds-button
kind="primary"
href="/new-client-staff"
size="field">
<span>Create another client</span>
</cds-button>
<div class="form-group-buttons">
<cds-button
id="openClientDtlsBtnId"
kind="tertiary"
v-on:click="openClientDetails(clientNumber)"
size="field">
<span>View client details</span>
</cds-button>
<cds-button
id="createAnotherClientBtnId"
kind="primary"
href="/new-client-staff"
size="field">
<span>Create another client</span>
</cds-button>
</div>
</div>
</div>
</template>
2 changes: 1 addition & 1 deletion frontend/src/pages/FormStaffPage.vue
Original file line number Diff line number Diff line change
Expand Up @@ -665,7 +665,7 @@ watch(submissionLimitError, () => {
<span class="body-compact-01" v-if="!isLast && !progressData[currentTab].valid">
All required fields must be filled out correctly to enable the "Next" button below
</span>
<div class="form-footer-group-buttons">
<div class="form-group-buttons">
<cds-button
v-if="isFirst"
kind="secondary"
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/pages/FormStaffProcessingPage.vue
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ const SVG = useSvg(badgePictogram);
<p class="fluid-paragraph-01">
We’ll send the client number and submission details to <strong>{{ clientEmail }}</strong> when the process is complete.
</p>
<div class="form-footer-group-buttons">
<div class="form-group-buttons">
<cds-button
kind="tertiary"
:href="`/submissions/${submissionId}`"
Expand Down
8 changes: 4 additions & 4 deletions frontend/src/pages/LandingPage.vue
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ if (query.ref && query.ref === "individual") {

<div class="spacing"></div>

<div class="form-footer-group-buttons" v-if="!hideIdirBtnInd">
<div class="form-group-buttons" v-if="!hideIdirBtnInd">
<cds-button
kind="primary"
iconLayout=""
Expand Down Expand Up @@ -106,7 +106,7 @@ if (query.ref && query.ref === "individual") {
object-position: 50% 0;
}
.form-footer-group-buttons {
.form-group-buttons {
flex-wrap: wrap;
}
Expand All @@ -122,7 +122,7 @@ if (query.ref && query.ref === "individual") {
flex: auto;
}
.login-content .form-footer-group-buttons {
.login-content .form-group-buttons {
flex-direction: column;
}
}
Expand All @@ -139,7 +139,7 @@ if (query.ref && query.ref === "individual") {
flex: auto;
}
.login-content .form-footer-group-buttons {
.login-content .form-group-buttons {
flex-direction: column;
}
}
Expand Down
4 changes: 2 additions & 2 deletions frontend/src/pages/LogoutPage.vue
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ logout(userProviderInfo.value);
flex: auto;
}
.login-content .form-footer-group-buttons {
.login-content .form-group-buttons {
flex-direction: column;
}
}
Expand All @@ -105,7 +105,7 @@ logout(userProviderInfo.value);
flex: auto;
}
.login-content .form-footer-group-buttons {
.login-content .form-group-buttons {
flex-direction: column;
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,10 @@ describe('FormStaffConfirmationPage.vue', () => {
expect(svg.exists()).toBe(true);
});

it('checks button existence and href attribute', () => {
it('checks create another client button existence and href attribute', () => {
const wrapper = createComponent({ clientNumber: '123', clientEmail: 'test@example.com' });
const button = wrapper.find('cds-button');
const button = wrapper.find('#createAnotherClientBtnId');
expect(button.exists()).toBe(true);
expect(button.attributes('href')).toBe('/new-client-staff');
});
});
});
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package ca.bc.gov.app.entity;

import static ca.bc.gov.app.ApplicationConstants.ORACLE_ATTRIBUTE_SCHEMA;
import java.time.LocalDate;
import java.time.LocalDateTime;
import lombok.AllArgsConstructor;
import lombok.Builder;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@
import org.junit.jupiter.params.provider.Arguments;
import org.junit.jupiter.params.provider.MethodSource;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.HttpStatus;
import org.springframework.http.HttpStatusCode;
import org.springframework.http.MediaType;
import org.springframework.test.web.reactive.server.WebTestClient;
import org.springframework.test.web.reactive.server.WebTestClient.ResponseSpec;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
import ca.bc.gov.app.dto.ForestClientContactDto;
import ca.bc.gov.app.entity.ForestClientContactEntity;
import java.time.LocalDateTime;
import org.apache.commons.lang3.StringUtils;
import org.junit.jupiter.api.DisplayName;
import org.junit.jupiter.api.Test;
import org.mapstruct.factory.Mappers;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package ca.bc.gov.app.mappers;

import static org.assertj.core.api.AssertionsForClassTypes.assertThat;
import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertNotNull;

import ca.bc.gov.app.dto.ForestClientDto;
Expand Down

0 comments on commit b27f866

Please sign in to comment.