Skip to content

Commit

Permalink
Merge pull request #94 from vtex/S2BRFPA-961-adicionar-status-nao-map…
Browse files Browse the repository at this point in the history
…eado-e-corrigir-cancel

feature/Not Mapped status tag added
  • Loading branch information
GabrielBarross authored Aug 25, 2022
2 parents fe6d5af + 5a61887 commit 31d4239
Show file tree
Hide file tree
Showing 7 changed files with 22 additions and 7 deletions.
8 changes: 6 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,19 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.

## [Unreleased]

## [0.58.0] - 2022-08-25
### Added

## [0.57.3] - 2022-08-24
- Added the "Not Mapped" status to the affiliate orders table

## [0.58.0] - 2022-08-25

### Changed

- Added the `Combobox` component to the affiliate orders page
- Changed the orders filter to work with the `Combobox` values

## [0.57.3] - 2022-08-24

### Changed

- update `admin-ui` version to `0.132.7`
Expand Down
1 change: 1 addition & 0 deletions messages/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,7 @@
"admin/order.status.paid.label": "Payment approved",
"admin/order.status.cancel.label": "Canceled",
"admin/order.status.invoiced.label": "Invoiced",
"admin/order.status.notmapped.label": "Not Mapped",
"admin/total.orders.label": "Total orders",
"admin/edit.affiliate.approve.title": "Change affiliate approved status",
"admin/total.order.value.disclaimer.text": "The total value is based only on the value of the items in the order. Shipping price is not considered.",
Expand Down
1 change: 1 addition & 0 deletions messages/pt.json
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,7 @@
"admin/order.status.paid.label": "Pagamento aprovado",
"admin/order.status.cancel.label": "Cancelado",
"admin/order.status.invoiced.label": "Faturado",
"admin/order.status.notmapped.label": "Não Mapeado",
"admin/total.orders.label": "Total de pedidos",
"admin/edit.affiliate.approve.title": "Modificar o status do afiliado",
"admin/total.order.value.disclaimer.text": "O valor total considera apenas o valor dos itens do pedido. O valor do frete não é considerado.",
Expand Down
2 changes: 1 addition & 1 deletion react/components/admin/dashboard/AffiliateOrdersTable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@ const AffiliateOrdersTable: FC = () => {
header: intl.formatMessage(
messages.affiliatesOrdersTableStatusColumnLabel
),
width: 140,
width: 200,
resolver: {
type: 'root',
render: StatusTableCell,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ function ProfileStatusTag(props: StatusProp) {
)
}

if (status === 'invoiced') {
if (status === 'invoiced' || status === 'invoice') {
return (
<Tag type="success" variation="low">
{intl.formatMessage(storeMessages.invoicedTitle)}
Expand Down
1 change: 1 addition & 0 deletions react/utils/messages.ts
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,7 @@ export const messages = defineMessages({
orderStatusPaidLabel: { id: 'admin/order.status.paid.label' },
orderStatusCancelLabel: { id: 'admin/order.status.cancel.label' },
orderStatusInvoicedLabel: { id: 'admin/order.status.invoiced.label' },
orderStatusNotMapped: { id: 'admin/order.status.notmapped.label' },
totalOrdersLabel: { id: 'admin/total.orders.label' },
totalOrderValueDisclaimerText: {
id: 'admin/total.order.value.disclaimer.text',
Expand Down
14 changes: 11 additions & 3 deletions react/utils/shared.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,17 +51,25 @@ export const statusTagControl = (
}
}

if (status === 'invoiced') {
if (status === 'invoiced' || status === 'invoice') {
return {
label: intl.formatMessage(messages.orderStatusInvoicedLabel),
palette: 'green',
size: 'large',
}
}

if (status === 'cancel' || status === 'canceled') {
return {
label: intl.formatMessage(messages.orderStatusCancelLabel),
palette: 'red',
size: 'large',
}
}

return {
label: intl.formatMessage(messages.orderStatusCancelLabel),
palette: 'red',
label: intl.formatMessage(messages.orderStatusNotMapped),
palette: 'gray',
size: 'large',
}
}

0 comments on commit 31d4239

Please sign in to comment.