Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

misc: add default empty state in credit note list page #1537

Merged
merged 1 commit into from
Jun 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions ditto/base.json
Original file line number Diff line number Diff line change
Expand Up @@ -942,6 +942,8 @@
"text_664f3562b7caf600e5246883": "Member role has been edited",
"text_665edfd17997c0006f09cdb2": "Unlock all roles",
"text_665edfd17997c0006f09cdb3": "Give specific access to your members",
"text_6663014df0a6be0098264dd9": "There are no credit notes",
"text_6663014df0a6be0098264dda": "A credit note serves as a document issued by you to a customer, reducing the amount owed by your organization on a specific invoice. Please create an invoice to generate credit notes.",
"text_64c7a89b6c67eb6c98898167": "Net payment term",
"text_64c7a89b6c67eb6c98898182": "Period within which a customer is expected to pay for an invoice after it has been issued.\nNeed more flexibility? Set a payment term at the customer level to override the one above.",
"text_64c7a89b6c67eb6c988980eb": "The duration within which a customer is expected to remit payment after the invoice is issued. Note that it may impact all invoices already in draft.",
Expand Down
22 changes: 16 additions & 6 deletions src/components/customers/creditNotes/CreditNotesList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -144,12 +144,22 @@ const CreditNotesList = memo(
</SkeletonLine>
))}
</>
) : !loading && hasSearchQuery && !creditNotes?.length ? (
<GenericPlaceholder
title={translate('text_63c6edd80c57d0dfaae389a4')}
subtitle={translate('text_63c6edd80c57d0dfaae389a8')}
image={<EmptyImage width="136" height="104" />}
/>
) : !loading && !creditNotes?.length ? (
<>
{hasSearchQuery ? (
<GenericPlaceholder
title={translate('text_63c6edd80c57d0dfaae389a4')}
subtitle={translate('text_63c6edd80c57d0dfaae389a8')}
image={<EmptyImage width="136" height="104" />}
/>
) : (
<GenericPlaceholder
title={translate('text_6663014df0a6be0098264dd9')}
subtitle={translate('text_6663014df0a6be0098264dda')}
image={<EmptyImage width="136" height="104" />}
/>
)}
</>
) : (
<InfiniteScroll
onBottom={() => {
Expand Down
Loading