Skip to content

feat: add meal balance breakdown component#18

Merged
Erick2280 merged 4 commits intorusbeapp:developfrom
Guilhermeasper:feat/meal-balance-breakdown
Jan 3, 2025
Merged

feat: add meal balance breakdown component#18
Erick2280 merged 4 commits intorusbeapp:developfrom
Guilhermeasper:feat/meal-balance-breakdown

Conversation

@Guilhermeasper
Copy link
Copy Markdown
Collaborator

No description provided.

Comment on lines +16 to +21
@Input() mealType: MealType = MealType.Lunch;
@Input() calculationType: CalculationType = 'equivalence';
@Input() mealValue = BrlCurrency.fromNumber(0);
@Input() mealCount = 0;
@Input() totalCost = BrlCurrency.fromNumber(0);
@Input() balanceLeft = BrlCurrency.fromNumber(0);
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use new input() syntax

balanceLeft: BrlCurrency;
}

export type CalculationType = 'equivalence' | 'details';
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use enum instead of type

Comment on lines +24 to +28
@Input() calculationType: CalculationType = 'equivalence';
@Input() mealPrincingProfile: MealPricingProfile = MEAL_PRICING_PROFILES[1];
@Input() numberOfDinners = 0;
@Input() numberOfLunches = 0;

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use new Angular input() syntax

Comment thread src/app/components/meal-balance-breakdown/meal-balance-breakdown.component.ts Outdated
Co-authored-by: Erick Almeida <Erick2280@users.noreply.github.com>
@@ -0,0 +1,31 @@
<div
class="flex justify-between"
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Set flex direction for clarity

</div>
<div
*ngIf="calculationType === 'details'"
class="flex items-center justify-between pr-5"
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Set flex direction for clarity

imports: [MealBalanceTableComponent, NgFor, NgIf, SlicePipe],
templateUrl: './meal-balance-breakdown.component.html',
changeDetection: ChangeDetectionStrategy.OnPush,
host: { class: 'flex flex-col gap-5' },
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Set flex direction for clarity

Copy link
Copy Markdown
Collaborator Author

@Guilhermeasper Guilhermeasper Jan 3, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Flex direction was already set

@Erick2280 Erick2280 merged commit 163c5b3 into rusbeapp:develop Jan 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants