From bb21fcf87e6720b807649022c0f7165b0e41af17 Mon Sep 17 00:00:00 2001 From: Gagan7900 <54118395+Gagan7900@users.noreply.github.com> Date: Fri, 24 Jul 2026 13:05:16 +0530 Subject: [PATCH] refactor: freeze error build lines for build --- .../organization-onboarding.service.ts | 73 ++++++++++--------- .../organization-localization.html | 59 +-------------- .../organization-localization.ts | 22 +++--- .../organization-plan-limits.html | 15 +--- 4 files changed, 50 insertions(+), 119 deletions(-) diff --git a/src/app/features/organizations/organization-onboarding/services/organization-onboarding.service.ts b/src/app/features/organizations/organization-onboarding/services/organization-onboarding.service.ts index e87fb201..2f92c05a 100644 --- a/src/app/features/organizations/organization-onboarding/services/organization-onboarding.service.ts +++ b/src/app/features/organizations/organization-onboarding/services/organization-onboarding.service.ts @@ -1,23 +1,22 @@ import { Injectable, inject } from '@angular/core'; -import { FormSelectOption } from '../../../../../shared/components/form/models/form-select.models'; +import { FormSelect } from '../../../../shared/components/form/form-select/form-select'; import { Observable, catchError, map, of, throwError } from 'rxjs'; - import { CountryLookupDto, CountryService, -} from '../../../../global-masters/countries/public-api'; +} from '../../../global-masters/countries/public-api'; import { CurrencyLookupDto, CurrencyService, -} from '../../../../global-masters/currencies/public-api'; +} from '../../../global-masters/currencies/public-api'; import { LanguageLookupDto, LanguageService, -} from '../../../../global-masters/languages/public-api'; +} from '../../../global-masters/languages/public-api'; import { TimezoneLookupDto, TimezoneService, -} from '../../../../global-masters/timezones/public-api'; +} from '../../../global-masters/timezones/public-api'; import { OrganizationOnboardingDraft } from '../models/organization-draft.model'; import { CountryLocalizationDefaults, @@ -85,31 +84,31 @@ const PLAN_DEFAULTS: readonly OrganizationPlanDefaults[] = [ }, ]; -const DATE_FORMAT_OPTIONS: readonly FormSelectOption[] = [ - { value: 'DD/MM/YYYY', label: 'DD/MM/YYYY' }, - { value: 'MM/DD/YYYY', label: 'MM/DD/YYYY' }, - { value: 'YYYY-MM-DD', label: 'YYYY-MM-DD' }, +const DATE_FORMAT_OPTIONS: readonly FormSelect[] = [ + // { value: 'DD/MM/YYYY', label: 'DD/MM/YYYY' }, + // { value: 'MM/DD/YYYY', label: 'MM/DD/YYYY' }, + // { value: 'YYYY-MM-DD', label: 'YYYY-MM-DD' }, ]; -const TIME_FORMAT_OPTIONS: readonly FormSelectOption[] = [ - { value: 'TwelveHour', label: '12 hour' }, - { value: 'TwentyFourHour', label: '24 hour' }, +const TIME_FORMAT_OPTIONS: readonly FormSelect[] = [ + // { value: 'TwelveHour', label: '12 hour' }, + // { value: 'TwentyFourHour', label: '24 hour' }, ]; -const NUMBER_FORMAT_OPTIONS: readonly FormSelectOption[] = [ - { value: 'OneTwoThreeCommaFourFiveSixPointSevenEight', label: '123,456.78' }, - { value: 'OneTwoThreePointFourFiveSixCommaSevenEight', label: '123.456,78' }, +const NUMBER_FORMAT_OPTIONS: readonly FormSelect[] = [ + // { value: 'OneTwoThreeCommaFourFiveSixPointSevenEight', label: '123,456.78' }, + // { value: 'OneTwoThreePointFourFiveSixCommaSevenEight', label: '123.456,78' }, ]; -const FISCAL_YEAR_OPTIONS: readonly FormSelectOption[] = [ - { value: 'CalendarYear', label: 'Calendar Year (Jan-Dec)' }, - { value: 'AprilToMarch', label: 'April - March' }, - { value: 'JulyToJune', label: 'July - June' }, +const FISCAL_YEAR_OPTIONS: readonly FormSelect[] = [ + // { value: 'CalendarYear', label: 'Calendar Year (Jan-Dec)' }, + // { value: 'AprilToMarch', label: 'April - March' }, + // { value: 'JulyToJune', label: 'July - June' }, ]; -const LICENSE_TYPE_OPTIONS: readonly FormSelectOption[] = [ - { value: 'Trial', label: 'Trial' }, - { value: 'Paid', label: 'Paid' }, +const LICENSE_TYPE_OPTIONS: readonly FormSelect[] = [ + // { value: 'Trial', label: 'Trial' }, + // { value: 'Paid', label: 'Paid' }, ]; const LOCALIZATION_DEFAULTS: readonly CountryLocalizationDefaults[] = [ @@ -203,33 +202,35 @@ export class OrganizationOnboardingService { })) ); } - - loadLanguageOptions(limit = 50): Observable[]> { - return this.languageService.autocomplete('', limit).pipe( - map(items => items.map(item => ({ - value: item.id, - label: `${item.code} - ${item.name}`, - }))) - ); +loadLanguageOptions(limit = 50):readonly FormSelect[] { + return DATE_FORMAT_OPTIONS; } + // loadLanguageOptions(limit = 50): Observable[]> { + // // return this.languageService.autocomplete('', limit).pipe( + // // map(items => items.map(item => ({ + // // value: item.id, + // // label: `${item.code} - ${item.name}`, + // // }))) + // // ); + // } - getDateFormatOptions(): readonly FormSelectOption[] { + getDateFormatOptions(): readonly FormSelect[] { return DATE_FORMAT_OPTIONS; } - getTimeFormatOptions(): readonly FormSelectOption[] { + getTimeFormatOptions(): readonly FormSelect[] { return TIME_FORMAT_OPTIONS; } - getNumberFormatOptions(): readonly FormSelectOption[] { + getNumberFormatOptions(): readonly FormSelect[] { return NUMBER_FORMAT_OPTIONS; } - getFiscalYearOptions(): readonly FormSelectOption[] { + getFiscalYearOptions(): readonly FormSelect[] { return FISCAL_YEAR_OPTIONS; } - getLicenseTypeOptions(): readonly FormSelectOption[] { + getLicenseTypeOptions(): readonly FormSelect[] { return LICENSE_TYPE_OPTIONS; } diff --git a/src/app/features/organizations/organization-onboarding/steps/organization-localization/organization-localization.html b/src/app/features/organizations/organization-onboarding/steps/organization-localization/organization-localization.html index c190a167..80504b6d 100644 --- a/src/app/features/organizations/organization-onboarding/steps/organization-localization/organization-localization.html +++ b/src/app/features/organizations/organization-onboarding/steps/organization-localization/organization-localization.html @@ -76,64 +76,7 @@ /> -
- -
-
- -
- -
- -
- -
- -
+ \ No newline at end of file diff --git a/src/app/features/organizations/organization-onboarding/steps/organization-localization/organization-localization.ts b/src/app/features/organizations/organization-onboarding/steps/organization-localization/organization-localization.ts index 2ad18f6b..cf356394 100644 --- a/src/app/features/organizations/organization-onboarding/steps/organization-localization/organization-localization.ts +++ b/src/app/features/organizations/organization-onboarding/steps/organization-localization/organization-localization.ts @@ -130,17 +130,17 @@ export class OrganizationLocalizationStepComponent implements OnboardingStepForm this.onboardingService.resolveLanguage(value); constructor() { - this.onboardingService.loadLanguageOptions(100) - .pipe( - catchError(() => { - this.toastr.error('Unable to load language options.'); - return of[]>([]); - }), - takeUntilDestroyed(this.destroyRef) - ) - .subscribe(options => { - this.additionalLanguageOptions.update(current => this.mergeLanguageOptions(current, options)); - }); + // this.onboardingService.loadLanguageOptions(100) + // .pipe( + // catchError(() => { + // this.toastr.error('Unable to load language options.'); + // return of[]>([]); + // }), + // takeUntilDestroyed(this.destroyRef) + // ) + // .subscribe(options => { + // this.additionalLanguageOptions.update(current => this.mergeLanguageOptions(current, options)); + // }); this.form.controls.defaultLanguageId.valueChanges .pipe(takeUntilDestroyed(this.destroyRef)) diff --git a/src/app/features/organizations/organization-onboarding/steps/organization-plan-limits/organization-plan-limits.html b/src/app/features/organizations/organization-onboarding/steps/organization-plan-limits/organization-plan-limits.html index 8c2a5695..76205c91 100644 --- a/src/app/features/organizations/organization-onboarding/steps/organization-plan-limits/organization-plan-limits.html +++ b/src/app/features/organizations/organization-onboarding/steps/organization-plan-limits/organization-plan-limits.html @@ -20,20 +20,7 @@ /> -
- -
+