Skip to content

Commit

Permalink
chore: merge main into client2 to solve conflicts (#1181)
Browse files Browse the repository at this point in the history
* fix(deps): update maven all non-major dependencies

* fix(deps): update dependency date-fns to v4 (#1173)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* fix(FSADT1-1514): fixed doing business as processing (#1177)

- added to external users the DBA field filled
- fixed the DBA field on the processor

* fix(deps): update dependency org.springframework.boot:spring-boot-starter-parent to v3.3.4

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Paulo Gomes da Cruz Junior <[email protected]>
  • Loading branch information
3 people authored Sep 26, 2024
1 parent 61efa97 commit 8889e26
Show file tree
Hide file tree
Showing 8 changed files with 26 additions and 37 deletions.
2 changes: 1 addition & 1 deletion backend/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>3.3.3</version>
<version>3.3.4</version>
<relativePath/>
</parent>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,7 @@ const autoCompleteResult = ref<BusinessSearchResult>();
watch([autoCompleteResult], () => {
// reset business validation state
validation.business = false;
formData.value.businessInformation.doingBusinessAs = null;
if (autoCompleteResult.value && autoCompleteResult.value.code) {
toggleErrorMessages(false, false, false, false, false);
Expand All @@ -177,6 +178,10 @@ watch([autoCompleteResult], () => {
);
showAutoCompleteInfo.value = false;
if (formData.value.businessInformation.clientType === 'RSP') {
formData.value.businessInformation.doingBusinessAs = autoCompleteResult.value.name;
}
emit("update:data", formData.value);
//Also, we will load the backend data to fill all the other information as well
Expand Down
2 changes: 1 addition & 1 deletion legacy/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>3.3.3</version>
<version>3.3.4</version>
<relativePath/> <!-- lookup parent from repository -->
</parent>

Expand Down
2 changes: 1 addition & 1 deletion processor/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>3.3.3</version>
<version>3.3.4</version>
<relativePath/>
<!-- lookup parent from repository -->
</parent>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ public final class ApplicationConstant {
public static final String MATCHING_KIND = "kind";
public static final String MATCHED_USER = "matched-user";
public static final String IS_DOING_BUSINESS_AS = "isDoingBusinessAs";
public static final String DOING_BUSINESS_AS = "isDoingBusinessAs";
public static final String DOING_BUSINESS_AS = "doingBusinessAsName";

public static final BcRegistryDocumentRequestBodyDto
BUSINESS_SUMMARY_FILING_HISTORY =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
import lombok.Getter;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.BooleanUtils;
import org.apache.commons.lang3.RegExUtils;
import org.apache.commons.lang3.StringUtils;
import org.springframework.stereotype.Service;
Expand Down Expand Up @@ -320,13 +319,12 @@ private Mono<String> createClientDoingBusinessAs(MessagingWrapper<ForestClientDt
.just(clientNumber)
//FSADT1-1388: Allow doing business as based on parameter
.filter(
forestClientNumber -> BooleanUtils
.toBoolean(
message
.getParameter(
ApplicationConstant.IS_DOING_BUSINESS_AS,
String.class
)
forestClientNumber ->
Boolean.TRUE.equals(message
.getParameter(
ApplicationConstant.IS_DOING_BUSINESS_AS,
Boolean.class
)
)
)
.doOnNext(forestClientNumber ->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,9 +76,12 @@ public Mono<MessagingWrapper<ForestClientDto>> generateForestClient(

//if Staff submitted, get the client name from the submission as doing business as
.doOnNext(submissionDetail -> {
if (isStaffSubmitted(message)) {
atomicClientName.set(submissionDetail.getDoingBusinessAs());
}
atomicClientName.set(
Optional
.ofNullable(submissionDetail.getDoingBusinessAs())
.filter(StringUtils::isNotBlank)
.orElse(submissionDetail.getOrganizationName())
);
})

.map(submissionDetail ->
Expand Down Expand Up @@ -139,15 +142,7 @@ public Mono<MessagingWrapper<ForestClientDto>> generateForestClient(
message.parameters()
)
.withParameter(ApplicationConstant.FOREST_CLIENT_NAME,
BooleanUtils.toString(
isStaffSubmitted(message),
atomicClientName.get(),
Optional
.ofNullable(forestClient.clientComment())
.filter(StringUtils::isNotBlank)
.map(comment -> comment.split("and company name ")[1])
.orElse(StringUtils.EMPTY)
)
atomicClientName.get().toUpperCase()
)
.withParameter(ApplicationConstant.REGISTRATION_NUMBER,
String.join(StringUtils.EMPTY,
Expand All @@ -161,16 +156,7 @@ public Mono<MessagingWrapper<ForestClientDto>> generateForestClient(
)
.withParameter(
ApplicationConstant.DOING_BUSINESS_AS,
BooleanUtils.toString(
isStaffSubmitted(message),
atomicClientName.get().toUpperCase(),
Optional
.ofNullable(forestClient.clientComment())
.filter(StringUtils::isNotBlank)
.map(comment -> comment.split("and company name ")[1])
.orElse(StringUtils.EMPTY)
.toUpperCase()
)
atomicClientName.get().toUpperCase()
)
);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -428,7 +428,7 @@ private static Stream<Arguments> generateForestClient() {
.withParameter(ApplicationConstant.CREATED_BY, "IDIR\\JWICK")
.withParameter(ApplicationConstant.UPDATED_BY, "IDIR\\JWICK")
.withParameter(ApplicationConstant.FOREST_CLIENT_NAME,
"Baxter Corp")
"BAXTER CORP")
.withParameter(ApplicationConstant.REGISTRATION_NUMBER, "FM00184546")
.withParameter(ApplicationConstant.IS_DOING_BUSINESS_AS, true)
.withParameter(ApplicationConstant.DOING_BUSINESS_AS, "BAXTER CORP"),
Expand Down Expand Up @@ -497,7 +497,7 @@ private static Stream<Arguments> generateForestClient() {
.withParameter(ApplicationConstant.CREATED_BY, "IDIR\\JWICK")
.withParameter(ApplicationConstant.UPDATED_BY, "IDIR\\JWICK")
.withParameter(ApplicationConstant.FOREST_CLIENT_NAME,
"Baxter Corp")
"BAXTER CORP")
.withParameter(ApplicationConstant.REGISTRATION_NUMBER, "FM00184546")
.withParameter(ApplicationConstant.IS_DOING_BUSINESS_AS, true)
.withParameter(ApplicationConstant.DOING_BUSINESS_AS, "BAXTER CORP"),
Expand Down Expand Up @@ -638,7 +638,7 @@ private static Stream<Arguments> generateDoingBusinessAs() {
.withParameter(ApplicationConstant.CREATED_BY, "IDIR\\JWICK")
.withParameter(ApplicationConstant.UPDATED_BY, "IDIR\\JWICK")
.withParameter(ApplicationConstant.FOREST_CLIENT_NAME,
"Baxter Corp")
"BAXTER CORP")
.withParameter(ApplicationConstant.REGISTRATION_NUMBER, "FM00184546")
.withParameter(ApplicationConstant.IS_DOING_BUSINESS_AS, true)
.withParameter(ApplicationConstant.DOING_BUSINESS_AS, "BAXTER CORP")
Expand Down

0 comments on commit 8889e26

Please sign in to comment.