Skip to content

Commit

Permalink
Merge branch 'main' into feat/fe/logout-dialog-conditional
Browse files Browse the repository at this point in the history
  • Loading branch information
paulushcgcj authored Nov 22, 2023
2 parents 3d51f4c + 9c34c34 commit 02e39ac
Show file tree
Hide file tree
Showing 70 changed files with 3,454 additions and 336 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/merge-main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -297,6 +297,7 @@ jobs:
-p ZONE=${{ env.ZONE }} -p NAME=${{ github.event.repository.name }}
-p PROMOTE=${{ github.repository }}/processor:${{ env.ZONE }}
-p URL_ZONE=${{ env.ZONE }}
-p BCREGISTRY_URI='https://bcregistry-prod.apigee.net'

image-promotions:
name: Promote images to PROD
Expand Down Expand Up @@ -449,3 +450,4 @@ jobs:
-p ZONE=${{ env.ZONE }} -p NAME=${{ github.event.repository.name }}
-p PROMOTE=${{ github.repository }}/processor:${{ env.PREV }}
-p URL_ZONE=${{ env.ZONE }}
-p BCREGISTRY_URI='https://bcregistry-prod.apigee.net'
1 change: 1 addition & 0 deletions .github/workflows/pr-open.yml
Original file line number Diff line number Diff line change
Expand Up @@ -256,6 +256,7 @@ jobs:
-p ZONE=${{ github.event.number }} -p NAME=${{ github.event.repository.name }}
-p PROMOTE=${{ github.repository }}/processor:${{ github.event.number }}
-p URL_ZONE=$((${{ github.event.number }} % 50))
-p BCREGISTRY_URI='https://bcregistry-prod.apigee.net'

cypress-run:
name: "User flow test"
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/unit-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ concurrency:

jobs:
tests-java:
name: Integrated Tests
name: Backend Tests
if: github.event_name != 'pull_request' || !github.event.pull_request.draft
runs-on: ubuntu-22.04
steps:
Expand Down Expand Up @@ -70,7 +70,7 @@ jobs:
-Dsonar.projectKey=nr-forest-client_processor
-Dsonar.coverage.jacoco.xmlReportPaths=target/coverage-reports/merged-test-report/jacoco.xml
-Dsonar.java.checkstyle.reportPaths=target/checkstyle-result.xml
-Dsonar.coverage.exclusions=**/configuration/**,**/dto/**,**/entity/**,**/repository/**,**/*$*Builder*,**/ProcessApplication***/ApplicationConstant*
-Dsonar.coverage.exclusions=**/configuration/**,**/dto/**,**/exception/**,**/entity/**,**/repository/**,**/*$*Builder*,**/ProcessApplication***/ApplicationConstant*
sonar_project_token: ${{ secrets.SONAR_TOKEN_PROCESSOR }}

- name: Archive CycloneDX
Expand Down
4 changes: 2 additions & 2 deletions backend/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -138,8 +138,8 @@
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.github.tomakehurst</groupId>
<artifactId>wiremock-jre8-standalone</artifactId>
<groupId>org.wiremock</groupId>
<artifactId>wiremock-standalone</artifactId>
<version>3.0.1</version>
<scope>test</scope>
</dependency>
Expand Down
11 changes: 11 additions & 0 deletions frontend/src/assets/styles/global.scss
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@
--light-theme-miscellaneous-interactive: #0073e6;
--light-theme-background-background-selected: #93939533;
--light-theme-text-text-disabled: rgba(19, 19, 21, 0.25);
--light-theme-text-text-on-color: #FFFFFF;

//Buttons
--cds-button-disabled: #c6c6c8;
Expand Down Expand Up @@ -296,6 +297,7 @@ div#app {
align-items: center;
background: var(--light-theme-layer-layer-02, #fff);
flex-grow: 1;
margin-top: 3.5rem;
}

.full {
Expand Down Expand Up @@ -1005,6 +1007,15 @@ cds-header-global-action {
background: var(--light-theme-layer-layer-02, #FFF) !important;
}

cds-header-menu-button::part(svg) {
width: 1rem;
height: 1rem;
}

cds-header-menu-button:not([active])::part(svg) {
fill: var(--light-theme-text-text-on-color, #FFF);
}

cds-header-global-action svg {
fill: var(--dark-theme-focus-focus);
}
Expand Down
4 changes: 3 additions & 1 deletion frontend/src/components/MainHeaderComponent.vue
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,9 @@ const onClickLogout = () => {
<cds-header-menu-button
v-if="$session?.user?.provider === 'idir'"
button-label-active="Close menu"
button-label-inactive="Open menu">
button-label-inactive="Open menu"
v-shadow="2"
>
</cds-header-menu-button>

<a href="https://gov.bc.ca" v-if="$session.user?.provider !== 'idir'" class="bclogotop">
Expand Down
4 changes: 2 additions & 2 deletions legacy/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -150,8 +150,8 @@
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.github.tomakehurst</groupId>
<artifactId>wiremock-jre8-standalone</artifactId>
<groupId>org.wiremock</groupId>
<artifactId>wiremock-standalone</artifactId>
<version>3.0.1</version>
<scope>test</scope>
</dependency>
Expand Down
15 changes: 15 additions & 0 deletions processor/openshift.deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,9 @@ parameters:
- name: URL_ZONE
description: Zone to use for URL
required: true
- name: BCREGISTRY_URI
description: Bc Registry API address
required: true
objects:
- apiVersion: v1
kind: ImageStream
Expand Down Expand Up @@ -195,6 +198,18 @@ objects:
value: 30S
- name: TZ
value: America/Vancouver
- name: BCREGISTRY_URI
value: ${BCREGISTRY_URI}
- name: BCREGISTRY_KEY
valueFrom:
secretKeyRef:
name: ${NAME}-${ZONE}
key: bcregistry-key
- name: BCREGISTRY_ACCOUNT
valueFrom:
secretKeyRef:
name: ${NAME}-${ZONE}
key: bcregistry-account
ports:
- containerPort: 3000
protocol: TCP
Expand Down
5 changes: 3 additions & 2 deletions processor/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -160,9 +160,10 @@
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.github.tomakehurst</groupId>
<artifactId>wiremock-jre8-standalone</artifactId>
<groupId>org.wiremock</groupId>
<artifactId>wiremock-standalone</artifactId>
<version>3.0.1</version>
<scope>test</scope>
</dependency>

</dependencies>
Expand Down
21 changes: 21 additions & 0 deletions processor/src/main/java/ca/bc/gov/app/ApplicationConstant.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
package ca.bc.gov.app;

import ca.bc.gov.app.dto.bcregistry.BcRegistryDocumentAccessRequestDto;
import ca.bc.gov.app.dto.bcregistry.BcRegistryDocumentAccessTypeDto;
import ca.bc.gov.app.dto.bcregistry.BcRegistryDocumentRequestBodyDto;
import java.util.List;
import lombok.AccessLevel;
import lombok.NoArgsConstructor;

Expand All @@ -17,6 +21,7 @@ public final class ApplicationConstant {
public static final String REVIEW_CHANNEL = "reviewChannel";
public static final String SUBMISSION_MAIL_CHANNEL = "submissionMailChannel";
public static final String SUBMISSION_LEGACY_CLIENT_CHANNEL = "submissionLegacyClientChannel";
public static final String SUBMISSION_LEGACY_CLIENT_PERSIST_CHANNEL = "submissionLegacyClientPersistChannel";
public static final String SUBMISSION_LEGACY_LOCATION_CHANNEL = "submissionLegacyLocationChannel";
public static final String SUBMISSION_LEGACY_CONTACT_CHANNEL = "submissionLegacyContactChannel";
public static final String SUBMISSION_LEGACY_AGGREGATE_CHANNEL = "submissionLegacyAggregateChannel";
Expand All @@ -42,4 +47,20 @@ public final class ApplicationConstant {
public static final String LOCATION_CODE = "locationCode";
public static final String SUBMISSION_MAIL_BUILD_CHANNEL = "submissionMailBuildChannel";
public static final String CLIENT_NUMBER = "CLIENT_NUMBER";
public static final String CLIENT_TYPE_CODE = "CLIENT_TYPE_CODE";
public static final String SUBMISSION_LEGACY_INDIVIDUAL_CHANNEL = "submissionLegacyIndividualChannel";
public static final String SUBMISSION_LEGACY_USP_CHANNEL = "submissionLegacyUSPChannel";
public static final String SUBMISSION_LEGACY_RSP_CHANNEL = "submissionLegacyRSPChannel";
public static final String SUBMISSION_LEGACY_OTHER_CHANNEL = "submissionLegacyOtherChannel";
public static final String CLIENT_EXISTS = "client-exists";

public static final BcRegistryDocumentRequestBodyDto
BUSINESS_SUMMARY_FILING_HISTORY =
new BcRegistryDocumentRequestBodyDto(
new BcRegistryDocumentAccessRequestDto(
List.of(
new BcRegistryDocumentAccessTypeDto("BUSINESS_SUMMARY_FILING_HISTORY")
)
)
);
}
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@ public class ForestClientConfiguration {
@NestedConfigurationProperty
private BackendConfiguration backend;

@NestedConfigurationProperty
private BcRegistryConfiguration bcregistry;

@Data
@Builder
@NoArgsConstructor
Expand All @@ -43,4 +46,18 @@ public static class BackendConfiguration {
private String uri;
}

/**
* The BC Registry configuration.
*/
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public static class BcRegistryConfiguration {

private String uri;
private String apiKey;
private String accountId;
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,20 @@ public WebClient forestClientApi(ForestClientConfiguration configuration) {
.build();
}

/**
* Returns a configured instance of WebClient for accessing the BC Registry API.
*
* @param configuration The configuration for the ForestClient.
* @return A configured instance of WebClient for accessing the BC Registry API.
*/
@Bean
public WebClient bcRegistryApi(ForestClientConfiguration configuration) {
return WebClient
.builder()
.baseUrl(configuration.getBcregistry().getUri())
.defaultHeader("x-apikey", configuration.getBcregistry().getApiKey())
.defaultHeader("Account-Id", configuration.getBcregistry().getAccountId())
.build();
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,32 @@ public FluxMessageChannel submissionLegacyNotifyChannel() {
return new FluxMessageChannel();
}

@Bean
public FluxMessageChannel submissionLegacyClientPersistChannel() {
return new FluxMessageChannel();
}

@Bean
public FluxMessageChannel submissionLegacyIndividualChannel() {
return new FluxMessageChannel();
}

@Bean
public FluxMessageChannel submissionLegacyUSPChannel() {
return new FluxMessageChannel();
}

@Bean
public FluxMessageChannel submissionLegacyRSPChannel() {
return new FluxMessageChannel();
}

@Bean
public FluxMessageChannel submissionLegacyOtherChannel() {
return new FluxMessageChannel();
}



@Bean
public R2dbcMessageSource submissionMessages(
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
package ca.bc.gov.app.dto;

import java.time.LocalDate;
import lombok.With;

@With
public record SubmissionInformationDto(
String legalName,
String corporationName,
LocalDate dateOfBirth,
String incorporationNumber,
String goodStanding
String goodStanding,
String clientType
) {
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
package ca.bc.gov.app.dto.bcregistry;

import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import java.util.List;
import lombok.With;

@With
@JsonIgnoreProperties(ignoreUnknown = true)
public record BcRegistryDocumentAccessRequestDto(
List<BcRegistryDocumentAccessTypeDto> documents
) {
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
package ca.bc.gov.app.dto.bcregistry;

import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.With;

@With
@JsonIgnoreProperties(ignoreUnknown = true)
public record BcRegistryDocumentAccessTypeDto(
@JsonProperty("type")
String documentType
) {
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
package ca.bc.gov.app.dto.bcregistry;

import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import java.util.List;
import lombok.With;

@With
@JsonIgnoreProperties(ignoreUnknown = true)
public record BcRegistryDocumentDto(
List<BcRegistryPartyDto> parties
) {

public BcRegistryPartyDto getProprietor() {
if (parties == null) {
return null;
}
return parties
.stream()
.filter(BcRegistryPartyDto::isProprietor)
.findFirst()
.orElse(null);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
package ca.bc.gov.app.dto.bcregistry;

import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import lombok.With;

@With
@JsonIgnoreProperties(ignoreUnknown = true)
public record BcRegistryDocumentRequestBodyDto(
BcRegistryDocumentAccessRequestDto documentAccessRequest
) {
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
package ca.bc.gov.app.dto.bcregistry;

import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import lombok.With;

@With
@JsonIgnoreProperties(ignoreUnknown = true)
public record BcRegistryDocumentRequestDocumentDto(
String documentKey,
String documentType,
String fileName,
Long id
) {
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
package ca.bc.gov.app.dto.bcregistry;

import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import java.util.List;
import lombok.With;

@With
@JsonIgnoreProperties(ignoreUnknown = true)
public record BcRegistryDocumentRequestResponseDto(
String businessIdentifier,
String businessName,
List<BcRegistryDocumentRequestDocumentDto> documents,
String paymentStatus,
String status
) {
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
package ca.bc.gov.app.dto.bcregistry;

import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import lombok.With;

@With
@JsonIgnoreProperties(ignoreUnknown = true)
public record BcRegistryExceptionMessageDto(
String errorMessage,
String rootCause
) {
}
Loading

0 comments on commit 02e39ac

Please sign in to comment.