Skip to content

Commit

Permalink
refactor; Refactor method names and computed property
Browse files Browse the repository at this point in the history
Refactored `setSiret` to `setCompany` in `CompanyDataStorageHandler` for better clarity. Updated computed property in `ResultProjectList.vue` to use `hasRegisteredData.value` instead of `props.hasRegisteredData` for consistency.
  • Loading branch information
dolemoine committed Nov 15, 2024
1 parent 8ea4d4b commit 280a137
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ const showNoResults = computed(() => {
})
const showOtherProjectForm = computed(() => {
return !showNoResults.value && props.hasRegisteredData
return !showNoResults.value && hasRegisteredData.value
})
const isSpecificGoal = computed(() => {
Expand Down
2 changes: 1 addition & 1 deletion apps/web/src/utils/storage/companyDataStorage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ export default class CompanyDataStorage {
return this._storageHandler.getItem(key) !== null
}

public static setSiret(value: CompanyDataType[CompanyDataStorageKey.Company]) {
public static setCompany(value: CompanyDataType[CompanyDataStorageKey.Company]) {
this.setItem(CompanyDataStorageKey.Company, value)
}

Expand Down
2 changes: 1 addition & 1 deletion apps/web/src/utils/storage/companyDataStorageHandler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ export class CompanyDataStorageHandler {
static setDataFromTrack(trackId: TrackId, value: string | string[], selectedOptions: TrackOptionsUnion[]) {
if (trackId === TrackId.Siret && value !== SiretValue.Wildcard && selectedOptions.length > 0) {
const questionnaireData = selectedOptions[0].questionnaireData as EstablishmentFront
CompanyDataStorage.setSiret(questionnaireData)
CompanyDataStorage.setCompany(questionnaireData)
if (questionnaireData.legalCategory === LegalCategory.EI) {
CompanyDataStorage.setSize(StructureSize.EI)
}
Expand Down

0 comments on commit 280a137

Please sign in to comment.