Skip to content

Commit

Permalink
fix: (CXSPA-2248) - Checkout schedule replenishment order Fieldset (#…
Browse files Browse the repository at this point in the history
…18596)

Co-authored-by: Piotr Bartkowiak <[email protected]>
  • Loading branch information
Pio-Bar and Piotr Bartkowiak authored Mar 27, 2024
1 parent 52330cc commit 99903cb
Show file tree
Hide file tree
Showing 4 changed files with 50 additions and 20 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -146,26 +146,50 @@
/>
</div>
</div>

<div
*ngIf="isWeekly"
class="cx-replenishment-form-data-container cx-repeat-days-container"
>
<span class="cx-repeat-days form-data-label">{{
'checkoutScheduledReplenishment.repeatOnDays' | cxTranslate
}}</span>
<div *ngFor="let day of daysOfWeek" class="form-check">
<label for="day-{{ day }}" class="cx-week-day">{{
day | titlecase
}}</label
><input
id="day-{{ day }}"
type="checkbox"
class="form-check-input"
[checked]="hasDaysOfWeekChecked(day)"
(change)="changeRepeatDays(day, $event.target.checked)"
/>
<!-- TODO: (CXSPA-6446) Remove feature flag next major release -->
<ng-container *cxFeature="'a11yReplenishmentOrderFieldset'">
<fieldset
*ngIf="isWeekly"
class="cx-replenishment-form-data-container cx-repeat-days-container"
>
<legend class="cx-repeat-days form-data-label">
{{ 'checkoutScheduledReplenishment.repeatOnDays' | cxTranslate }}
</legend>
<div *ngFor="let day of daysOfWeek" class="form-check">
<label for="day-{{ day }}" class="cx-week-day">{{
day | titlecase
}}</label
><input
id="day-{{ day }}"
type="checkbox"
class="form-check-input"
[checked]="hasDaysOfWeekChecked(day)"
(change)="changeRepeatDays(day, $event.target.checked)"
/>
</div>
</fieldset>
</ng-container>
<ng-container *cxFeature="'!a11yReplenishmentOrderFieldset'">
<div
*ngIf="isWeekly"
class="cx-replenishment-form-data-container cx-repeat-days-container"
>
<span class="cx-repeat-days form-data-label">{{
'checkoutScheduledReplenishment.repeatOnDays' | cxTranslate
}}</span>
<div *ngFor="let day of daysOfWeek" class="form-check">
<label for="day-{{ day }}" class="cx-week-day">{{
day | titlecase
}}</label
><input
id="day-{{ day }}"
type="checkbox"
class="form-check-input"
[checked]="hasDaysOfWeekChecked(day)"
(change)="changeRepeatDays(day, $event.target.checked)"
/>
</div>
</div>
</div>
</ng-container>
</ng-container>
</div>
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ export class CheckoutScheduleReplenishmentOrderComponent
constructor(
protected checkoutReplenishmentFormService: CheckoutReplenishmentFormService
) {
useFeatureStyles('a11yReplenishmentOrderFieldset');
useFeatureStyles('a11yScheduleReplenishment');
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,10 @@
}

.cx-repeat-days {
//TODO: (CXSPA-6446) Remove feature flag next major release
@include forFeature('a11yReplenishmentOrderFieldset') {
font-size: inherit;
}
flex: 0 100%;
margin-bottom: 14px;
align-self: start;
Expand Down
1 change: 1 addition & 0 deletions projects/storefrontapp/src/app/app.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@ if (!environment.production) {
a11ySortingOptionsTruncation: true,
a11yExpandedFocusIndicator: true,
a11yCheckoutDeliveryFocus: true,
a11yReplenishmentOrderFieldset: true,
},
}),
provideConfig(<StoreFinderConfig>{
Expand Down

0 comments on commit 99903cb

Please sign in to comment.