Skip to content

feat: add top up flow#21

Merged
Erick2280 merged 25 commits intodevelopfrom
feat/add-top-up-page
Mar 6, 2025
Merged

feat: add top up flow#21
Erick2280 merged 25 commits intodevelopfrom
feat/add-top-up-page

Conversation

@Guilhermeasper
Copy link
Copy Markdown
Collaborator

No description provided.

@Guilhermeasper Guilhermeasper requested a review from Erick2280 March 4, 2025 20:44
@github-actions
Copy link
Copy Markdown

github-actions bot commented Mar 4, 2025

Visit the preview URL for this PR (updated for commit 225a023):

https://rusbeplatform--pr21-feat-add-top-up-page-12t59o5d.web.app

(expires Thu, 13 Mar 2025 02:31:26 GMT)

🔥 via Firebase Hosting GitHub Action 🌎

Sign: 7ac055a794bf319cb7386a70c5f00a959ddb7b14

Comment on lines +14 to +16
subtitle = input('');
iconName = input('');
badgeText = input('');
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.

nit: Maybe use input.required() here? (or string | undefined to be more clear if it's not)

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Updated, left only badgeText being optional.

host: { class: 'grouping-card' },
})
export class CardGroupComponent {
title = input('');
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.

nit: Maybe use input.required() here?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Updated.

Comment on lines +4 to +8
import { provideNgxMask } from 'ngx-mask';

@Component({
selector: 'rusbe-jumbo-text-input',
imports: [NgxMaskDirective, FormsModule],
imports: [FormsModule],
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.

Please don't remove this import 😭 I fixed it in a later commit

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Added back.

Comment on lines +46 to +47
Você tem R$ <strong>{{ currentBalance().value }} </strong> de saldo. Após a
transação, você ficará com R$ <strong> {{ newBalance() }}</strong
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.

This is showing NaN when currency input is empty.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Add check for NaN on computed value.

Comment on lines +49 to +54
const cpfNumber = this.cpf();
if (!cpfNumber) return '';
return cpfNumber.replace(/(\d{3})(\d{3})(\d{3})(\d{2})/, '$1.$2.$3-$4');
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.

A General Goods identifier may not be a CPF (🥲), so check if it has 11 characters before formatting

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Added early return in case it's not 11 characters.

[customAction]="goToPreviousStage.bind(this)"
[type]="headerType()"
>
ADICIONAR CRÉDITOS
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.

nit: Header component automatically transforms text to be uppercase

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Updated.

Comment thread src/app/pages/top-up/top-up.component.ts Outdated
[TopUpError.Generic]:
'Ocorreu um erro desconhecido. Por favor, tente novamente.',
};
readonly FIFHTEEEN_MINUTES = 15 * 60 * 1000;
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.

Suggested change
readonly FIFHTEEEN_MINUTES = 15 * 60 * 1000;
readonly FIFTEEN_MINUTES = 15 * 60 * 1000;

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Fixed locally updating other occurences.

Comment thread src/app/pages/top-up/top-up.component.ts Outdated
@Guilhermeasper Guilhermeasper requested a review from Erick2280 March 6, 2025 01:38
@Erick2280 Erick2280 merged commit b4e0da0 into develop Mar 6, 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