@spaceinvoices/react-ui 0.4.8 → 0.4.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cli/dist/index.js +1 -1
- package/package.json +1 -1
- package/src/common/autocomplete.tsx +69 -6
- package/src/components/advance-invoices/create/create-advance-invoice-form.tsx +124 -285
- package/src/components/advance-invoices/list/list-table.tsx +10 -3
- package/src/components/advance-invoices/list/locales/de.ts +2 -0
- package/src/components/advance-invoices/list/locales/en.ts +1 -0
- package/src/components/advance-invoices/list/locales/es.ts +1 -0
- package/src/components/advance-invoices/list/locales/fr.ts +1 -0
- package/src/components/advance-invoices/list/locales/hr.ts +1 -0
- package/src/components/advance-invoices/list/locales/it.ts +1 -0
- package/src/components/advance-invoices/list/locales/nl.ts +1 -0
- package/src/components/advance-invoices/list/locales/pl.ts +1 -0
- package/src/components/advance-invoices/list/locales/pt.ts +1 -0
- package/src/components/advance-invoices/list/locales/sl.ts +1 -0
- package/src/components/advance-invoices/list/use-advance-invoice-download.ts +1 -12
- package/src/components/credit-notes/create/create-credit-note-form.tsx +116 -238
- package/src/components/credit-notes/list/list-table.tsx +6 -3
- package/src/components/credit-notes/list/use-credit-note-download.ts +1 -12
- package/src/components/customers/customer-autocomplete.tsx +64 -11
- package/src/components/customers/customer-list-table/customer-list-table.tsx +3 -2
- package/src/components/dashboard/collection-rate-card/collection-rate-card.tsx +9 -1
- package/src/components/dashboard/collection-rate-card/locales/bg.ts +3 -0
- package/src/components/dashboard/collection-rate-card/locales/cs.ts +3 -0
- package/src/components/dashboard/collection-rate-card/locales/et.ts +3 -0
- package/src/components/dashboard/collection-rate-card/locales/fi.ts +3 -0
- package/src/components/dashboard/collection-rate-card/locales/is.ts +3 -0
- package/src/components/dashboard/collection-rate-card/locales/nb.ts +3 -0
- package/src/components/dashboard/collection-rate-card/locales/sk.ts +3 -0
- package/src/components/dashboard/collection-rate-card/locales/sv.ts +3 -0
- package/src/components/dashboard/invoice-status-chart/invoice-status-chart.tsx +10 -2
- package/src/components/dashboard/invoice-status-chart/locales/bg.ts +10 -0
- package/src/components/dashboard/invoice-status-chart/locales/cs.ts +10 -0
- package/src/components/dashboard/invoice-status-chart/locales/de.ts +1 -0
- package/src/components/dashboard/invoice-status-chart/locales/es.ts +1 -0
- package/src/components/dashboard/invoice-status-chart/locales/et.ts +10 -0
- package/src/components/dashboard/invoice-status-chart/locales/fi.ts +10 -0
- package/src/components/dashboard/invoice-status-chart/locales/fr.ts +1 -0
- package/src/components/dashboard/invoice-status-chart/locales/hr.ts +1 -0
- package/src/components/dashboard/invoice-status-chart/locales/is.ts +10 -0
- package/src/components/dashboard/invoice-status-chart/locales/it.ts +1 -0
- package/src/components/dashboard/invoice-status-chart/locales/nb.ts +10 -0
- package/src/components/dashboard/invoice-status-chart/locales/nl.ts +1 -0
- package/src/components/dashboard/invoice-status-chart/locales/pl.ts +1 -0
- package/src/components/dashboard/invoice-status-chart/locales/pt.ts +1 -0
- package/src/components/dashboard/invoice-status-chart/locales/sk.ts +10 -0
- package/src/components/dashboard/invoice-status-chart/locales/sl.ts +1 -0
- package/src/components/dashboard/invoice-status-chart/locales/sv.ts +10 -0
- package/src/components/dashboard/payment-methods-chart/locales/bg.ts +12 -0
- package/src/components/dashboard/payment-methods-chart/locales/cs.ts +12 -0
- package/src/components/dashboard/payment-methods-chart/locales/et.ts +12 -0
- package/src/components/dashboard/payment-methods-chart/locales/fi.ts +12 -0
- package/src/components/dashboard/payment-methods-chart/locales/is.ts +12 -0
- package/src/components/dashboard/payment-methods-chart/locales/nb.ts +12 -0
- package/src/components/dashboard/payment-methods-chart/locales/sk.ts +12 -0
- package/src/components/dashboard/payment-methods-chart/locales/sv.ts +12 -0
- package/src/components/dashboard/payment-methods-chart/payment-methods-chart.tsx +9 -1
- package/src/components/dashboard/payment-trend-chart/locales/bg.ts +6 -0
- package/src/components/dashboard/payment-trend-chart/locales/cs.ts +6 -0
- package/src/components/dashboard/payment-trend-chart/locales/de.ts +1 -0
- package/src/components/dashboard/payment-trend-chart/locales/es.ts +1 -0
- package/src/components/dashboard/payment-trend-chart/locales/et.ts +6 -0
- package/src/components/dashboard/payment-trend-chart/locales/fi.ts +6 -0
- package/src/components/dashboard/payment-trend-chart/locales/fr.ts +1 -0
- package/src/components/dashboard/payment-trend-chart/locales/hr.ts +1 -0
- package/src/components/dashboard/payment-trend-chart/locales/is.ts +6 -0
- package/src/components/dashboard/payment-trend-chart/locales/it.ts +1 -0
- package/src/components/dashboard/payment-trend-chart/locales/nb.ts +6 -0
- package/src/components/dashboard/payment-trend-chart/locales/nl.ts +1 -0
- package/src/components/dashboard/payment-trend-chart/locales/pl.ts +1 -0
- package/src/components/dashboard/payment-trend-chart/locales/pt.ts +1 -0
- package/src/components/dashboard/payment-trend-chart/locales/sk.ts +6 -0
- package/src/components/dashboard/payment-trend-chart/locales/sl.ts +1 -0
- package/src/components/dashboard/payment-trend-chart/locales/sv.ts +6 -0
- package/src/components/dashboard/payment-trend-chart/payment-trend-chart.tsx +15 -8
- package/src/components/dashboard/revenue-trend-chart/locales/bg.ts +6 -0
- package/src/components/dashboard/revenue-trend-chart/locales/cs.ts +6 -0
- package/src/components/dashboard/revenue-trend-chart/locales/de.ts +1 -0
- package/src/components/dashboard/revenue-trend-chart/locales/es.ts +1 -0
- package/src/components/dashboard/revenue-trend-chart/locales/et.ts +6 -0
- package/src/components/dashboard/revenue-trend-chart/locales/fi.ts +6 -0
- package/src/components/dashboard/revenue-trend-chart/locales/fr.ts +1 -0
- package/src/components/dashboard/revenue-trend-chart/locales/hr.ts +1 -0
- package/src/components/dashboard/revenue-trend-chart/locales/is.ts +6 -0
- package/src/components/dashboard/revenue-trend-chart/locales/it.ts +1 -0
- package/src/components/dashboard/revenue-trend-chart/locales/nb.ts +6 -0
- package/src/components/dashboard/revenue-trend-chart/locales/nl.ts +1 -0
- package/src/components/dashboard/revenue-trend-chart/locales/pl.ts +1 -0
- package/src/components/dashboard/revenue-trend-chart/locales/pt.ts +1 -0
- package/src/components/dashboard/revenue-trend-chart/locales/sk.ts +6 -0
- package/src/components/dashboard/revenue-trend-chart/locales/sl.ts +1 -0
- package/src/components/dashboard/revenue-trend-chart/locales/sv.ts +6 -0
- package/src/components/dashboard/revenue-trend-chart/revenue-trend-chart.tsx +15 -8
- package/src/components/dashboard/tax-collected-card/locales.ts +110 -0
- package/src/components/dashboard/tax-collected-card/tax-collected-card.tsx +8 -2
- package/src/components/dashboard/tax-collected-card/use-tax-collected.ts +4 -4
- package/src/components/dashboard/top-customers-chart/locales/bg.ts +7 -0
- package/src/components/dashboard/top-customers-chart/locales/cs.ts +7 -0
- package/src/components/dashboard/top-customers-chart/locales/de.ts +2 -0
- package/src/components/dashboard/top-customers-chart/locales/es.ts +2 -0
- package/src/components/dashboard/top-customers-chart/locales/et.ts +7 -0
- package/src/components/dashboard/top-customers-chart/locales/fi.ts +7 -0
- package/src/components/dashboard/top-customers-chart/locales/fr.ts +2 -0
- package/src/components/dashboard/top-customers-chart/locales/hr.ts +2 -0
- package/src/components/dashboard/top-customers-chart/locales/is.ts +7 -0
- package/src/components/dashboard/top-customers-chart/locales/it.ts +2 -0
- package/src/components/dashboard/top-customers-chart/locales/nb.ts +7 -0
- package/src/components/dashboard/top-customers-chart/locales/nl.ts +2 -0
- package/src/components/dashboard/top-customers-chart/locales/pl.ts +2 -0
- package/src/components/dashboard/top-customers-chart/locales/pt.ts +2 -0
- package/src/components/dashboard/top-customers-chart/locales/sk.ts +7 -0
- package/src/components/dashboard/top-customers-chart/locales/sl.ts +2 -0
- package/src/components/dashboard/top-customers-chart/locales/sv.ts +7 -0
- package/src/components/dashboard/top-customers-chart/top-customers-chart.tsx +23 -12
- package/src/components/delivery-notes/create/create-delivery-note-form.tsx +33 -20
- package/src/components/delivery-notes/list/list-table.tsx +22 -13
- package/src/components/delivery-notes/list/locales/de.ts +2 -0
- package/src/components/delivery-notes/list/locales/en.ts +1 -0
- package/src/components/delivery-notes/list/locales/es.ts +1 -0
- package/src/components/delivery-notes/list/locales/fr.ts +1 -0
- package/src/components/delivery-notes/list/locales/hr.ts +1 -0
- package/src/components/delivery-notes/list/locales/it.ts +1 -0
- package/src/components/delivery-notes/list/locales/nl.ts +1 -0
- package/src/components/delivery-notes/list/locales/pl.ts +1 -0
- package/src/components/delivery-notes/list/locales/pt.ts +1 -0
- package/src/components/delivery-notes/list/locales/sl.ts +1 -0
- package/src/components/delivery-notes/list/use-delivery-note-download.ts +1 -12
- package/src/components/documents/create/document-add-item-form.tsx +28 -16
- package/src/components/documents/create/document-add-item-tax-rate-field.tsx +12 -2
- package/src/components/documents/create/document-items-section.tsx +70 -39
- package/src/components/documents/create/document-recipient-section.tsx +10 -1
- package/src/components/documents/create/live-preview.tsx +113 -15
- package/src/components/documents/create/prepare-document-submission.ts +35 -16
- package/src/components/documents/create/use-document-customer-form.ts +14 -3
- package/src/components/documents/documents.hooks.ts +7 -2
- package/src/components/documents/shared/document-preview-display.tsx +136 -67
- package/src/components/documents/shared/scaled-document-preview.tsx +45 -5
- package/src/components/documents/view/document-actions-bar.tsx +284 -182
- package/src/components/documents/view/document-activities-list.tsx +3 -0
- package/src/components/documents/view/document-payments-list.tsx +3 -0
- package/src/components/documents/view/locales/de.ts +8 -0
- package/src/components/documents/view/locales/es.ts +8 -0
- package/src/components/documents/view/locales/fr.ts +8 -0
- package/src/components/documents/view/locales/hr.ts +8 -0
- package/src/components/documents/view/locales/it.ts +8 -0
- package/src/components/documents/view/locales/nl.ts +8 -0
- package/src/components/documents/view/locales/pl.ts +8 -0
- package/src/components/documents/view/locales/pt.ts +8 -0
- package/src/components/documents/view/locales/sl.ts +8 -0
- package/src/components/documents/view/use-document-download.ts +14 -25
- package/src/components/entities/create-entity-form.tsx +101 -16
- package/src/components/entities/fina-settings-form/fina-operator-required-dialog.tsx +3 -3
- package/src/components/entities/fina-settings-form/fina-settings-form.tsx +78 -124
- package/src/components/entities/fina-settings-form/sections/certificate-settings-section.tsx +8 -1
- package/src/components/entities/fina-settings-form/sections/premises-management-section.tsx +14 -2
- package/src/components/entities/fina-settings-form/sections/register-premise-dialog.tsx +7 -2
- package/src/components/entities/furs-settings-form/furs-settings-form.tsx +56 -130
- package/src/components/entities/furs-settings-form/sections/certificate-settings-section.tsx +8 -1
- package/src/components/entities/furs-settings-form/sections/enable-fiscalization-section.tsx +1 -0
- package/src/components/entities/furs-settings-form/sections/general-settings-section.tsx +15 -2
- package/src/components/entities/furs-settings-form/sections/premises-management-section.tsx +20 -3
- package/src/components/entities/furs-settings-form/sections/register-premise-dialog.tsx +38 -12
- package/src/components/entities/settings/eslog-settings-form.tsx +13 -1
- package/src/components/entities/settings/pdf-template-selector/demo-invoice-data.ts +3 -22
- package/src/components/entities/shared/fiscalization-step-flow.ts +77 -0
- package/src/components/entities/shared/fiscalization-step-tabs.tsx +71 -0
- package/src/components/estimates/create/create-estimate-form.tsx +34 -21
- package/src/components/estimates/list/list-table.tsx +23 -14
- package/src/components/estimates/list/locales/de.ts +2 -0
- package/src/components/estimates/list/locales/en.ts +1 -0
- package/src/components/estimates/list/locales/es.ts +1 -0
- package/src/components/estimates/list/locales/fr.ts +1 -0
- package/src/components/estimates/list/locales/hr.ts +1 -0
- package/src/components/estimates/list/locales/it.ts +1 -0
- package/src/components/estimates/list/locales/nl.ts +1 -0
- package/src/components/estimates/list/locales/pl.ts +1 -0
- package/src/components/estimates/list/locales/pt.ts +1 -0
- package/src/components/estimates/list/locales/sl.ts +1 -0
- package/src/components/estimates/list/use-estimate-download.ts +1 -12
- package/src/components/export/document-export-form.tsx +33 -7
- package/src/components/export/sales-per-item-export-form.tsx +23 -7
- package/src/components/invoices/create/create-invoice-form.tsx +295 -329
- package/src/components/invoices/create/prepare-invoice-submission.ts +0 -8
- package/src/components/invoices/list/list-table.tsx +7 -4
- package/src/components/invoices/list/use-invoice-download.ts +1 -11
- package/src/components/invoices/send-email-dialog/locales/de.ts +2 -0
- package/src/components/invoices/send-email-dialog/locales/es.ts +2 -0
- package/src/components/invoices/send-email-dialog/locales/fr.ts +2 -0
- package/src/components/invoices/send-email-dialog/locales/hr.ts +2 -0
- package/src/components/invoices/send-email-dialog/locales/it.ts +2 -0
- package/src/components/invoices/send-email-dialog/locales/nl.ts +2 -0
- package/src/components/invoices/send-email-dialog/locales/pl.ts +2 -0
- package/src/components/invoices/send-email-dialog/locales/pt.ts +2 -0
- package/src/components/invoices/send-email-dialog/locales/sl.ts +2 -0
- package/src/components/invoices/send-email-dialog/send-email-dialog.tsx +77 -8
- package/src/components/invoices/view/eslog-info-display.tsx +17 -1
- package/src/components/invoices/view/fiscalization-status-card.tsx +7 -3
- package/src/components/items/item-combobox.tsx +26 -6
- package/src/components/items/item-list-table/item-list-table.tsx +5 -2
- package/src/components/payments/list/list-table.tsx +14 -4
- package/src/components/recurring-invoices/list/list-table.tsx +7 -4
- package/src/components/request-logs/locales.ts +412 -0
- package/src/components/request-logs/request-log-detail.tsx +37 -21
- package/src/components/request-logs/request-log-list-table.tsx +57 -11
- package/src/components/table/data-table.tsx +5 -2
- package/src/components/table/date-cell.tsx +3 -1
- package/src/components/table/filter-bar.tsx +14 -2
- package/src/components/table/hooks/use-table-query.ts +1 -1
- package/src/components/table/locales.ts +1116 -0
- package/src/components/table/search-input.tsx +12 -3
- package/src/components/table/selection-toolbar.tsx +23 -6
- package/src/components/table/table-empty-state.tsx +43 -3
- package/src/components/table/table-no-results.tsx +3 -3
- package/src/components/table/table-pagination.tsx +4 -3
- package/src/components/table/types.ts +1 -0
- package/src/components/tax-reports/index.ts +1 -0
- package/src/components/tax-reports/kir-export-form.tsx +46 -8
- package/src/components/tax-reports/slovenia-tax-profile-step.tsx +191 -0
- package/src/components/tax-reports/slovenia-yearly-export-form.tsx +509 -0
- package/src/components/tax-reports/slovenia-yearly-review-step.tsx +253 -0
- package/src/components/tax-reports/slovenia-yearly-summary.tsx +19 -0
- package/src/components/taxes/tax-list-table/tax-list-table.tsx +3 -2
- package/src/components/ui/sticky-form-footer.tsx +7 -1
- package/src/components/webhook-logs/index.ts +6 -0
- package/src/components/webhook-logs/locales.ts +392 -0
- package/src/components/webhook-logs/webhook-delivery-detail.tsx +255 -0
- package/src/components/webhook-logs/webhook-delivery-list-table.tsx +278 -0
- package/src/components/wl-subscription/index.ts +1 -0
- package/src/components/wl-subscription/locked-feature.tsx +1 -0
- package/src/components/wl-subscription/paywall.tsx +193 -0
- package/src/components/wl-subscription/upgrade-modal.tsx +93 -29
- package/src/generate-schemas.ts +10 -5
- package/src/generated/schemas/customer.ts +2 -0
- package/src/generated/schemas/entity.ts +34 -0
- package/src/generated/schemas/me.ts +20 -1
- package/src/generated/schemas/renderadvanceinvoicepreview_body.ts +40 -34
- package/src/generated/schemas/rendercreditnotepreview_body.ts +42 -36
- package/src/generated/schemas/renderdeliverynotepreview_body.ts +23 -13
- package/src/generated/schemas/renderestimatepreview_body.ts +23 -13
- package/src/generated/schemas/renderinvoicepreview_body.ts +40 -34
- package/src/generated/schemas/sendemail_body.ts +44 -0
- package/src/generated/schemas/startpdfexport_body.ts +91 -1
- package/src/generated/schemas/webhook.ts +10 -0
- package/src/hooks/use-duplicate-document.ts +51 -13
- package/src/hooks/use-eslog-validation.ts +59 -0
- package/src/hooks/use-premise-selection.ts +186 -0
- package/src/lib/browser-cookies.ts +4 -4
- package/src/lib/date-fns-locale.ts +48 -0
- package/src/lib/fiscalization-options.ts +81 -0
- package/src/lib/locale.ts +38 -0
- package/src/lib/template-variables.tsx +1 -1
- package/src/lib/translation.ts +14 -3
- package/src/providers/entities-context.tsx +1 -0
- package/src/providers/entities-provider.tsx +102 -3
- package/src/providers/form-footer-context.tsx +37 -4
- package/src/providers/sdk-provider.tsx +7 -2
- package/src/providers/white-label-provider.tsx +4 -1
- package/src/providers/wl-subscription-provider.tsx +90 -3
|
@@ -0,0 +1,412 @@
|
|
|
1
|
+
const en = {
|
|
2
|
+
"Search...": "Search...",
|
|
3
|
+
Search: "Search",
|
|
4
|
+
"Clear search": "Clear search",
|
|
5
|
+
Filters: "Filters",
|
|
6
|
+
"Clear filters": "Clear filters",
|
|
7
|
+
"Date Range": "Date Range",
|
|
8
|
+
From: "From",
|
|
9
|
+
To: "To",
|
|
10
|
+
Status: "Status",
|
|
11
|
+
Method: "Method",
|
|
12
|
+
Date: "Date",
|
|
13
|
+
Entity: "Entity",
|
|
14
|
+
Resource: "Resource",
|
|
15
|
+
Path: "Path",
|
|
16
|
+
Time: "Time",
|
|
17
|
+
Copy: "Copy",
|
|
18
|
+
Request: "Request",
|
|
19
|
+
Response: "Response",
|
|
20
|
+
Headers: "Headers",
|
|
21
|
+
Action: "Opération",
|
|
22
|
+
ID: "ID",
|
|
23
|
+
"Request ID": "Request ID",
|
|
24
|
+
"Copy to clipboard": "Copy to clipboard",
|
|
25
|
+
"No request body data": "No request body data",
|
|
26
|
+
"No response body data": "No response body data",
|
|
27
|
+
"No headers data": "No headers data",
|
|
28
|
+
"2xx Success": "2xx Success",
|
|
29
|
+
"4xx Client Error": "4xx Client Error",
|
|
30
|
+
"5xx Server Error": "5xx Server Error",
|
|
31
|
+
"No results found": "No results found",
|
|
32
|
+
"Try adjusting your search criteria": "Try adjusting your search criteria",
|
|
33
|
+
"Your list is empty": "Your list is empty",
|
|
34
|
+
"Get started by creating your first entry": "Get started by creating your first entry",
|
|
35
|
+
"Create new": "Create new",
|
|
36
|
+
"Clear all": "Clear all",
|
|
37
|
+
"Previous page": "Previous page",
|
|
38
|
+
"Next page": "Next page",
|
|
39
|
+
} as const;
|
|
40
|
+
|
|
41
|
+
const sl = {
|
|
42
|
+
"Search...": "Išči...",
|
|
43
|
+
Search: "Išči",
|
|
44
|
+
"Clear search": "Počisti iskanje",
|
|
45
|
+
Filters: "Filtri",
|
|
46
|
+
"Clear filters": "Počisti filtre",
|
|
47
|
+
"Date Range": "Datumski razpon",
|
|
48
|
+
From: "Od",
|
|
49
|
+
To: "Do",
|
|
50
|
+
Status: "Status",
|
|
51
|
+
Method: "Metoda",
|
|
52
|
+
Date: "Datum",
|
|
53
|
+
Entity: "Entiteta",
|
|
54
|
+
Resource: "Vir",
|
|
55
|
+
Path: "Pot",
|
|
56
|
+
Time: "Čas",
|
|
57
|
+
Copy: "Kopiraj",
|
|
58
|
+
Request: "Zahteva",
|
|
59
|
+
Response: "Odgovor",
|
|
60
|
+
Headers: "Glave",
|
|
61
|
+
Action: "Dejanje",
|
|
62
|
+
ID: "ID",
|
|
63
|
+
"Request ID": "ID zahteve",
|
|
64
|
+
"Copy to clipboard": "Kopirano v odložišče",
|
|
65
|
+
"No request body data": "Ni podatkov telesa zahteve",
|
|
66
|
+
"No response body data": "Ni podatkov telesa odgovora",
|
|
67
|
+
"No headers data": "Ni podatkov glav",
|
|
68
|
+
"2xx Success": "2xx Uspešno",
|
|
69
|
+
"4xx Client Error": "4xx Napaka odjemalca",
|
|
70
|
+
"5xx Server Error": "5xx Napaka strežnika",
|
|
71
|
+
"No results found": "Ni rezultatov",
|
|
72
|
+
"Try adjusting your search criteria": "Poskusite prilagoditi iskalne pogoje",
|
|
73
|
+
"Your list is empty": "Seznam je prazen",
|
|
74
|
+
"Get started by creating your first entry": "Začnite z ustvarjanjem prvega vnosa",
|
|
75
|
+
"Create new": "Ustvari novo",
|
|
76
|
+
"Clear all": "Počisti vse",
|
|
77
|
+
"Previous page": "Prejšnja stran",
|
|
78
|
+
"Next page": "Naslednja stran",
|
|
79
|
+
} as const;
|
|
80
|
+
|
|
81
|
+
const de = {
|
|
82
|
+
"Search...": "Suchen...",
|
|
83
|
+
Search: "Suchen",
|
|
84
|
+
"Clear search": "Suche löschen",
|
|
85
|
+
Filters: "Filter",
|
|
86
|
+
"Clear filters": "Filter löschen",
|
|
87
|
+
"Date Range": "Datumsbereich",
|
|
88
|
+
From: "Von",
|
|
89
|
+
To: "Bis",
|
|
90
|
+
Status: "Status",
|
|
91
|
+
Method: "Methode",
|
|
92
|
+
Date: "Datum",
|
|
93
|
+
Entity: "Entität",
|
|
94
|
+
Resource: "Ressource",
|
|
95
|
+
Path: "Pfad",
|
|
96
|
+
Time: "Zeit",
|
|
97
|
+
Copy: "Kopieren",
|
|
98
|
+
Request: "Anfrage",
|
|
99
|
+
Response: "Antwort",
|
|
100
|
+
Headers: "Header",
|
|
101
|
+
Action: "Aktion",
|
|
102
|
+
ID: "ID",
|
|
103
|
+
"Request ID": "Request-ID",
|
|
104
|
+
"Copy to clipboard": "In die Zwischenablage kopieren",
|
|
105
|
+
"No request body data": "Keine Request-Body-Daten",
|
|
106
|
+
"No response body data": "Keine Response-Body-Daten",
|
|
107
|
+
"No headers data": "Keine Header-Daten",
|
|
108
|
+
"2xx Success": "2xx Erfolg",
|
|
109
|
+
"4xx Client Error": "4xx Client-Fehler",
|
|
110
|
+
"5xx Server Error": "5xx Server-Fehler",
|
|
111
|
+
"No results found": "Keine Ergebnisse gefunden",
|
|
112
|
+
"Try adjusting your search criteria": "Versuchen Sie, Ihre Suchkriterien anzupassen",
|
|
113
|
+
"Your list is empty": "Ihre Liste ist leer",
|
|
114
|
+
"Get started by creating your first entry": "Erstellen Sie Ihren ersten Eintrag",
|
|
115
|
+
"Create new": "Neu erstellen",
|
|
116
|
+
"Clear all": "Alles löschen",
|
|
117
|
+
"Previous page": "Vorherige Seite",
|
|
118
|
+
"Next page": "Nächste Seite",
|
|
119
|
+
} as const;
|
|
120
|
+
|
|
121
|
+
const it = {
|
|
122
|
+
"Search...": "Cerca...",
|
|
123
|
+
Search: "Cerca",
|
|
124
|
+
"Clear search": "Cancella ricerca",
|
|
125
|
+
Filters: "Filtri",
|
|
126
|
+
"Clear filters": "Cancella filtri",
|
|
127
|
+
"Date Range": "Intervallo di date",
|
|
128
|
+
From: "Da",
|
|
129
|
+
To: "A",
|
|
130
|
+
Status: "Stato",
|
|
131
|
+
Method: "Metodo",
|
|
132
|
+
Date: "Data",
|
|
133
|
+
Entity: "Entità",
|
|
134
|
+
Resource: "Risorsa",
|
|
135
|
+
Path: "Percorso",
|
|
136
|
+
Time: "Ora",
|
|
137
|
+
Copy: "Copia",
|
|
138
|
+
Request: "Richiesta",
|
|
139
|
+
Response: "Risposta",
|
|
140
|
+
Headers: "Intestazioni",
|
|
141
|
+
Action: "Azione",
|
|
142
|
+
ID: "ID",
|
|
143
|
+
"Request ID": "ID richiesta",
|
|
144
|
+
"Copy to clipboard": "Copia negli appunti",
|
|
145
|
+
"No request body data": "Nessun dato del corpo della richiesta",
|
|
146
|
+
"No response body data": "Nessun dato del corpo della risposta",
|
|
147
|
+
"No headers data": "Nessun dato delle intestazioni",
|
|
148
|
+
"2xx Success": "2xx Successo",
|
|
149
|
+
"4xx Client Error": "4xx Errore client",
|
|
150
|
+
"5xx Server Error": "5xx Errore server",
|
|
151
|
+
"No results found": "Nessun risultato trovato",
|
|
152
|
+
"Try adjusting your search criteria": "Prova a modificare i criteri di ricerca",
|
|
153
|
+
"Your list is empty": "La tua lista è vuota",
|
|
154
|
+
"Get started by creating your first entry": "Inizia creando il tuo primo elemento",
|
|
155
|
+
"Create new": "Crea nuovo",
|
|
156
|
+
"Clear all": "Cancella tutto",
|
|
157
|
+
"Previous page": "Pagina precedente",
|
|
158
|
+
"Next page": "Pagina successiva",
|
|
159
|
+
} as const;
|
|
160
|
+
|
|
161
|
+
const fr = {
|
|
162
|
+
"Search...": "Rechercher...",
|
|
163
|
+
Search: "Rechercher",
|
|
164
|
+
"Clear search": "Effacer la recherche",
|
|
165
|
+
Filters: "Filtres",
|
|
166
|
+
"Clear filters": "Effacer les filtres",
|
|
167
|
+
"Date Range": "Plage de dates",
|
|
168
|
+
From: "De",
|
|
169
|
+
To: "À",
|
|
170
|
+
Status: "Statut",
|
|
171
|
+
Method: "Méthode",
|
|
172
|
+
Date: "Date",
|
|
173
|
+
Entity: "Entité",
|
|
174
|
+
Resource: "Ressource",
|
|
175
|
+
Path: "Chemin",
|
|
176
|
+
Time: "Heure",
|
|
177
|
+
Copy: "Copier",
|
|
178
|
+
Request: "Requête",
|
|
179
|
+
Response: "Réponse",
|
|
180
|
+
Headers: "En-têtes",
|
|
181
|
+
Action: "Action",
|
|
182
|
+
ID: "ID",
|
|
183
|
+
"Request ID": "ID de requête",
|
|
184
|
+
"Copy to clipboard": "Copier dans le presse-papiers",
|
|
185
|
+
"No request body data": "Aucune donnée de corps de requête",
|
|
186
|
+
"No response body data": "Aucune donnée de corps de réponse",
|
|
187
|
+
"No headers data": "Aucune donnée d'en-têtes",
|
|
188
|
+
"2xx Success": "2xx Succès",
|
|
189
|
+
"4xx Client Error": "4xx Erreur client",
|
|
190
|
+
"5xx Server Error": "5xx Erreur serveur",
|
|
191
|
+
"No results found": "Aucun résultat trouvé",
|
|
192
|
+
"Try adjusting your search criteria": "Essayez d'ajuster vos critères de recherche",
|
|
193
|
+
"Your list is empty": "Votre liste est vide",
|
|
194
|
+
"Get started by creating your first entry": "Commencez par créer votre première entrée",
|
|
195
|
+
"Create new": "Créer",
|
|
196
|
+
"Clear all": "Tout effacer",
|
|
197
|
+
"Previous page": "Page précédente",
|
|
198
|
+
"Next page": "Page suivante",
|
|
199
|
+
} as const;
|
|
200
|
+
|
|
201
|
+
const es = {
|
|
202
|
+
"Search...": "Buscar...",
|
|
203
|
+
Search: "Buscar",
|
|
204
|
+
"Clear search": "Borrar búsqueda",
|
|
205
|
+
Filters: "Filtros",
|
|
206
|
+
"Clear filters": "Limpiar filtros",
|
|
207
|
+
"Date Range": "Rango de fechas",
|
|
208
|
+
From: "Desde",
|
|
209
|
+
To: "Hasta",
|
|
210
|
+
Status: "Estado",
|
|
211
|
+
Method: "Método",
|
|
212
|
+
Date: "Fecha",
|
|
213
|
+
Entity: "Entidad",
|
|
214
|
+
Resource: "Recurso",
|
|
215
|
+
Path: "Ruta",
|
|
216
|
+
Time: "Hora",
|
|
217
|
+
Copy: "Copiar",
|
|
218
|
+
Request: "Solicitud",
|
|
219
|
+
Response: "Respuesta",
|
|
220
|
+
Headers: "Encabezados",
|
|
221
|
+
Action: "Acción",
|
|
222
|
+
ID: "ID",
|
|
223
|
+
"Request ID": "ID de solicitud",
|
|
224
|
+
"Copy to clipboard": "Copiar al portapapeles",
|
|
225
|
+
"No request body data": "Sin datos del cuerpo de la solicitud",
|
|
226
|
+
"No response body data": "Sin datos del cuerpo de la respuesta",
|
|
227
|
+
"No headers data": "Sin datos de encabezados",
|
|
228
|
+
"2xx Success": "2xx Correcto",
|
|
229
|
+
"4xx Client Error": "4xx Error del cliente",
|
|
230
|
+
"5xx Server Error": "5xx Error del servidor",
|
|
231
|
+
"No results found": "No se encontraron resultados",
|
|
232
|
+
"Try adjusting your search criteria": "Prueba a ajustar tus criterios de búsqueda",
|
|
233
|
+
"Your list is empty": "Tu lista está vacía",
|
|
234
|
+
"Get started by creating your first entry": "Empieza creando tu primera entrada",
|
|
235
|
+
"Create new": "Crear nuevo",
|
|
236
|
+
"Clear all": "Limpiar todo",
|
|
237
|
+
"Previous page": "Página anterior",
|
|
238
|
+
"Next page": "Página siguiente",
|
|
239
|
+
} as const;
|
|
240
|
+
|
|
241
|
+
const pt = {
|
|
242
|
+
"Search...": "Pesquisar...",
|
|
243
|
+
Search: "Pesquisar",
|
|
244
|
+
"Clear search": "Limpar pesquisa",
|
|
245
|
+
Filters: "Filtros",
|
|
246
|
+
"Clear filters": "Limpar filtros",
|
|
247
|
+
"Date Range": "Intervalo de datas",
|
|
248
|
+
From: "De",
|
|
249
|
+
To: "Até",
|
|
250
|
+
Status: "Estado",
|
|
251
|
+
Method: "Método",
|
|
252
|
+
Date: "Data",
|
|
253
|
+
Entity: "Entidade",
|
|
254
|
+
Resource: "Recurso",
|
|
255
|
+
Path: "Caminho",
|
|
256
|
+
Time: "Hora",
|
|
257
|
+
Copy: "Copiar",
|
|
258
|
+
Request: "Pedido",
|
|
259
|
+
Response: "Resposta",
|
|
260
|
+
Headers: "Cabeçalhos",
|
|
261
|
+
Action: "Ação",
|
|
262
|
+
ID: "ID",
|
|
263
|
+
"Request ID": "ID do pedido",
|
|
264
|
+
"Copy to clipboard": "Copiar para a área de transferência",
|
|
265
|
+
"No request body data": "Sem dados do corpo do pedido",
|
|
266
|
+
"No response body data": "Sem dados do corpo da resposta",
|
|
267
|
+
"No headers data": "Sem dados de cabeçalhos",
|
|
268
|
+
"2xx Success": "2xx Sucesso",
|
|
269
|
+
"4xx Client Error": "4xx Erro do cliente",
|
|
270
|
+
"5xx Server Error": "5xx Erro do servidor",
|
|
271
|
+
"No results found": "Nenhum resultado encontrado",
|
|
272
|
+
"Try adjusting your search criteria": "Tente ajustar os seus critérios de pesquisa",
|
|
273
|
+
"Your list is empty": "A sua lista está vazia",
|
|
274
|
+
"Get started by creating your first entry": "Comece por criar a sua primeira entrada",
|
|
275
|
+
"Create new": "Criar novo",
|
|
276
|
+
"Clear all": "Limpar tudo",
|
|
277
|
+
"Previous page": "Página anterior",
|
|
278
|
+
"Next page": "Página seguinte",
|
|
279
|
+
} as const;
|
|
280
|
+
|
|
281
|
+
const nl = {
|
|
282
|
+
"Search...": "Zoeken...",
|
|
283
|
+
Search: "Zoeken",
|
|
284
|
+
"Clear search": "Zoekopdracht wissen",
|
|
285
|
+
Filters: "Filters",
|
|
286
|
+
"Clear filters": "Filters wissen",
|
|
287
|
+
"Date Range": "Datumbereik",
|
|
288
|
+
From: "Van",
|
|
289
|
+
To: "Tot",
|
|
290
|
+
Status: "Status",
|
|
291
|
+
Method: "Methode",
|
|
292
|
+
Date: "Datum",
|
|
293
|
+
Entity: "Entiteit",
|
|
294
|
+
Resource: "Resource",
|
|
295
|
+
Path: "Pad",
|
|
296
|
+
Time: "Tijd",
|
|
297
|
+
Copy: "Kopiëren",
|
|
298
|
+
Request: "Verzoek",
|
|
299
|
+
Response: "Respons",
|
|
300
|
+
Headers: "Kopteksten",
|
|
301
|
+
Action: "Actie",
|
|
302
|
+
ID: "ID",
|
|
303
|
+
"Request ID": "Request-ID",
|
|
304
|
+
"Copy to clipboard": "Kopiëren naar klembord",
|
|
305
|
+
"No request body data": "Geen gegevens in request-body",
|
|
306
|
+
"No response body data": "Geen gegevens in response-body",
|
|
307
|
+
"No headers data": "Geen headergegevens",
|
|
308
|
+
"2xx Success": "2xx Succes",
|
|
309
|
+
"4xx Client Error": "4xx Clientfout",
|
|
310
|
+
"5xx Server Error": "5xx Serverfout",
|
|
311
|
+
"No results found": "Geen resultaten gevonden",
|
|
312
|
+
"Try adjusting your search criteria": "Probeer je zoekcriteria aan te passen",
|
|
313
|
+
"Your list is empty": "Je lijst is leeg",
|
|
314
|
+
"Get started by creating your first entry": "Begin met het maken van je eerste item",
|
|
315
|
+
"Create new": "Nieuw maken",
|
|
316
|
+
"Clear all": "Alles wissen",
|
|
317
|
+
"Previous page": "Vorige pagina",
|
|
318
|
+
"Next page": "Volgende pagina",
|
|
319
|
+
} as const;
|
|
320
|
+
|
|
321
|
+
const pl = {
|
|
322
|
+
"Search...": "Szukaj...",
|
|
323
|
+
Search: "Szukaj",
|
|
324
|
+
"Clear search": "Wyczyść wyszukiwanie",
|
|
325
|
+
Filters: "Filtry",
|
|
326
|
+
"Clear filters": "Wyczyść filtry",
|
|
327
|
+
"Date Range": "Zakres dat",
|
|
328
|
+
From: "Od",
|
|
329
|
+
To: "Do",
|
|
330
|
+
Status: "Status",
|
|
331
|
+
Method: "Metoda",
|
|
332
|
+
Date: "Data",
|
|
333
|
+
Entity: "Encja",
|
|
334
|
+
Resource: "Zasób",
|
|
335
|
+
Path: "Ścieżka",
|
|
336
|
+
Time: "Czas",
|
|
337
|
+
Copy: "Kopiuj",
|
|
338
|
+
Request: "Żądanie",
|
|
339
|
+
Response: "Odpowiedź",
|
|
340
|
+
Headers: "Nagłówki",
|
|
341
|
+
Action: "Akcja",
|
|
342
|
+
ID: "ID",
|
|
343
|
+
"Request ID": "ID żądania",
|
|
344
|
+
"Copy to clipboard": "Kopiuj do schowka",
|
|
345
|
+
"No request body data": "Brak danych treści żądania",
|
|
346
|
+
"No response body data": "Brak danych treści odpowiedzi",
|
|
347
|
+
"No headers data": "Brak danych nagłówków",
|
|
348
|
+
"2xx Success": "2xx Sukces",
|
|
349
|
+
"4xx Client Error": "4xx Błąd klienta",
|
|
350
|
+
"5xx Server Error": "5xx Błąd serwera",
|
|
351
|
+
"No results found": "Nie znaleziono wyników",
|
|
352
|
+
"Try adjusting your search criteria": "Spróbuj dostosować kryteria wyszukiwania",
|
|
353
|
+
"Your list is empty": "Twoja lista jest pusta",
|
|
354
|
+
"Get started by creating your first entry": "Zacznij od utworzenia pierwszego wpisu",
|
|
355
|
+
"Create new": "Utwórz nowy",
|
|
356
|
+
"Clear all": "Wyczyść wszystko",
|
|
357
|
+
"Previous page": "Poprzednia strona",
|
|
358
|
+
"Next page": "Następna strona",
|
|
359
|
+
} as const;
|
|
360
|
+
|
|
361
|
+
const hr = {
|
|
362
|
+
"Search...": "Pretraži...",
|
|
363
|
+
Search: "Pretraži",
|
|
364
|
+
"Clear search": "Očisti pretragu",
|
|
365
|
+
Filters: "Filtri",
|
|
366
|
+
"Clear filters": "Očisti filtre",
|
|
367
|
+
"Date Range": "Datumski raspon",
|
|
368
|
+
From: "Od",
|
|
369
|
+
To: "Do",
|
|
370
|
+
Status: "Status",
|
|
371
|
+
Method: "Metoda",
|
|
372
|
+
Date: "Datum",
|
|
373
|
+
Entity: "Entitet",
|
|
374
|
+
Resource: "Resurs",
|
|
375
|
+
Path: "Putanja",
|
|
376
|
+
Time: "Vrijeme",
|
|
377
|
+
Copy: "Kopiraj",
|
|
378
|
+
Request: "Zahtjev",
|
|
379
|
+
Response: "Odgovor",
|
|
380
|
+
Headers: "Zaglavlja",
|
|
381
|
+
Action: "Radnja",
|
|
382
|
+
ID: "ID",
|
|
383
|
+
"Request ID": "ID zahtjeva",
|
|
384
|
+
"Copy to clipboard": "Kopiraj u međuspremnik",
|
|
385
|
+
"No request body data": "Nema podataka tijela zahtjeva",
|
|
386
|
+
"No response body data": "Nema podataka tijela odgovora",
|
|
387
|
+
"No headers data": "Nema podataka zaglavlja",
|
|
388
|
+
"2xx Success": "2xx Uspjeh",
|
|
389
|
+
"4xx Client Error": "4xx Greška klijenta",
|
|
390
|
+
"5xx Server Error": "5xx Greška poslužitelja",
|
|
391
|
+
"No results found": "Nema rezultata",
|
|
392
|
+
"Try adjusting your search criteria": "Pokušajte prilagoditi kriterije pretrage",
|
|
393
|
+
"Your list is empty": "Vaš popis je prazan",
|
|
394
|
+
"Get started by creating your first entry": "Započnite stvaranjem prve stavke",
|
|
395
|
+
"Create new": "Stvori novo",
|
|
396
|
+
"Clear all": "Očisti sve",
|
|
397
|
+
"Previous page": "Prethodna stranica",
|
|
398
|
+
"Next page": "Sljedeća stranica",
|
|
399
|
+
} as const;
|
|
400
|
+
|
|
401
|
+
export default {
|
|
402
|
+
en,
|
|
403
|
+
sl,
|
|
404
|
+
de,
|
|
405
|
+
it,
|
|
406
|
+
fr,
|
|
407
|
+
es,
|
|
408
|
+
pt,
|
|
409
|
+
nl,
|
|
410
|
+
pl,
|
|
411
|
+
hr,
|
|
412
|
+
} as const;
|
|
@@ -5,17 +5,20 @@ import { Check, Copy } from "lucide-react";
|
|
|
5
5
|
import { useState } from "react";
|
|
6
6
|
import { Button } from "@/ui/components/ui/button";
|
|
7
7
|
import { Tabs, TabsContent, TabsList, TabsTrigger } from "@/ui/components/ui/tabs";
|
|
8
|
+
import { getDateFnsLocale } from "@/ui/lib/date-fns-locale";
|
|
8
9
|
import { cn } from "../../lib/utils";
|
|
9
10
|
import type { RequestLogResponse } from "./request-log-list-table";
|
|
10
11
|
|
|
11
|
-
type TranslationFn = (key: string
|
|
12
|
+
type TranslationFn = (key: string) => string;
|
|
12
13
|
|
|
13
|
-
const defaultT: TranslationFn = (
|
|
14
|
+
const defaultT: TranslationFn = (key) => key;
|
|
14
15
|
|
|
15
16
|
export interface RequestLogDetailProps {
|
|
16
17
|
log: RequestLogResponse;
|
|
17
|
-
/** Translation function - defaults to
|
|
18
|
+
/** Translation function - defaults to identity */
|
|
18
19
|
t?: TranslationFn;
|
|
20
|
+
/** Locale used for relative date formatting */
|
|
21
|
+
locale?: string;
|
|
19
22
|
}
|
|
20
23
|
|
|
21
24
|
/**
|
|
@@ -39,7 +42,7 @@ function unwrapResponseData(data: unknown): unknown {
|
|
|
39
42
|
return data;
|
|
40
43
|
}
|
|
41
44
|
|
|
42
|
-
function JsonViewer({ data,
|
|
45
|
+
function JsonViewer({ data, noDataLabel, t }: { data: unknown; noDataLabel: string; t: TranslationFn }) {
|
|
43
46
|
const [copied, setCopied] = useState(false);
|
|
44
47
|
// Unwrap { text: "json" } format if present
|
|
45
48
|
const unwrappedData = unwrapResponseData(data);
|
|
@@ -59,7 +62,7 @@ function JsonViewer({ data, label }: { data: unknown; label: string }) {
|
|
|
59
62
|
) {
|
|
60
63
|
return (
|
|
61
64
|
<div className="rounded-lg border bg-muted/30 p-4 text-center text-muted-foreground text-sm">
|
|
62
|
-
|
|
65
|
+
{t(noDataLabel)}
|
|
63
66
|
</div>
|
|
64
67
|
);
|
|
65
68
|
}
|
|
@@ -71,7 +74,7 @@ function JsonViewer({ data, label }: { data: unknown; label: string }) {
|
|
|
71
74
|
size="sm"
|
|
72
75
|
className="absolute top-2 right-2 h-8 w-8 p-0"
|
|
73
76
|
onClick={handleCopy}
|
|
74
|
-
title="Copy to clipboard"
|
|
77
|
+
title={t("Copy to clipboard")}
|
|
75
78
|
>
|
|
76
79
|
{copied ? <Check className="h-4 w-4 text-green-500" /> : <Copy className="h-4 w-4" />}
|
|
77
80
|
</Button>
|
|
@@ -140,8 +143,9 @@ function JsonHighlight({ json }: { json: string }) {
|
|
|
140
143
|
);
|
|
141
144
|
}
|
|
142
145
|
|
|
143
|
-
export function RequestLogDetail({ log, t = defaultT }: RequestLogDetailProps) {
|
|
146
|
+
export function RequestLogDetail({ log, t = defaultT, locale }: RequestLogDetailProps) {
|
|
144
147
|
const createdAt = new Date(log.created_at);
|
|
148
|
+
const dateLocale = getDateFnsLocale(locale);
|
|
145
149
|
const statusCode = log.res_status ? Number.parseInt(log.res_status, 10) : 0;
|
|
146
150
|
|
|
147
151
|
let statusColor = "text-gray-500";
|
|
@@ -166,7 +170,7 @@ export function RequestLogDetail({ log, t = defaultT }: RequestLogDetailProps) {
|
|
|
166
170
|
</span>
|
|
167
171
|
<div className="text-muted-foreground text-sm">
|
|
168
172
|
<time dateTime={log.created_at} title={format(createdAt, "PPpp")}>
|
|
169
|
-
{formatDistanceToNow(createdAt, { addSuffix: true })}
|
|
173
|
+
{formatDistanceToNow(createdAt, { addSuffix: true, locale: dateLocale })}
|
|
170
174
|
</time>
|
|
171
175
|
<span className="mx-2">•</span>
|
|
172
176
|
<span>{format(createdAt, "PPpp")}</span>
|
|
@@ -174,23 +178,29 @@ export function RequestLogDetail({ log, t = defaultT }: RequestLogDetailProps) {
|
|
|
174
178
|
</div>
|
|
175
179
|
|
|
176
180
|
{/* Metadata */}
|
|
177
|
-
{(log.resource_type || log.resource_id || log.action) && (
|
|
181
|
+
{(log.client_name || log.resource_type || log.resource_id || log.action) && (
|
|
178
182
|
<div className="flex flex-wrap gap-4 text-sm">
|
|
183
|
+
{log.client_name && (
|
|
184
|
+
<div>
|
|
185
|
+
<span className="text-muted-foreground">{t("Client")}:</span>{" "}
|
|
186
|
+
<code className="rounded bg-muted px-1.5 py-0.5 font-mono text-xs">{log.client_name}</code>
|
|
187
|
+
</div>
|
|
188
|
+
)}
|
|
179
189
|
{log.resource_type && (
|
|
180
190
|
<div>
|
|
181
|
-
<span className="text-muted-foreground">{t("
|
|
191
|
+
<span className="text-muted-foreground">{t("Resource")}:</span>{" "}
|
|
182
192
|
<span className="font-medium">{log.resource_type}</span>
|
|
183
193
|
</div>
|
|
184
194
|
)}
|
|
185
195
|
{log.resource_id && (
|
|
186
196
|
<div>
|
|
187
|
-
<span className="text-muted-foreground">{t("
|
|
197
|
+
<span className="text-muted-foreground">{t("ID")}:</span>{" "}
|
|
188
198
|
<code className="rounded bg-muted px-1.5 py-0.5 font-mono text-xs">{log.resource_id}</code>
|
|
189
199
|
</div>
|
|
190
200
|
)}
|
|
191
201
|
{log.action && (
|
|
192
202
|
<div>
|
|
193
|
-
<span className="text-muted-foreground">{t("
|
|
203
|
+
<span className="text-muted-foreground">{t("Action")}:</span>{" "}
|
|
194
204
|
<span className="font-medium">{log.action}</span>
|
|
195
205
|
</div>
|
|
196
206
|
)}
|
|
@@ -200,18 +210,18 @@ export function RequestLogDetail({ log, t = defaultT }: RequestLogDetailProps) {
|
|
|
200
210
|
{/* Tabs for Request/Response/Headers */}
|
|
201
211
|
<Tabs defaultValue="request" className="w-full">
|
|
202
212
|
<TabsList className="grid w-full grid-cols-3">
|
|
203
|
-
<TabsTrigger value="request">{t("
|
|
204
|
-
<TabsTrigger value="response">{t("
|
|
205
|
-
<TabsTrigger value="headers">{t("
|
|
213
|
+
<TabsTrigger value="request">{t("Request")}</TabsTrigger>
|
|
214
|
+
<TabsTrigger value="response">{t("Response")}</TabsTrigger>
|
|
215
|
+
<TabsTrigger value="headers">{t("Headers")}</TabsTrigger>
|
|
206
216
|
</TabsList>
|
|
207
217
|
<TabsContent value="request" className="mt-4">
|
|
208
|
-
<JsonViewer data={log.req_body}
|
|
218
|
+
<JsonViewer data={log.req_body} noDataLabel="No request body data" t={t} />
|
|
209
219
|
</TabsContent>
|
|
210
220
|
<TabsContent value="response" className="mt-4">
|
|
211
|
-
<JsonViewer data={log.res_body}
|
|
221
|
+
<JsonViewer data={log.res_body} noDataLabel="No response body data" t={t} />
|
|
212
222
|
</TabsContent>
|
|
213
223
|
<TabsContent value="headers" className="mt-4">
|
|
214
|
-
<JsonViewer data={log.headers}
|
|
224
|
+
<JsonViewer data={log.headers} noDataLabel="No headers data" t={t} />
|
|
215
225
|
</TabsContent>
|
|
216
226
|
</Tabs>
|
|
217
227
|
|
|
@@ -221,7 +231,7 @@ export function RequestLogDetail({ log, t = defaultT }: RequestLogDetailProps) {
|
|
|
221
231
|
);
|
|
222
232
|
}
|
|
223
233
|
|
|
224
|
-
function RequestIdDisplay({ requestId, t }: { requestId: string; t:
|
|
234
|
+
function RequestIdDisplay({ requestId, t }: { requestId: string; t: TranslationFn }) {
|
|
225
235
|
const [copied, setCopied] = useState(false);
|
|
226
236
|
|
|
227
237
|
const handleCopy = async () => {
|
|
@@ -232,9 +242,15 @@ function RequestIdDisplay({ requestId, t }: { requestId: string; t: (key: string
|
|
|
232
242
|
|
|
233
243
|
return (
|
|
234
244
|
<div className="flex items-center gap-2 border-t pt-4 text-muted-foreground text-xs">
|
|
235
|
-
<span>{t("
|
|
245
|
+
<span>{t("Request ID")}:</span>
|
|
236
246
|
<code className="font-mono">{requestId}</code>
|
|
237
|
-
<Button
|
|
247
|
+
<Button
|
|
248
|
+
variant="ghost"
|
|
249
|
+
size="sm"
|
|
250
|
+
className="h-6 w-6 p-0"
|
|
251
|
+
onClick={handleCopy}
|
|
252
|
+
title={t("Copy to clipboard")}
|
|
253
|
+
>
|
|
238
254
|
{copied ? <Check className="h-3 w-3 text-green-500" /> : <Copy className="h-3 w-3" />}
|
|
239
255
|
</Button>
|
|
240
256
|
</div>
|