diff --git a/.DS_Store b/.DS_Store new file mode 100644 index 000000000..e0f8714b5 Binary files /dev/null and b/.DS_Store differ diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 000000000..458bc5a6e --- /dev/null +++ b/.editorconfig @@ -0,0 +1,13 @@ +# editorconfig.org +root = true + +[*] +end_of_line = lf +insert_final_newline = true +indent_style = space +indent_size = 2 +charset = utf-8 +trim_trailing_whitespace = true + +[*.md] +trim_trailing_whitespace = false diff --git a/admin/navigation.json b/admin/navigation.json index 8d76fa071..f398f73a7 100644 --- a/admin/navigation.json +++ b/admin/navigation.json @@ -1,15 +1,34 @@ -{ - "section": "orders", - "titleId": "admin/return-app.navigation.label", - "path": "/admin/returns/requests", - "subSectionItems": [ - { - "labelId": "navigation.labelRequests", - "path": "/admin/returns/requests" - }, - { - "labelId": "admin/return-app.settings.navigation.label", - "path": "/admin/returns/settings" - } - ] -} +[ + { + "section": "orders", + "titleId": "admin/return-app.navigation.label", + "path": "/admin/returns/requests", + "subSectionItems": [ + { + "labelId": "navigation.labelRequests", + "path": "/admin/returns/requests" + }, + { + "labelId": "admin/return-app.settings.navigation.label", + "path": "/admin/returns/settings" + } + ] + }, + { + "section": "orders", + "subSection": "Return", + "adminVersion": 4, + "titleId": "admin/return-app.navigation.label", + "path": "/admin/returns/requests", + "subSectionItems": [ + { + "labelId": "navigation.labelRequests", + "path": "/admin/returns/requests" + }, + { + "labelId": "admin/return-app.settings.navigation.label", + "path": "/admin/returns/settings" + } + ] + } +] diff --git a/admin/routes.json b/admin/routes.json index c194b0a54..d9ca6acfa 100644 --- a/admin/routes.json +++ b/admin/routes.json @@ -3,10 +3,26 @@ "component": "AdminReturnList", "path": "/admin/app/returns/requests/" }, + "admin.app.return-settings-list": { + "component": "AdminSettingReturnList", + "path": "/admin/app/returns/sellers/settings/" + }, + "admin.app.return-setting-details": { + "component": "AdminSettingDetail", + "path": "/admin/app/returns/sellers/settings/:id/details/" + }, "admin.app.return-settings": { "component": "AdminReturnSettings", "path": "/admin/app/returns/settings/" }, + "admin.app.return-add": { + "component": "AdminReturnAdd", + "path": "/admin/app/returns/orders/add/:orderId/" + }, + "admin.app.order-list": { + "component": "AdminReturnOrderList", + "path": "/admin/app/returns/orders/" + }, "admin.app.return-details": { "component": "AdminReturnDetails", "path": "/admin/app/returns/:id/details/" diff --git a/docs/README.md b/docs/README.md index f8b1412e1..fa9cc4885 100644 --- a/docs/README.md +++ b/docs/README.md @@ -166,7 +166,7 @@ with the following example body: |Field|Description|isRequired| |----|----|----| -|status|`enum` possible values: new, processing, pickedUpFromClient,pendingVerification, packageVerified, amountRefunded, denied, cancelled |true| +|status|`enum` possible values: new, processing, pickedUpFromClient,pendingVerification, packageVerified, amountRefunded, denied, canceled |true| |comment| `object` only required if not updating status | false| |comment value|`string` only required if not updating status|true| |comment visibleForCustomer|`boolean` the comment will be shown to the customer. Default false|false| diff --git a/graphql/schema.graphql b/graphql/schema.graphql index a99d4aafb..6edfe70e7 100644 --- a/graphql/schema.graphql +++ b/graphql/schema.graphql @@ -1,5 +1,8 @@ type Query { returnAppSettings: ReturnAppSettings @cacheControl(maxAge: ZERO) + returnSellerSettings(sellerId: String!): SellerSetting + @withUserProfile + @cacheControl(maxAge: ZERO) categoryTreeName: [CategoryInfo]! @cacheControl(maxAge: MEDIUM) """ storeUserEmail: If not passed, resolver will try to parse it from session cookie. @@ -7,6 +10,8 @@ type Query { ordersAvailableToReturn( page: Int! storeUserEmail: String + isAdmin: Boolean + filter: OrdersFilters ): OrdersToReturnList @withUserProfile @cacheControl(scope: PRIVATE, maxAge: SHORT) @@ -30,14 +35,26 @@ type Query { @withUserProfile @cacheControl(scope: PRIVATE, maxAge: SHORT) nearestPickupPoints(lat: String!, long: String!): NearPickupPointQueryResponse + sellerSetting(sellerId: String!): SellerSetting + sellerSettingList: SellerSettingResponseList @cacheControl(maxAge: ZERO) + returnSettingsList( + filter: ReturnSettingsFilters + page: Int! + perPage: Int + ): ReturnSettingsList + @withUserProfile + @cacheControl(scope: PRIVATE, maxAge: SHORT) } type Mutation { createReturnRequest(returnRequest: ReturnRequestInput!): returnRequestCreated @withUserProfile saveReturnAppSettings(settings: ReturnAppSettingsInput!): Boolean + saveSellerSetting(settings: SellerSettingInput!): Boolean + updateSellerSetting(id: ID!, settings: SellerSettingInput!): Boolean updateReturnRequestStatus( requestId: ID! + sellerName: String status: Status! comment: ReturnRequestCommentInput refundData: RefundDataInput diff --git a/graphql/types/OrderToReturn.graphql b/graphql/types/OrderToReturn.graphql index f5aef617b..ed841ab1f 100644 --- a/graphql/types/OrderToReturn.graphql +++ b/graphql/types/OrderToReturn.graphql @@ -5,6 +5,7 @@ type OrdersToReturnList { type OrderToReturnSummary { orderId: String! + sellerName: String! creationDate: String! """ Items invoiced / sent to costumer with items details. @@ -23,6 +24,7 @@ type OrderToReturnSummary { clientProfileData: ClientProfileData! shippingData: ShippingData! paymentData: PaymentData! + availableAmountsToRefund: AvailableAmountsToRefund } type Pagination { @@ -79,7 +81,7 @@ type ShippingData { addressId: String! address: String! city: String! - state: String! + state: String country: String! zipCode: String! addressType: AddressType! @@ -89,3 +91,14 @@ type ShippingData { type PaymentData { canRefundCard: Boolean! } + +input CreatedInInput { + from: String! + to: String! +} + +input OrdersFilters { + createdIn: CreatedInInput + orderId: String + sellerName: String +} diff --git a/graphql/types/PickupPoints.graphql b/graphql/types/PickupPoints.graphql index daff84c18..a9a25566a 100644 --- a/graphql/types/PickupPoints.graphql +++ b/graphql/types/PickupPoints.graphql @@ -18,7 +18,7 @@ type CheckoutAddress { isDisposable: Boolean! postalCode: String! city: String! - state: String! + state: String country: String! street: String! number: String! diff --git a/graphql/types/ReturnAppSettings.graphql b/graphql/types/ReturnAppSettings.graphql index ebdef40cb..d83711329 100644 --- a/graphql/types/ReturnAppSettings.graphql +++ b/graphql/types/ReturnAppSettings.graphql @@ -5,6 +5,8 @@ type ReturnAppSettings { termsUrl: String! customReturnReasons: [CustomReturnReason!] options: ReturnOption + orderStatus: String + sellerId: String } type PaymentOptions { @@ -35,6 +37,8 @@ type ReturnOption { enablePickupPoints: Boolean enableProportionalShippingValue: Boolean enableSelectItemCondition: Boolean + enableHighlightFormMessage: Boolean + enableGoodwill: Boolean } input ReturnAppSettingsInput { @@ -44,6 +48,8 @@ input ReturnAppSettingsInput { termsUrl: String! customReturnReasons: [CustomReturnReasonInput!] options: ReturnOptionInput + orderStatus: String + sellerId: String } input PaymentOptionsInput { @@ -74,4 +80,6 @@ input ReturnOptionInput { enablePickupPoints: Boolean enableProportionalShippingValue: Boolean enableSelectItemCondition: Boolean + enableHighlightFormMessage: Boolean + enableGoodwill: Boolean } diff --git a/graphql/types/ReturnRequest.graphql b/graphql/types/ReturnRequest.graphql index 7ae4911d0..ffd72b506 100644 --- a/graphql/types/ReturnRequest.graphql +++ b/graphql/types/ReturnRequest.graphql @@ -1,5 +1,6 @@ input ReturnRequestInput { orderId: String! + sellerName: String items: [ReturnRequestItemInput!]! customerProfileData: CustomerProfileDataInput! pickupReturnData: PickupReturnDataInput! @@ -41,7 +42,7 @@ input PickupReturnDataInput { addressId: String! address: String! city: String! - state: String! + state: String country: String! zipCode: String! addressType: AddressType! @@ -65,8 +66,20 @@ enum RefundPaymentMethod { sameAsPurchase } +type AvailableAmountsToRefund { + initialInvoicedAmount: Int + amountToBeRefundedInProcess: Int + totalRefunded: Int + remainingRefundableAmount: Int + initialShippingCost: Int + shippingCostToBeRefundedInProcess: Int + totalShippingCostRefunded: Int + remainingRefundableShippingCost: Int +} + type ReturnRequestResponse { id: ID! + sellerName: String orderId: String! refundableAmount: Int! sequenceNumber: String! @@ -82,6 +95,7 @@ type ReturnRequestResponse { refundData: RefundData refundStatusData: [RefundStatusData!]! cultureInfoData: CultureInfoData! + availableAmountsToRefund: AvailableAmountsToRefund } enum Status { @@ -92,7 +106,7 @@ enum Status { packageVerified amountRefunded denied - cancelled + canceled } type CustomerProfileData { @@ -106,7 +120,7 @@ type PickupReturnData { addressId: String! address: String! city: String! - state: String! + state: String country: String! zipCode: String! addressType: AddressType! @@ -186,6 +200,7 @@ input ReturnRequestFilters { status: Status sequenceNumber: String id: String + sellerName: String """ createdIn: It uses the field dateSubmitted in the return request schema to search for documents. The field createdIn is auto generated when the document is created, not reflecting the real value for documents migrated from older versions. diff --git a/graphql/types/ReturnSettings.graphql b/graphql/types/ReturnSettings.graphql new file mode 100644 index 000000000..d0db547db --- /dev/null +++ b/graphql/types/ReturnSettings.graphql @@ -0,0 +1,23 @@ +input ReturnSettingsFilters { + id: String + sellerName: String + +} + +type ReturnSettingsList { + list: [ReturnSettingsResponse!]! + paging: Pagination! +} + + +type ReturnSettingsResponse { + id: ID! + sellerId: String + maxDays: Int! + excludedCategories: [String!]! + paymentOptions: PaymentOptions! + termsUrl: String! + customReturnReasons: [CustomReturnReason!] + options: ReturnOption + orderStatus: String +} diff --git a/graphql/types/SellerSetting.graphql b/graphql/types/SellerSetting.graphql new file mode 100644 index 000000000..cfdcd6943 --- /dev/null +++ b/graphql/types/SellerSetting.graphql @@ -0,0 +1,29 @@ +type SellerSetting { + id: String + sellerId: String! + parentAccount: String + maxDays: Int! + excludedCategories: [String!]! + paymentOptions: PaymentOptions! + termsUrl: String! + customReturnReasons: [CustomReturnReason!] + options: ReturnOption + orderStatus: String +} + +type SellerSettingResponseList { + sellers: [SellerSetting] +} + +input SellerSettingInput { + id: String + sellerId: String! + parentAccount: String + maxDays: Int! + excludedCategories: [String!]! + paymentOptions: PaymentOptionsInput! + termsUrl: String! + customReturnReasons: [CustomReturnReasonInput!] + options: ReturnOptionInput + orderStatus: String +} diff --git a/manifest.json b/manifest.json index 4617a349a..b1894a59b 100644 --- a/manifest.json +++ b/manifest.json @@ -1,7 +1,7 @@ { "vendor": "vtex", "name": "return-app", - "version": "3.5.6", + "version": "3.16.1-hkignore", "title": "Return app", "description": "Return app", "dependencies": { @@ -13,7 +13,8 @@ "vtex.css-handles": "0.x", "vtex.easypost": "0.x", "vtex.tenant-graphql": "0.x", - "vtex.catalog-graphql": "1.x" + "vtex.catalog-graphql": "1.x", + "vtex.sellers-graphql": "8.x" }, "builders": { "admin": "0.x", @@ -37,6 +38,9 @@ "path": "/api/*" } }, + { + "name": "colossus-fire-event" + }, { "name": "outbound-access", "attrs": { diff --git a/masterdata/goodwill/schema.json b/masterdata/goodwill/schema.json new file mode 100644 index 000000000..8dbe00992 --- /dev/null +++ b/masterdata/goodwill/schema.json @@ -0,0 +1,50 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "type": "object", + "title": "goodwill", + "properties": { + "creditnoteID": { + "type": "string", + "description": "Unique identifier for the order." + }, + "sellerId": { + "type": "string", + "description": "Unique identifier for the seller." + }, + "status": { "$ref": "#/$defs/status" }, + "creditAmount": { + "type": "number", + "description": "Amount to be credited.", + "minimum": 0 + }, + "reason": { + "type": "string", + "description": "Reason for the credit." + }, + "refundPaymentData": { + "type": "object", + "properties": { + "refundPaymentMethod": { + "type": "string", + "enum": ["bank", "card", "giftCard", "sameAsPurchase"], + "description": "Method of refund payment." + } + }, + "required": ["refundPaymentMethod"] + } + }, + "$defs": { + "status": { + "type": "string", + "enum": ["new", "processing", "amountRefunded"], + "default": "new" + } + }, + "required": [ + "orderId", + "creditAmount", + "reason", + "sellerId", + "refundPaymentData" + ] +} diff --git a/masterdata/orderRefundDetails/schema.json b/masterdata/orderRefundDetails/schema.json new file mode 100644 index 000000000..0de268bad --- /dev/null +++ b/masterdata/orderRefundDetails/schema.json @@ -0,0 +1,72 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "orderRefundDetails", + "description": "Schema for order refund details", + "type": "object", + "properties": { + "orderID": { + "type": "string", + "description": "The unique identifier for the order." + }, + "initialInvoicedAmount": { + "type": "number", + "minimum": 0, + "description": "The initial amount invoiced for the order." + }, + "amountToBeRefundedInProcess": { + "type": "number", + "minimum": 0, + "description": "The amount that is currently being refunded for the order." + }, + "totalRefunded": { + "type": "number", + "minimum": 0, + "description": "Total amount that has been refunded so far for the order." + }, + "remainingRefundableAmount": { + "type": "number", + "minimum": 0, + "description": "The remaining amount that can be refunded for the order." + }, + "initialShippingCost": { + "type": "number", + "minimum": 0, + "description": "The inital shipping cost for the order." + }, + "shippingCostToBeRefundedInProcess": { + "type": "number", + "minimum": 0, + "description": "The shipping cost that is currently being refunded for the order." + }, + "totalShippingCostRefunded": { + "type": "number", + "minimum": 0, + "description": "Total shipping cost that has been refunded so far for the order." + }, + "remainingRefundableShippingCost": { + "type": "number", + "minimum": 0, + "description": "The remaining shipping cost that can be refunded for the order." + }, + "lastUpdated": { + "type": "string", + "format": "date-time", + "description": "The date and time when the refund details were last updated." + } + }, + "required": [ + "orderID", + "initialInvoicedAmount", + "amountToBeRefundedInProcess", + "lastUpdated" + ], + "v-default-fields": [ + "orderID", + "initialInvoicedAmount", + "totalRefunded", + "remainingRefundableAmount", + "lastUpdated" + ], + "v-indexed": ["orderID"], + "v-immediate-indexing": true +} diff --git a/masterdata/returnRequest/schema.json b/masterdata/returnRequest/schema.json index 1b3a06b2b..1a913c923 100644 --- a/masterdata/returnRequest/schema.json +++ b/masterdata/returnRequest/schema.json @@ -1,8 +1,17 @@ { + "$schema": "http://json-schema.org/schema#", + "title": "returnRequest", + "type": "object", "properties": { "orderId": { "type": "string" }, + "orderSellerId": { + "type": "string" + }, + "sellerName": { + "type": "string" + }, "refundableAmount": { "type": "integer" }, @@ -261,6 +270,17 @@ } }, "required": ["currencyCode", "locale"] + }, + "logisticsInfo": { + "type": "object", + "properties": { + "currier": { + "type": "string" + }, + "sla": { + "type": "string" + } + } } }, "$defs": { @@ -274,7 +294,7 @@ "packageVerified", "amountRefunded", "denied", - "cancelled" + "canceled" ] } }, @@ -300,7 +320,8 @@ "orderId", "sequenceNumber", "dateSubmitted", - "status" + "status", + "sellerName" ], "v-indexed": [ "id", @@ -309,7 +330,8 @@ "customerProfileData", "status", "sequenceNumber", - "dateSubmitted" + "dateSubmitted", + "sellerName" ], "v-immediate-indexing": true } diff --git a/masterdata/sellerSetting/schema.json b/masterdata/sellerSetting/schema.json new file mode 100644 index 000000000..92d33b475 --- /dev/null +++ b/masterdata/sellerSetting/schema.json @@ -0,0 +1,83 @@ +{ + "$schema": "http://json-schema.org/schema#", + "title": "sellerSetting", + "type": "object", + "properties": { + "sellerId": { + "type": "string" + }, + "parentAccount": { + "type": "string" + }, + "maxDays": { + "type": "integer" + }, + "excludedCategories": { + "type": "array" + }, + "paymentOptions": { + "type": "object", + "properties": { + "enablePaymentMethodSelection": { + "type": "boolean" + }, + "allowedPaymentTypes": { + "type": "object", + "properties": { + "bank": { + "type": "boolean" + }, + "card": { + "type": "boolean" + }, + "giftCard": { + "type": "boolean" + } + } + }, + "automaticallyRefundPaymentMethod": { + "type": "boolean" + } + } + }, + "termsUrl": { + "type": "string" + }, + "customReturnReasons": { + "type": "array", + "properties": { + "reason": { + "type": "string" + }, + "maxDays": { + "type": "integer" + } + } + }, + "options": { + "type": "object", + "properties": { + "enableOtherOptionSelection": { + "type": "boolean" + }, + "enablePickupPoints": { + "type": "boolean" + }, + "enableProportionalShippingValue": { + "type": "boolean" + }, + "enableSelectItemCondition": { + "type": "boolean" + } + } + }, + "orderStatus": { + "type": "string" + } + }, + "required": ["sellerId"], + "v-cache": false, + "v-default-fields": ["id", "createdIn", "sellerId", "parentAccount"], + "v-indexed": ["id", "createdIn", "sellerId", "parentAccount"], + "v-immediate-indexing": true +} diff --git a/masterdata/sellerSetting/security.json b/masterdata/sellerSetting/security.json new file mode 100644 index 000000000..b58836cc6 --- /dev/null +++ b/masterdata/sellerSetting/security.json @@ -0,0 +1,3 @@ +{ + "allowGetAll": true +} diff --git a/messages/.DS_Store b/messages/.DS_Store new file mode 100644 index 000000000..75494ba22 Binary files /dev/null and b/messages/.DS_Store differ diff --git a/messages/bg.json b/messages/bg.json index 0542664c6..2d7c1c05e 100644 --- a/messages/bg.json +++ b/messages/bg.json @@ -53,107 +53,26 @@ "store/return-app.link": "Моите връщания", "store/return-app.request-return.page.header": "Заявка за ново връщане", "store/return-app.request-return.page.header.subtitle": "Изберете поръчка, за да започнете процеса на заявка на връщане", - "store/return-app.return-order-list.table-header.order-id": "ИД на поръчката", - "store/return-app.return-order-list.table-header.creation-date": "Дата на създаване", - "store/return-app.return-order-list.table-header.items-to-return": "Налични артикули за връщане", - "store/return-app.return-order-list.table-header.select-order": "Избор на поръчка", - "store/return-app.return-order-list.table-empty-state-label.no-orders-available": "Няма налични поръчки за връщане", - "store/return-app.return-order-list.table-pagination.text-of": "от", - "store/return-app.return-order-details.page-header.link": "Назад към поръчки", - "store/return-app.return-order-details.page-header.title": "Формуляр за заявка на връщане", - "store/return-app.return-order-details.page-header.subtitle": "Изберете продуктите, за които искате да възстановите сума", - "store/return-app.return-order-details.section-products": "Продукти, достъпни за връщане", - "store/return-app.return-order-details.section-details": "Подробности за контакт", - "store/return-app.return-order-details.section-payment": "Начин на плащане на възстановената сума", - "store/return-app.return-order-details.page-header.creation-date": "Дата на създаване", - "store/return-app.return-order-details.table-header.product": "Продукт", - "store/return-app.return-order-details.table-header.quantity": "Количество", - "store/return-app.return-order-details.table-header.available-to-return": "Налично за връщане", - "store/return-app.return-order-details.table-header.quantity-to-return": "Количество за връщане", - "store/return-app.return-order-details.table-header.reason": "Причина", - "store/return-app.return-order-details.table-header.condition": "Условие", + "return-app.return-order-list.table-header.order-id": "ИД на поръчката", + "return-app.return-order-list.table-header.creation-date": "Дата на създаване", + "return-app.return-order-list.table-header.items-to-return": "Налични артикули за връщане", + "return-app.return-order-list.table-header.select-order": "Избор на поръчка", + "return-app.return-order-list.table-empty-state-label.no-orders-available": "Няма налични поръчки за връщане", + "return-app.return-order-list.table-pagination.text-of": "от", + "return-app.return-order-list.table-header.linkLabel": "Обратно към връщанията", + "return-app.return-order-list.page-header.title": "Списък на поръчките", + "return-app.return-order-list.table-header.seller-name": "Име на продавача", + "return-app.return-order-list.page-header.subTitle": "Всички върнати поръчки. Щракнете върху идентификационния номер на поръчката, за да създадете връщане.", "return-app.return-order-details.conditions.new-with-box": "Ново с кутия", "return-app.return-order-details.conditions.new-without-box": "Ново без кутия", "return-app.return-order-details.conditions.used-with-box": "Използвано с кутия", "return-app.return-order-details.conditions.used-without-box": "Използвано без кутия", "return-app.return-order-details.dropdown-conditions.placeholder.select-condition": "Избор на условие", - "store/return-app.return-order-details.dropdown-reasons.accidental-order": "Случайно поръчване", - "store/return-app.return-order-details.dropdown-reasons.better-price": "По-добра цена", - "store/return-app.return-order-details.dropdown-reasons.performance": "Представяне", - "store/return-app.return-order-details.dropdown-reasons.incompatible": "Несъвместимо", - "store/return-app.return-order-details.dropdown-reasons.item-damaged": "Повреден артикул", - "store/return-app.return-order-details.dropdown-reasons.missed-delivery": "Пропусната доставка", - "store/return-app.return-order-details.dropdown-reasons.missing-parts": "Липсващи части", - "store/return-app.return-order-details.dropdown-reasons.box-damaged": "Повредена кутия", - "store/return-app.return-order-details.dropdown-reasons.different-product": "Различен продукт", - "store/return-app.return-order-details.dropdown-reasons.defective": "Дефектно", - "store/return-app.return-order-details.dropdown-reasons.arrived-in-addition": "Пристигнало в допълнение", - "store/return-app.return-order-details.dropdown-reasons.no-longer-needed": "Вече не е необходимо", - "store/return-app.return-order-details.dropdown-reasons.unauthorized-purchase": "Неразрешена покупка", - "store/return-app.return-order-details.dropdown-reasons.different-from-website": "Различно от това на уеб страницата", - "store/return-app.return-order-details.dropdown-reasons.other-reason": "Друга причина", - "store/return-app.return-order-details.dropdown-reasons.placeholder.select-reason": "Избор на причина", - "store/return-app.return-order-details.error.order-not-invoiced": "Поръчката не е фактурирана", - "store/return-app.return-order-details.error.out-of-max-days": "Поръчката надхвърля максималния период за връщане", - "store/return-app.return-order-details.error.order-not-found": "Няма намерена поръчка", - "store/return-app.return-order-details.error.forbidden": "Нямате достъп до тази поръчка", - "store/return-app.return-order-details.error.unknown": "Неуспешно действие. Моля, опитайте отново.", - "store/return-app.return-order-details.title.contact-details": "Подробности за контакт", - "store/return-app.return-order-details.inputs.name-input": "Име", - "store/return-app.return-order-details.inputs.email-input": "Имейл адрес", - "store/return-app.return-order-details.inputs.phone-input": "Телефон", - "store/return-app.return-order-details.title.pickup-address": "Адрес за доставка", - "store/return-app.return-order-details.title.tooltip.pickup-address": "Избор на адреса за доставка, който искате, за доставяне или вземане", - "store/return-app.return-order-details.title.extra-comment": "Допълнителни коментари", - "store/return-app.return-order-details.inputs.address-input": "Адрес", - "store/return-app.return-order-details.inputs.city-input": "Град", - "store/return-app.return-order-details.inputs.state-input": "Щат", - "store/return-app.return-order-details.inputs.zip-input": "Пощенски Код", - "store/return-app.return-order-details.inputs.country-input": "Държава", - "store/return-app.return-order-details.setting-provider.error.retry-action": "Опитайте отново", - "store/return-app.return-order-details.setting-provider.error": "Възникна грешка при зареждането на настройките на приложението.", - "store/return-app.return-order-details.payment-options.card": "Карта", - "store/return-app.return-order-details.payment-options.bank": "Банка", - "store/return-app.return-order-details.payment-options.gift-card": "Подаръчна карта", - "store/return-app.return-order-details.payment-method.description": "Изберете начина на плащане, по който да ви бъде възстановена сумата", - "store/return-app.return-order-details.payment-method.default": "Възстановената сума ще бъде изпратена съгласно начина на плащане, използван за тази поръчка", - "store/return-app.return-order-details.payment-method.account-holder": "Име на титуляра на сметката", - "store/return-app.return-order-details.payment-method.iban": "IBAN", - "store/return-app.return-order-details.terms-and-conditions.form-agree": "Прочетох и приемам {link}", - "store/return-app.return-order-details.terms-and-conditions.link": "общи условия", - "store/return-app.return-order-details.button.next": "Напред", - "store/return-app.return-order-details.page-header.order-id": "ИД на поръчка", - "store/return-app.return-item-details.excluded-items.warning": "Магазинът не разрешава връщането на този продукт", - "store/return-app.return-item-details.dropdown-reason.error": "Причината е задължителна", - "store/return-app.return-item-details.dropdown-condition.error": "Условието е задължително", - "store/return-app.return-payment-methods.input-payment-method.error": "Начинът на плащане е задължителен", - "store/return-app.return-payment-methods.input-iban.error": "IBAN е задължителен", - "store/return-app.return-payment-methods.input-account-holder.error": "Титулярът на сметката е задължителен", - "store/return-app.return-terms-and-conditions.checkbox.error": "Моля, приемете общите условия.", - "store/return-app.return-items-list.no-items-selected.error": "Няма избрани артикули", - "store/return-app.return-address-details.address-input.error": "Адресът е задължителен", - "store/return-app.return-address-details.city-input.error": "Градът е задължителен", - "store/return-app.return-address-details.state-input.error": "Щатът е задължителен", - "store/return-app.return-address-details.zip-input.error": "Пощенският код е задължителен", - "store/return-app.return-address-details.country-input.error": "Държавата е задължителна", - "store/return-app.return-contact-details.name-input.error": "Изисква се име", - "store/return-app.return-contact-details.phone-input.error": "Телефонът е задължителен", - "store/return-app.confirm-and-submit.page-header.title": "Потвърждаване на подробностите за връщането", - "store/return-app.confirm-and-submit.refund-method.title": "Начин на плащане на възстановяване на сума", - "store/return-app.confirm-and-submit.alert.label": "Вижте списъка си с връщания", - "store/return-app.confirm-and-submit.alert.error.label": "Повторен опит", - "store/return-app.confirm-and-submit.alert.success": "Заявката за връщане беше създадена успешно.", - "store/return-app.confirm-and-submit.alert.error": "Нещо се обърка. Моля, опитайте отново.", - "store/return-app.confirm-and-submit.button.back": "Назад", - "store/return-app.confirm-and-submit.button.submit": "Подаване", - "store/return-app.confirm-and-submit.pickup-address.title": "Адрес за доставка", - "store/return-app.confirm-and-submit.contact-details.title": "Подробности за контакт", - "store/return-app.confirm-and-submit.user-comment.title": "Коментар", - "store/return-app.confirm-payment-methods.refund-method.p-account-holder-name": "Име на получателя: ", - "store/return-app.confirm-payment-methods.refund-method.p-iban": "Банков превод към сметка: ", - "store/return-app.confirm-payment-methods.refund-method.p-same-as-purchase": "Същото като при покупката", - "store/return-app.return-information-table.table-row.p-condition": "Условие:", - "store/return-app.return-information-table.table-row.p-reason": "Причина:", + "return-app.return-order-details.inputs.address-input": "Адрес", + "return-app.return-order-details.inputs.city-input": "Град", + "return-app.return-order-details.inputs.state-input": "Щат", + "return-app.return-order-details.inputs.zip-input": "Пощенски Код", + "return-app.return-order-details.inputs.country-input": "Държава", "admin/return-app.settings.section.payment-options.available-payment-methods.card": "Кредитна карта", "admin/return-app.settings.section.payment-options.available-payment-methods.gift-card": "Подаръчна карта", "admin/return-app.settings.section.payment-options.available-payment-methods.bank": "Банков превод", @@ -180,7 +99,7 @@ "return-app-status.package-verified": "Пакетът е потвърден", "return-app-status.refunded": "Възстановена сума", "return-app-status.denied": "Отказана", - "return-app-status.cancelled": "Отменено", + "return-app-status.canceled": "Отменено", "admin/return-app.return-request-details.verify-items.button": "потвърждаване на артикули", "admin/return-app.return-request-details.verify-items.action.confirm": "Актуализиране на статуса", "admin/return-app.return-request-details.verify-items.action.cancel": "Отказ", @@ -213,7 +132,6 @@ "return-app.return-request-details.table.product-info.sold-by": "Продавано от: {seller}", "return-app.return-request-details.table.product-info.condition": "Condition: {condition}", "return-app.return-request-details.table.verification-status.denied": "Отказана", - "return-app.return-request-details.table.verification-status.cancelled": "Отменено", "return-app.return-request-details.table.verification-status.approved": "Одобрени", "return-app.return-request-details.table.verification-status.new": "Нов", "return-app.return-request-details.table.verification-status.partially-approved": "Частично одобрени {quantityRefunded}/{quantity}", @@ -267,7 +185,7 @@ "return-app-status.timeline.package-verified": "Пакетът е потвърден", "return-app-status.timeline.refunded": "Възстановена сума", "return-app-status.timeline.denied": "Отказана", - "return-app-status.timeline.cancelled": "Отменено", + "return-app-status.timeline.canceled": "Отменено", "admin/return-app.return-request-list.page-header.title": "Списък със заявки за връщане", "admin/return-app.return-request-list.page-header.subTitle": "Всички заявки за връщане, създадени от потребители на магазина. Кликнете ИД на заявката, за да видите повече.", "return-app.return-request-list.error.title": "Грешка при зареждането на списъка", @@ -278,6 +196,7 @@ "return-app.return-request-list.table-data.requestId": "ИД на заявката", "return-app.return-request-list.table-data.sequenceNumber": "Номер на поредността", "return-app.return-request-list.table-data.orderId": "ИД на поръчка", + "return-app.return-request-list.table-data.sellerName": "Seller ID", "return-app.return-request-list.table-data.createdDate": "Дата на създаване", "return-app.return-request-list.table-data.status": "Статус", "return-app.return-request-list.table-filters.fromDate": "От дата", @@ -288,7 +207,7 @@ "return-app.return-request-list.table-jumpToPage.cta": "НАПРЕД", "store/return-app.return-request-list.page-header.title": "Моите връщания", "store/return-app.return-request-list.page-header.goBack": "Назад", - "store/return-app.return-request-list.page-header.cta": "Нова заявка", + "return-app.return-request-list.page-header.cta": "Нова заявка", "return-app.return-request-list.table.status.new": "Нов", "return-app.return-request-list.table.status.processing": "Обработка", "return-app.return-request-list.table.status.pickedup-from-client": "Взето от клиент", @@ -296,7 +215,7 @@ "return-app.return-request-list.table.status.package-verified": "Пакетът е потвърден", "return-app.return-request-list.table.status.refunded": "Възстановена сума", "return-app.return-request-list.table.status.denied": "Отказана", - "return-app.return-request-list.table.status.cancelled": "Отменено", + "return-app.return-request-list.table.status.canceled": "Отменено", "return-app.return-request-list.table.status.allStatus": "Статус", "return-app.return-request-details.table.status-history.header.created-at": "Създадена на", "return-app.return-request-details.table.status-history.header.status": "Статус", @@ -307,6 +226,7 @@ "return-app.return-request-details.order-id.link": "Поръчка {orderId}", "return-app.return-request-details.current-status.request-id": "ИД на заявката: {id}", "return-app.return-request-details.current-status.status": "Статус:", + "return-app.return-request-details.current-status.sellerName": "SellerName: {sellerName}", "admin/return-app.return-request-list.table-data.requestId.tooltip": "Клиентите виждат ИД на заявката си вътре в подробностите за заявката", "admin/return-app.settings.modal-warning.title": "Моля, прегледайте настройките си", "admin/return-app.settings.modal-warning.first-paragraph": "Изглежда се опитвате да запазите персонализирани опции за връщане, никоя от които не достига {maxDays}. Това е максималният набор дни за връщане.", @@ -314,10 +234,6 @@ "admin/return-app.settings.modal-warning.third-paragraph": "Ако кликнете \"Редактиране\", максималният брой дни за връщане ще бъде намален от {maxDays} на {customMaxDays}. Това е функцията \"Максимален брой дни\", която се показва в персонализиранните ви опции за връщане.", "admin/return-app.settings.modal-warning.confirm": "Редактиране", "admin/return-app.settings.modal-warning.cancel": "Отказ", - "store/return-app.return-order-details.pickup-address.drop-off-points": "Изберете точка за оставяне", - "store/return-app.return-order-details.pickup-address.drop-off-points.tooltip": "Можете да върнете артикулите си в една от избраните точки за оставяне", - "store/return-app.return-order-details.pickup-address.drop-off-points.dropdown.placehoder": "Изберете точка за оставяне", - "store/return-app.return-order-details.pickup-address.drop-off-points.dropdown.error": "Възникна грешка при зареждането на точките за оставяне", "admin/return-app.return-request-details.localized-product-name.tooltip": "Оригинално име на артикула от поръчката", "admin/return-app.settings.section.payment-options.refund-method-strategy.checkbox.label": "Автоматично възстановяване на суми по заявки", "admin/return-app.settings.section.payment-options.refund-method-strategy.checkbox.description": "Автоматично създаване на фактура за връщане в OMS за заявките", @@ -328,5 +244,105 @@ "return-app.return-request-details.cancellation.modal.adminAllow": "

Внимание: Статусът на тази заявка ще бъде зададен като ОТКАЗАНА.

Това ще извести потребителя по имейл и ще му позволи да създаде нова заявка за възстановяване на сума с артикулите от отказаната заявка.

Ако не това е намерението ви, задайте заявката като ОТХВЪРЛЕНА.

", "return-app.return-request-details.cancellation.modal.adminRefuse": "

За съжаление, не е възможно да откажете тази заявка заради текущия ѝ статус.

", "return-app.return-request-details.cancellation.modal.storeAllow": "

Отказването на тази заявка ще позволи използването на текущите артикули в нова заявка за възстановяване.

Това действие е необратимо.

", - "return-app.return-request-details.cancellation.modal.storeRefuse": "

За съжаление, трябва да се свържете с екипа по поддръжката, за да откажете тази заявка заради текущия ѝ статус.

" + "return-app.return-request-details.cancellation.modal.storeRefuse": "

За съжаление, трябва да се свържете с екипа по поддръжката, за да откажете тази заявка заради текущия ѝ статус.

", + "return-app.return-order-details.page-header.link": "Назад към поръчките", + "return-app.return-order-details.page-header.title": "Формуляр за заявка за връщане", + "return-app.return-order-details.page-header.subtitle": "Изберете продуктите, които искате да възстановите", + "return-app.return-order-details.section-products": "Продукти, налични за връщане", + "return-app.return-order-details.section-details": "Информация за връзка", + "return-app.return-order-details.section-payment": "Начин на плащане за възстановяване", + "return-app.return-order-details.page-header.creation-date": "Дата на създаване", + "return-app.return-order-details.table-header.product": "Продукт", + "return-app.return-order-details.table-header.quantity": "Количество", + "return-app.return-order-details.table-header.available-to-return": "Наличен за връщане", + "return-app.return-order-details.table-header.quantity-to-return": "Количество за връщане", + "return-app.return-order-details.table-header.reason": "Причина", + "return-app.return-order-details.table-header.condition": "Състояние", + "return-app.return-order-details.dropdown-reasons.accidental-order": "Случайна поръчка", + "return-app.return-order-details.dropdown-reasons.better-price": "По-добра цена", + "return-app.return-order-details.dropdown-reasons.performance": "производителност", + "return-app.return-order-details.dropdown-reasons.incompatible": "Несъвместим", + "return-app.return-order-details.dropdown-reasons.item-damaged": "Повреден артикул", + "return-app.return-order-details.dropdown-reasons.missed-delivery": "Пропусната доставка", + "return-app.return-order-details.dropdown-reasons.missing-parts": "Липсващи части", + "return-app.return-order-details.dropdown-reasons.box-damaged": "Повредена кутия", + "return-app.return-order-details.dropdown-reasons.different-product": "Различен продукт", + "return-app.return-order-details.dropdown-reasons.defective": "Дефектен", + "return-app.return-order-details.dropdown-reasons.arrived-in-addition": "Пристигна като екстра", + "return-app.return-order-details.dropdown-reasons.no-longer-needed": "Не е нужно повече", + "return-app.return-order-details.dropdown-reasons.unauthorized-purchase": "Неразрешена покупка", + "return-app.return-order-details.dropdown-reasons.different-from-website": "Различно от уебсайта", + "return-app.return-order-details.dropdown-reasons.other-reason": "Друга причина", + "return-app.return-order-details.dropdown-reasons.placeholder.select-reason": "Изберете причина", + "return-app.return-order-details.title.contact-details": "Данни за контакт", + "return-app.return-order-details.inputs.name-input": "Име", + "return-app.return-order-details.inputs.email-input": "електронна поща", + "return-app.return-order-details.inputs.phone-input": "Телефон", + "return-app.return-order-details.title.pickup-address": "Адрес за доставка", + "return-app.return-order-details.title.tooltip.pickup-address": "Изберете адреса за доставка, който искате за доставка или получаване", + "return-app.return-order-details.title.extra-comment": "Допълнителен коментар", + "return-app.return-order-details.payment-options.card": "карта", + "return-app.return-order-details.payment-options.bank": "банка", + "return-app.return-order-details.payment-options.gift-card": "Карта за подарък", + "return-app.return-order-details.payment-method.description": "Изберете метода на плащане, към който ще бъде възстановена сумата", + "return-app.return-order-details.payment-method.default": "Сумата ще бъде възстановена по начина на плащане, използван за тази поръчка", + "return-app.return-order-details.payment-method.account-holder": "Име на титуляра на сметката", + "return-app.return-order-details.payment-method.iban": "ОТИВАХА", + "return-app.return-order-details.terms-and-conditions.form-agree": "Прочетох и приемам {link}", + "return-app.return-order-details.terms-and-conditions.link": "правила и условия", + "return-app.return-order-details.button.next": "Следващия", + "return-app.return-order-details.page-header.order-id": "ID на поръчката", + "return-app.return-item-details.excluded-items.warning": "Магазинът не позволява връщане на този продукт", + "return-app.return-item-details.dropdown-reason.error": "Изисква се причина", + "return-app.return-item-details.dropdown-condition.error": "Изисква се условие", + "return-app.return-payment-methods.input-payment-method.error": "Изисква се начин на плащане", + "return-app.return-payment-methods.input-iban.error": "Изисква се IBAN", + "return-app.return-payment-methods.input-iban-invalid.error": "IBAN не е валиден", + "return-app.return-payment-methods.input-account-holder.error": "Изисква се титуляр на акаунт", + "return-app.return-terms-and-conditions.checkbox.error": "Моля, приемете правилата и условията.", + "return-app.return-items-list.no-items-selected.error": "Няма избрани елементи", + "return-app.return-address-details.address-input.error": "Изисква се адрес", + "return-app.return-address-details.city-input.error": "Изисква се град", + "return-app.return-address-details.state-input.error": "Държавата е задължителна", + "return-app.return-address-details.zip-input.error": "Изисква се пощенски код", + "return-app.return-address-details.country-input.error": "Изисква се държава", + "return-app.return-contact-details.name-input.error": "Името е задължително", + "return-app.return-contact-details.phone-input.error": "Изисква се телефон", + "return-app.confirm-and-submit.page-header.title": "Потвърдете подробностите за връщане", + "return-app.confirm-and-submit.refund-method.title": "Начин на плащане за възстановяване", + "return-app.confirm-and-submit.alert.label": "Вижте вашия списък за връщане", + "return-app.confirm-and-submit.alert.error.label": "Опитайте отново", + "return-app.confirm-and-submit.alert.success": "Заявката за връщане е създадена успешно.", + "return-app.confirm-and-submit.alert.error": "Нещо се обърка. Моля, опитайте отново.", + "return-app.confirm-and-submit.button.back": "обратно", + "return-app.confirm-and-submit.button.submit": "Изпращане", + "return-app.confirm-and-submit.pickup-address.title": "Адрес за доставка", + "return-app.confirm-and-submit.contact-details.title": "Данни за контакт", + "return-app.confirm-and-submit.user-comment.title": "Коментирайте", + "return-app.confirm-payment-methods.refund-method.p-account-holder-name": "Име на получател:", + "return-app.confirm-payment-methods.refund-method.p-iban": "Банков превод по сметка:", + "return-app.confirm-payment-methods.refund-method.p-same-as-purchase": "Същото като при покупка", + "return-app.return-information-table.table-row.p-condition": "Състояние:", + "return-app.return-information-table.table-row.p-reason": "причина:", + "return-app.return-order-details.pickup-address.drop-off-points": "Изберете точка за пускане", + "return-app.return-order-details.pickup-address.drop-off-points.tooltip": "Можете да върнете артикулите си в един от нашите избрани пунктове за връщане", + "return-app.return-order-details.pickup-address.drop-off-points.dropdown.placehoder": "Изберете точка за пускане", + "return-app.return-order-details.pickup-address.drop-off-points.dropdown.error": "Възникна грешка при зареждането на точките за връщане", + "return-app.return-request-list.table-filters.export-returns": "ЕКСПОРТИРАЙ", + "admin/return-app.sellers.settings.navigation.label": "Настройки за връщане на продавачи", + "admin/return-app.sellers-settings-list.page-header.title": "Списък с настройки на продавачите", + "admin/return-app.sellers-settings-list.page-header.subTitle": "Всички настройки, създадени от продавачите, връщат приложението. Щракнете върху ID на настройките, за да видите повече.", + "admin/return-app.return-add.page-header.title": "Ново завръщане", + "admin/return-app.return-add.page-header.subTitle": "Изберете артикул, за да започнете процеса на заявка за връщане.", + "return-app.sellers-settings-list.table-data.settingId": "ИД на настройка", + "store/return-app.return-order-details.error.order-not-invoiced": "Поръчката не е фактурирана", + "store/return-app.return-order-details.setting-provider.error.retry-action": "Опитайте отново", + "store/return-app.return-order-details.setting-provider.error": "Възникна грешка при зареждането на настройките на приложението.", + "store/return-app.return-order-details.error.out-of-max-days": "Поръчката надхвърля максималния период за връщане", + "store/return-app.return-order-details.error.order-not-found": "Няма намерена поръчка", + "store/return-app.return-order-details.error.forbidden": "Нямате достъп до тази поръчка", + "store/return-app.return-order-details.error.unknown": "Неуспешно действие. Моля, опитайте отново.", + "admin/return-app.settings.order-status.label": "Статус на поръчката", + "admin/return-app.settings.order-status.placeholder": "Изберете Опция", + "return-app.return-request-list.table-data.searchBySellerName": "Име на продавача" } diff --git a/messages/context.json b/messages/context.json index 428dda41d..3505998c6 100644 --- a/messages/context.json +++ b/messages/context.json @@ -6,6 +6,8 @@ "admin/return-app.settings.error.header": "Error loading settings", "admin/return-app.settings.error.description": "There was an error loading the application settings. Please try to reload the page.", "admin/return-app.settings.terms.label": "Terms and conditions URL:", + "admin/return-app.settings.order-status.label": "Order Status", + "admin/return-app.settings.order-status.placeholder": "Select Option", "admin/return-app.settings.section.payment-options.available-payment-methods.header": "Available payment methods:", "admin/return-app.settings.section.payment-options.enable-payment-method-selection.description": "Prevent the customer from selecting a different payment method", "admin/return-app.settings.section.payment-options.enable-payment-method-selection.label.uncheck": "Same as order", @@ -53,108 +55,103 @@ "store/return-app.link": "My Returns", "store/return-app.request-return.page.header": "Request a new return", "store/return-app.request-return.page.header.subtitle": "Select an order to start the return request process", - "store/return-app.return-order-list.table-header.order-id": "OrderId", - "store/return-app.return-order-list.table-header.creation-date": "Creation Date", - "store/return-app.return-order-list.table-header.items-to-return": "Available Items To Return", - "store/return-app.return-order-list.table-header.select-order": "Select Order", - "store/return-app.return-order-list.table-empty-state-label.no-orders-available": "No orders available for return", - "store/return-app.return-order-list.table-pagination.text-of": "Text of", - "store/return-app.return-order-details.page-header.link": "Back to orders", - "store/return-app.return-order-details.page-header.title": "Return request form", - "store/return-app.return-order-details.page-header.subtitle": "Select the Product(s) you want to make a Refund", - "store/return-app.return-order-details.section-products": "Products available for return", - "store/return-app.return-order-details.section-details": "Contact information", - "store/return-app.return-order-details.section-payment": "Refund payment method", - "store/return-app.return-order-details.page-header.creation-date": "Creation Date", - "store/return-app.return-order-details.table-header.product": "Product", - "store/return-app.return-order-details.table-header.quantity": "Quantity", - "store/return-app.return-order-details.table-header.available-to-return": "Available to return", - "store/return-app.return-order-details.table-header.quantity-to-return": "Quantity to return", - "store/return-app.return-order-details.table-header.reason": "Reason", - "store/return-app.return-order-details.table-header.condition": "Condition", + "return-app.return-order-list.table-header.order-id": "OrderId", + "return-app.return-order-list.table-header.seller-name": "Seller name", + "return-app.return-order-list.table-header.linkLabel": "Back to returns", + "return-app.return-order-list.table-header.creation-date": "Creation Date", + "return-app.return-order-list.table-header.items-to-return": "Available Items To Return", + "return-app.return-order-list.table-header.select-order": "Select Order", + "return-app.return-order-list.table-empty-state-label.no-orders-available": "No orders available for return", + "return-app.return-order-list.table-pagination.text-of": "Text of", + "return-app.return-order-details.page-header.link": "Back to orders", + "return-app.return-order-details.page-header.title": "Return request form", + "return-app.return-order-details.page-header.subtitle": "Select the Product(s) you want to make a Refund", + "return-app.return-order-details.section-products": "Products available for return", + "return-app.return-order-details.section-details": "Contact information", + "return-app.return-order-details.section-payment": "Refund payment method", + "return-app.return-order-details.page-header.creation-date": "Creation Date", + "return-app.return-order-details.table-header.product": "Product", + "return-app.return-order-details.table-header.quantity": "Quantity", + "return-app.return-order-details.table-header.available-to-return": "Available to return", + "return-app.return-order-details.table-header.quantity-to-return": "Quantity to return", + "return-app.return-order-details.table-header.reason": "Reason", + "return-app.return-order-details.table-header.condition": "Condition", "return-app.return-order-details.conditions.new-with-box": "New with box", "return-app.return-order-details.conditions.new-without-box": "New without box", "return-app.return-order-details.conditions.used-with-box": "Used with box", "return-app.return-order-details.conditions.used-without-box": "Used without box", "return-app.return-order-details.dropdown-conditions.placeholder.select-condition": "Select condition", - "store/return-app.return-order-details.dropdown-reasons.accidental-order": "Accidental order", - "store/return-app.return-order-details.dropdown-reasons.better-price": "Better price", - "store/return-app.return-order-details.dropdown-reasons.performance": "Performance", - "store/return-app.return-order-details.dropdown-reasons.incompatible": "Incompatible", - "store/return-app.return-order-details.dropdown-reasons.item-damaged": "Item damaged", - "store/return-app.return-order-details.dropdown-reasons.missed-delivery": "Missed delivery", - "store/return-app.return-order-details.dropdown-reasons.missing-parts": "Missing parts", - "store/return-app.return-order-details.dropdown-reasons.box-damaged": "Box damaged", - "store/return-app.return-order-details.dropdown-reasons.different-product": "Different product", - "store/return-app.return-order-details.dropdown-reasons.defective": "Defective", - "store/return-app.return-order-details.dropdown-reasons.arrived-in-addition": "Arrived in addition", - "store/return-app.return-order-details.dropdown-reasons.no-longer-needed": "No longer needed", - "store/return-app.return-order-details.dropdown-reasons.unauthorized-purchase": "Unauthorized purchase", - "store/return-app.return-order-details.dropdown-reasons.different-from-website": "Different from website", - "store/return-app.return-order-details.dropdown-reasons.other-reason": "Other reason", - "store/return-app.return-order-details.dropdown-reasons.placeholder.select-reason": "Select reason", - "store/return-app.return-order-details.error.order-not-invoiced": "The order is not invoiced", - "store/return-app.return-order-details.error.out-of-max-days": "The order exceeds the maximum return period", - "store/return-app.return-order-details.error.order-not-found": "Order not found", - "store/return-app.return-order-details.error.forbidden": "You don't have access to this order", - "store/return-app.return-order-details.error.unknown": "Something failed, please try again.", - "store/return-app.return-order-details.title.contact-details": "Contact details", - "store/return-app.return-order-details.inputs.name-input": "Name", - "store/return-app.return-order-details.inputs.email-input": "Email", - "store/return-app.return-order-details.inputs.phone-input": "Phone", - "store/return-app.return-order-details.title.pickup-address": "Delivery address", - "store/return-app.return-order-details.title.tooltip.pickup-address": "Select the Shipping Address you want to deliver or have your items picked up at", - "store/return-app.return-order-details.title.extra-comment": "Extra comment", - "store/return-app.return-order-details.inputs.address-input": "Address", - "store/return-app.return-order-details.inputs.city-input": "City", - "store/return-app.return-order-details.inputs.state-input": "State", - "store/return-app.return-order-details.inputs.zip-input": "Zip", - "store/return-app.return-order-details.inputs.country-input": "Country", - "store/return-app.return-order-details.setting-provider.error.retry-action": "Try again", - "store/return-app.return-order-details.setting-provider.error": "There was an error loading app settings.", - "store/return-app.return-order-details.payment-options.card": "Card", - "store/return-app.return-order-details.payment-options.bank": "Bank", - "store/return-app.return-order-details.payment-options.gift-card": "Gift card", - "store/return-app.return-order-details.payment-method.description": "Select the Payment Method to be refunded to", - "store/return-app.return-order-details.payment-method.default": "The refund will be emitted to the payment method used for this order", - "store/return-app.return-order-details.payment-method.account-holder": "Account holder name", - "store/return-app.return-order-details.payment-method.iban": "IBAN", - "store/return-app.return-order-details.terms-and-conditions.form-agree": "I have read and accept the {link}", - "store/return-app.return-order-details.terms-and-conditions.link": "terms and conditions", - "store/return-app.return-order-details.button.next": "Next", - "store/return-app.return-order-details.page-header.order-id": "Order ID", - "store/return-app.return-item-details.excluded-items.warning": "Store does not allow this product to be returned", - "store/return-app.return-item-details.dropdown-reason.error": "Reason is required", - "store/return-app.return-item-details.dropdown-condition.error": "Condition is required", - "store/return-app.return-payment-methods.input-payment-method.error": "Payment method required", - "store/return-app.return-payment-methods.input-iban.error": "Iban is required", - "store/return-app.return-payment-methods.input-iban-invalid.error": "IBAN is not valid", - "store/return-app.return-payment-methods.input-account-holder.error": "Account holder is required", - "store/return-app.return-terms-and-conditions.checkbox.error": "Accept terms and conditions, please.", - "store/return-app.return-items-list.no-items-selected.error": "No items selected", - "store/return-app.return-address-details.address-input.error": "Address is required", - "store/return-app.return-address-details.city-input.error": "City is required", - "store/return-app.return-address-details.state-input.error": "State is required", - "store/return-app.return-address-details.zip-input.error": "Zip is required", - "store/return-app.return-address-details.country-input.error": "Country is required", - "store/return-app.return-contact-details.name-input.error": "Name is required", - "store/return-app.return-contact-details.phone-input.error": "Phone is required", - "store/return-app.confirm-and-submit.page-header.title": "Confirm Return Details", - "store/return-app.confirm-and-submit.refund-method.title": "Refund payment method", - "store/return-app.confirm-and-submit.alert.label": "See your returns list", - "store/return-app.confirm-and-submit.alert.error.label": "Retry", - "store/return-app.confirm-and-submit.alert.success": "The return request was created successfully.", - "store/return-app.confirm-and-submit.alert.error": "Something went wrong, please try again.", - "store/return-app.confirm-and-submit.button.back": "Back", - "store/return-app.confirm-and-submit.button.submit": "Submit", - "store/return-app.confirm-and-submit.pickup-address.title": "Delivery address", - "store/return-app.confirm-and-submit.contact-details.title": "Contact details", - "store/return-app.confirm-and-submit.user-comment.title": "Comment", - "store/return-app.confirm-payment-methods.refund-method.p-account-holder-name": "Beneficiary name: ", - "store/return-app.confirm-payment-methods.refund-method.p-iban": "Bank transfer into account: ", - "store/return-app.confirm-payment-methods.refund-method.p-same-as-purchase": "Same as purchase", - "store/return-app.return-information-table.table-row.p-condition": "Condition:", - "store/return-app.return-information-table.table-row.p-reason": "Reason:", + "return-app.return-order-details.dropdown-reasons.accidental-order": "Accidental order", + "return-app.return-order-details.dropdown-reasons.better-price": "Better price", + "return-app.return-order-details.dropdown-reasons.performance": "Performance", + "return-app.return-order-details.dropdown-reasons.incompatible": "Incompatible", + "return-app.return-order-details.dropdown-reasons.item-damaged": "Item damaged", + "return-app.return-order-details.dropdown-reasons.missed-delivery": "Missed delivery", + "return-app.return-order-details.dropdown-reasons.missing-parts": "Missing parts", + "return-app.return-order-details.dropdown-reasons.box-damaged": "Box damaged", + "return-app.return-order-details.dropdown-reasons.different-product": "Different product", + "return-app.return-order-details.dropdown-reasons.defective": "Defective", + "return-app.return-order-details.dropdown-reasons.arrived-in-addition": "Arrived in addition", + "return-app.return-order-details.dropdown-reasons.no-longer-needed": "No longer needed", + "return-app.return-order-details.dropdown-reasons.unauthorized-purchase": "Unauthorized purchase", + "return-app.return-order-details.dropdown-reasons.different-from-website": "Different from website", + "return-app.return-order-details.dropdown-reasons.other-reason": "Other reason", + "return-app.return-order-details.dropdown-reasons.placeholder.select-reason": "Select reason", + "return-app.return-order-details.title.contact-details": "Contact details", + "return-app.return-order-details.inputs.name-input": "Name", + "return-app.return-order-details.inputs.email-input": "Email", + "return-app.return-order-details.inputs.phone-input": "Phone", + "return-app.return-order-details.title.pickup-address": "Delivery address", + "return-app.return-order-details.title.tooltip.pickup-address": "Select the Shipping Address you want to deliver or have your items picked up at", + "return-app.return-order-details.title.extra-comment": "Extra comment", + "return-app.return-order-details.inputs.address-input": "Address", + "return-app.return-order-details.inputs.city-input": "City", + "return-app.return-order-details.inputs.state-input": "State", + "return-app.return-order-details.inputs.zip-input": "Zip", + "return-app.return-order-details.inputs.country-input": "Country", + "return-app.return-order-details.payment-options.card": "Card", + "return-app.return-order-details.payment-options.bank": "Bank", + "return-app.return-order-details.payment-options.gift-card": "Gift card", + "return-app.return-order-details.payment-method.description": "Select the Payment Method to be refunded to", + "return-app.return-order-details.payment-method.default": "The refund will be emitted to the payment method used for this order", + "return-app.return-order-details.payment-method.account-holder": "Account holder name", + "return-app.return-order-details.payment-method.iban": "IBAN", + "return-app.return-order-details.terms-and-conditions.form-agree": "I have read and accept the {link}", + "return-app.return-order-details.terms-and-conditions.link": "terms and conditions", + "return-app.return-order-details.button.next": "Next", + "return-app.return-order-details.page-header.order-id": "Order ID", + "return-app.return-item-details.excluded-items.warning": "Store does not allow this product to be returned", + "return-app.return-item-details.dropdown-reason.error": "Reason is required", + "return-app.return-item-details.dropdown-condition.error": "Condition is required", + "return-app.return-payment-methods.input-payment-method.error": "Payment method required", + "return-app.return-payment-methods.input-iban.error": "Iban is required", + "return-app.return-payment-methods.input-iban-invalid.error": "IBAN is not valid", + "return-app.return-payment-methods.input-account-holder.error": "Account holder is required", + "return-app.return-terms-and-conditions.checkbox.error": "Accept terms and conditions, please.", + "return-app.return-items-list.no-items-selected.error": "No items selected", + "return-app.return-address-details.address-input.error": "Address is required", + "return-app.return-address-details.city-input.error": "City is required", + "return-app.return-address-details.state-input.error": "State is required", + "return-app.return-address-details.zip-input.error": "Zip is required", + "return-app.return-address-details.country-input.error": "Country is required", + "return-app.return-contact-details.name-input.error": "Name is required", + "return-app.return-contact-details.phone-input.error": "Phone is required", + "return-app.confirm-and-submit.page-header.title": "Confirm Return Details", + "return-app.confirm-and-submit.refund-method.title": "Refund payment method", + "return-app.confirm-and-submit.alert.label": "See your returns list", + "return-app.confirm-and-submit.alert.error.label": "Retry", + "return-app.confirm-and-submit.alert.success": "The return request was created successfully.", + "return-app.confirm-and-submit.alert.error": "Something went wrong, please try again.", + "return-app.confirm-and-submit.button.back": "Back", + "return-app.confirm-and-submit.button.submit": "Submit", + "return-app.confirm-and-submit.pickup-address.title": "Delivery address", + "return-app.confirm-and-submit.contact-details.title": "Contact details", + "return-app.confirm-and-submit.user-comment.title": "Comment", + "return-app.confirm-payment-methods.refund-method.p-account-holder-name": "Beneficiary name: ", + "return-app.confirm-payment-methods.refund-method.p-iban": "Bank transfer into account: ", + "return-app.confirm-payment-methods.refund-method.p-same-as-purchase": "Same as purchase", + "return-app.return-information-table.table-row.p-condition": "Condition:", + "return-app.return-information-table.table-row.p-reason": "Reason:", "admin/return-app.settings.section.payment-options.available-payment-methods.card": "Credit Card", "admin/return-app.settings.section.payment-options.available-payment-methods.gift-card": "Gift Card", "admin/return-app.settings.section.payment-options.available-payment-methods.bank": "Bank Transfer", @@ -181,7 +178,7 @@ "return-app-status.package-verified": "Package Verified", "return-app-status.refunded": "Refunded", "return-app-status.denied": "Denied", - "return-app-status.cancelled": "Cancelled", + "return-app-status.canceled": "Canceled", "admin/return-app.return-request-details.verify-items.button": "verify Items", "admin/return-app.return-request-details.verify-items.action.confirm": "Update status", "admin/return-app.return-request-details.verify-items.action.cancel": "Cancel", @@ -214,7 +211,6 @@ "return-app.return-request-details.table.product-info.sold-by": "Sold by: {seller}", "return-app.return-request-details.table.product-info.condition": "Condition: {condition}", "return-app.return-request-details.table.verification-status.denied": "Denied", - "return-app.return-request-details.table.verification-status.cancelled": "Cancelled", "return-app.return-request-details.table.verification-status.approved": "Approved", "return-app.return-request-details.table.verification-status.new": "New", "return-app.return-request-details.table.verification-status.partially-approved": "Partially Approved {quantityRefunded}/{quantity}", @@ -268,7 +264,7 @@ "return-app-status.timeline.package-verified": "Package Verified", "return-app-status.timeline.refunded": "Refunded", "return-app-status.timeline.denied": "Denied", - "return-app-status.timeline.cancelled": "Cancelled", + "return-app-status.timeline.canceled": "Canceled", "admin/return-app.return-request-list.page-header.title": "App page header title", "admin/return-app.return-request-list.page-header.subTitle": "App page header subtitle", "return-app.return-request-list.error.title": "Title when the return request list has an error loading", @@ -279,6 +275,7 @@ "return-app.return-request-list.table-data.requestId": "Data title of a return request: id", "return-app.return-request-list.table-data.sequenceNumber": "Data title of a return request: sequence number", "return-app.return-request-list.table-data.orderId": "Data title of a return request: order id", + "return-app.return-request-list.table-data.sellerName": "Data title of a return request: seller name", "return-app.return-request-list.table-data.createdDate": "Data title of a return request: created date", "return-app.return-request-list.table-data.status": "Data title of a return request: status", "return-app.return-request-list.table-filters.fromDate": "Filter placeholder: from date", @@ -289,7 +286,7 @@ "return-app.return-request-list.table-jumpToPage.cta": "GO", "store/return-app.return-request-list.page-header.title": "My Returns", "store/return-app.return-request-list.page-header.goBack": "Go Back", - "store/return-app.return-request-list.page-header.cta": "New Request", + "return-app.return-request-list.page-header.cta": "New Request", "return-app.return-request-list.table.status.new": "New", "return-app.return-request-list.table.status.processing": "Processing", "return-app.return-request-list.table.status.pickedup-from-client": "Picked up from client", @@ -297,7 +294,7 @@ "return-app.return-request-list.table.status.package-verified": "Package verified", "return-app.return-request-list.table.status.refunded": "Refunded", "return-app.return-request-list.table.status.denied": "Denied", - "return-app.return-request-list.table.status.cancelled": "Cancelled", + "return-app.return-request-list.table.status.canceled": "Canceled", "return-app.return-request-list.table.status.allStatus": "Status", "return-app.return-request-details.table.status-history.header.created-at": "Created At", "return-app.return-request-details.table.status-history.header.status": "Status", @@ -308,6 +305,7 @@ "return-app.return-request-details.order-id.link": "Order {orderId}", "return-app.return-request-details.current-status.request-id": "Request id: {id}", "return-app.return-request-details.current-status.status": "Status:", + "return-app.return-request-details.current-status.sellerName": "SellerName: {sellerName}", "admin/return-app.return-request-list.table-data.requestId.tooltip": "Tooltip with an explanation of how the customer can access the data", "admin/return-app.settings.modal-warning.title": "Title of a modal to warn about max days settings", "admin/return-app.settings.modal-warning.first-paragraph": "First parahraph describing the warning", @@ -315,10 +313,10 @@ "admin/return-app.settings.modal-warning.third-paragraph": "Third parahraph describing the warning", "admin/return-app.settings.modal-warning.confirm": "Warning modal confirm CTA", "admin/return-app.settings.modal-warning.cancel": "Warning modal cancel CTA", - "store/return-app.return-order-details.pickup-address.drop-off-points": "Select a drop off point", - "store/return-app.return-order-details.pickup-address.drop-off-points.tooltip": "You can return your items in one of our selected drop off points", - "store/return-app.return-order-details.pickup-address.drop-off-points.dropdown.placehoder": "Select a drop off point", - "store/return-app.return-order-details.pickup-address.drop-off-points.dropdown.error": "There was an error loading the drop off points", + "return-app.return-order-details.pickup-address.drop-off-points": "Select a drop off point", + "return-app.return-order-details.pickup-address.drop-off-points.tooltip": "You can return your items in one of our selected drop off points", + "return-app.return-order-details.pickup-address.drop-off-points.dropdown.placehoder": "Select a drop off point", + "return-app.return-order-details.pickup-address.drop-off-points.dropdown.error": "There was an error loading the drop off points", "admin/return-app.return-request-details.localized-product-name.tooltip": "Tooltip for localized product names", "admin/return-app.settings.section.payment-options.refund-method-strategy.checkbox.label": "Automatically refund requests", "admin/return-app.settings.section.payment-options.refund-method-strategy.checkbox.description": "Automatically create the return invoice in the OMS for the requests", @@ -329,5 +327,30 @@ "return-app.return-request-details.cancellation.modal.adminAllow": "Text message for allowing a cancellation for admins", "return-app.return-request-details.cancellation.modal.adminRefuse": "Text message for refusing a cancellation for admins", "return-app.return-request-details.cancellation.modal.storeAllow": "Text message for allowing a cancellation for store users", - "return-app.return-request-details.cancellation.modal.storeRefuse": "Text message for refusing a cancellation for store users" + "return-app.return-request-details.cancellation.modal.storeRefuse": "Text message for refusing a cancellation for store users", + "return-app.return-order-list.page-header.title": "Order List", + "return-app.return-order-list.page-header.subTitle": "All return orders. Click on an order ID to create a return.", + "return-app.sellers-settings-list.table-data.settingId": "Setting ID", + "admin/return-app.sellers-settings-list.page-header.title": "Sellers Settings List", + "admin/return-app.sellers-settings-list.page-header.subTitle": "All settings created by sellers return app. Click a settings ID to see more.", + "store/return-app.return-order-details.error.order-not-invoiced": "The order is not invoiced", + "store/return-app.return-order-details.setting-provider.error.retry-action": "Try again", + "store/return-app.return-order-details.setting-provider.error": "There was an error loading app settings.", + "store/return-app.return-order-details.error.out-of-max-days": "The order exceeds the maximum return period", + "store/return-app.return-order-details.error.order-not-found": "Order not found", + "store/return-app.return-order-details.error.forbidden": "You don't have access to this order", + "store/return-app.return-order-details.error.unknown": "Something failed, please try again.", + "return-app.return-request-list.table-data.searchBySellerName": "Seller ID", + "return-app.return-request-list.table-filters.export-returns": "EXPORT", + "admin/return-app.settings.section.general-options.enable-highlight-form-message.label": "Toogle label for enabling a highlighted message", + "admin/return-app.settings.section.general-options.enable-highlight-form-message.description": "Toogle description for enabling a highlighted message", + "admin/return-app.settings.section.general-options.enable-goodwill.label": "Enable Goodwill Refund", + "admin/return-app.settings.section.general-options.enable-goodwill.description": "When enabled, you can make a goodwill refund via REST API", + "return-app.return-request-details.available-amounts.header": "Available Amounts", + "return-app.return-request-details.available-amounts.total-order": "Total Order", + "return-app.return-request-details.available-amounts.remaining-amount": "Remaining Amount", + "return-app.return-request-details.available-amounts.amount-to-refund": "Amount to Refund in process", + "return-app.return-request-details.available-amounts.total-refunded": "Total Refunded", + "return-app.return-request-details.available-amounts.total-shipping-refunded": "Total Shipping Refunded", + "admin/return-app.return-request-details.refund-amount.button": "Refund Amount" } diff --git a/messages/en.json b/messages/en.json index 03bbc0c2f..731793188 100644 --- a/messages/en.json +++ b/messages/en.json @@ -1,11 +1,14 @@ { "admin/return-app.navigation.label": "Returns", "navigation.labelRequests": "Requests", + "admin/return-app.sellers.settings.navigation.label": "Sellers Returns Settings", "admin/return-app.settings.navigation.label": "Returns Settings", "admin/return-app.settings.max-days.label": "Max days:", "admin/return-app.settings.error.header": "Error loading settings", "admin/return-app.settings.error.description": "There was an error loading the application settings. Please try reloading the page.", "admin/return-app.settings.terms.label": "Terms and conditions URL:", + "admin/return-app.settings.order-status.label": "Order Status", + "admin/return-app.settings.order-status.placeholder": "Select Option", "admin/return-app.settings.section.payment-options.available-payment-methods.header": "Available payment methods:", "admin/return-app.settings.section.payment-options.enable-payment-method-selection.description": "Prevent customer from selecting a different payment method", "admin/return-app.settings.section.payment-options.enable-payment-method-selection.label.uncheck": "Same as order", @@ -53,108 +56,97 @@ "store/return-app.link": "My Returns", "store/return-app.request-return.page.header": "Request New Return", "store/return-app.request-return.page.header.subtitle": "Select an order to start the return request process", - "store/return-app.return-order-list.table-header.order-id": "Order ID", - "store/return-app.return-order-list.table-header.creation-date": "Created Date", - "store/return-app.return-order-list.table-header.items-to-return": "Items Available for Return", - "store/return-app.return-order-list.table-header.select-order": "Select Order", - "store/return-app.return-order-list.table-empty-state-label.no-orders-available": "No orders available for return", - "store/return-app.return-order-list.table-pagination.text-of": "of", - "store/return-app.return-order-details.page-header.link": "Back to orders", - "store/return-app.return-order-details.page-header.title": "Return Request Form", - "store/return-app.return-order-details.page-header.subtitle": "Select the products you want to refund", - "store/return-app.return-order-details.section-products": "Products available for return", - "store/return-app.return-order-details.section-details": "Contact Details", - "store/return-app.return-order-details.section-payment": "Refund payment method", - "store/return-app.return-order-details.page-header.creation-date": "Creation Date", - "store/return-app.return-order-details.table-header.product": "Product", - "store/return-app.return-order-details.table-header.quantity": "Quantity", - "store/return-app.return-order-details.table-header.available-to-return": "Available for Return", - "store/return-app.return-order-details.table-header.quantity-to-return": "Return Quantity", - "store/return-app.return-order-details.table-header.reason": "Reason", - "store/return-app.return-order-details.table-header.condition": "Condition", + "return-app.return-order-details.page-header.link": "Back to orders", + "return-app.return-order-details.page-header.title": "Return Request Form", + "return-app.return-order-details.page-header.subtitle": "Select the products you want to refund", + "return-app.return-order-details.section-products": "Products available for return", + "return-app.return-order-details.section-details": "Contact information", + "return-app.return-order-details.section-payment": "Refund payment method", + "return-app.return-order-details.page-header.creation-date": "Creation Date", + "return-app.return-order-details.table-header.product": "Product", + "return-app.return-order-details.table-header.quantity": "Quantity", + "return-app.return-order-details.table-header.available-to-return": "Available to return", + "return-app.return-order-details.table-header.quantity-to-return": "Quantity to return", + "return-app.return-order-details.table-header.reason": "Reason", + "return-app.return-order-details.table-header.condition": "Condition", "return-app.return-order-details.conditions.new-with-box": "New With Box", "return-app.return-order-details.conditions.new-without-box": "New Without Box", "return-app.return-order-details.conditions.used-with-box": "Used With Box", "return-app.return-order-details.conditions.used-without-box": "Used Without Box", "return-app.return-order-details.dropdown-conditions.placeholder.select-condition": "Select condition", - "store/return-app.return-order-details.dropdown-reasons.accidental-order": "Accidental Order", - "store/return-app.return-order-details.dropdown-reasons.better-price": "Better Price", - "store/return-app.return-order-details.dropdown-reasons.performance": "Performance", - "store/return-app.return-order-details.dropdown-reasons.incompatible": "Incompatible", - "store/return-app.return-order-details.dropdown-reasons.item-damaged": "Damaged Item", - "store/return-app.return-order-details.dropdown-reasons.missed-delivery": "Missed Delivery", - "store/return-app.return-order-details.dropdown-reasons.missing-parts": "Missing Parts", - "store/return-app.return-order-details.dropdown-reasons.box-damaged": "Damaged Box", - "store/return-app.return-order-details.dropdown-reasons.different-product": "Different Product", - "store/return-app.return-order-details.dropdown-reasons.defective": "Defective", - "store/return-app.return-order-details.dropdown-reasons.arrived-in-addition": "Arrived as Extra", - "store/return-app.return-order-details.dropdown-reasons.no-longer-needed": "No Longer Needed", - "store/return-app.return-order-details.dropdown-reasons.unauthorized-purchase": "Unauthorized Purchase", - "store/return-app.return-order-details.dropdown-reasons.different-from-website": "Different From Website", - "store/return-app.return-order-details.dropdown-reasons.other-reason": "Other Reason", - "store/return-app.return-order-details.dropdown-reasons.placeholder.select-reason": "Select reason", - "store/return-app.return-order-details.error.order-not-invoiced": "The order is not invoiced", - "store/return-app.return-order-details.error.out-of-max-days": "The order exceeds the maximum return period", - "store/return-app.return-order-details.error.order-not-found": "Order not found", - "store/return-app.return-order-details.error.forbidden": "You don't have access to this order", - "store/return-app.return-order-details.error.unknown": "Something failed. Please try again.", - "store/return-app.return-order-details.title.contact-details": "Contact Details", - "store/return-app.return-order-details.inputs.name-input": "Name", - "store/return-app.return-order-details.inputs.email-input": "Email", - "store/return-app.return-order-details.inputs.phone-input": "Phone", - "store/return-app.return-order-details.title.pickup-address": "Delivery address", - "store/return-app.return-order-details.title.tooltip.pickup-address": "Select the shipping address you want for delivery or pickup", - "store/return-app.return-order-details.title.extra-comment": "Additional Comment", - "store/return-app.return-order-details.inputs.address-input": "Address", - "store/return-app.return-order-details.inputs.city-input": "City", - "store/return-app.return-order-details.inputs.state-input": "State", - "store/return-app.return-order-details.inputs.zip-input": "Postal code", - "store/return-app.return-order-details.inputs.country-input": "Country", + "return-app.return-order-details.dropdown-reasons.accidental-order": "Accidental Order", + "return-app.return-order-details.dropdown-reasons.better-price": "Better Price", + "return-app.return-order-details.dropdown-reasons.performance": "Performance", + "return-app.return-order-details.dropdown-reasons.incompatible": "Incompatible", + "return-app.return-order-details.dropdown-reasons.item-damaged": "Damaged Item", + "return-app.return-order-details.dropdown-reasons.missed-delivery": "Missed Delivery", + "return-app.return-order-details.dropdown-reasons.missing-parts": "Missing Parts", + "return-app.return-order-details.dropdown-reasons.box-damaged": "Damaged Box", + "return-app.return-order-details.dropdown-reasons.different-product": "Different Product", + "return-app.return-order-details.dropdown-reasons.defective": "Defective", + "return-app.return-order-details.dropdown-reasons.arrived-in-addition": "Arrived as Extra", + "return-app.return-order-details.dropdown-reasons.no-longer-needed": "No Longer Needed", + "return-app.return-order-details.dropdown-reasons.unauthorized-purchase": "Unauthorized Purchase", + "return-app.return-order-details.dropdown-reasons.different-from-website": "Different From Website", + "return-app.return-order-details.dropdown-reasons.other-reason": "Other Reason", + "return-app.return-order-details.dropdown-reasons.placeholder.select-reason": "Select reason", + "return-app.return-order-details.title.contact-details": "Contact details", + "return-app.return-order-details.inputs.name-input": "Name", + "return-app.return-order-details.inputs.email-input": "Email", + "return-app.return-order-details.inputs.phone-input": "Phone", + "return-app.return-order-details.title.pickup-address": "Delivery address", + "return-app.return-order-details.title.tooltip.pickup-address": "Select the shipping address you want for delivery or pickup", + "return-app.return-order-details.title.extra-comment": "Additional Comment", + "return-app.return-order-details.inputs.address-input": "Address", + "return-app.return-order-details.inputs.city-input": "City", + "return-app.return-order-details.inputs.state-input": "State", + "return-app.return-order-details.inputs.zip-input": "Postal code", + "return-app.return-order-details.inputs.country-input": "Country", "store/return-app.return-order-details.setting-provider.error.retry-action": "Try again", "store/return-app.return-order-details.setting-provider.error": "There was an error loading app settings.", - "store/return-app.return-order-details.payment-options.card": "Card", - "store/return-app.return-order-details.payment-options.bank": "Bank", - "store/return-app.return-order-details.payment-options.gift-card": "Gift card", - "store/return-app.return-order-details.payment-method.description": "Select the payment method to which the refund will be issued", - "store/return-app.return-order-details.payment-method.default": "The refund will be issued to the payment method used for this order", - "store/return-app.return-order-details.payment-method.account-holder": "Account holder name", - "store/return-app.return-order-details.payment-method.iban": "IBAN", - "store/return-app.return-order-details.terms-and-conditions.form-agree": "I have read and accept the {link}", - "store/return-app.return-order-details.terms-and-conditions.link": "terms and conditions", - "store/return-app.return-order-details.button.next": "Next", - "store/return-app.return-order-details.page-header.order-id": "Order ID", - "store/return-app.return-item-details.excluded-items.warning": "Store does not allow this product to be returned", - "store/return-app.return-item-details.dropdown-reason.error": "Reason is required", - "store/return-app.return-item-details.dropdown-condition.error": "Condition is required", - "store/return-app.return-payment-methods.input-payment-method.error": "Payment method is required", - "store/return-app.return-payment-methods.input-iban.error": "IBAN is required", - "store/return-app.return-payment-methods.input-iban-invalid.error": "IBAN is not valid", - "store/return-app.return-payment-methods.input-account-holder.error": "Account holder is required", - "store/return-app.return-terms-and-conditions.checkbox.error": "Please accept the terms and conditions.", - "store/return-app.return-items-list.no-items-selected.error": "No items selected", - "store/return-app.return-address-details.address-input.error": "Address is required", - "store/return-app.return-address-details.city-input.error": "City is required", - "store/return-app.return-address-details.state-input.error": "State is required", - "store/return-app.return-address-details.zip-input.error": "Postal code is required", - "store/return-app.return-address-details.country-input.error": "Country is required", - "store/return-app.return-contact-details.name-input.error": "Name is required", - "store/return-app.return-contact-details.phone-input.error": "Phone is required", - "store/return-app.confirm-and-submit.page-header.title": "Confirm Return Details", - "store/return-app.confirm-and-submit.refund-method.title": "Refund Payment Method", - "store/return-app.confirm-and-submit.alert.label": "View your return list", - "store/return-app.confirm-and-submit.alert.error.label": "Retry", - "store/return-app.confirm-and-submit.alert.success": "The return request was created successfully.", - "store/return-app.confirm-and-submit.alert.error": "Something went wrong. Please try again.", - "store/return-app.confirm-and-submit.button.back": "Back", - "store/return-app.confirm-and-submit.button.submit": "Submit", - "store/return-app.confirm-and-submit.pickup-address.title": "Delivery Address", - "store/return-app.confirm-and-submit.contact-details.title": "Contact Details", - "store/return-app.confirm-and-submit.user-comment.title": "Comment", - "store/return-app.confirm-payment-methods.refund-method.p-account-holder-name": "Recipient name: ", - "store/return-app.confirm-payment-methods.refund-method.p-iban": "Bank transfer into account: ", - "store/return-app.confirm-payment-methods.refund-method.p-same-as-purchase": "Same as purchase", - "store/return-app.return-information-table.table-row.p-condition": "Condition:", - "store/return-app.return-information-table.table-row.p-reason": "Reason:", + "return-app.return-order-details.payment-options.card": "Card", + "return-app.return-order-details.payment-options.bank": "Bank", + "return-app.return-order-details.payment-options.gift-card": "Gift card", + "return-app.return-order-details.payment-method.description": "Select the payment method to which the refund will be issued", + "return-app.return-order-details.payment-method.default": "The refund will be issued to the payment method used for this order", + "return-app.return-order-details.payment-method.account-holder": "Account holder name", + "return-app.return-order-details.payment-method.iban": "IBAN", + "return-app.return-order-details.terms-and-conditions.form-agree": "I have read and accept the {link}", + "return-app.return-order-details.terms-and-conditions.link": "terms and conditions", + "return-app.return-order-details.button.next": "Next", + "return-app.return-order-details.page-header.order-id": "Order ID", + "return-app.return-item-details.excluded-items.warning": "Store does not allow this product to be returned", + "return-app.return-item-details.dropdown-reason.error": "Reason is required", + "return-app.return-item-details.dropdown-condition.error": "Condition is required", + "return-app.return-payment-methods.input-payment-method.error": "Payment method is required", + "return-app.return-payment-methods.input-iban.error": "IBAN is required", + "return-app.return-payment-methods.input-iban-invalid.error": "IBAN is not valid", + "return-app.return-payment-methods.input-account-holder.error": "Account holder is required", + "return-app.return-terms-and-conditions.checkbox.error": "Please accept the terms and conditions.", + "return-app.return-items-list.no-items-selected.error": "No items selected", + "return-app.return-address-details.address-input.error": "Address is required", + "return-app.return-address-details.city-input.error": "City is required", + "return-app.return-address-details.state-input.error": "State is required", + "return-app.return-address-details.zip-input.error": "Postal code is required", + "return-app.return-address-details.country-input.error": "Country is required", + "return-app.return-contact-details.name-input.error": "Name is required", + "return-app.return-contact-details.phone-input.error": "Phone is required", + "return-app.confirm-and-submit.page-header.title": "Confirm Return Details", + "return-app.confirm-and-submit.refund-method.title": "Refund Payment Method", + "return-app.confirm-and-submit.alert.label": "View your return list", + "return-app.confirm-and-submit.alert.error.label": "Retry", + "return-app.confirm-and-submit.alert.success": "The return request was created successfully.", + "return-app.confirm-and-submit.alert.error": "Something went wrong. Please try again.", + "return-app.confirm-and-submit.button.back": "Back", + "return-app.confirm-and-submit.button.submit": "Submit", + "return-app.confirm-and-submit.pickup-address.title": "Delivery Address", + "return-app.confirm-and-submit.contact-details.title": "Contact Details", + "return-app.confirm-and-submit.user-comment.title": "Comment", + "return-app.confirm-payment-methods.refund-method.p-account-holder-name": "Recipient name: ", + "return-app.confirm-payment-methods.refund-method.p-iban": "Bank transfer into account: ", + "return-app.confirm-payment-methods.refund-method.p-same-as-purchase": "Same as purchase", + "return-app.return-information-table.table-row.p-condition": "Condition:", + "return-app.return-information-table.table-row.p-reason": "Reason:", "admin/return-app.settings.section.payment-options.available-payment-methods.card": "Credit card", "admin/return-app.settings.section.payment-options.available-payment-methods.gift-card": "Gift card", "admin/return-app.settings.section.payment-options.available-payment-methods.bank": "Bank transfer", @@ -181,7 +173,7 @@ "return-app-status.package-verified": "Package verified", "return-app-status.refunded": "Refunded", "return-app-status.denied": "Denied", - "return-app-status.cancelled": "Cancelled", + "return-app-status.canceled": "Canceled", "admin/return-app.return-request-details.verify-items.button": "Verify Items", "admin/return-app.return-request-details.verify-items.action.confirm": "Update Status", "admin/return-app.return-request-details.verify-items.action.cancel": "Cancel", @@ -214,7 +206,6 @@ "return-app.return-request-details.table.product-info.sold-by": "Sold by: {seller}", "return-app.return-request-details.table.product-info.condition": "Condition: {condition}", "return-app.return-request-details.table.verification-status.denied": "Denied", - "return-app.return-request-details.table.verification-status.cancelled": "Cancelled", "return-app.return-request-details.table.verification-status.approved": "Approved", "return-app.return-request-details.table.verification-status.new": "New", "return-app.return-request-details.table.verification-status.partially-approved": "Partially approved {quantityRefunded}/{quantity}", @@ -268,17 +259,23 @@ "return-app-status.timeline.package-verified": "Package verified", "return-app-status.timeline.refunded": "Refunded", "return-app-status.timeline.denied": "Denied", - "return-app-status.timeline.cancelled": "Cancelled", + "return-app-status.timeline.canceled": "Canceled", "admin/return-app.return-request-list.page-header.title": "Return Request List", + "admin/return-app.sellers-settings-list.page-header.title": "Sellers Settings List", "admin/return-app.return-request-list.page-header.subTitle": "All return requests created by store users. Click a request ID to see more.", + "admin/return-app.sellers-settings-list.page-header.subTitle": "All settings created by sellers return app. Click a settings ID to see more.", + "admin/return-app.return-add.page-header.title": "New Return", + "admin/return-app.return-add.page-header.subTitle": "Select an item to start the return request process.", "return-app.return-request-list.error.title": "Error loading list", "return-app.return-request-list.error.description": "An error occurred while loading the request list. Please try again.", "return-app.return-request-list.table.emptyState": "No results available", "return-app.return-request-list.table.emptyState-children": "Try different filters for your search", "return-app.return-request-list.table-pagination.textOf": "of", "return-app.return-request-list.table-data.requestId": "Request ID", + "return-app.sellers-settings-list.table-data.settingId": "Setting ID", "return-app.return-request-list.table-data.sequenceNumber": "Sequence Number", "return-app.return-request-list.table-data.orderId": "Order ID", + "return-app.return-request-list.table-data.sellerName": "Seller ID", "return-app.return-request-list.table-data.createdDate": "Created Date", "return-app.return-request-list.table-data.status": "Status", "return-app.return-request-list.table-filters.fromDate": "From date", @@ -289,7 +286,7 @@ "return-app.return-request-list.table-jumpToPage.cta": "GO", "store/return-app.return-request-list.page-header.title": "My Returns", "store/return-app.return-request-list.page-header.goBack": "Go Back", - "store/return-app.return-request-list.page-header.cta": "New Request", + "return-app.return-request-list.page-header.cta": "New Request", "return-app.return-request-list.table.status.new": "New", "return-app.return-request-list.table.status.processing": "Processing", "return-app.return-request-list.table.status.pickedup-from-client": "Picked up from customer", @@ -297,7 +294,7 @@ "return-app.return-request-list.table.status.package-verified": "Package verified", "return-app.return-request-list.table.status.refunded": "Refunded", "return-app.return-request-list.table.status.denied": "Denied", - "return-app.return-request-list.table.status.cancelled": "Cancelled", + "return-app.return-request-list.table.status.canceled": "Canceled", "return-app.return-request-list.table.status.allStatus": "Status", "return-app.return-request-details.table.status-history.header.created-at": "Created on", "return-app.return-request-details.table.status-history.header.status": "Status", @@ -308,6 +305,7 @@ "return-app.return-request-details.order-id.link": "Order {orderId}", "return-app.return-request-details.current-status.request-id": "Request ID: {id}", "return-app.return-request-details.current-status.status": "Status:", + "return-app.return-request-details.current-status.sellerName": "SellerName: {sellerName}", "admin/return-app.return-request-list.table-data.requestId.tooltip": "Customers can see their request ID inside the request details", "admin/return-app.settings.modal-warning.title": "Please review your settings", "admin/return-app.settings.modal-warning.first-paragraph": "It looks like you are trying to save custom return options, none of which reach {maxDays}. This is the maximum days set for a return.", @@ -315,10 +313,10 @@ "admin/return-app.settings.modal-warning.third-paragraph": "If you click Edit, the maximum days for a return will be reduced from {maxDays} to {customMaxDays}. This is the Max Days shown in your custom return options.", "admin/return-app.settings.modal-warning.confirm": "Edit", "admin/return-app.settings.modal-warning.cancel": "Cancel", - "store/return-app.return-order-details.pickup-address.drop-off-points": "Select a drop-off point", - "store/return-app.return-order-details.pickup-address.drop-off-points.tooltip": "You can return your items in one of our selected drop-off points", - "store/return-app.return-order-details.pickup-address.drop-off-points.dropdown.placehoder": "Select a drop-off point", - "store/return-app.return-order-details.pickup-address.drop-off-points.dropdown.error": "There was an error loading the drop-off points", + "return-app.return-order-details.pickup-address.drop-off-points": "Select a drop-off point", + "return-app.return-order-details.pickup-address.drop-off-points.tooltip": "You can return your items in one of our selected drop-off points", + "return-app.return-order-details.pickup-address.drop-off-points.dropdown.placehoder": "Select a drop-off point", + "return-app.return-order-details.pickup-address.drop-off-points.dropdown.error": "There was an error loading the drop-off points", "admin/return-app.return-request-details.localized-product-name.tooltip": "Original item name from the order", "admin/return-app.settings.section.payment-options.refund-method-strategy.checkbox.label": "Automatically refund requests", "admin/return-app.settings.section.payment-options.refund-method-strategy.checkbox.description": "Automatically create a return invoice in OMS for the requests", @@ -326,8 +324,36 @@ "return-app.return-request-details.cancellation.cta": "Cancel request", "return-app.return-request-details.cancellation.modal.accept": "Proceed to cancel", "return-app.return-request-details.cancellation.modal.close": "Close", - "return-app.return-request-details.cancellation.modal.adminAllow": "

Attention: This request's status will be set to CANCELLED.

This will notify the user via email and allow them to create a new return request with the cancelled request's items.

If that is not your intention, set the request as DENIED.

", + "return-app.return-request-details.cancellation.modal.adminAllow": "

Attention: This request's status will be set to CANCELED.

This will notify the user via email and allow them to create a new return request with the canceled request's items.

If that is not your intention, set the request as DENIED.

", "return-app.return-request-details.cancellation.modal.adminRefuse": "

Sorry, it's not possible to cancel this request due to its current status.

", "return-app.return-request-details.cancellation.modal.storeAllow": "

Cancelling this request will allow the current items to be used in a new return request.

This action is irreversible.

", - "return-app.return-request-details.cancellation.modal.storeRefuse": "

Sorry, you need to contact the support team to cancel this request due to its current status.

" + "return-app.return-request-details.cancellation.modal.storeRefuse": "

Sorry, you need to contact the support team to cancel this request due to its current status.

", + "return-app.return-order-list.table-header.order-id": "OrderId", + "return-app.return-order-list.table-header.creation-date": "Creation Date", + "return-app.return-order-list.table-header.items-to-return": "Available Items To Return", + "return-app.return-order-list.table-header.select-order": "Select Order", + "return-app.return-order-list.table-empty-state-label.no-orders-available": "No orders available for return", + "return-app.return-order-list.table-pagination.text-of": "Text of", + "return-app.return-order-list.table-header.linkLabel": "Back to returns", + "return-app.return-order-list.page-header.title": "Order List", + "return-app.return-order-list.table-header.seller-name": "Seller name", + "return-app.return-order-list.page-header.subTitle": "All return orders. Click on an order ID to create a return.", + "return-app.return-request-list.table-data.searchBySellerName": "Seller ID", + "store/return-app.return-order-details.error.order-not-invoiced": "The order is not invoiced", + "store/return-app.return-order-details.error.out-of-max-days": "The order exceeds the maximum return period", + "store/return-app.return-order-details.error.order-not-found": "Order not found", + "store/return-app.return-order-details.error.forbidden": "You don't have access to this order", + "store/return-app.return-order-details.error.unknown": "Something failed. Please try again.", + "return-app.return-request-list.table-filters.export-returns": "EXPORT", + "admin/return-app.settings.section.general-options.enable-highlight-form-message.label": "Enable a customizable message in return forms", + "admin/return-app.settings.section.general-options.enable-highlight-form-message.description": "When enabled, on top of the form that's used to fill the user personal data, a message will be displayed. Customizable via \"Messages\"", + "admin/return-app.settings.section.general-options.enable-goodwill.label": "Enable Goodwill Refund", + "admin/return-app.settings.section.general-options.enable-goodwill.description": "When enabled, you can make a goodwill refund via REST API", + "return-app.return-request-details.available-amounts.header": "Available Amounts", + "return-app.return-request-details.available-amounts.total-order": "Total Order", + "return-app.return-request-details.available-amounts.remaining-amount": "Remaining Amount", + "return-app.return-request-details.available-amounts.amount-to-refund": "Amount to Refund in process", + "return-app.return-request-details.available-amounts.total-refunded": "Total Refunded", + "return-app.return-request-details.available-amounts.total-shipping-refunded": "Total Shipping Refunded", + "admin/return-app.return-request-details.refund-amount.button": "Refund Amount" } diff --git a/messages/es.json b/messages/es.json index f2d4f05a8..6cec04602 100644 --- a/messages/es.json +++ b/messages/es.json @@ -1,6 +1,7 @@ { "admin/return-app.navigation.label": "Devoluciones", "navigation.labelRequests": "Solicitudes", + "admin/return-app.sellers.settings.navigation.label": "Configuración de devolución de sellers", "admin/return-app.settings.navigation.label": "Configuración de devolución", "admin/return-app.settings.max-days.label": "Max. días:", "admin/return-app.settings.error.header": "Error al cargar la configuración", @@ -53,107 +54,26 @@ "store/return-app.link": "Mis devoluciones", "store/return-app.request-return.page.header": "Solicitar nueva devolución", "store/return-app.request-return.page.header.subtitle": "Selecciona un pedido para iniciar el proceso de solicitud de devolución", - "store/return-app.return-order-list.table-header.order-id": "ID de pedido", - "store/return-app.return-order-list.table-header.creation-date": "Fecha de creación", - "store/return-app.return-order-list.table-header.items-to-return": "Ítems disponibles para devolución", - "store/return-app.return-order-list.table-header.select-order": "Seleccionar pedido", - "store/return-app.return-order-list.table-empty-state-label.no-orders-available": "No hay pedidos disponibles para devolución", - "store/return-app.return-order-list.table-pagination.text-of": "de", - "store/return-app.return-order-details.page-header.link": "Volver a pedidos", - "store/return-app.return-order-details.page-header.title": "Formulario de solicitud de devolución", - "store/return-app.return-order-details.page-header.subtitle": "Selecciona los productos a reembolsar", - "store/return-app.return-order-details.section-products": "Productos disponibles para devolución", - "store/return-app.return-order-details.section-details": "Información de contacto", - "store/return-app.return-order-details.section-payment": "Medio de pago del reembolso", - "store/return-app.return-order-details.page-header.creation-date": "Fecha de creación", - "store/return-app.return-order-details.table-header.product": "Producto", - "store/return-app.return-order-details.table-header.quantity": "Cantidad", - "store/return-app.return-order-details.table-header.available-to-return": "Disponible para devolución", - "store/return-app.return-order-details.table-header.quantity-to-return": "Cantidad a devolver", - "store/return-app.return-order-details.table-header.reason": "Motivo", - "store/return-app.return-order-details.table-header.condition": "Condición", + "return-app.return-order-list.table-header.order-id": "ID de pedido", + "return-app.return-order-list.table-header.creation-date": "Fecha de creación", + "return-app.return-order-list.table-header.items-to-return": "Ítems disponibles para devolución", + "return-app.return-order-list.table-header.select-order": "Seleccionar pedido", + "return-app.return-order-list.table-empty-state-label.no-orders-available": "No hay pedidos disponibles para devolución", + "return-app.return-order-list.table-pagination.text-of": "de", + "return-app.return-order-list.table-header.linkLabel": "Volver a devoluciones", + "return-app.return-order-list.page-header.title": "Lista de pedidos", + "return-app.return-order-list.table-header.seller-name": "Nombre del vendedor", + "return-app.return-order-list.page-header.subTitle": "Todos los pedidos de devolución. Haga clic en un ID de pedido para crear una devolución.", "return-app.return-order-details.conditions.new-with-box": "Nuevo en la caja", "return-app.return-order-details.conditions.new-without-box": "Nuevo sin caja", "return-app.return-order-details.conditions.used-with-box": "Usado en la caja", "return-app.return-order-details.conditions.used-without-box": "Usado sin caja", "return-app.return-order-details.dropdown-conditions.placeholder.select-condition": "Selecciona una condición", - "store/return-app.return-order-details.dropdown-reasons.accidental-order": "Pedido realizado accidentalmente", - "store/return-app.return-order-details.dropdown-reasons.better-price": "Precio mejor", - "store/return-app.return-order-details.dropdown-reasons.performance": "Rendimiento", - "store/return-app.return-order-details.dropdown-reasons.incompatible": "Incompatible", - "store/return-app.return-order-details.dropdown-reasons.item-damaged": "Ítem dañado", - "store/return-app.return-order-details.dropdown-reasons.missed-delivery": "Entrega perdida", - "store/return-app.return-order-details.dropdown-reasons.missing-parts": "Partes faltantes", - "store/return-app.return-order-details.dropdown-reasons.box-damaged": "Caja dañada", - "store/return-app.return-order-details.dropdown-reasons.different-product": "Producto diferente", - "store/return-app.return-order-details.dropdown-reasons.defective": "Defectuoso", - "store/return-app.return-order-details.dropdown-reasons.arrived-in-addition": "Ítem extra", - "store/return-app.return-order-details.dropdown-reasons.no-longer-needed": "El ítem ya no es necesario", - "store/return-app.return-order-details.dropdown-reasons.unauthorized-purchase": "Compra no autorizada", - "store/return-app.return-order-details.dropdown-reasons.different-from-website": "Diferente del sitio web", - "store/return-app.return-order-details.dropdown-reasons.other-reason": "Otro motivo", - "store/return-app.return-order-details.dropdown-reasons.placeholder.select-reason": "Selecciona el motivo", - "store/return-app.return-order-details.error.order-not-invoiced": "El pedido no está facturado", - "store/return-app.return-order-details.error.out-of-max-days": "El pedido supera el plazo máximo de devolución", - "store/return-app.return-order-details.error.order-not-found": "No se encontró el pedido", - "store/return-app.return-order-details.error.forbidden": "No tienes acceso a este pedido", - "store/return-app.return-order-details.error.unknown": "Se produjo un error. Por favor, vuelve a intentarlo.", - "store/return-app.return-order-details.title.contact-details": "Información de contacto", - "store/return-app.return-order-details.inputs.name-input": "Nombre", - "store/return-app.return-order-details.inputs.email-input": "Email", - "store/return-app.return-order-details.inputs.phone-input": "Celular", - "store/return-app.return-order-details.title.pickup-address": "Dirección de entrega", - "store/return-app.return-order-details.title.tooltip.pickup-address": "Selecciona la dirección de envío para la entrega o la recogida", - "store/return-app.return-order-details.title.extra-comment": "Comentario adicional", - "store/return-app.return-order-details.inputs.address-input": "Dirección", - "store/return-app.return-order-details.inputs.city-input": "Ciudad", - "store/return-app.return-order-details.inputs.state-input": "Estado", - "store/return-app.return-order-details.inputs.zip-input": "Código postal", - "store/return-app.return-order-details.inputs.country-input": "País", - "store/return-app.return-order-details.setting-provider.error.retry-action": "Inténtalo de nuevo", - "store/return-app.return-order-details.setting-provider.error": "Se produjo un error al cargar la configuración de la aplicación.", - "store/return-app.return-order-details.payment-options.card": "Tarjeta", - "store/return-app.return-order-details.payment-options.bank": "Banco", - "store/return-app.return-order-details.payment-options.gift-card": "Tarjeta de regalo", - "store/return-app.return-order-details.payment-method.description": "Selecciona el medio de pago al que se emitirá el reembolso", - "store/return-app.return-order-details.payment-method.default": "El reembolso se emitirá al medio de pago utilizado para este pedido", - "store/return-app.return-order-details.payment-method.account-holder": "Nombre del titular de la cuenta", - "store/return-app.return-order-details.payment-method.iban": "IBAN", - "store/return-app.return-order-details.terms-and-conditions.form-agree": "He leído y acepto los {link}", - "store/return-app.return-order-details.terms-and-conditions.link": "términos y condiciones", - "store/return-app.return-order-details.button.next": "Siguiente", - "store/return-app.return-order-details.page-header.order-id": "ID del pedido", - "store/return-app.return-item-details.excluded-items.warning": "La tienda no permite que este producto sea devuelto", - "store/return-app.return-item-details.dropdown-reason.error": "El motivo es obligatorio", - "store/return-app.return-item-details.dropdown-condition.error": "La condición es obligatoria", - "store/return-app.return-payment-methods.input-payment-method.error": "El método de pago es obligatorio", - "store/return-app.return-payment-methods.input-iban.error": "El IBAN es obligatorio", - "store/return-app.return-payment-methods.input-account-holder.error": "El titular de la cuenta es obligatorio", - "store/return-app.return-terms-and-conditions.checkbox.error": "Por favor, acepta los términos y condiciones.", - "store/return-app.return-items-list.no-items-selected.error": "No hay ítems seleccionados", - "store/return-app.return-address-details.address-input.error": "La dirección es obligatoria", - "store/return-app.return-address-details.city-input.error": "La ciudad es obligatoria", - "store/return-app.return-address-details.state-input.error": "El estado es obligatorio", - "store/return-app.return-address-details.zip-input.error": "El código postal es obligatorio", - "store/return-app.return-address-details.country-input.error": "El país es obligatorio", - "store/return-app.return-contact-details.name-input.error": "El nombre es obligatorio", - "store/return-app.return-contact-details.phone-input.error": "El teléfono es obligatorio", - "store/return-app.confirm-and-submit.page-header.title": "Confirmar detalles de la devolución", - "store/return-app.confirm-and-submit.refund-method.title": "Medio de pago del reembolso", - "store/return-app.confirm-and-submit.alert.label": "Ve la lista de devoluciones", - "store/return-app.confirm-and-submit.alert.error.label": "Reintentar", - "store/return-app.confirm-and-submit.alert.success": "La solicitud de devolución se creó con éxito.", - "store/return-app.confirm-and-submit.alert.error": "Se produjo un error. Por favor, inténtalo de nuevo.", - "store/return-app.confirm-and-submit.button.back": "Atrás", - "store/return-app.confirm-and-submit.button.submit": "Enviar", - "store/return-app.confirm-and-submit.pickup-address.title": "Dirección de entrega", - "store/return-app.confirm-and-submit.contact-details.title": "Información de contacto", - "store/return-app.confirm-and-submit.user-comment.title": "Comentario", - "store/return-app.confirm-payment-methods.refund-method.p-account-holder-name": "Nombre del destinatario: ", - "store/return-app.confirm-payment-methods.refund-method.p-iban": "Transferencia bancaria para la cuenta: ", - "store/return-app.confirm-payment-methods.refund-method.p-same-as-purchase": "Igual que la compra", - "store/return-app.return-information-table.table-row.p-condition": "Condición:", - "store/return-app.return-information-table.table-row.p-reason": "Motivo:", + "return-app.return-order-details.inputs.address-input": "Dirección", + "return-app.return-order-details.inputs.city-input": "Ciudad", + "return-app.return-order-details.inputs.state-input": "Estado", + "return-app.return-order-details.inputs.zip-input": "Código postal", + "return-app.return-order-details.inputs.country-input": "País", "admin/return-app.settings.section.payment-options.available-payment-methods.card": "Tarjeta de crédito", "admin/return-app.settings.section.payment-options.available-payment-methods.gift-card": "Tarjeta de regalo", "admin/return-app.settings.section.payment-options.available-payment-methods.bank": "Transferencia bancaria", @@ -180,7 +100,7 @@ "return-app-status.package-verified": "Paquete verificado", "return-app-status.refunded": "Reembolsado", "return-app-status.denied": "Rechazado", - "return-app-status.cancelled": "Cancelado", + "return-app-status.canceled": "Cancelado", "admin/return-app.return-request-details.verify-items.button": "verificar ítems", "admin/return-app.return-request-details.verify-items.action.confirm": "Actualizar status", "admin/return-app.return-request-details.verify-items.action.cancel": "Cancelar", @@ -213,7 +133,6 @@ "return-app.return-request-details.table.product-info.sold-by": "Vendido por: {seller}", "return-app.return-request-details.table.product-info.condition": "Condición: {condition}", "return-app.return-request-details.table.verification-status.denied": "Rechazado", - "return-app.return-request-details.table.verification-status.cancelled": "Cancelado", "return-app.return-request-details.table.verification-status.approved": "Aprobados", "return-app.return-request-details.table.verification-status.new": "Nuevo", "return-app.return-request-details.table.verification-status.partially-approved": "Aprobado parcialmente {quantityRefunded}/{quantity}", @@ -267,17 +186,21 @@ "return-app-status.timeline.package-verified": "Paquete verificado", "return-app-status.timeline.refunded": "Reembolsado", "return-app-status.timeline.denied": "Denegado", - "return-app-status.timeline.cancelled": "Cancelado", + "return-app-status.timeline.canceled": "Cancelado", "admin/return-app.return-request-list.page-header.title": "Lista de solicitudes de devolución", + "admin/return-app.sellers-settings-list.page-header.title": "Lista de configuraciones de sellers", "admin/return-app.return-request-list.page-header.subTitle": "Todas las solicitudes de devolución creadas por los usuarios de la tienda. Haz clic en el ID de una solicitud para ver más.", + "admin/return-app.sellers-settings-list.page-header.subTitle": "Todas las configuraciones de sellers. Haz clic en el ID de una configuración para ver más.", "return-app.return-request-list.error.title": "Error al cargar la lista", "return-app.return-request-list.error.description": "Se produjo un error al cargar la lista de solicitudes. Por favor, vuelve a intentarlo.", "return-app.return-request-list.table.emptyState": "No hay resultados disponibles", "return-app.return-request-list.table.emptyState-children": "Intenta utilizar filtros diferentes en tu búsqueda", "return-app.return-request-list.table-pagination.textOf": "de", "return-app.return-request-list.table-data.requestId": "ID de la solicitud", + "return-app.sellers-settings-list.table-data.settingId": "ID de la configuración", "return-app.return-request-list.table-data.sequenceNumber": "Número de secuencia", "return-app.return-request-list.table-data.orderId": "ID del pedido", + "return-app.return-request-list.table-data.sellerName": "Vendedor ID", "return-app.return-request-list.table-data.createdDate": "Fecha de creación", "return-app.return-request-list.table-data.status": "Status", "return-app.return-request-list.table-filters.fromDate": "Desde", @@ -288,7 +211,7 @@ "return-app.return-request-list.table-jumpToPage.cta": "IR", "store/return-app.return-request-list.page-header.title": "Mis devoluciones", "store/return-app.return-request-list.page-header.goBack": "Volver", - "store/return-app.return-request-list.page-header.cta": "Nueva solicitud", + "return-app.return-request-list.page-header.cta": "Nueva solicitud", "return-app.return-request-list.table.status.new": "Nuevo", "return-app.return-request-list.table.status.processing": "En procesamiento", "return-app.return-request-list.table.status.pickedup-from-client": "Recogido del cliente", @@ -296,7 +219,7 @@ "return-app.return-request-list.table.status.package-verified": "Paquete verificado", "return-app.return-request-list.table.status.refunded": "Reembolsado", "return-app.return-request-list.table.status.denied": "Rechazado", - "return-app.return-request-list.table.status.cancelled": "Cancelado", + "return-app.return-request-list.table.status.canceled": "Cancelado", "return-app.return-request-list.table.status.allStatus": "Status", "return-app.return-request-details.table.status-history.header.created-at": "Creado en", "return-app.return-request-details.table.status-history.header.status": "Status", @@ -307,6 +230,7 @@ "return-app.return-request-details.order-id.link": "Pedido {orderId}", "return-app.return-request-details.current-status.request-id": "ID de la solicitud: {id}", "return-app.return-request-details.current-status.status": "Status:", + "return-app.return-request-details.current-status.sellerName": "Vendedor: {sellerName}", "admin/return-app.return-request-list.table-data.requestId.tooltip": "Los clientes pueden ver el ID de la solicitud en los detalles de la solicitud", "admin/return-app.settings.modal-warning.title": "Por favor, revisa tu configuración", "admin/return-app.settings.modal-warning.first-paragraph": "Parece que estás intentando guardar opciones de devolución personalizadas, ninguna que llegue a {maxDays}. Este es el plazo máximo en días para solicitar una devolución.", @@ -314,10 +238,6 @@ "admin/return-app.settings.modal-warning.third-paragraph": "Si haces clic en «Editar», el plazo de la devolución se reducirá de {maxDays} a {customMaxDays}. Este es el máximo de días que aparece en tus opciones de devolución personalizadas.", "admin/return-app.settings.modal-warning.confirm": "Modificar", "admin/return-app.settings.modal-warning.cancel": "Cancelar", - "store/return-app.return-order-details.pickup-address.drop-off-points": "Selecciona un punto de entrega", - "store/return-app.return-order-details.pickup-address.drop-off-points.tooltip": "Puedes devolver tus ítems en uno de los puntos de entrega seleccionados", - "store/return-app.return-order-details.pickup-address.drop-off-points.dropdown.placehoder": "Selecciona un punto de entrega", - "store/return-app.return-order-details.pickup-address.drop-off-points.dropdown.error": "Se produjo un error al cargar los puntos de entrega", "admin/return-app.return-request-details.localized-product-name.tooltip": "Nombre del ítem original del pedido", "admin/return-app.settings.section.payment-options.refund-method-strategy.checkbox.label": "Reembolsar las solicitudes automáticamente", "admin/return-app.settings.section.payment-options.refund-method-strategy.checkbox.description": "Crear automáticamente la factura de devolución en el OMS para las solicitudes", @@ -328,5 +248,104 @@ "return-app.return-request-details.cancellation.modal.adminAllow": "

Atención: El status de esta solicitud se establecerá como CANCELADA.

El usuario será notificado por correo electrónico y podrá crear una nueva solicitud de devolución con los elementos de la solicitud cancelada.

Si esa no es tu intención, define la solicitud como DENEGADA.

", "return-app.return-request-details.cancellation.modal.adminRefuse": "

Lo sentimos, no se puede cancelar esta solicitud debido a su status actual.

", "return-app.return-request-details.cancellation.modal.storeAllow": "

Cancelar esta solicitud permitirá utilizar los ítems actuales en una nueva solicitud de devolución.

Esta acción es irreversible.

", - "return-app.return-request-details.cancellation.modal.storeRefuse": "

Lo sentimos, debes ponerte en contacto con el equipo de soporte para cancelar esta solicitud debido a su status actual.

" + "return-app.return-request-details.cancellation.modal.storeRefuse": "

Lo sentimos, debes ponerte en contacto con el equipo de soporte para cancelar esta solicitud debido a su status actual.

", + + "return-app.return-order-details.page-header.link": "Volver a Pedidos", + "return-app.return-order-details.page-header.title": "Formulario de solicitud de devolución", + "return-app.return-order-details.page-header.subtitle": "Seleccione los productos que desea reembolsar", + "return-app.return-order-details.section-products": "Productos disponibles para devolución", + "return-app.return-order-details.section-details": "Información del contacto", + "return-app.return-order-details.section-payment": "Método de pago de reembolso", + "return-app.return-order-details.page-header.creation-date": "Fecha de creación", + "return-app.return-order-details.table-header.product": "Producto", + "return-app.return-order-details.table-header.quantity": "Cantidad", + "return-app.return-order-details.table-header.available-to-return": "Disponible para regresar", + "return-app.return-order-details.table-header.quantity-to-return": "Cantidad a devolver", + "return-app.return-order-details.table-header.reason": "Razón", + "return-app.return-order-details.table-header.condition": "Condición", + "return-app.return-order-details.dropdown-reasons.accidental-order": "Orden accidental", + "return-app.return-order-details.dropdown-reasons.better-price": "Mejor precio", + "return-app.return-order-details.dropdown-reasons.performance": "Actuación", + "return-app.return-order-details.dropdown-reasons.incompatible": "Incompatible", + "return-app.return-order-details.dropdown-reasons.item-damaged": "Artículo dañado", + "return-app.return-order-details.dropdown-reasons.missed-delivery": "Entrega perdida", + "return-app.return-order-details.dropdown-reasons.missing-parts": "Partes faltantes", + "return-app.return-order-details.dropdown-reasons.box-damaged": "Caja dañada", + "return-app.return-order-details.dropdown-reasons.different-product": "Producto diferente", + "return-app.return-order-details.dropdown-reasons.defective": "Defectuoso", + "return-app.return-order-details.dropdown-reasons.arrived-in-addition": "Llegó como extra", + "return-app.return-order-details.dropdown-reasons.no-longer-needed": "Ya no es necesario", + "return-app.return-order-details.dropdown-reasons.unauthorized-purchase": "Compra no autorizada", + "return-app.return-order-details.dropdown-reasons.different-from-website": "Diferente del sitio web", + "return-app.return-order-details.dropdown-reasons.other-reason": "Otra razon", + "return-app.return-order-details.dropdown-reasons.placeholder.select-reason": "Selecciona el motivo", + "return-app.return-order-details.title.contact-details": "Detalles de contacto", + "return-app.return-order-details.inputs.name-input": "Nombre", + "return-app.return-order-details.inputs.email-input": "Correo electrónico", + "return-app.return-order-details.inputs.phone-input": "Teléfono", + "return-app.return-order-details.title.pickup-address": "Dirección de entrega", + "return-app.return-order-details.title.tooltip.pickup-address": "Seleccione la dirección de envío que desea para la entrega o recogida", + "return-app.return-order-details.title.extra-comment": "Comentario adicional", + "return-app.return-order-details.payment-options.card": "Tarjeta", + "return-app.return-order-details.payment-options.bank": "Banco", + "return-app.return-order-details.payment-options.gift-card": "Tarjeta de regalo", + "return-app.return-order-details.payment-method.description": "Seleccione el método de pago al que se emitirá el reembolso", + "return-app.return-order-details.payment-method.default": "El reembolso se emitirá al método de pago utilizado para este pedido.", + "return-app.return-order-details.payment-method.account-holder": "Nombre del titular de la cuenta", + "return-app.return-order-details.payment-method.iban": "IBAN", + "return-app.return-order-details.terms-and-conditions.form-agree": "He leído y acepto el {link}", + "return-app.return-order-details.terms-and-conditions.link": "Términos y condiciones", + "return-app.return-order-details.button.next": "Siguiente", + "return-app.return-order-details.page-header.order-id": "Solicitar ID", + "return-app.return-item-details.excluded-items.warning": "La tienda no permite la devolución de este producto.", + "return-app.return-item-details.dropdown-reason.error": "Se requiere razón", + "return-app.return-item-details.dropdown-condition.error": "Se requiere condición", + "return-app.return-payment-methods.input-payment-method.error": "Se requiere método de pago", + "return-app.return-payment-methods.input-iban.error": "Se requiere IBAN", + "return-app.return-payment-methods.input-iban-invalid.error": "IBAN no es válido", + "return-app.return-payment-methods.input-account-holder.error": "Se requiere titular de la cuenta", + "return-app.return-terms-and-conditions.checkbox.error": "Por favor acepte los términos y condiciones.", + "return-app.return-items-list.no-items-selected.error": "No hay elementos seleccionados", + "return-app.return-address-details.address-input.error": "La dirección es necesaria", + "return-app.return-address-details.city-input.error": "Ciudad es requerida", + "return-app.return-address-details.state-input.error": "Se requiere estado", + "return-app.return-address-details.zip-input.error": "Se requiere código postal", + "return-app.return-address-details.country-input.error": "El país es obligatorio", + "return-app.return-contact-details.name-input.error": "Se requiere el nombre", + "return-app.return-contact-details.phone-input.error": "Se requiere teléfono", + "return-app.confirm-and-submit.page-header.title": "Confirmar detalles de devolución", + "return-app.confirm-and-submit.refund-method.title": "Método de pago de reembolso", + "return-app.confirm-and-submit.alert.label": "Ver su lista de devoluciones", + "return-app.confirm-and-submit.alert.error.label": "Rever", + "return-app.confirm-and-submit.alert.success": "La solicitud de devolución se creó con éxito.", + "return-app.confirm-and-submit.alert.error": "Algo salió mal. Inténtalo de nuevo.", + "return-app.confirm-and-submit.button.back": "Atrás", + "return-app.confirm-and-submit.button.submit": "Entregar", + "return-app.confirm-and-submit.pickup-address.title": "Dirección de entrega", + "return-app.confirm-and-submit.contact-details.title": "Detalles de contacto", + "return-app.confirm-and-submit.user-comment.title": "Comentario", + "return-app.confirm-payment-methods.refund-method.p-account-holder-name": "Nombre del Recipiente:", + "return-app.confirm-payment-methods.refund-method.p-iban": "Transferencia bancaria a cuenta:", + "return-app.confirm-payment-methods.refund-method.p-same-as-purchase": "Igual que la compra", + "return-app.return-information-table.table-row.p-condition": "Condición:", + "return-app.return-information-table.table-row.p-reason": "Razón:", + "return-app.return-order-details.pickup-address.drop-off-points": "Seleccione un punto de entrega", + "return-app.return-order-details.pickup-address.drop-off-points.tooltip": "Puede devolver sus artículos en uno de nuestros puntos de entrega seleccionados", + "return-app.return-order-details.pickup-address.drop-off-points.dropdown.placehoder": "Seleccione un punto de entrega", + "return-app.return-order-details.pickup-address.drop-off-points.dropdown.error": "Hubo un error al cargar los puntos de entrega", + "admin/return-app.return-add.page-header.title": "Nueva devolución", + "admin/return-app.return-add.page-header.subTitle": "Seleccione un artículo para iniciar el proceso de solicitud de devolución.", + "store/return-app.return-order-details.error.order-not-invoiced": "El pedido no está facturado", + "store/return-app.return-order-details.setting-provider.error.retry-action": "Inténtalo de nuevo", + "store/return-app.return-order-details.setting-provider.error": "Se produjo un error al cargar la configuración de la aplicación.", + "store/return-app.return-order-details.error.out-of-max-days": "El pedido supera el plazo máximo de devolución", + "store/return-app.return-order-details.error.order-not-found": "No se encontró el pedido", + "store/return-app.return-order-details.error.forbidden": "No tienes acceso a este pedido", + "store/return-app.return-order-details.error.unknown": "Se produjo un error. Por favor, vuelve a intentarlo.", + "admin/return-app.settings.order-status.label": "Estado del pedido", + "admin/return-app.settings.order-status.placeholder": "Seleccionar opción", + "return-app.return-request-list.table-data.searchBySellerName": "ID del vendedor", + "return-app.return-request-list.table-filters.export-returns": "EXPORTAR", + "admin/return-app.settings.section.general-options.enable-highlight-form-message.label": "Habilitar un mensaje personalizable en los formularios de devolución", + "admin/return-app.settings.section.general-options.enable-highlight-form-message.description": "Cuando está habilitado, en la parte superior del formulario que se utiliza para completar los datos personales del usuario, se mostrará un mensaje. Personalizable a través de \"Mensajes\"" } diff --git a/messages/fr.json b/messages/fr.json index ebcda77c2..1d2be792a 100644 --- a/messages/fr.json +++ b/messages/fr.json @@ -53,107 +53,26 @@ "store/return-app.link": "Mes retours", "store/return-app.request-return.page.header": "Demander un nouveau retour", "store/return-app.request-return.page.header.subtitle": "Sélectionner une commande pour démarrer le processus de demande de retour", - "store/return-app.return-order-list.table-header.order-id": "ID de commande", - "store/return-app.return-order-list.table-header.creation-date": "Date de création", - "store/return-app.return-order-list.table-header.items-to-return": "Articles disponibles pour un retour", - "store/return-app.return-order-list.table-header.select-order": "Sélectionner la commande", - "store/return-app.return-order-list.table-empty-state-label.no-orders-available": "Aucune commande disponible pour un retour", - "store/return-app.return-order-list.table-pagination.text-of": "of", - "store/return-app.return-order-details.page-header.link": "Retour aux commandes", - "store/return-app.return-order-details.page-header.title": "Formulaire de demande de retour", - "store/return-app.return-order-details.page-header.subtitle": "Sélectionnez les articles que vous souhaitez rembourser", - "store/return-app.return-order-details.section-products": "Articles disponibles pour un retour", - "store/return-app.return-order-details.section-details": "Coordonnées", - "store/return-app.return-order-details.section-payment": "Mode de remboursement", - "store/return-app.return-order-details.page-header.creation-date": "Date de création", - "store/return-app.return-order-details.table-header.product": "Article", - "store/return-app.return-order-details.table-header.quantity": "Quantité", - "store/return-app.return-order-details.table-header.available-to-return": "Disponible pour un retour", - "store/return-app.return-order-details.table-header.quantity-to-return": "Quantité de retour", - "store/return-app.return-order-details.table-header.reason": "Motif", - "store/return-app.return-order-details.table-header.condition": "Condition", + "return-app.return-order-list.table-header.order-id": "ID de commande", + "return-app.return-order-list.table-header.creation-date": "Date de création", + "return-app.return-order-list.table-header.items-to-return": "Articles disponibles pour un retour", + "return-app.return-order-list.table-header.select-order": "Sélectionner la commande", + "return-app.return-order-list.table-empty-state-label.no-orders-available": "Aucune commande disponible pour un retour", + "return-app.return-order-list.table-pagination.text-of": "of", + "return-app.return-order-list.table-header.linkLabel": "Retour aux retours", + "return-app.return-order-list.page-header.title": "Liste de commandes", + "return-app.return-order-list.table-header.seller-name": "Nom du vendeur", + "return-app.return-order-list.page-header.subTitle": "Toutes les commandes de retour. Cliquez sur un ID de commande pour créer un retour.", "return-app.return-order-details.conditions.new-with-box": "Neuf, avec emballage", "return-app.return-order-details.conditions.new-without-box": "Neuf, sans emballage", "return-app.return-order-details.conditions.used-with-box": "Utilisé, avec emballage", "return-app.return-order-details.conditions.used-without-box": "Utilisé, sans emballage", "return-app.return-order-details.dropdown-conditions.placeholder.select-condition": "Sélectionner l’état", - "store/return-app.return-order-details.dropdown-reasons.accidental-order": "Commande accidentelle", - "store/return-app.return-order-details.dropdown-reasons.better-price": "Meilleur prix", - "store/return-app.return-order-details.dropdown-reasons.performance": "Performance", - "store/return-app.return-order-details.dropdown-reasons.incompatible": "Incompatible", - "store/return-app.return-order-details.dropdown-reasons.item-damaged": "Article endommagé", - "store/return-app.return-order-details.dropdown-reasons.missed-delivery": "Livraison manquée", - "store/return-app.return-order-details.dropdown-reasons.missing-parts": "Éléments manquants", - "store/return-app.return-order-details.dropdown-reasons.box-damaged": "Colis endommagé", - "store/return-app.return-order-details.dropdown-reasons.different-product": "Produit différent", - "store/return-app.return-order-details.dropdown-reasons.defective": "Défectueux", - "store/return-app.return-order-details.dropdown-reasons.arrived-in-addition": "Arrivé en double", - "store/return-app.return-order-details.dropdown-reasons.no-longer-needed": "N’est plus nécessaire", - "store/return-app.return-order-details.dropdown-reasons.unauthorized-purchase": "Achat non autorisé", - "store/return-app.return-order-details.dropdown-reasons.different-from-website": "Différent du site web", - "store/return-app.return-order-details.dropdown-reasons.other-reason": "Autre raison", - "store/return-app.return-order-details.dropdown-reasons.placeholder.select-reason": "Sélectionner une raison", - "store/return-app.return-order-details.error.order-not-invoiced": "La commande n’est pas facturée", - "store/return-app.return-order-details.error.out-of-max-days": "La commande dépasse la période maximale de retour", - "store/return-app.return-order-details.error.order-not-found": "Commande introuvable", - "store/return-app.return-order-details.error.forbidden": "Vous n’avez pas accès à cette commande", - "store/return-app.return-order-details.error.unknown": "Une erreur s’est produite. Veuillez réessayer.", - "store/return-app.return-order-details.title.contact-details": "Coordonnées", - "store/return-app.return-order-details.inputs.name-input": "Nom", - "store/return-app.return-order-details.inputs.email-input": "Email", - "store/return-app.return-order-details.inputs.phone-input": "Téléphone", - "store/return-app.return-order-details.title.pickup-address": "Adresse de livraison", - "store/return-app.return-order-details.title.tooltip.pickup-address": "Sélectionnez l’adresse de livraison souhaitée pour la livraison ou le retrait en point relais", - "store/return-app.return-order-details.title.extra-comment": "Commentaires", - "store/return-app.return-order-details.inputs.address-input": "Adresse", - "store/return-app.return-order-details.inputs.city-input": "Ville", - "store/return-app.return-order-details.inputs.state-input": "Région", - "store/return-app.return-order-details.inputs.zip-input": "Code postal", - "store/return-app.return-order-details.inputs.country-input": "Pays", - "store/return-app.return-order-details.setting-provider.error.retry-action": "Réessayez", - "store/return-app.return-order-details.setting-provider.error": "Une erreur s’est produite lors du chargement des paramètres de l’application.", - "store/return-app.return-order-details.payment-options.card": "Carte", - "store/return-app.return-order-details.payment-options.bank": "Banque", - "store/return-app.return-order-details.payment-options.gift-card": "Carte cadeau", - "store/return-app.return-order-details.payment-method.description": "Sélectionnez le mode de paiement pour le remboursement", - "store/return-app.return-order-details.payment-method.default": "Le remboursement sera effectué selon le mode de paiement utilisé pour cette commande", - "store/return-app.return-order-details.payment-method.account-holder": "Nom du titulaire du compte", - "store/return-app.return-order-details.payment-method.iban": "IBAN", - "store/return-app.return-order-details.terms-and-conditions.form-agree": "J’ai lu et j’accepte les {link}", - "store/return-app.return-order-details.terms-and-conditions.link": "conditions générales", - "store/return-app.return-order-details.button.next": "Suivant", - "store/return-app.return-order-details.page-header.order-id": "ID de commande", - "store/return-app.return-item-details.excluded-items.warning": "Le magasin n’autorise pas le retour de cet article", - "store/return-app.return-item-details.dropdown-reason.error": "Un motif est requis", - "store/return-app.return-item-details.dropdown-condition.error": "L’état de l’article est requis", - "store/return-app.return-payment-methods.input-payment-method.error": "Le mode de paiement est requis", - "store/return-app.return-payment-methods.input-iban.error": "Un IBAN est requis", - "store/return-app.return-payment-methods.input-account-holder.error": "Le titulaire du compte est requis", - "store/return-app.return-terms-and-conditions.checkbox.error": "Veuillez accepter les conditions générales.", - "store/return-app.return-items-list.no-items-selected.error": "Aucun article sélectionné", - "store/return-app.return-address-details.address-input.error": "Adresse requise", - "store/return-app.return-address-details.city-input.error": "Ville requise", - "store/return-app.return-address-details.state-input.error": "Région requise", - "store/return-app.return-address-details.zip-input.error": "Le code postal est requis", - "store/return-app.return-address-details.country-input.error": "Le pays est requis", - "store/return-app.return-contact-details.name-input.error": "Nom requis", - "store/return-app.return-contact-details.phone-input.error": "Le numéro de téléphone est requis", - "store/return-app.confirm-and-submit.page-header.title": "Confirmer les modalités de retour", - "store/return-app.confirm-and-submit.refund-method.title": "Mode de remboursement", - "store/return-app.confirm-and-submit.alert.label": "Afficher votre liste de retours", - "store/return-app.confirm-and-submit.alert.error.label": "Réessayer", - "store/return-app.confirm-and-submit.alert.success": "La demande de retour a bien été créée.", - "store/return-app.confirm-and-submit.alert.error": "Une erreur s’est produite. Veuillez réessayer.", - "store/return-app.confirm-and-submit.button.back": "Retour", - "store/return-app.confirm-and-submit.button.submit": "Envoyer", - "store/return-app.confirm-and-submit.pickup-address.title": "Adresse de livraison", - "store/return-app.confirm-and-submit.contact-details.title": "Coordonnées", - "store/return-app.confirm-and-submit.user-comment.title": "Commentaire", - "store/return-app.confirm-payment-methods.refund-method.p-account-holder-name": "Nom du destinataire : ", - "store/return-app.confirm-payment-methods.refund-method.p-iban": "Virement bancaire vers le compte : ", - "store/return-app.confirm-payment-methods.refund-method.p-same-as-purchase": "Identique à l’achat", - "store/return-app.return-information-table.table-row.p-condition": "État :", - "store/return-app.return-information-table.table-row.p-reason": "Motif:", + "return-app.return-order-details.inputs.address-input": "Adresse", + "return-app.return-order-details.inputs.city-input": "Ville", + "return-app.return-order-details.inputs.state-input": "Région", + "return-app.return-order-details.inputs.zip-input": "Code postal", + "return-app.return-order-details.inputs.country-input": "Pays", "admin/return-app.settings.section.payment-options.available-payment-methods.card": "Carte de crédit", "admin/return-app.settings.section.payment-options.available-payment-methods.gift-card": "Carte cadeau", "admin/return-app.settings.section.payment-options.available-payment-methods.bank": "Virement bancaire", @@ -180,7 +99,7 @@ "return-app-status.package-verified": "Colis vérifié", "return-app-status.refunded": "Remboursé", "return-app-status.denied": "Refusé", - "return-app-status.cancelled": "Annulée", + "return-app-status.canceled": "Annulée", "admin/return-app.return-request-details.verify-items.button": "vérifier les articles", "admin/return-app.return-request-details.verify-items.action.confirm": "Mettre à jour le statut", "admin/return-app.return-request-details.verify-items.action.cancel": "Annuler", @@ -213,7 +132,6 @@ "return-app.return-request-details.table.product-info.sold-by": "Vendu par : {seller}", "return-app.return-request-details.table.product-info.condition": "Condition: {condition}", "return-app.return-request-details.table.verification-status.denied": "Refusé", - "return-app.return-request-details.table.verification-status.cancelled": "Annulée", "return-app.return-request-details.table.verification-status.approved": "Approuvé", "return-app.return-request-details.table.verification-status.new": "Nouveau", "return-app.return-request-details.table.verification-status.partially-approved": "Partiellement approuvé {quantityRefunded}/{quantity}", @@ -267,7 +185,7 @@ "return-app-status.timeline.package-verified": "Colis vérifié", "return-app-status.timeline.refunded": "Remboursé", "return-app-status.timeline.denied": "Refusé", - "return-app-status.timeline.cancelled": "Annulée", + "return-app-status.timeline.canceled": "Annulée", "admin/return-app.return-request-list.page-header.title": "Liste des demandes de retour", "admin/return-app.return-request-list.page-header.subTitle": "Toutes les demandes de retour créées par les utilisateurs du magasin. Cliquez sur une référence de demande pour en voir plus.", "return-app.return-request-list.error.title": "Erreur lors du chargement de liste", @@ -278,6 +196,7 @@ "return-app.return-request-list.table-data.requestId": "Demander une référence", "return-app.return-request-list.table-data.sequenceNumber": "Numéro de séquence", "return-app.return-request-list.table-data.orderId": "ID de commande", + "return-app.return-request-list.table-data.sellerName": "ID du Vendeur", "return-app.return-request-list.table-data.createdDate": "Date de création", "return-app.return-request-list.table-data.status": "Statut", "return-app.return-request-list.table-filters.fromDate": "À partir de", @@ -288,7 +207,7 @@ "return-app.return-request-list.table-jumpToPage.cta": "OK", "store/return-app.return-request-list.page-header.title": "Mes retours", "store/return-app.return-request-list.page-header.goBack": "Retour", - "store/return-app.return-request-list.page-header.cta": "Nouvelle demande", + "return-app.return-request-list.page-header.cta": "Nouvelle demande", "return-app.return-request-list.table.status.new": "Nouveau", "return-app.return-request-list.table.status.processing": "En cours", "return-app.return-request-list.table.status.pickedup-from-client": "Retrait effectué par le client", @@ -296,7 +215,7 @@ "return-app.return-request-list.table.status.package-verified": "Colis vérifié", "return-app.return-request-list.table.status.refunded": "Remboursé", "return-app.return-request-list.table.status.denied": "Refusé", - "return-app.return-request-list.table.status.cancelled": "Annulée", + "return-app.return-request-list.table.status.canceled": "Annulée", "return-app.return-request-list.table.status.allStatus": "Statut", "return-app.return-request-details.table.status-history.header.created-at": "Créé le", "return-app.return-request-details.table.status-history.header.status": "Statut", @@ -307,6 +226,7 @@ "return-app.return-request-details.order-id.link": "Commande {orderId}", "return-app.return-request-details.current-status.request-id": "ID de la requête : {id}", "return-app.return-request-details.current-status.status": "Statut :", + "return-app.return-request-details.current-status.sellerName": "SellerName: {sellerName}", "admin/return-app.return-request-list.table-data.requestId.tooltip": "Les clients peuvent voir leur ID de demande dans les détails de la demande", "admin/return-app.settings.modal-warning.title": "Veuillez vérifier vos paramètres", "admin/return-app.settings.modal-warning.first-paragraph": "Il semble que vous essayez d’enregistrer les options de retour personnalisées, dont aucune n’atteint {maxDays}. Ceci est le nombre maximum de jours définis pour une déclaration.", @@ -314,10 +234,6 @@ "admin/return-app.settings.modal-warning.third-paragraph": "Si vous cliquez sur Modifier, le nombre maximum de jours pour un retour sera réduit de {maxDays} à {customMaxDays}. Ceci est le nombre de jours maximum affiché dans vos options de retour personnalisées.", "admin/return-app.settings.modal-warning.confirm": "Modifier", "admin/return-app.settings.modal-warning.cancel": "Annuler", - "store/return-app.return-order-details.pickup-address.drop-off-points": "Sélectionnez un point de dépôt", - "store/return-app.return-order-details.pickup-address.drop-off-points.tooltip": "Vous pouvez retourner vos articles dans l’un de nos points de dépôt sélectionnés", - "store/return-app.return-order-details.pickup-address.drop-off-points.dropdown.placehoder": "Sélectionnez un point de dépôt", - "store/return-app.return-order-details.pickup-address.drop-off-points.dropdown.error": "Une erreur s’est produite lors du chargement des points de dépôt", "admin/return-app.return-request-details.localized-product-name.tooltip": "Nom de l’article d’origine de la commande", "admin/return-app.settings.section.payment-options.refund-method-strategy.checkbox.label": "Demandes de remboursement automatique", "admin/return-app.settings.section.payment-options.refund-method-strategy.checkbox.description": "Créer automatiquement une facture de retour dans l’OMS pour les demandes", @@ -328,5 +244,105 @@ "return-app.return-request-details.cancellation.modal.adminAllow": "

Attention : Le statut de cette demande sera défini sur ANNULÉ.

Ceci avertira l’utilisateur par email et lui permettra de créer une nouvelle demande de retour avec les éléments de la demande annulée.

Si ce n’est pas votre intention, définissez la requête comme REFUSÉ.

", "return-app.return-request-details.cancellation.modal.adminRefuse": "

Désolé, il est impossible d’annuler cette demande en raison de son état actuel.

", "return-app.return-request-details.cancellation.modal.storeAllow": "

L’annulation de cette requête permettra aux articles actuels d’être utilisés dans une nouvelle demande de retour.

Cette action est irréversible.

", - "return-app.return-request-details.cancellation.modal.storeRefuse": "

Désolé, vous devez contacter l’équipe d’assistance pour annuler cette demande en raison de son statut actuel.

" + "return-app.return-request-details.cancellation.modal.storeRefuse": "

Désolé, vous devez contacter l’équipe d’assistance pour annuler cette demande en raison de son statut actuel.

", + "return-app.return-order-details.page-header.link": "Retour aux commandes", + "return-app.return-order-details.page-header.title": "Formulaire de demande de retour", + "return-app.return-order-details.page-header.subtitle": "Sélectionnez les produits que vous souhaitez rembourser", + "return-app.return-order-details.section-products": "Produits disponibles pour retour", + "return-app.return-order-details.section-details": "Coordonnées", + "return-app.return-order-details.section-payment": "Rembourser le mode de paiement", + "return-app.return-order-details.page-header.creation-date": "Date de création", + "return-app.return-order-details.table-header.product": "Produit", + "return-app.return-order-details.table-header.quantity": "Quantité", + "return-app.return-order-details.table-header.available-to-return": "Disponible pour retour", + "return-app.return-order-details.table-header.quantity-to-return": "Quantité à retourner", + "return-app.return-order-details.table-header.reason": "Raison", + "return-app.return-order-details.table-header.condition": "Condition", + "return-app.return-order-details.dropdown-reasons.accidental-order": "Commande accidentelle", + "return-app.return-order-details.dropdown-reasons.better-price": "Meilleur prix", + "return-app.return-order-details.dropdown-reasons.performance": "Performance", + "return-app.return-order-details.dropdown-reasons.incompatible": "Incompatible", + "return-app.return-order-details.dropdown-reasons.item-damaged": "Article endommagé", + "return-app.return-order-details.dropdown-reasons.missed-delivery": "Livraison manquée", + "return-app.return-order-details.dropdown-reasons.missing-parts": "Parties manquantes", + "return-app.return-order-details.dropdown-reasons.box-damaged": "Boîte endommagée", + "return-app.return-order-details.dropdown-reasons.different-product": "Produit différent", + "return-app.return-order-details.dropdown-reasons.defective": "Défectueux", + "return-app.return-order-details.dropdown-reasons.arrived-in-addition": "Arrivé en supplément", + "return-app.return-order-details.dropdown-reasons.no-longer-needed": "Ne sont plus nécessaires", + "return-app.return-order-details.dropdown-reasons.unauthorized-purchase": "Achat non autorisé", + "return-app.return-order-details.dropdown-reasons.different-from-website": "Différent du site Web", + "return-app.return-order-details.dropdown-reasons.other-reason": "Autre raison", + "return-app.return-order-details.dropdown-reasons.placeholder.select-reason": "Sélectionnez la raison", + "return-app.return-order-details.title.contact-details": "Détails du contact", + "return-app.return-order-details.inputs.name-input": "Nom", + "return-app.return-order-details.inputs.email-input": "E-mail", + "return-app.return-order-details.inputs.phone-input": "Téléphone", + "return-app.return-order-details.title.pickup-address": "Adresse de livraison", + "return-app.return-order-details.title.tooltip.pickup-address": "Sélectionnez l'adresse de livraison que vous souhaitez pour la livraison ou le ramassage", + "return-app.return-order-details.title.extra-comment": "Commentaire additionnel", + "return-app.return-order-details.payment-options.card": "Carte", + "return-app.return-order-details.payment-options.bank": "Banque", + "return-app.return-order-details.payment-options.gift-card": "Carte cadeau", + "return-app.return-order-details.payment-method.description": "Sélectionnez le mode de paiement sur lequel le remboursement sera émis", + "return-app.return-order-details.payment-method.default": "Le remboursement sera effectué sur le mode de paiement utilisé pour cette commande", + "return-app.return-order-details.payment-method.account-holder": "Nom du titulaire du compte", + "return-app.return-order-details.payment-method.iban": "ALLAIENT", + "return-app.return-order-details.terms-and-conditions.form-agree": "J'ai lu et j'accepte les le {link}", + "return-app.return-order-details.terms-and-conditions.link": "termes et conditions", + "return-app.return-order-details.button.next": "Suivant", + "return-app.return-order-details.page-header.order-id": "numéro de commande", + "return-app.return-item-details.excluded-items.warning": "Le magasin n'autorise pas le retour de ce produit", + "return-app.return-item-details.dropdown-reason.error": "La raison est requise", + "return-app.return-item-details.dropdown-condition.error": "Condition requise", + "return-app.return-payment-methods.input-payment-method.error": "Le mode de paiement est requis", + "return-app.return-payment-methods.input-iban.error": "IBAN est requis", + "return-app.return-payment-methods.input-iban-invalid.error": "L'IBAN n'est pas valide", + "return-app.return-payment-methods.input-account-holder.error": "Le titulaire du compte est requis", + "return-app.return-terms-and-conditions.checkbox.error": "Veuillez accepter les termes et conditions.", + "return-app.return-items-list.no-items-selected.error": "Aucun élément sélectionné", + "return-app.return-address-details.address-input.error": "L'adresse est obligatoire", + "return-app.return-address-details.city-input.error": "La ville est obligatoire", + "return-app.return-address-details.state-input.error": "L'état est requis", + "return-app.return-address-details.zip-input.error": "Le code postal est requis", + "return-app.return-address-details.country-input.error": "Le pays est requis", + "return-app.return-contact-details.name-input.error": "Le nom est requis", + "return-app.return-contact-details.phone-input.error": "Le téléphone est requis", + "return-app.confirm-and-submit.page-header.title": "Confirmer les détails du retour", + "return-app.confirm-and-submit.refund-method.title": "Méthode de paiement de remboursement", + "return-app.confirm-and-submit.alert.label": "Consulter votre liste de retour", + "return-app.confirm-and-submit.alert.error.label": "Recommencez", + "return-app.confirm-and-submit.alert.success": "La demande de retour a été créée avec succès.", + "return-app.confirm-and-submit.alert.error": "Quelque chose s'est mal passé. Veuillez réessayer.", + "return-app.confirm-and-submit.button.back": "Dos", + "return-app.confirm-and-submit.button.submit": "Soumettre", + "return-app.confirm-and-submit.pickup-address.title": "Adresse de livraison", + "return-app.confirm-and-submit.contact-details.title": "Détails du contact", + "return-app.confirm-and-submit.user-comment.title": "Commentaire", + "return-app.confirm-payment-methods.refund-method.p-account-holder-name": "Nom du destinataire :", + "return-app.confirm-payment-methods.refund-method.p-iban": "Virement bancaire sur le compte :", + "return-app.confirm-payment-methods.refund-method.p-same-as-purchase": "Identique à l'achat", + "return-app.return-information-table.table-row.p-condition": "Condition:", + "return-app.return-information-table.table-row.p-reason": "Raison:", + "return-app.return-order-details.pickup-address.drop-off-points": "Sélectionnez un point de chute", + "return-app.return-order-details.pickup-address.drop-off-points.tooltip": "Vous pouvez retourner vos articles dans l'un de nos points de dépôt sélectionnés", + "return-app.return-order-details.pickup-address.drop-off-points.dropdown.placehoder": "Sélectionnez un point de chute", + "return-app.return-order-details.pickup-address.drop-off-points.dropdown.error": "Une erreur s'est produite lors du chargement des points de chute", + "admin/return-app.sellers.settings.navigation.label": "Paramètres de retour des vendeurs", + "admin/return-app.sellers-settings-list.page-header.title": "Liste des paramètres des vendeurs", + "admin/return-app.sellers-settings-list.page-header.subTitle": "Tous les paramètres créés par les vendeurs renvoient l'application. Cliquez sur un ID de paramètres pour en voir plus.", + "admin/return-app.return-add.page-header.title": "Nouveau retour", + "admin/return-app.return-add.page-header.subTitle": "Sélectionnez un article pour démarrer le processus de demande de retour.", + "return-app.sellers-settings-list.table-data.settingId": "Identifiant de paramètre", + "store/return-app.return-order-details.error.order-not-invoiced": "La commande n’est pas facturée", + "store/return-app.return-order-details.setting-provider.error.retry-action": "Réessayez", + "store/return-app.return-order-details.setting-provider.error": "Une erreur s’est produite lors du chargement des paramètres de l’application.", + "store/return-app.return-order-details.error.out-of-max-days": "La commande dépasse la période maximale de retour", + "store/return-app.return-order-details.error.order-not-found": "Commande introuvable", + "store/return-app.return-order-details.error.forbidden": "Vous n’avez pas accès à cette commande", + "store/return-app.return-order-details.error.unknown": "Une erreur s’est produite. Veuillez réessayer.", + "admin/return-app.settings.order-status.label": "Statut de la commande", + "admin/return-app.settings.order-status.placeholder": "Sélectionner une option", + "return-app.return-request-list.table-data.searchBySellerName": "ID du Vendeur", + "return-app.return-request-list.table-filters.export-returns": "EXPORTER" } diff --git a/messages/it.json b/messages/it.json index 4380fe542..6512faf22 100644 --- a/messages/it.json +++ b/messages/it.json @@ -53,107 +53,26 @@ "store/return-app.link": "I miei resi", "store/return-app.request-return.page.header": "Richiedi nuovo reso", "store/return-app.request-return.page.header.subtitle": "Seleziona un ordine per avviare il processo di richiesta di reso", - "store/return-app.return-order-list.table-header.order-id": "ID ordine", - "store/return-app.return-order-list.table-header.creation-date": "Data di creazione", - "store/return-app.return-order-list.table-header.items-to-return": "Articoli idonei al reso", - "store/return-app.return-order-list.table-header.select-order": "Seleziona ordine", - "store/return-app.return-order-list.table-empty-state-label.no-orders-available": "Nessun ordine idoneo al reso", - "store/return-app.return-order-list.table-pagination.text-of": "di", - "store/return-app.return-order-details.page-header.link": "Torna agli ordini", - "store/return-app.return-order-details.page-header.title": "Modulo per richieste di reso", - "store/return-app.return-order-details.page-header.subtitle": "Seleziona i prodotti che si desiderano rimborsare", - "store/return-app.return-order-details.section-products": "Prodotti idonei al reso", - "store/return-app.return-order-details.section-details": "Dettagli di contatto", - "store/return-app.return-order-details.section-payment": "Metodo di pagamento del rimborso", - "store/return-app.return-order-details.page-header.creation-date": "Data di creazione", - "store/return-app.return-order-details.table-header.product": "Prodotto", - "store/return-app.return-order-details.table-header.quantity": "Quantità", - "store/return-app.return-order-details.table-header.available-to-return": "Idoneo al reso", - "store/return-app.return-order-details.table-header.quantity-to-return": "Quantità del reso", - "store/return-app.return-order-details.table-header.reason": "Motivo", - "store/return-app.return-order-details.table-header.condition": "Condizione", + "return-app.return-order-list.table-header.order-id": "ID ordine", + "return-app.return-order-list.table-header.creation-date": "Data di creazione", + "return-app.return-order-list.table-header.items-to-return": "Articoli idonei al reso", + "return-app.return-order-list.table-header.select-order": "Seleziona ordine", + "return-app.return-order-list.table-empty-state-label.no-orders-available": "Nessun ordine idoneo al reso", + "return-app.return-order-list.table-pagination.text-of": "di", + "return-app.return-order-list.table-header.linkLabel": "Torna a resi", + "return-app.return-order-list.page-header.title": "Elenco ordini", + "return-app.return-order-list.table-header.seller-name": "Nome del venditore", + "return-app.return-order-list.page-header.subTitle": "Tutti gli ordini di reso. Fare clic su un ID ordine per creare un reso.", "return-app.return-order-details.conditions.new-with-box": "Nuovo con scatola", "return-app.return-order-details.conditions.new-without-box": "Nuovo senza scatola", "return-app.return-order-details.conditions.used-with-box": "Usato con scatola", "return-app.return-order-details.conditions.used-without-box": "Usato senza scatola", "return-app.return-order-details.dropdown-conditions.placeholder.select-condition": "Seleziona condizione", - "store/return-app.return-order-details.dropdown-reasons.accidental-order": "Ordine accidentale", - "store/return-app.return-order-details.dropdown-reasons.better-price": "Miglior prezzo", - "store/return-app.return-order-details.dropdown-reasons.performance": "Prestazioni", - "store/return-app.return-order-details.dropdown-reasons.incompatible": "Incompatibile", - "store/return-app.return-order-details.dropdown-reasons.item-damaged": "Articolo danneggiato", - "store/return-app.return-order-details.dropdown-reasons.missed-delivery": "Consegna mancata", - "store/return-app.return-order-details.dropdown-reasons.missing-parts": "Parti mancanti", - "store/return-app.return-order-details.dropdown-reasons.box-damaged": "Scatola danneggiata", - "store/return-app.return-order-details.dropdown-reasons.different-product": "Prodotto differente", - "store/return-app.return-order-details.dropdown-reasons.defective": "Difettoso", - "store/return-app.return-order-details.dropdown-reasons.arrived-in-addition": "Articolo non richiesto (extra)", - "store/return-app.return-order-details.dropdown-reasons.no-longer-needed": "Articolo non più necessario", - "store/return-app.return-order-details.dropdown-reasons.unauthorized-purchase": "Acquisto non autorizzato", - "store/return-app.return-order-details.dropdown-reasons.different-from-website": "Differente rispetto al sito web", - "store/return-app.return-order-details.dropdown-reasons.other-reason": "Altro motivo", - "store/return-app.return-order-details.dropdown-reasons.placeholder.select-reason": "Seleziona motivo", - "store/return-app.return-order-details.error.order-not-invoiced": "L'ordine non è stato fatturato", - "store/return-app.return-order-details.error.out-of-max-days": "L'ordine supera l'intervallo massimo consentito per il reso", - "store/return-app.return-order-details.error.order-not-found": "Ordine non trovato", - "store/return-app.return-order-details.error.forbidden": "Non hai accesso a quest'ordine", - "store/return-app.return-order-details.error.unknown": "Si è verificato un errore. Si prega di riprovare.", - "store/return-app.return-order-details.title.contact-details": "Dettagli di contatto", - "store/return-app.return-order-details.inputs.name-input": "Nome", - "store/return-app.return-order-details.inputs.email-input": "Email", - "store/return-app.return-order-details.inputs.phone-input": "Telefono", - "store/return-app.return-order-details.title.pickup-address": "Indirizzo di consegna", - "store/return-app.return-order-details.title.tooltip.pickup-address": "Seleziona l'indirizzo di spedizione che si desidera impostare per la consegna o il ritiro", - "store/return-app.return-order-details.title.extra-comment": "Ulteriori commenti", - "store/return-app.return-order-details.inputs.address-input": "Indirizzo", - "store/return-app.return-order-details.inputs.city-input": "Città", - "store/return-app.return-order-details.inputs.state-input": "Provincia", - "store/return-app.return-order-details.inputs.zip-input": "Codice postale", - "store/return-app.return-order-details.inputs.country-input": "Stato", - "store/return-app.return-order-details.setting-provider.error.retry-action": "Riprova", - "store/return-app.return-order-details.setting-provider.error": "Si è verificato un errore durante il caricamento delle impostazioni dell'applicazione.", - "store/return-app.return-order-details.payment-options.card": "Carta", - "store/return-app.return-order-details.payment-options.bank": "Banca", - "store/return-app.return-order-details.payment-options.gift-card": "Buono regalo", - "store/return-app.return-order-details.payment-method.description": "Seleziona il metodo di pagamento su cui verrà emesso il rimborso", - "store/return-app.return-order-details.payment-method.default": "Il rimborso sarà emesso sul metodo di pagamento utilizzato per questo ordine", - "store/return-app.return-order-details.payment-method.account-holder": "Nome del titolare del conto", - "store/return-app.return-order-details.payment-method.iban": "IBAN", - "store/return-app.return-order-details.terms-and-conditions.form-agree": "Ho letto e accettato i {link}", - "store/return-app.return-order-details.terms-and-conditions.link": "termini e le condizioni", - "store/return-app.return-order-details.button.next": "Avanti", - "store/return-app.return-order-details.page-header.order-id": "ID ordine", - "store/return-app.return-item-details.excluded-items.warning": "Il negozio non consente di restituire questo prodotto", - "store/return-app.return-item-details.dropdown-reason.error": "È obbligatorio indicare un motivo", - "store/return-app.return-item-details.dropdown-condition.error": "È obbligatorio inserire una condizione", - "store/return-app.return-payment-methods.input-payment-method.error": "È obbligatorio inserire un metodo di pagamento", - "store/return-app.return-payment-methods.input-iban.error": "È obbligatorio inserire un IBAN", - "store/return-app.return-payment-methods.input-account-holder.error": "È obbligatorio indicare il titolare del conto", - "store/return-app.return-terms-and-conditions.checkbox.error": "Si prega di accettare i termini e le condizioni.", - "store/return-app.return-items-list.no-items-selected.error": "Nessun articolo selezionato", - "store/return-app.return-address-details.address-input.error": "È obbligatorio inserire un indirizzo", - "store/return-app.return-address-details.city-input.error": "È obbligatorio inserire una città", - "store/return-app.return-address-details.state-input.error": "È obbligatorio inserire una provincia", - "store/return-app.return-address-details.zip-input.error": "Il codice postale è obbligatorio", - "store/return-app.return-address-details.country-input.error": "È obbligatorio inserire uno stato", - "store/return-app.return-contact-details.name-input.error": "Il nome è obbligatorio", - "store/return-app.return-contact-details.phone-input.error": "È obbligatorio inserire un numero di telefono", - "store/return-app.confirm-and-submit.page-header.title": "Conferma dettagli del reso", - "store/return-app.confirm-and-submit.refund-method.title": "Metodo di pagamento del rimborso", - "store/return-app.confirm-and-submit.alert.label": "Visualizza l'elenco dei tuoi resi", - "store/return-app.confirm-and-submit.alert.error.label": "Riprova", - "store/return-app.confirm-and-submit.alert.success": "Richiesta di reso creata correttamente.", - "store/return-app.confirm-and-submit.alert.error": "Si è verificato un errore. Si prega di riprovare.", - "store/return-app.confirm-and-submit.button.back": "Indietro", - "store/return-app.confirm-and-submit.button.submit": "Invia", - "store/return-app.confirm-and-submit.pickup-address.title": "Indirizzo di consegna", - "store/return-app.confirm-and-submit.contact-details.title": "Dettagli di contatto", - "store/return-app.confirm-and-submit.user-comment.title": "Commenta", - "store/return-app.confirm-payment-methods.refund-method.p-account-holder-name": "Nome del destinatario: ", - "store/return-app.confirm-payment-methods.refund-method.p-iban": "Bonifico bancario sul conto: ", - "store/return-app.confirm-payment-methods.refund-method.p-same-as-purchase": "Stesso metodo di pagamento dell'acquisto", - "store/return-app.return-information-table.table-row.p-condition": "Condizione:", - "store/return-app.return-information-table.table-row.p-reason": "Motivo:", + "return-app.return-order-details.inputs.address-input": "Indirizzo", + "return-app.return-order-details.inputs.city-input": "Città", + "return-app.return-order-details.inputs.state-input": "Provincia", + "return-app.return-order-details.inputs.zip-input": "Codice postale", + "return-app.return-order-details.inputs.country-input": "Stato", "admin/return-app.settings.section.payment-options.available-payment-methods.card": "Carta di credito", "admin/return-app.settings.section.payment-options.available-payment-methods.gift-card": "Buono regalo", "admin/return-app.settings.section.payment-options.available-payment-methods.bank": "Bonifico bancario", @@ -180,7 +99,7 @@ "return-app-status.package-verified": "Pacco verificato", "return-app-status.refunded": "Rimborsato", "return-app-status.denied": "Respinto", - "return-app-status.cancelled": "Annullato", + "return-app-status.canceled": "Annullato", "admin/return-app.return-request-details.verify-items.button": "verifica articoli", "admin/return-app.return-request-details.verify-items.action.confirm": "Aggiorna stato", "admin/return-app.return-request-details.verify-items.action.cancel": "Annulla", @@ -213,7 +132,6 @@ "return-app.return-request-details.table.product-info.sold-by": "Venduto da: {seller}", "return-app.return-request-details.table.product-info.condition": "Condizione: {condition}", "return-app.return-request-details.table.verification-status.denied": "Respinto", - "return-app.return-request-details.table.verification-status.cancelled": "Annullato", "return-app.return-request-details.table.verification-status.approved": "Approvato", "return-app.return-request-details.table.verification-status.new": "Nuovo", "return-app.return-request-details.table.verification-status.partially-approved": "Parzialmente approvato {quantityRefunded}/{quantity}", @@ -267,7 +185,7 @@ "return-app-status.timeline.package-verified": "Pacco verificato", "return-app-status.timeline.refunded": "Rimborsato", "return-app-status.timeline.denied": "Rifiutato", - "return-app-status.timeline.cancelled": "Annullato", + "return-app-status.timeline.canceled": "Annullato", "admin/return-app.return-request-list.page-header.title": "Elenco delle richieste di reso", "admin/return-app.return-request-list.page-header.subTitle": "Tutte le richieste di reso create dagli utenti del negozio. Clicca sull'ID di una richiesta per saperne di più.", "return-app.return-request-list.error.title": "Errore durante il caricamento dell'elenco", @@ -278,6 +196,7 @@ "return-app.return-request-list.table-data.requestId": "ID richiesta", "return-app.return-request-list.table-data.sequenceNumber": "Numero sequenziale", "return-app.return-request-list.table-data.orderId": "ID ordine", + "return-app.return-request-list.table-data.sellerName": "ID venditore", "return-app.return-request-list.table-data.createdDate": "Data di creazione", "return-app.return-request-list.table-data.status": "Stato", "return-app.return-request-list.table-filters.fromDate": "Dal", @@ -288,7 +207,7 @@ "return-app.return-request-list.table-jumpToPage.cta": "VAI", "store/return-app.return-request-list.page-header.title": "I miei resi", "store/return-app.return-request-list.page-header.goBack": "Torna indietro", - "store/return-app.return-request-list.page-header.cta": "Nuova richiesta", + "return-app.return-request-list.page-header.cta": "Nuova richiesta", "return-app.return-request-list.table.status.new": "Nuovo", "return-app.return-request-list.table.status.processing": "In elaborazione", "return-app.return-request-list.table.status.pickedup-from-client": "Ritirato dal cliente", @@ -296,7 +215,7 @@ "return-app.return-request-list.table.status.package-verified": "Pacco verificato", "return-app.return-request-list.table.status.refunded": "Rimborsato", "return-app.return-request-list.table.status.denied": "Rifiutato", - "return-app.return-request-list.table.status.cancelled": "Annullato", + "return-app.return-request-list.table.status.canceled": "Annullato", "return-app.return-request-list.table.status.allStatus": "Stato", "return-app.return-request-details.table.status-history.header.created-at": "Creato il", "return-app.return-request-details.table.status-history.header.status": "Stato", @@ -314,10 +233,6 @@ "admin/return-app.settings.modal-warning.third-paragraph": "Se clicci su \"Modifica\", i giorni massimi per un reso verranno ridotti da {maxDays} a {customMaxDays}. Questo numero è il numero massimo di giorni che verrà mostrato nelle tue opzioni di reso personalizzate.", "admin/return-app.settings.modal-warning.confirm": "Modifica", "admin/return-app.settings.modal-warning.cancel": "Annulla", - "store/return-app.return-order-details.pickup-address.drop-off-points": "Seleziona un punto di riconsegna", - "store/return-app.return-order-details.pickup-address.drop-off-points.tooltip": "Puoi restituire i tuoi articoli in uno dei nostri punti di riconsegna selezionati", - "store/return-app.return-order-details.pickup-address.drop-off-points.dropdown.placehoder": "Seleziona un punto di riconsegna", - "store/return-app.return-order-details.pickup-address.drop-off-points.dropdown.error": "Si è verificato un errore durante il caricamento dei punti di riconsegna", "admin/return-app.return-request-details.localized-product-name.tooltip": "Nome dell'articolo originale dell'ordine", "admin/return-app.settings.section.payment-options.refund-method-strategy.checkbox.label": "Rimborsa richieste automaticamente", "admin/return-app.settings.section.payment-options.refund-method-strategy.checkbox.description": "Crea automaticamente una fattura di reso nell'OMS per le richieste", @@ -328,5 +243,108 @@ "return-app.return-request-details.cancellation.modal.adminAllow": "

Attenzione: lo stato di questa richiesta sarà impostato su ANNULLATO.

L'utente verrà notificato via email e potrà creare una nuova richiesta di reso con gli articoli della richiesta annullata.

Se questa non è la tua intenzione, imposta lo stato della richiesta su RIFIUTATO.

", "return-app.return-request-details.cancellation.modal.adminRefuse": "

Siamo spiacenti, non è possibile annullare questa richiesta a causa del suo stato attuale.

", "return-app.return-request-details.cancellation.modal.storeAllow": "

L'annullamento di questa richiesta consentirà di utilizzare gli articoli attuali in una nuova richiesta di reso.

Questa azione è irreversibile.

", - "return-app.return-request-details.cancellation.modal.storeRefuse": "

Siamo spiacenti, è necessario contattare il team di assistenza per annullare questa richiesta a causa del suo stato attuale.

" + "return-app.return-request-details.cancellation.modal.storeRefuse": "

Siamo spiacenti, è necessario contattare il team di assistenza per annullare questa richiesta a causa del suo stato attuale.

", + "return-app.return-order-details.page-header.link": "Torniamo agli ordini", + "return-app.return-order-details.page-header.title": "Modulo richiesta reso", + "return-app.return-order-details.page-header.subtitle": "Seleziona i prodotti che desideri rimborsare", + "return-app.return-order-details.section-products": "Prodotti disponibili per il reso", + "return-app.return-order-details.section-details": "Informazioni sui contatti", + "return-app.return-order-details.section-payment": "Metodo di pagamento del rimborso", + "return-app.return-order-details.page-header.creation-date": "Data di creazione", + "return-app.return-order-details.table-header.product": "Prodotto", + "return-app.return-order-details.table-header.quantity": "Quantità", + "return-app.return-order-details.table-header.available-to-return": "Disponibile al reso", + "return-app.return-order-details.table-header.quantity-to-return": "Quantità da restituire", + "return-app.return-order-details.table-header.reason": "Motivo", + "return-app.return-order-details.table-header.condition": "Condizione", + "return-app.return-order-details.dropdown-reasons.accidental-order": "Ordine accidentale", + "return-app.return-order-details.dropdown-reasons.better-price": "Prezzo migliore", + "return-app.return-order-details.dropdown-reasons.performance": "Prestazione", + "return-app.return-order-details.dropdown-reasons.incompatible": "Incompatibile", + "return-app.return-order-details.dropdown-reasons.item-damaged": "Articolo danneggiato", + "return-app.return-order-details.dropdown-reasons.missed-delivery": "Mancata consegna", + "return-app.return-order-details.dropdown-reasons.missing-parts": "Parti mancanti", + "return-app.return-order-details.dropdown-reasons.box-damaged": "Scatola danneggiata", + "return-app.return-order-details.dropdown-reasons.different-product": "Prodotto diverso", + "return-app.return-order-details.dropdown-reasons.defective": "Difettoso", + "return-app.return-order-details.dropdown-reasons.arrived-in-addition": "Arrivato come Extra", + "return-app.return-order-details.dropdown-reasons.no-longer-needed": "Non è più necessario", + "return-app.return-order-details.dropdown-reasons.unauthorized-purchase": "Acquisto non autorizzato", + "return-app.return-order-details.dropdown-reasons.different-from-website": "Diverso dal sito web", + "return-app.return-order-details.dropdown-reasons.other-reason": "Un'altra ragione", + "return-app.return-order-details.dropdown-reasons.placeholder.select-reason": "Seleziona il motivo", + "return-app.return-order-details.title.contact-details": "Dettagli del contatto", + "return-app.return-order-details.inputs.name-input": "Nome", + "return-app.return-order-details.inputs.email-input": "E-mail", + "return-app.return-order-details.inputs.phone-input": "Telefono", + "return-app.return-order-details.title.pickup-address": "Indirizzo di consegna", + "return-app.return-order-details.title.tooltip.pickup-address": "Seleziona l'indirizzo di spedizione che desideri per la consegna o il ritiro", + "return-app.return-order-details.title.extra-comment": "Commento aggiuntivo", + "return-app.return-order-details.payment-options.card": "Carta", + "return-app.return-order-details.payment-options.bank": "Banca", + "return-app.return-order-details.payment-options.gift-card": "Carta regalo", + "return-app.return-order-details.payment-method.description": "Seleziona il metodo di pagamento a cui verrà emesso il rimborso", + "return-app.return-order-details.payment-method.default": "Il rimborso verrà emesso sul metodo di pagamento utilizzato per questo ordine", + "return-app.return-order-details.payment-method.account-holder": "Nome del titolare", + "return-app.return-order-details.payment-method.iban": "STAVAMO ANDANDO", + "return-app.return-order-details.terms-and-conditions.form-agree": "Ho letto e accetto il {link}", + "return-app.return-order-details.terms-and-conditions.link": "Termini e Condizioni", + "return-app.return-order-details.button.next": "Prossimo", + "return-app.return-order-details.page-header.order-id": "ID ordine", + "return-app.return-item-details.excluded-items.warning": "Il negozio non consente la restituzione di questo prodotto", + "return-app.return-item-details.dropdown-reason.error": "La ragione è richiesta", + "return-app.return-item-details.dropdown-condition.error": "La condizione è richiesta", + "return-app.return-payment-methods.input-payment-method.error": "Il metodo di pagamento è obbligatorio", + "return-app.return-payment-methods.input-iban.error": "L'IBAN è obbligatorio", + "return-app.return-payment-methods.input-iban-invalid.error": "L'IBAN non è valido", + "return-app.return-payment-methods.input-account-holder.error": "Il titolare del conto è obbligatorio", + "return-app.return-terms-and-conditions.checkbox.error": "Si prega di accettare i termini e le condizioni.", + "return-app.return-items-list.no-items-selected.error": "Nessun elemento selezionato", + "return-app.return-address-details.address-input.error": "L'indirizzo è obbligatorio", + "return-app.return-address-details.city-input.error": "La città è obbligatoria", + "return-app.return-address-details.state-input.error": "Lo stato è obbligatorio", + "return-app.return-address-details.zip-input.error": "Il codice postale è obbligatorio", + "return-app.return-address-details.country-input.error": "Il paese è obbligatorio", + "return-app.return-contact-details.name-input.error": "Il nome è obbligatorio", + "return-app.return-contact-details.phone-input.error": "Il telefono è obbligatorio", + "return-app.confirm-and-submit.page-header.title": "Conferma i dettagli del reso", + "return-app.confirm-and-submit.refund-method.title": "Metodo di pagamento del rimborso", + "return-app.confirm-and-submit.alert.label": "Visualizza l'elenco dei resi", + "return-app.confirm-and-submit.alert.error.label": "Riprova", + "return-app.confirm-and-submit.alert.success": "La richiesta di reso è stata creata con successo.", + "return-app.confirm-and-submit.alert.error": "Qualcosa è andato storto. Per favore riprova.", + "return-app.confirm-and-submit.button.back": "Indietro", + "return-app.confirm-and-submit.button.submit": "Invia", + "return-app.confirm-and-submit.pickup-address.title": "Indirizzo di consegna", + "return-app.confirm-and-submit.contact-details.title": "Dettagli del contatto", + "return-app.confirm-and-submit.user-comment.title": "Commento", + "return-app.confirm-payment-methods.refund-method.p-account-holder-name": "Nome destinatario:", + "return-app.confirm-payment-methods.refund-method.p-iban": "Bonifico bancario in conto:", + "return-app.confirm-payment-methods.refund-method.p-same-as-purchase": "Uguale all'acquisto", + "return-app.return-information-table.table-row.p-condition": "Condizione:", + "return-app.return-information-table.table-row.p-reason": "Motivo:", + "return-app.return-order-details.pickup-address.drop-off-points": "Seleziona un punto di consegna", + "return-app.return-order-details.pickup-address.drop-off-points.tooltip": "Puoi restituire i tuoi articoli in uno dei nostri punti di consegna selezionati", + "return-app.return-order-details.pickup-address.drop-off-points.dropdown.placehoder": "Seleziona un punto di consegna", + "return-app.return-order-details.pickup-address.drop-off-points.dropdown.error": "Si è verificato un errore durante il caricamento dei punti di consegna", + "admin/return-app.sellers.settings.navigation.label": "Impostazioni resi venditori", + "admin/return-app.sellers-settings-list.page-header.title": "Elenco impostazioni venditori", + "admin/return-app.sellers-settings-list.page-header.subTitle": "Tutte le impostazioni create dai venditori restituiscono l'app. Fai clic su un ID impostazioni per vedere di più.", + "admin/return-app.return-add.page-header.title": "Nuovo Ritorno", + "admin/return-app.return-add.page-header.subTitle": "Seleziona un articolo per avviare la procedura di richiesta di reso.", + "return-app.sellers-settings-list.table-data.settingId": "ID impostazione", + "return-app.return-request-details.current-status.sellerName": "NomeVenditore: {sellerName}", + "store/return-app.return-order-details.error.order-not-invoiced": "L'ordine non è stato fatturato", + "store/return-app.return-order-details.setting-provider.error.retry-action": "Riprova", + "store/return-app.return-order-details.setting-provider.error": "Si è verificato un errore durante il caricamento delle impostazioni dell'applicazione.", + "store/return-app.return-order-details.error.out-of-max-days": "L'ordine supera l'intervallo massimo consentito per il reso", + "store/return-app.return-order-details.error.order-not-found": "Ordine non trovato", + "store/return-app.return-order-details.error.forbidden": "Non hai accesso a quest'ordine", + "store/return-app.return-order-details.error.unknown": "Si è verificato un errore. Si prega di riprovare.", + "admin/return-app.settings.order-status.label": "Lo stato dell'ordine", + "admin/return-app.settings.order-status.placeholder": "Selezionare l'opzione", + "return-app.return-request-list.table-data.searchBySellerName": "ID venditore", + "return-app.return-request-list.table-filters.export-returns": "ESPORTA", + "admin/return-app.settings.section.general-options.enable-highlight-form-message.label": "Abilita un messaggio personalizzabile nei moduli di reso", + "admin/return-app.settings.section.general-options.enable-highlight-form-message.description": "Se abilitato, in cima al modulo utilizzato per compilare i dati personali dell'utente, verrà visualizzato un messaggio. Personalizzabile tramite \"Messaggi\"" } diff --git a/messages/nl.json b/messages/nl.json index d67956c80..cd09eddec 100644 --- a/messages/nl.json +++ b/messages/nl.json @@ -53,107 +53,26 @@ "store/return-app.link": "Mijn retourzendingen", "store/return-app.request-return.page.header": "Nieuwe retour aanvragen", "store/return-app.request-return.page.header.subtitle": "Selecteer een bestelling om het retourverzoek te starten", - "store/return-app.return-order-list.table-header.order-id": "Bestel-ID", - "store/return-app.return-order-list.table-header.creation-date": "Aanmaakdatum", - "store/return-app.return-order-list.table-header.items-to-return": "Beschikbare items voor retour", - "store/return-app.return-order-list.table-header.select-order": "Kies bestelling", - "store/return-app.return-order-list.table-empty-state-label.no-orders-available": "Geen bestellingen beschikbaar om te retouren", - "store/return-app.return-order-list.table-pagination.text-of": "van", - "store/return-app.return-order-details.page-header.link": "Terug naar bestellingen", - "store/return-app.return-order-details.page-header.title": "Retouraanvraagformulier", - "store/return-app.return-order-details.page-header.subtitle": "Selecteer de producten die u wilt terugbetalen", - "store/return-app.return-order-details.section-products": "Producten beschikbaar voor retour", - "store/return-app.return-order-details.section-details": "Contactgegevens", - "store/return-app.return-order-details.section-payment": "Betaalmethode voor terugbetaling", - "store/return-app.return-order-details.page-header.creation-date": "Aanmaakdatum", - "store/return-app.return-order-details.table-header.product": "Artikel", - "store/return-app.return-order-details.table-header.quantity": "Aantal artikelen", - "store/return-app.return-order-details.table-header.available-to-return": "Beschikbaar voor retour", - "store/return-app.return-order-details.table-header.quantity-to-return": "Retourhoeveelheid", - "store/return-app.return-order-details.table-header.reason": "Reden", - "store/return-app.return-order-details.table-header.condition": "Voorwaarde", + "return-app.return-order-list.table-header.order-id": "Bestel-ID", + "return-app.return-order-list.table-header.creation-date": "Aanmaakdatum", + "return-app.return-order-list.table-header.items-to-return": "Beschikbare items voor retour", + "return-app.return-order-list.table-header.select-order": "Kies bestelling", + "return-app.return-order-list.table-empty-state-label.no-orders-available": "Geen bestellingen beschikbaar om te retouren", + "return-app.return-order-list.table-pagination.text-of": "van", + "return-app.return-order-list.table-header.linkLabel": "Terug naar retourzendingen", + "return-app.return-order-list.page-header.title": "Bestellijst", + "return-app.return-order-list.table-header.seller-name": "Naam verkoper", + "return-app.return-order-list.page-header.subTitle": "Alle retourbestellingen. Klik op een bestel-ID om een retourzending te maken.", "return-app.return-order-details.conditions.new-with-box": "Nieuwe met box", "return-app.return-order-details.conditions.new-without-box": "Nieuwe zonder box", "return-app.return-order-details.conditions.used-with-box": "Gebruikt met box", "return-app.return-order-details.conditions.used-without-box": "Gebruikt zonder box", "return-app.return-order-details.dropdown-conditions.placeholder.select-condition": "Selecteer voorwaarde", - "store/return-app.return-order-details.dropdown-reasons.accidental-order": "Onbedoelde bestelling", - "store/return-app.return-order-details.dropdown-reasons.better-price": "Betere prijs", - "store/return-app.return-order-details.dropdown-reasons.performance": "Prestatie", - "store/return-app.return-order-details.dropdown-reasons.incompatible": "Incompatibel", - "store/return-app.return-order-details.dropdown-reasons.item-damaged": "Beschadigd item", - "store/return-app.return-order-details.dropdown-reasons.missed-delivery": "Gemiste levering", - "store/return-app.return-order-details.dropdown-reasons.missing-parts": "Ontbrekende onderdelen", - "store/return-app.return-order-details.dropdown-reasons.box-damaged": "Beschadigde box", - "store/return-app.return-order-details.dropdown-reasons.different-product": "Ander product", - "store/return-app.return-order-details.dropdown-reasons.defective": "Beschadigd", - "store/return-app.return-order-details.dropdown-reasons.arrived-in-addition": "Gearriveerd als extra", - "store/return-app.return-order-details.dropdown-reasons.no-longer-needed": "Niet langer nodig", - "store/return-app.return-order-details.dropdown-reasons.unauthorized-purchase": "Onbevoegde aankoop", - "store/return-app.return-order-details.dropdown-reasons.different-from-website": "Verschillende van website", - "store/return-app.return-order-details.dropdown-reasons.other-reason": "Andere reden", - "store/return-app.return-order-details.dropdown-reasons.placeholder.select-reason": "Reden selecteren", - "store/return-app.return-order-details.error.order-not-invoiced": "De bestelling is niet gefactureerd", - "store/return-app.return-order-details.error.out-of-max-days": "De bestelling overschrijdt de maximale retourperiode", - "store/return-app.return-order-details.error.order-not-found": "Bestelling niet gevonden", - "store/return-app.return-order-details.error.forbidden": "U heeft geen toegang tot deze bestelling", - "store/return-app.return-order-details.error.unknown": "Er is iets misgegaan. Probeer het opnieuw.", - "store/return-app.return-order-details.title.contact-details": "Contactgegevens", - "store/return-app.return-order-details.inputs.name-input": "Naam", - "store/return-app.return-order-details.inputs.email-input": "E-mail", - "store/return-app.return-order-details.inputs.phone-input": "Telefoon", - "store/return-app.return-order-details.title.pickup-address": "Leveringsadres", - "store/return-app.return-order-details.title.tooltip.pickup-address": "Selecteer het verzendadres dat u wilt voor levering of afhalen", - "store/return-app.return-order-details.title.extra-comment": "Aanvullende opmerking", - "store/return-app.return-order-details.inputs.address-input": "Adres", - "store/return-app.return-order-details.inputs.city-input": "Stad", - "store/return-app.return-order-details.inputs.state-input": "Staat", - "store/return-app.return-order-details.inputs.zip-input": "Postcode", - "store/return-app.return-order-details.inputs.country-input": "Land", - "store/return-app.return-order-details.setting-provider.error.retry-action": "Opnieuw proberen", - "store/return-app.return-order-details.setting-provider.error": "Er is een fout opgetreden bij het laden van app-instellingen.", - "store/return-app.return-order-details.payment-options.card": "Kaart", - "store/return-app.return-order-details.payment-options.bank": "Bank", - "store/return-app.return-order-details.payment-options.gift-card": "Geschenkkaart", - "store/return-app.return-order-details.payment-method.description": "Selecteer de betaalmethode waarnaar de terugbetaling zal worden uitgevoerd", - "store/return-app.return-order-details.payment-method.default": "De terugbetaling zal worden uitgegeven aan de betaalmethode die voor deze bestelling wordt gebruikt", - "store/return-app.return-order-details.payment-method.account-holder": "Naam rekeninghouder", - "store/return-app.return-order-details.payment-method.iban": "IBAN", - "store/return-app.return-order-details.terms-and-conditions.form-agree": "Ik heb de {link} gelezen en accepteer het", - "store/return-app.return-order-details.terms-and-conditions.link": "algemene voorwaarden", - "store/return-app.return-order-details.button.next": "Volgende", - "store/return-app.return-order-details.page-header.order-id": "Bestel-id", - "store/return-app.return-item-details.excluded-items.warning": "Winkel laat dit product niet retourneren", - "store/return-app.return-item-details.dropdown-reason.error": "Reden is vereist", - "store/return-app.return-item-details.dropdown-condition.error": "Voorwaarde is vereist", - "store/return-app.return-payment-methods.input-payment-method.error": "Betaalmethode is vereist", - "store/return-app.return-payment-methods.input-iban.error": "IBAN is vereist", - "store/return-app.return-payment-methods.input-account-holder.error": "Rekeninghouder is vereist", - "store/return-app.return-terms-and-conditions.checkbox.error": "Algemene voorwaarden dienen te worden geaccepteerd.", - "store/return-app.return-items-list.no-items-selected.error": "Geen items geselecteerd", - "store/return-app.return-address-details.address-input.error": "Adres is verplicht", - "store/return-app.return-address-details.city-input.error": "Stad is verplicht", - "store/return-app.return-address-details.state-input.error": "Staat is vereist", - "store/return-app.return-address-details.zip-input.error": "Postcode is vereist", - "store/return-app.return-address-details.country-input.error": "Land is vereist", - "store/return-app.return-contact-details.name-input.error": "Naam is vereist", - "store/return-app.return-contact-details.phone-input.error": "Telefoon is vereist", - "store/return-app.confirm-and-submit.page-header.title": "Bevestig retourgegevens", - "store/return-app.confirm-and-submit.refund-method.title": "Betaalmethode voor terugbetaling", - "store/return-app.confirm-and-submit.alert.label": "Bekijk uw retourlijst", - "store/return-app.confirm-and-submit.alert.error.label": "Probeer opnieuw", - "store/return-app.confirm-and-submit.alert.success": "Het retourverzoek is aangemaakt.", - "store/return-app.confirm-and-submit.alert.error": "Er is iets fout gegaan. Probeer het opnieuw.", - "store/return-app.confirm-and-submit.button.back": "Terug", - "store/return-app.confirm-and-submit.button.submit": "Verzend", - "store/return-app.confirm-and-submit.pickup-address.title": "Leveringsadres", - "store/return-app.confirm-and-submit.contact-details.title": "Contactgegevens", - "store/return-app.confirm-and-submit.user-comment.title": "Opmerking", - "store/return-app.confirm-payment-methods.refund-method.p-account-holder-name": "Naam van de ontvanger: ", - "store/return-app.confirm-payment-methods.refund-method.p-iban": "Bankoverschrijving naar rekening: ", - "store/return-app.confirm-payment-methods.refund-method.p-same-as-purchase": "Hetzelfde als de aankoop", - "store/return-app.return-information-table.table-row.p-condition": "Voorwaarde:", - "store/return-app.return-information-table.table-row.p-reason": "Reden:", + "return-app.return-order-details.inputs.address-input": "Adres", + "return-app.return-order-details.inputs.city-input": "Stad", + "return-app.return-order-details.inputs.state-input": "Staat", + "return-app.return-order-details.inputs.zip-input": "Postcode", + "return-app.return-order-details.inputs.country-input": "Land", "admin/return-app.settings.section.payment-options.available-payment-methods.card": "Kredietkaart", "admin/return-app.settings.section.payment-options.available-payment-methods.gift-card": "Cadeaubon", "admin/return-app.settings.section.payment-options.available-payment-methods.bank": "Bankoverschrijving", @@ -180,7 +99,7 @@ "return-app-status.package-verified": "Pakket geverifieerd", "return-app-status.refunded": "Terugbetaald", "return-app-status.denied": "Geweigerd", - "return-app-status.cancelled": "Geannuleerd", + "return-app-status.canceled": "Geannuleerd", "admin/return-app.return-request-details.verify-items.button": "items verifiëren", "admin/return-app.return-request-details.verify-items.action.confirm": "Status bijwerken", "admin/return-app.return-request-details.verify-items.action.cancel": "Annuleren", @@ -213,7 +132,6 @@ "return-app.return-request-details.table.product-info.sold-by": "Verkocht door: {seller}", "return-app.return-request-details.table.product-info.condition": "Voorwaarde: {condition}", "return-app.return-request-details.table.verification-status.denied": "Geweigerd", - "return-app.return-request-details.table.verification-status.cancelled": "Geannuleerd", "return-app.return-request-details.table.verification-status.approved": "Goedgekeurd", "return-app.return-request-details.table.verification-status.new": "Nieuw", "return-app.return-request-details.table.verification-status.partially-approved": "Gedeeltelijk goedgekeurd {quantityRefunded}/{quantity}", @@ -267,7 +185,7 @@ "return-app-status.timeline.package-verified": "Pakket geverifieerd", "return-app-status.timeline.refunded": "Terugbetaald", "return-app-status.timeline.denied": "Geweigerd", - "return-app-status.timeline.cancelled": "Geannuleerd", + "return-app-status.timeline.canceled": "Geannuleerd", "admin/return-app.return-request-list.page-header.title": "Return Requests List", "admin/return-app.return-request-list.page-header.subTitle": "All return requests created by the store users. Click on a Request ID to see more.", "return-app.return-request-list.error.title": "Fout bij laden lijst", @@ -288,7 +206,7 @@ "return-app.return-request-list.table-jumpToPage.cta": "GA", "store/return-app.return-request-list.page-header.title": "Mijn retourzendingen", "store/return-app.return-request-list.page-header.goBack": "Ga terug", - "store/return-app.return-request-list.page-header.cta": "Nieuwe aanvraag", + "return-app.return-request-list.page-header.cta": "Nieuwe aanvraag", "return-app.return-request-list.table.status.new": "Nieuw", "return-app.return-request-list.table.status.processing": "Verwerken", "return-app.return-request-list.table.status.pickedup-from-client": "Afgehaald bij klant", @@ -296,7 +214,7 @@ "return-app.return-request-list.table.status.package-verified": "Pakket geverifieerd", "return-app.return-request-list.table.status.refunded": "Terugbetaald", "return-app.return-request-list.table.status.denied": "Geweigerd", - "return-app.return-request-list.table.status.cancelled": "Geannuleerd", + "return-app.return-request-list.table.status.canceled": "Geannuleerd", "return-app.return-request-list.table.status.allStatus": "Status", "return-app.return-request-details.table.status-history.header.created-at": "Gemaakt op", "return-app.return-request-details.table.status-history.header.status": "Status", @@ -307,6 +225,7 @@ "return-app.return-request-details.order-id.link": "Bestelling {orderId}\"", "return-app.return-request-details.current-status.request-id": "Aanvraag-ID: {id}", "return-app.return-request-details.current-status.status": "Status:", + "return-app.return-request-details.current-status.sellerName": "SellerName: {sellerName}", "admin/return-app.return-request-list.table-data.requestId.tooltip": "Klanten kunnen hun aanvraag-ID zien in de aanvraaggegevens", "admin/return-app.settings.modal-warning.title": "Controleer uw instellingen", "admin/return-app.settings.modal-warning.first-paragraph": "Het lijkt erop dat u probeert de aangepaste retouropties op te slaan, waarvan er geen alle {maxDays} bereiken. Dit is het maximum aantal dagen voor een retouraanvraag.", @@ -314,10 +233,6 @@ "admin/return-app.settings.modal-warning.third-paragraph": "Als u op Bewerken klikt, wordt het maximum aantal dagen voor een retour teruggebracht van {maxDays} tot {customMaxDays}. Dit zijn de maximale dagen die worden weergegeven in uw aangepaste retouropties.", "admin/return-app.settings.modal-warning.confirm": "Bewerken", "admin/return-app.settings.modal-warning.cancel": "Annuleren", - "store/return-app.return-order-details.pickup-address.drop-off-points": "Selecteer een afleverpunt", - "store/return-app.return-order-details.pickup-address.drop-off-points.tooltip": "U kunt je items retourneren in een van onze geselecteerde afhaalpunten", - "store/return-app.return-order-details.pickup-address.drop-off-points.dropdown.placehoder": "Selecteer een afleverpunt", - "store/return-app.return-order-details.pickup-address.drop-off-points.dropdown.error": "Er is een fout opgetreden bij het laden van de afhaalpunten", "admin/return-app.return-request-details.localized-product-name.tooltip": "Oorspronkelijke item naam van de bestelling", "admin/return-app.settings.section.payment-options.refund-method-strategy.checkbox.label": "Automatisch aanvragen terugbetalen", "admin/return-app.settings.section.payment-options.refund-method-strategy.checkbox.description": "Automatisch de retourfactuur aanmaken in de OMS voor de aanvragen", @@ -328,5 +243,106 @@ "return-app.return-request-details.cancellation.modal.adminAllow": "

Let op: De status van dit verzoek wordt ingesteld op GEANNULEERD.

Dit stelt de gebruiker via e-mail op de hoogte en stelt hem in staat een nieuwe retouraanvraag te maken met de items van het geannuleerde verzoek.

Als dat niet uw bedoeling is, stel het verzoek dan in als GEWEIGERD.

", "return-app.return-request-details.cancellation.modal.adminRefuse": "

Sorry, het is niet mogelijk om dit verzoek te annuleren vanwege de huidige status.

", "return-app.return-request-details.cancellation.modal.storeAllow": "

Als u dit verzoek annuleert, kunnen de huidige items worden gebruikt in een nieuwe retouraanvraag.

Deze actie is onomkeerbaar.

", - "return-app.return-request-details.cancellation.modal.storeRefuse": "

Sorry, u moet contact opnemen met het ondersteuningsteam om dit verzoek te annuleren vanwege de huidige status.

" + "return-app.return-request-details.cancellation.modal.storeRefuse": "

Sorry, u moet contact opnemen met het ondersteuningsteam om dit verzoek te annuleren vanwege de huidige status.

", + "return-app.return-order-details.page-header.link": "Terug naar bestellingen", + "return-app.return-order-details.page-header.title": "Retour aanvraagformulier", + "return-app.return-order-details.page-header.subtitle": "Selecteer de producten die je wilt terugbetalen", + "return-app.return-order-details.section-products": "Producten beschikbaar voor retournering", + "return-app.return-order-details.section-details": "Contactgegevens", + "return-app.return-order-details.section-payment": "Betalingswijze terugbetalen", + "return-app.return-order-details.page-header.creation-date": "Aanmaakdatum", + "return-app.return-order-details.table-header.product": "Product", + "return-app.return-order-details.table-header.quantity": "Hoeveelheid", + "return-app.return-order-details.table-header.available-to-return": "Beschikbaar om te retourneren", + "return-app.return-order-details.table-header.quantity-to-return": "Aantal te retourneren", + "return-app.return-order-details.table-header.reason": "Reden", + "return-app.return-order-details.table-header.condition": "Voorwaarde", + "return-app.return-order-details.dropdown-reasons.accidental-order": "Toevallige bestelling", + "return-app.return-order-details.dropdown-reasons.better-price": "Betere prijs", + "return-app.return-order-details.dropdown-reasons.performance": "Prestatie", + "return-app.return-order-details.dropdown-reasons.incompatible": "Onverenigbaar", + "return-app.return-order-details.dropdown-reasons.item-damaged": "Beschadigd item", + "return-app.return-order-details.dropdown-reasons.missed-delivery": "Gemiste bezorging", + "return-app.return-order-details.dropdown-reasons.missing-parts": "Missende onderdelen", + "return-app.return-order-details.dropdown-reasons.box-damaged": "Beschadigde doos", + "return-app.return-order-details.dropdown-reasons.different-product": "Ander produkt", + "return-app.return-order-details.dropdown-reasons.defective": "Defecte", + "return-app.return-order-details.dropdown-reasons.arrived-in-addition": "Aangekomen als Extra", + "return-app.return-order-details.dropdown-reasons.no-longer-needed": "Niet langer nodig", + "return-app.return-order-details.dropdown-reasons.unauthorized-purchase": "Ongeautoriseerde aankoop", + "return-app.return-order-details.dropdown-reasons.different-from-website": "Anders dan website", + "return-app.return-order-details.dropdown-reasons.other-reason": "Andere reden", + "return-app.return-order-details.dropdown-reasons.placeholder.select-reason": "Selecteer reden", + "return-app.return-order-details.title.contact-details": "Contact details", + "return-app.return-order-details.inputs.name-input": "Naam", + "return-app.return-order-details.inputs.email-input": "E-mail", + "return-app.return-order-details.inputs.phone-input": "Telefoon", + "return-app.return-order-details.title.pickup-address": "Bezorgadres", + "return-app.return-order-details.title.tooltip.pickup-address": "Selecteer het verzendadres dat u wilt laten bezorgen of ophalen", + "return-app.return-order-details.title.extra-comment": "Toegevoegd commentaar", + "return-app.return-order-details.payment-options.card": "Kaart", + "return-app.return-order-details.payment-options.bank": "Bank", + "return-app.return-order-details.payment-options.gift-card": "Cadeaukaart", + "return-app.return-order-details.payment-method.description": "Selecteer de betaalmethode waarop de terugbetaling zal worden uitgevoerd", + "return-app.return-order-details.payment-method.default": "De terugbetaling wordt uitgevoerd via de betaalmethode die voor deze bestelling is gebruikt", + "return-app.return-order-details.payment-method.account-holder": "Naam rekeninghouder", + "return-app.return-order-details.payment-method.iban": "WE GAAN", + "return-app.return-order-details.terms-and-conditions.form-agree": "Ik heb de {link} gelezen en geaccepteerd", + "return-app.return-order-details.terms-and-conditions.link": "voorwaarden", + "return-app.return-order-details.button.next": "Volgende", + "return-app.return-order-details.page-header.order-id": "Order ID", + "return-app.return-item-details.excluded-items.warning": "Store staat niet toe dat dit product wordt geretourneerd", + "return-app.return-item-details.dropdown-reason.error": "Reden is vereist", + "return-app.return-item-details.dropdown-condition.error": "Voorwaarde is vereist", + "return-app.return-payment-methods.input-payment-method.error": "Betaalmethode is vereist", + "return-app.return-payment-methods.input-iban.error": "IBAN is vereist", + "return-app.return-payment-methods.input-iban-invalid.error": "IBAN is niet geldig", + "return-app.return-payment-methods.input-account-holder.error": "Accounthouder is verplicht", + "return-app.return-terms-and-conditions.checkbox.error": "Accepteer de algemene voorwaarden.", + "return-app.return-items-list.no-items-selected.error": "Geen items geselecteerd", + "return-app.return-address-details.address-input.error": "adres is nodig", + "return-app.return-address-details.city-input.error": "Plaats is vereist", + "return-app.return-address-details.state-input.error": "Staat is vereist", + "return-app.return-address-details.zip-input.error": "Postcode is vereist", + "return-app.return-address-details.country-input.error": "Land is vereist", + "return-app.return-contact-details.name-input.error": "Naam is vereist", + "return-app.return-contact-details.phone-input.error": "Telefoon is verplicht", + "return-app.confirm-and-submit.page-header.title": "Bevestig retourgegevens", + "return-app.confirm-and-submit.refund-method.title": "Betalingswijze terugbetaling", + "return-app.confirm-and-submit.alert.label": "Bekijk je retourlijst", + "return-app.confirm-and-submit.alert.error.label": "Opnieuw proberen", + "return-app.confirm-and-submit.alert.success": "Het retourverzoek is succesvol aangemaakt.", + "return-app.confirm-and-submit.alert.error": "Er is iets fout gegaan. Probeer het opnieuw.", + "return-app.confirm-and-submit.button.back": "Rug", + "return-app.confirm-and-submit.button.submit": "Indienen", + "return-app.confirm-and-submit.pickup-address.title": "Bezorgadres", + "return-app.confirm-and-submit.contact-details.title": "Contact details", + "return-app.confirm-and-submit.user-comment.title": "Opmerking", + "return-app.confirm-payment-methods.refund-method.p-account-holder-name": "Naam ontvanger:", + "return-app.confirm-payment-methods.refund-method.p-iban": "Bankoverschrijving op rekening:", + "return-app.confirm-payment-methods.refund-method.p-same-as-purchase": "Zelfde als aankoop", + "return-app.return-information-table.table-row.p-condition": "Voorwaarde:", + "return-app.return-information-table.table-row.p-reason": "Reden:", + "return-app.return-order-details.pickup-address.drop-off-points": "Selecteer een afleverpunt", + "return-app.return-order-details.pickup-address.drop-off-points.tooltip": "U kunt uw artikelen retourneren in een van onze geselecteerde inleverpunten", + "return-app.return-order-details.pickup-address.drop-off-points.dropdown.placehoder": "Selecteer een afleverpunt", + "return-app.return-order-details.pickup-address.drop-off-points.dropdown.error": "Er is een fout opgetreden bij het laden van de afleverpunten", + "admin/return-app.sellers.settings.navigation.label": "Instellingen voor retourzendingen van verkopers", + "admin/return-app.sellers-settings-list.page-header.title": "Lijst met verkopersinstellingen", + "admin/return-app.sellers-settings-list.page-header.subTitle": "Alle instellingen die door verkopers zijn gemaakt, retourneren de app. Klik op een instellingen-ID om meer te zien.", + "admin/return-app.return-add.page-header.title": "Nieuwe terugkeer", + "admin/return-app.return-add.page-header.subTitle": "Selecteer een item om het retouraanvraagproces te starten.", + "return-app.sellers-settings-list.table-data.settingId": "ID instellen", + "return-app.return-request-list.table-data.sellerName": "Gegevenstitel van een retouraanvraag: naam verkoper", + "store/return-app.return-order-details.error.order-not-invoiced": "De bestelling is niet gefactureerd", + "store/return-app.return-order-details.setting-provider.error.retry-action": "Opnieuw proberen", + "store/return-app.return-order-details.setting-provider.error": "Er is een fout opgetreden bij het laden van app-instellingen.", + "store/return-app.return-order-details.error.out-of-max-days": "De bestelling overschrijdt de maximale retourperiode", + "store/return-app.return-order-details.error.order-not-found": "Bestelling niet gevonden", + "store/return-app.return-order-details.error.forbidden": "U heeft geen toegang tot deze bestelling", + "store/return-app.return-order-details.error.unknown": "Er is iets misgegaan. Probeer het opnieuw.", + "admin/return-app.settings.order-status.label": "Bestelstatus", + "admin/return-app.settings.order-status.placeholder": "Selecteer optie", + "return-app.return-request-list.table-data.searchBySellerName": "ID van de verkoper", + "return-app.return-request-list.table-filters.export-returns": "EXPORTEREN" } diff --git a/messages/pt.json b/messages/pt.json index a415fd4b0..3e7d729cb 100644 --- a/messages/pt.json +++ b/messages/pt.json @@ -53,107 +53,26 @@ "store/return-app.link": "Minhas devoluções", "store/return-app.request-return.page.header": "Solicitar nova devolução", "store/return-app.request-return.page.header.subtitle": "Selecione um pedido para iniciar o processo de solicitação de devolução", - "store/return-app.return-order-list.table-header.order-id": "ID do pedido", - "store/return-app.return-order-list.table-header.creation-date": "Data de criação", - "store/return-app.return-order-list.table-header.items-to-return": "Itens disponíveis para devolução", - "store/return-app.return-order-list.table-header.select-order": "Selecionar pedido", - "store/return-app.return-order-list.table-empty-state-label.no-orders-available": "Nenhum pedido disponível para devolução", - "store/return-app.return-order-list.table-pagination.text-of": "de", - "store/return-app.return-order-details.page-header.link": "Voltar aos pedidos", - "store/return-app.return-order-details.page-header.title": "Formulário para solicitar devolução", - "store/return-app.return-order-details.page-header.subtitle": "Selecione os produtos que serão reembolsados", - "store/return-app.return-order-details.section-products": "Produtos disponíveis para devolução", - "store/return-app.return-order-details.section-details": "Informações para contato", - "store/return-app.return-order-details.section-payment": "Meio de pagamento do reembolso", - "store/return-app.return-order-details.page-header.creation-date": "Data de criação", - "store/return-app.return-order-details.table-header.product": "Produto", - "store/return-app.return-order-details.table-header.quantity": "Quantidade", - "store/return-app.return-order-details.table-header.available-to-return": "Disponível para devolução", - "store/return-app.return-order-details.table-header.quantity-to-return": "Quantidade a ser devolvida", - "store/return-app.return-order-details.table-header.reason": "Motivo", - "store/return-app.return-order-details.table-header.condition": "Condição", + "return-app.return-order-list.table-header.order-id": "ID do pedido", + "return-app.return-order-list.table-header.creation-date": "Data de criação", + "return-app.return-order-list.table-header.items-to-return": "Itens disponíveis para devolução", + "return-app.return-order-list.table-header.select-order": "Selecionar pedido", + "return-app.return-order-list.table-empty-state-label.no-orders-available": "Nenhum pedido disponível para devolução", + "return-app.return-order-list.table-pagination.text-of": "de", + "return-app.return-order-list.table-header.linkLabel": "Voltar para devoluções", + "return-app.return-order-list.page-header.title": "Lista de pedidos", + "return-app.return-order-list.table-header.seller-name": "Nome do vendedor", + "return-app.return-order-list.page-header.subTitle": "Todos os pedidos de devolução. Clique em um ID de pedido para criar uma devolução.", "return-app.return-order-details.conditions.new-with-box": "Novo com caixa", "return-app.return-order-details.conditions.new-without-box": "Novo sem caixa", "return-app.return-order-details.conditions.used-with-box": "Usado com caixa", "return-app.return-order-details.conditions.used-without-box": "Usado sem caixa", "return-app.return-order-details.dropdown-conditions.placeholder.select-condition": "Selecione uma condição", - "store/return-app.return-order-details.dropdown-reasons.accidental-order": "Pedido feito acidentalmente", - "store/return-app.return-order-details.dropdown-reasons.better-price": "Preço melhor", - "store/return-app.return-order-details.dropdown-reasons.performance": "Desempenho", - "store/return-app.return-order-details.dropdown-reasons.incompatible": "Incompatível", - "store/return-app.return-order-details.dropdown-reasons.item-damaged": "Item danificado", - "store/return-app.return-order-details.dropdown-reasons.missed-delivery": "Entrega perdida", - "store/return-app.return-order-details.dropdown-reasons.missing-parts": "Peças faltando", - "store/return-app.return-order-details.dropdown-reasons.box-damaged": "Caixa danificada", - "store/return-app.return-order-details.dropdown-reasons.different-product": "Produto diferente", - "store/return-app.return-order-details.dropdown-reasons.defective": "Com defeito", - "store/return-app.return-order-details.dropdown-reasons.arrived-in-addition": "Item não solicitado (extra)", - "store/return-app.return-order-details.dropdown-reasons.no-longer-needed": "Não é mais necessário", - "store/return-app.return-order-details.dropdown-reasons.unauthorized-purchase": "Compra não autorizada", - "store/return-app.return-order-details.dropdown-reasons.different-from-website": "Diferente do site", - "store/return-app.return-order-details.dropdown-reasons.other-reason": "Outro motivo", - "store/return-app.return-order-details.dropdown-reasons.placeholder.select-reason": "Selecione um motivo", - "store/return-app.return-order-details.error.order-not-invoiced": "O pedido não foi faturado", - "store/return-app.return-order-details.error.out-of-max-days": "O pedido excede o prazo máximo de devolução", - "store/return-app.return-order-details.error.order-not-found": "Pedido não encontrado", - "store/return-app.return-order-details.error.forbidden": "Você não tem acesso a este pedido", - "store/return-app.return-order-details.error.unknown": "Ocorreu um erro. Tente novamente.", - "store/return-app.return-order-details.title.contact-details": "Informações para contato", - "store/return-app.return-order-details.inputs.name-input": "Nome", - "store/return-app.return-order-details.inputs.email-input": "Email", - "store/return-app.return-order-details.inputs.phone-input": "Celular", - "store/return-app.return-order-details.title.pickup-address": "Endereço de entrega", - "store/return-app.return-order-details.title.tooltip.pickup-address": "Selecione o endereço de envio para entrega ou retirada", - "store/return-app.return-order-details.title.extra-comment": "Comentários adicionais", - "store/return-app.return-order-details.inputs.address-input": "Endereço", - "store/return-app.return-order-details.inputs.city-input": "Cidade", - "store/return-app.return-order-details.inputs.state-input": "Estado", - "store/return-app.return-order-details.inputs.zip-input": "CEP", - "store/return-app.return-order-details.inputs.country-input": "País", - "store/return-app.return-order-details.setting-provider.error.retry-action": "Tentar novamente", - "store/return-app.return-order-details.setting-provider.error": "Ocorreu um erro ao carregar as configurações do aplicativo.", - "store/return-app.return-order-details.payment-options.card": "Cartão", - "store/return-app.return-order-details.payment-options.bank": "Banco", - "store/return-app.return-order-details.payment-options.gift-card": "Vale-presente", - "store/return-app.return-order-details.payment-method.description": "Selecione o meio de pagamento para o qual será enviado o reembolso", - "store/return-app.return-order-details.payment-method.default": "O reembolso será enviado para o meio de pagamento usado para este pedido", - "store/return-app.return-order-details.payment-method.account-holder": "Nome do titular da conta", - "store/return-app.return-order-details.payment-method.iban": "IBAN", - "store/return-app.return-order-details.terms-and-conditions.form-agree": "Eu li e aceito os {link}", - "store/return-app.return-order-details.terms-and-conditions.link": "termos e condições", - "store/return-app.return-order-details.button.next": "Próximo", - "store/return-app.return-order-details.page-header.order-id": "ID do pedido", - "store/return-app.return-item-details.excluded-items.warning": "A loja não permite que este produto seja devolvido", - "store/return-app.return-item-details.dropdown-reason.error": "É obrigatório informar um motivo", - "store/return-app.return-item-details.dropdown-condition.error": "É obrigatório informar uma condição", - "store/return-app.return-payment-methods.input-payment-method.error": "É obrigatório informar um meio de pagamento", - "store/return-app.return-payment-methods.input-iban.error": "É obrigatório informar um IBAN", - "store/return-app.return-payment-methods.input-account-holder.error": "É obrigatório informar um titular da conta", - "store/return-app.return-terms-and-conditions.checkbox.error": "Por favor, aceite os termos e condições.", - "store/return-app.return-items-list.no-items-selected.error": "Nenhum item selecionado", - "store/return-app.return-address-details.address-input.error": "É obrigatório informar um endereço", - "store/return-app.return-address-details.city-input.error": "É obrigatório informar uma cidade", - "store/return-app.return-address-details.state-input.error": "É obrigatório informar um estado", - "store/return-app.return-address-details.zip-input.error": "É obrigatório informar um CEP", - "store/return-app.return-address-details.country-input.error": "É obrigatório informar um país", - "store/return-app.return-contact-details.name-input.error": "É obrigatório informar um nome", - "store/return-app.return-contact-details.phone-input.error": "É obrigatório informar um número de telefone", - "store/return-app.confirm-and-submit.page-header.title": "Confirmar dados da devolução", - "store/return-app.confirm-and-submit.refund-method.title": "Meio de pagamento do reembolso", - "store/return-app.confirm-and-submit.alert.label": "Ver lista com as suas devoluções", - "store/return-app.confirm-and-submit.alert.error.label": "Tentar novamente", - "store/return-app.confirm-and-submit.alert.success": "Solicitação de devolução criada com sucesso", - "store/return-app.confirm-and-submit.alert.error": "Algo deu errado. Tente novamente.", - "store/return-app.confirm-and-submit.button.back": "Voltar", - "store/return-app.confirm-and-submit.button.submit": "Enviar", - "store/return-app.confirm-and-submit.pickup-address.title": "Endereço de entrega", - "store/return-app.confirm-and-submit.contact-details.title": "Informações para contato", - "store/return-app.confirm-and-submit.user-comment.title": "Comentar", - "store/return-app.confirm-payment-methods.refund-method.p-account-holder-name": "Nome do destinatário: ", - "store/return-app.confirm-payment-methods.refund-method.p-iban": "Transferência bancária para a conta: ", - "store/return-app.confirm-payment-methods.refund-method.p-same-as-purchase": "Mesmo método de reembolso que o pedido", - "store/return-app.return-information-table.table-row.p-condition": "Condição:", - "store/return-app.return-information-table.table-row.p-reason": "Motivo:", + "return-app.return-order-details.inputs.address-input": "Endereço", + "return-app.return-order-details.inputs.city-input": "Cidade", + "return-app.return-order-details.inputs.state-input": "Estado", + "return-app.return-order-details.inputs.zip-input": "CEP", + "return-app.return-order-details.inputs.country-input": "País", "admin/return-app.settings.section.payment-options.available-payment-methods.card": "Cartão de crédito", "admin/return-app.settings.section.payment-options.available-payment-methods.gift-card": "Vale-presente", "admin/return-app.settings.section.payment-options.available-payment-methods.bank": "Transferência bancária", @@ -180,7 +99,7 @@ "return-app-status.package-verified": "Pacote verificado", "return-app-status.refunded": "Reembolsado", "return-app-status.denied": "Negado", - "return-app-status.cancelled": "Cancelado", + "return-app-status.canceled": "Cancelado", "admin/return-app.return-request-details.verify-items.button": "verificar itens", "admin/return-app.return-request-details.verify-items.action.confirm": "Atualizar status", "admin/return-app.return-request-details.verify-items.action.cancel": "Cancelar", @@ -213,7 +132,6 @@ "return-app.return-request-details.table.product-info.sold-by": "Vendido por: {seller}", "return-app.return-request-details.table.product-info.condition": "Condição: {condition}", "return-app.return-request-details.table.verification-status.denied": "Negado", - "return-app.return-request-details.table.verification-status.cancelled": "Cancelado", "return-app.return-request-details.table.verification-status.approved": "Aprovados", "return-app.return-request-details.table.verification-status.new": "Novo", "return-app.return-request-details.table.verification-status.partially-approved": "Parcialmente aprovado {quantityRefunded}/{quantity}", @@ -267,7 +185,7 @@ "return-app-status.timeline.package-verified": "Pacote verificado", "return-app-status.timeline.refunded": "Reembolsado", "return-app-status.timeline.denied": "Negado", - "return-app-status.timeline.cancelled": "Cancelado", + "return-app-status.timeline.canceled": "Cancelado", "admin/return-app.return-request-list.page-header.title": "Relação das solicitações de devolução", "admin/return-app.return-request-list.page-header.subTitle": "Todas as solicitações de devolução criadas por usuários da loja. Clique no ID de uma solicitação para ver mais detalhes.", "return-app.return-request-list.error.title": "Erro ao carregar a lista", @@ -278,6 +196,7 @@ "return-app.return-request-list.table-data.requestId": "ID da solicitação", "return-app.return-request-list.table-data.sequenceNumber": "Número sequencial", "return-app.return-request-list.table-data.orderId": "ID do pedido", + "return-app.return-request-list.table-data.sellerName": "ID do Vendedor", "return-app.return-request-list.table-data.createdDate": "Data de criação", "return-app.return-request-list.table-data.status": "Status", "return-app.return-request-list.table-filters.fromDate": "De", @@ -288,7 +207,7 @@ "return-app.return-request-list.table-jumpToPage.cta": "IR", "store/return-app.return-request-list.page-header.title": "Minhas devoluções", "store/return-app.return-request-list.page-header.goBack": "Voltar", - "store/return-app.return-request-list.page-header.cta": "Nova solicitação", + "return-app.return-request-list.page-header.cta": "Nova solicitação", "return-app.return-request-list.table.status.new": "Novo", "return-app.return-request-list.table.status.processing": "Em processamento", "return-app.return-request-list.table.status.pickedup-from-client": "Recebido do cliente", @@ -296,7 +215,7 @@ "return-app.return-request-list.table.status.package-verified": "Pacote verificado", "return-app.return-request-list.table.status.refunded": "Reembolsado", "return-app.return-request-list.table.status.denied": "Negado", - "return-app.return-request-list.table.status.cancelled": "Cancelado", + "return-app.return-request-list.table.status.canceled": "Cancelado", "return-app.return-request-list.table.status.allStatus": "Status", "return-app.return-request-details.table.status-history.header.created-at": "Criado em", "return-app.return-request-details.table.status-history.header.status": "Status", @@ -307,6 +226,7 @@ "return-app.return-request-details.order-id.link": "Pedido {orderId}", "return-app.return-request-details.current-status.request-id": "ID da solicitação: {id}", "return-app.return-request-details.current-status.status": "Status:", + "return-app.return-request-details.current-status.sellerName": "SellerName: {sellerName}", "admin/return-app.return-request-list.table-data.requestId.tooltip": "Os clientes podem ver o ID da solicitação nos dados da própria solicitação", "admin/return-app.settings.modal-warning.title": "Por favor, verifique suas configurações", "admin/return-app.settings.modal-warning.first-paragraph": "Parece que você está tentando salvar opções personalizadas de devolução, nenhuma que chegue a {maxDays}. Este é o prazo máximo em dias para solicitar uma devolução.", @@ -314,10 +234,6 @@ "admin/return-app.settings.modal-warning.third-paragraph": "Se você clicar em \"Editar\", o prazo para a devolução será reduzido de {maxDays} para {customMaxDays}. Este é o máximo de dias mostrado nas suas opções personalizadas de devolução.", "admin/return-app.settings.modal-warning.confirm": "Editar", "admin/return-app.settings.modal-warning.cancel": "Cancelar", - "store/return-app.return-order-details.pickup-address.drop-off-points": "Selecione um ponto de coleta", - "store/return-app.return-order-details.pickup-address.drop-off-points.tooltip": "Você pode devolver os itens em um dos pontos de coleta selecionados", - "store/return-app.return-order-details.pickup-address.drop-off-points.dropdown.placehoder": "Selecione um ponto de coleta", - "store/return-app.return-order-details.pickup-address.drop-off-points.dropdown.error": "Ocorreu um erro ao carregar os pontos de coleta", "admin/return-app.return-request-details.localized-product-name.tooltip": "Nome do item original do pedido", "admin/return-app.settings.section.payment-options.refund-method-strategy.checkbox.label": "Reembolsar as solicitações automaticamente", "admin/return-app.settings.section.payment-options.refund-method-strategy.checkbox.description": "Crie a nota de devolução automaticamente no OMS para os pedidos", @@ -328,5 +244,107 @@ "return-app.return-request-details.cancellation.modal.adminAllow": "

Atenção: o status desta solicitação será definido como CANCELADO.

Isso irá notificar o usuário por email e permitir a criação de uma nova solicitação de devolução com os itens do pedido cancelado.

Se essa não for a sua intenção, defina a solicitação como NEGADA.

", "return-app.return-request-details.cancellation.modal.adminRefuse": "

Não é possível cancelar este pedido devido ao seu status atual.

", "return-app.return-request-details.cancellation.modal.storeAllow": "

O cancelamento desta solicitação permitirá que os itens atuais sejam usados em uma nova solicitação de devolução.

Esta ação é irreversível.

", - "return-app.return-request-details.cancellation.modal.storeRefuse": "

Devido ao status atual do pedido, você precisa entrar em contato com a equipe de suporte para cancelá-lo.

" + "return-app.return-request-details.cancellation.modal.storeRefuse": "

Devido ao status atual do pedido, você precisa entrar em contato com a equipe de suporte para cancelá-lo.

", + "return-app.return-order-details.page-header.link": "de volta às encomendas", + "return-app.return-order-details.page-header.title": "Formulário de Solicitação de Devolução", + "return-app.return-order-details.page-header.subtitle": "Selecione os produtos que deseja reembolsar", + "return-app.return-order-details.section-products": "Produtos disponíveis para devolução", + "return-app.return-order-details.section-details": "Informações de contato", + "return-app.return-order-details.section-payment": "Forma de pagamento do reembolso", + "return-app.return-order-details.page-header.creation-date": "Data de criação", + "return-app.return-order-details.table-header.product": "produtos", + "return-app.return-order-details.table-header.quantity": "Quantidade", + "return-app.return-order-details.table-header.available-to-return": "Disponível para retornar", + "return-app.return-order-details.table-header.quantity-to-return": "Quantidade a devolver", + "return-app.return-order-details.table-header.reason": "Razão", + "return-app.return-order-details.table-header.condition": "Doença", + "return-app.return-order-details.dropdown-reasons.accidental-order": "Ordem Acidental", + "return-app.return-order-details.dropdown-reasons.better-price": "Melhor preço", + "return-app.return-order-details.dropdown-reasons.performance": "Desempenho", + "return-app.return-order-details.dropdown-reasons.incompatible": "Incompatível", + "return-app.return-order-details.dropdown-reasons.item-damaged": "Item danificado", + "return-app.return-order-details.dropdown-reasons.missed-delivery": "Entrega Perdida", + "return-app.return-order-details.dropdown-reasons.missing-parts": "Partes faltando", + "return-app.return-order-details.dropdown-reasons.box-damaged": "Caixa danificada", + "return-app.return-order-details.dropdown-reasons.different-product": "Produto diferente", + "return-app.return-order-details.dropdown-reasons.defective": "defeituoso", + "return-app.return-order-details.dropdown-reasons.arrived-in-addition": "Chegou como Extra", + "return-app.return-order-details.dropdown-reasons.no-longer-needed": "Não é mais necessário", + "return-app.return-order-details.dropdown-reasons.unauthorized-purchase": "Compra não autorizada", + "return-app.return-order-details.dropdown-reasons.different-from-website": "Diferente do site", + "return-app.return-order-details.dropdown-reasons.other-reason": "Outra razão", + "return-app.return-order-details.dropdown-reasons.placeholder.select-reason": "Selecione o motivo", + "return-app.return-order-details.title.contact-details": "Detalhes do contato", + "return-app.return-order-details.inputs.name-input": "Nome", + "return-app.return-order-details.inputs.email-input": "E-mail", + "return-app.return-order-details.inputs.phone-input": "Telefone", + "return-app.return-order-details.title.pickup-address": "Endereço de entrega", + "return-app.return-order-details.title.tooltip.pickup-address": "Selecione o endereço de entrega que deseja para entrega ou retirada", + "return-app.return-order-details.title.extra-comment": "Comentário adicional", + "return-app.return-order-details.payment-options.card": "Cartão", + "return-app.return-order-details.payment-options.bank": "Banco", + "return-app.return-order-details.payment-options.gift-card": "Cartão Presente", + "return-app.return-order-details.payment-method.description": "Selecione o método de pagamento para o qual o reembolso será emitido", + "return-app.return-order-details.payment-method.default": "O reembolso será emitido para o método de pagamento usado para este pedido", + "return-app.return-order-details.payment-method.account-holder": "Nome do titular da conta", + "return-app.return-order-details.payment-method.iban": "ESTAVAM INDO", + "return-app.return-order-details.terms-and-conditions.form-agree": "Eu li e aceito o {link}", + "return-app.return-order-details.terms-and-conditions.link": "termos e Condições", + "return-app.return-order-details.button.next": "Próximo", + "return-app.return-order-details.page-header.order-id": "ID do pedido", + "return-app.return-item-details.excluded-items.warning": "A loja não permite a devolução deste produto", + "return-app.return-item-details.dropdown-reason.error": "O motivo é obrigatório", + "return-app.return-item-details.dropdown-condition.error": "A condição é necessária", + "return-app.return-payment-methods.input-payment-method.error": "O método de pagamento é obrigatório", + "return-app.return-payment-methods.input-iban.error": "O IBAN é obrigatório", + "return-app.return-payment-methods.input-iban-invalid.error": "IBAN inválido", + "return-app.return-payment-methods.input-account-holder.error": "Titular da conta é obrigatório", + "return-app.return-terms-and-conditions.checkbox.error": "Aceite os termos e condições.", + "return-app.return-items-list.no-items-selected.error": "Nenhum item selecionado", + "return-app.return-address-details.address-input.error": "Endereço é necessário", + "return-app.return-address-details.city-input.error": "A cidade é obrigatória", + "return-app.return-address-details.state-input.error": "O estado é obrigatório", + "return-app.return-address-details.zip-input.error": "O código postal é obrigatório", + "return-app.return-address-details.country-input.error": "O país é obrigatório", + "return-app.return-contact-details.name-input.error": "O nome é obrigatório", + "return-app.return-contact-details.phone-input.error": "O telefone é obrigatório", + "return-app.confirm-and-submit.page-header.title": "Confirme os detalhes da devolução", + "return-app.confirm-and-submit.refund-method.title": "Forma de pagamento do reembolso", + "return-app.confirm-and-submit.alert.label": "Veja sua lista de devolução", + "return-app.confirm-and-submit.alert.error.label": "Tentar novamente", + "return-app.confirm-and-submit.alert.success": "A solicitação de devolução foi criada com sucesso.", + "return-app.confirm-and-submit.alert.error": "Algo deu errado. Por favor, tente novamente.", + "return-app.confirm-and-submit.button.back": "Voltar", + "return-app.confirm-and-submit.button.submit": "Enviar", + "return-app.confirm-and-submit.pickup-address.title": "Endereço de entrega", + "return-app.confirm-and-submit.contact-details.title": "Detalhes do contato", + "return-app.confirm-and-submit.user-comment.title": "Comente", + "return-app.confirm-payment-methods.refund-method.p-account-holder-name": "Nome do Destinatário:", + "return-app.confirm-payment-methods.refund-method.p-iban": "Transferência bancária na conta:", + "return-app.confirm-payment-methods.refund-method.p-same-as-purchase": "O mesmo que compra", + "return-app.return-information-table.table-row.p-condition": "Doença:", + "return-app.return-information-table.table-row.p-reason": "Razão:", + "return-app.return-order-details.pickup-address.drop-off-points": "Selecione um ponto de entrega", + "return-app.return-order-details.pickup-address.drop-off-points.tooltip": "Você pode devolver seus itens em um de nossos pontos de entrega selecionados", + "return-app.return-order-details.pickup-address.drop-off-points.dropdown.placehoder": "Selecione um ponto de entrega", + "return-app.return-order-details.pickup-address.drop-off-points.dropdown.error": "Ocorreu um erro ao carregar os pontos de entrega", + "admin/return-app.sellers.settings.navigation.label": "Configurações de devolução de vendedores", + "admin/return-app.sellers-settings-list.page-header.title": "Lista de configurações de vendedores", + "admin/return-app.sellers-settings-list.page-header.subTitle": "Todas as configurações criadas pelos vendedores retornam o app. Clique em um ID de configuração para ver mais.", + "admin/return-app.return-add.page-header.title": "Nova Devolução", + "admin/return-app.return-add.page-header.subTitle": "Selecione um item para iniciar o processo de solicitação de devolução.", + "return-app.sellers-settings-list.table-data.settingId": "ID de configuração", + "store/return-app.return-order-details.error.order-not-invoiced": "O pedido não foi faturado", + "store/return-app.return-order-details.setting-provider.error.retry-action": "Tentar novamente", + "store/return-app.return-order-details.setting-provider.error": "Ocorreu um erro ao carregar as configurações do aplicativo.", + "store/return-app.return-order-details.error.out-of-max-days": "O pedido excede o prazo máximo de devolução", + "store/return-app.return-order-details.error.order-not-found": "Pedido não encontrado", + "store/return-app.return-order-details.error.forbidden": "Você não tem acesso a este pedido", + "store/return-app.return-order-details.error.unknown": "Ocorreu um erro. Tente novamente.", + "admin/return-app.settings.order-status.label": "Status do pedido", + "admin/return-app.settings.order-status.placeholder": "Selecione a opção", + "return-app.return-request-list.table-data.searchBySellerName": "ID do Vendedor", + "return-app.return-request-list.table-filters.export-returns": "EXPORTAR", + "admin/return-app.settings.section.general-options.enable-highlight-form-message.label": "Ativar uma mensagem personalizável em formulários de retorno", + "admin/return-app.settings.section.general-options.enable-highlight-form-message.description": "Quando habilitado, no topo do formulário que é utilizado para preencher os dados pessoais do usuário, uma mensagem será exibida. Personalizável via \"Mensagens\"" } diff --git a/messages/ro.json b/messages/ro.json index 21e979f33..aa9ac2a87 100644 --- a/messages/ro.json +++ b/messages/ro.json @@ -53,107 +53,26 @@ "store/return-app.link": "Retururile mele", "store/return-app.request-return.page.header": "Solicită un nou retur", "store/return-app.request-return.page.header.subtitle": "Selectează o comandă pentru a începe procesul de solicitare a returului", - "store/return-app.return-order-list.table-header.order-id": "ID Comandă", - "store/return-app.return-order-list.table-header.creation-date": "Data creării", - "store/return-app.return-order-list.table-header.items-to-return": "Articole disponibile pentru retur", - "store/return-app.return-order-list.table-header.select-order": "Alegeți comanda", - "store/return-app.return-order-list.table-empty-state-label.no-orders-available": "Nu există comenzi disponibile pentru retur", - "store/return-app.return-order-list.table-pagination.text-of": "of", - "store/return-app.return-order-details.page-header.link": "Înapoi la comenzi", - "store/return-app.return-order-details.page-header.title": "Formular de cerere de retur", - "store/return-app.return-order-details.page-header.subtitle": "Selectați produsul (produsele) pentru care doriți să faceți retur", - "store/return-app.return-order-details.section-products": "Produse disponibile pentru retur", - "store/return-app.return-order-details.section-details": "Informații de contact", - "store/return-app.return-order-details.section-payment": "Metoda de plata a rambursării", - "store/return-app.return-order-details.page-header.creation-date": "Data creării", - "store/return-app.return-order-details.table-header.product": "Produs", - "store/return-app.return-order-details.table-header.quantity": "Cantitate", - "store/return-app.return-order-details.table-header.available-to-return": "Disponibil pentru retur", - "store/return-app.return-order-details.table-header.quantity-to-return": "Cantitate de returnat", - "store/return-app.return-order-details.table-header.reason": "Motiv", - "store/return-app.return-order-details.table-header.condition": "Condiție", + "return-app.return-order-list.table-header.order-id": "ID Comandă", + "return-app.return-order-list.table-header.creation-date": "Data creării", + "return-app.return-order-list.table-header.items-to-return": "Articole disponibile pentru retur", + "return-app.return-order-list.table-header.select-order": "Alegeți comanda", + "return-app.return-order-list.table-empty-state-label.no-orders-available": "Nu există comenzi disponibile pentru retur", + "return-app.return-order-list.table-pagination.text-of": "of", + "return-app.return-order-list.table-header.linkLabel": "Înapoi la returnări", + "return-app.return-order-list.page-header.title": "Listă comenzi", + "return-app.return-order-list.table-header.seller-name": "Nume vânzător", + "return-app.return-order-list.page-header.subTitle": "Toate comenzile de returnare. Faceți clic pe un ID comandă pentru a crea o returnare.", "return-app.return-order-details.conditions.new-with-box": "Nou în cutie", "return-app.return-order-details.conditions.new-without-box": "Nou, fără cutie", "return-app.return-order-details.conditions.used-with-box": "Folosit, în cutie", "return-app.return-order-details.conditions.used-without-box": "Folosit, fără cutie", "return-app.return-order-details.dropdown-conditions.placeholder.select-condition": "Selectează condiția produselor", - "store/return-app.return-order-details.dropdown-reasons.accidental-order": "Am comandat din greșeală", - "store/return-app.return-order-details.dropdown-reasons.better-price": "Preț mai bun", - "store/return-app.return-order-details.dropdown-reasons.performance": "Performanță", - "store/return-app.return-order-details.dropdown-reasons.incompatible": "Incompatibilitate", - "store/return-app.return-order-details.dropdown-reasons.item-damaged": "Produs avariat", - "store/return-app.return-order-details.dropdown-reasons.missed-delivery": "Livrare ratată", - "store/return-app.return-order-details.dropdown-reasons.missing-parts": "Componente lipsă", - "store/return-app.return-order-details.dropdown-reasons.box-damaged": "Cutia avariată", - "store/return-app.return-order-details.dropdown-reasons.different-product": "Produs diferit", - "store/return-app.return-order-details.dropdown-reasons.defective": "Defect", - "store/return-app.return-order-details.dropdown-reasons.arrived-in-addition": "A sosit in plus", - "store/return-app.return-order-details.dropdown-reasons.no-longer-needed": "Nu mai este necesar", - "store/return-app.return-order-details.dropdown-reasons.unauthorized-purchase": "Achiziție neautorizată", - "store/return-app.return-order-details.dropdown-reasons.different-from-website": "Diferit de produsul de pe site", - "store/return-app.return-order-details.dropdown-reasons.other-reason": "Alt motiv", - "store/return-app.return-order-details.dropdown-reasons.placeholder.select-reason": "Alege motivul", - "store/return-app.return-order-details.error.order-not-invoiced": "Comanda nu este facturată", - "store/return-app.return-order-details.error.out-of-max-days": "Comanda depășește perioada maximă de retur", - "store/return-app.return-order-details.error.order-not-found": "Comanda nu a fost găsită", - "store/return-app.return-order-details.error.forbidden": "Nu ai acces la această comandă", - "store/return-app.return-order-details.error.unknown": "Ceva nu a funcționat, te rugăm să încerci din nou.", - "store/return-app.return-order-details.title.contact-details": "Detalii de contact", - "store/return-app.return-order-details.inputs.name-input": "Nume", - "store/return-app.return-order-details.inputs.email-input": "E-mail", - "store/return-app.return-order-details.inputs.phone-input": "Telefon", - "store/return-app.return-order-details.title.pickup-address": "Adresă de livrare", - "store/return-app.return-order-details.title.tooltip.pickup-address": "Selectează adresa de livrare la care soliciți livrarea sau punctul de ridicare la care să primești articolele", - "store/return-app.return-order-details.title.extra-comment": "Mențiuni suplimentare", - "store/return-app.return-order-details.inputs.address-input": "Adresă", - "store/return-app.return-order-details.inputs.city-input": "Oraș", - "store/return-app.return-order-details.inputs.state-input": "Județ", - "store/return-app.return-order-details.inputs.zip-input": "Cod poștal", - "store/return-app.return-order-details.inputs.country-input": "Țară", - "store/return-app.return-order-details.setting-provider.error.retry-action": "Încearcă din nou", - "store/return-app.return-order-details.setting-provider.error": "A apărut o eroare la încărcarea setărilor aplicației.", - "store/return-app.return-order-details.payment-options.card": "Card", - "store/return-app.return-order-details.payment-options.bank": "Banca", - "store/return-app.return-order-details.payment-options.gift-card": "Card cadou", - "store/return-app.return-order-details.payment-method.description": "Selectează metoda de plată prin care vrei rambursarea", - "store/return-app.return-order-details.payment-method.default": "Rambursarea va fi emisă prin metoda de plată utilizată pentru această comandă", - "store/return-app.return-order-details.payment-method.account-holder": "Nume titular cont", - "store/return-app.return-order-details.payment-method.iban": "Cont IBAN", - "store/return-app.return-order-details.terms-and-conditions.form-agree": "Am citit si sunt de acord cu {link}", - "store/return-app.return-order-details.terms-and-conditions.link": "termenii si condițiile", - "store/return-app.return-order-details.button.next": "Următorul", - "store/return-app.return-order-details.page-header.order-id": "ID comandă", - "store/return-app.return-item-details.excluded-items.warning": "Magazinul nu permite returnarea acestui produs", - "store/return-app.return-item-details.dropdown-reason.error": "Motivul este obligatoriu", - "store/return-app.return-item-details.dropdown-condition.error": "Condiția este obligatorie", - "store/return-app.return-payment-methods.input-payment-method.error": "Metoda de plată este necesară", - "store/return-app.return-payment-methods.input-iban.error": "IBAN-ul este obligatoriu", - "store/return-app.return-payment-methods.input-account-holder.error": "Titularul contului este obligatoriu", - "store/return-app.return-terms-and-conditions.checkbox.error": "Te rugăm să accepți termenii și condițiile.", - "store/return-app.return-items-list.no-items-selected.error": "Nu s-a selectat niciun produs", - "store/return-app.return-address-details.address-input.error": "Adresa este obligatorie", - "store/return-app.return-address-details.city-input.error": "Orașul este obligatoriu", - "store/return-app.return-address-details.state-input.error": "Județul este obligatoriu", - "store/return-app.return-address-details.zip-input.error": "Codul poștal este obligatoriu", - "store/return-app.return-address-details.country-input.error": "Țara este obligatorie", - "store/return-app.return-contact-details.name-input.error": "Numele este obligatoriu", - "store/return-app.return-contact-details.phone-input.error": "Telefonul este obligatoriu", - "store/return-app.confirm-and-submit.page-header.title": "Confirmă detaliile de retur", - "store/return-app.confirm-and-submit.refund-method.title": "Metoda de plată a rambursului", - "store/return-app.confirm-and-submit.alert.label": "Vezi lista de retururi", - "store/return-app.confirm-and-submit.alert.error.label": "Reîncearcă", - "store/return-app.confirm-and-submit.alert.success": "Solicitarea de retur a fost creată cu succes.", - "store/return-app.confirm-and-submit.alert.error": "Ceva n-a mers bine. Te rugăm să încerci din nou.", - "store/return-app.confirm-and-submit.button.back": "Înapoi", - "store/return-app.confirm-and-submit.button.submit": "Trimite", - "store/return-app.confirm-and-submit.pickup-address.title": "Adresă de livrare", - "store/return-app.confirm-and-submit.contact-details.title": "Detalii de contact", - "store/return-app.confirm-and-submit.user-comment.title": "Comentariu", - "store/return-app.confirm-payment-methods.refund-method.p-account-holder-name": "Nume beneficiar: ", - "store/return-app.confirm-payment-methods.refund-method.p-iban": "Transfer bancar în contul: ", - "store/return-app.confirm-payment-methods.refund-method.p-same-as-purchase": "La fel ca achiziția", - "store/return-app.return-information-table.table-row.p-condition": "Condiție:", - "store/return-app.return-information-table.table-row.p-reason": "Motiv:", + "return-app.return-order-details.inputs.address-input": "Adresă", + "return-app.return-order-details.inputs.city-input": "Oraș", + "return-app.return-order-details.inputs.state-input": "Județ", + "return-app.return-order-details.inputs.zip-input": "Cod poștal", + "return-app.return-order-details.inputs.country-input": "Țară", "admin/return-app.settings.section.payment-options.available-payment-methods.card": "Card", "admin/return-app.settings.section.payment-options.available-payment-methods.gift-card": "Card cadou", "admin/return-app.settings.section.payment-options.available-payment-methods.bank": "Transfer bancar", @@ -180,7 +99,7 @@ "return-app-status.package-verified": "Colet verificat", "return-app-status.refunded": "Rambursată", "return-app-status.denied": "Refuzată", - "return-app-status.cancelled": "Anulată", + "return-app-status.canceled": "Anulată", "admin/return-app.return-request-details.verify-items.button": "verifică produsele", "admin/return-app.return-request-details.verify-items.action.confirm": "Actualizează statusul", "admin/return-app.return-request-details.verify-items.action.cancel": "Anulează", @@ -213,7 +132,6 @@ "return-app.return-request-details.table.product-info.sold-by": "Vândut de: {seller}", "return-app.return-request-details.table.product-info.condition": "Condition: {condition}", "return-app.return-request-details.table.verification-status.denied": "Refuzată", - "return-app.return-request-details.table.verification-status.cancelled": "Anulată", "return-app.return-request-details.table.verification-status.approved": "Aprobată", "return-app.return-request-details.table.verification-status.new": "Nouă", "return-app.return-request-details.table.verification-status.partially-approved": "Aprobată parțial {quantityRefunded}/{quantity}", @@ -267,7 +185,7 @@ "return-app-status.timeline.package-verified": "Pachet verificat", "return-app-status.timeline.refunded": "Rambursat", "return-app-status.timeline.denied": "Refuzat", - "return-app-status.timeline.cancelled": "Anulată", + "return-app-status.timeline.canceled": "Anulată", "admin/return-app.return-request-list.page-header.title": "Listă cereri de retur", "admin/return-app.return-request-list.page-header.subTitle": "Toate cererile de retur create de utilizatorii magazinului. Fă clic pe un ID de cerere pentru mai multe detalii.", "return-app.return-request-list.error.title": "Eroare la încărcarea listei", @@ -288,7 +206,7 @@ "return-app.return-request-list.table-jumpToPage.cta": "ACCESEAZĂ", "store/return-app.return-request-list.page-header.title": "Retururile mele", "store/return-app.return-request-list.page-header.goBack": "Înapoi", - "store/return-app.return-request-list.page-header.cta": "Cerere nouă", + "return-app.return-request-list.page-header.cta": "Cerere nouă", "return-app.return-request-list.table.status.new": "Nouă", "return-app.return-request-list.table.status.processing": "Se procesează", "return-app.return-request-list.table.status.pickedup-from-client": "Ridicat de la client", @@ -296,7 +214,7 @@ "return-app.return-request-list.table.status.package-verified": "Pachet verificat", "return-app.return-request-list.table.status.refunded": "Rambursat", "return-app.return-request-list.table.status.denied": "Refuzat", - "return-app.return-request-list.table.status.cancelled": "Anulată", + "return-app.return-request-list.table.status.canceled": "Anulată", "return-app.return-request-list.table.status.allStatus": "Status", "return-app.return-request-details.table.status-history.header.created-at": "Creat la", "return-app.return-request-details.table.status-history.header.status": "Status", @@ -307,6 +225,7 @@ "return-app.return-request-details.order-id.link": "Comanda {orderId}", "return-app.return-request-details.current-status.request-id": "ID cerere: {id}", "return-app.return-request-details.current-status.status": "Status:", + "return-app.return-request-details.current-status.sellerName": "SellerName: {sellerName}", "admin/return-app.return-request-list.table-data.requestId.tooltip": "Clienții pot vedea ID-ul cererii în detaliile acesteia", "admin/return-app.settings.modal-warning.title": "Te rugăm să îți verifici setările", "admin/return-app.settings.modal-warning.first-paragraph": "Se pare că încerci să salvezi opțiuni de retur personalizate, dintre care niciuna dintre ele nu ajunge la {maxDays}; ziua maximă prevăzută pentru retur.", @@ -314,10 +233,6 @@ "admin/return-app.settings.modal-warning.third-paragraph": "Dacă apeși pe Modifică, valoarea maximă a zilelor pentru un retur va fi redusă de la {maxDays} la {customMaxDays}. Aceasta este perioada maximă de zile regăsită în opțiunile de returnare personalizate.", "admin/return-app.settings.modal-warning.confirm": "Modifică", "admin/return-app.settings.modal-warning.cancel": "Anulează", - "store/return-app.return-order-details.pickup-address.drop-off-points": "Selectează un punct de predare", - "store/return-app.return-order-details.pickup-address.drop-off-points.tooltip": "Poți returna articolele într-unul dintre punctele noastre de predare selectate", - "store/return-app.return-order-details.pickup-address.drop-off-points.dropdown.placehoder": "Selectează un punct de predare", - "store/return-app.return-order-details.pickup-address.drop-off-points.dropdown.error": "A apărut o eroare la încărcarea punctelor de predare", "admin/return-app.return-request-details.localized-product-name.tooltip": "Numele original al articolului din comandă", "admin/return-app.settings.section.payment-options.refund-method-strategy.checkbox.label": "Rambursează automat cererile", "admin/return-app.settings.section.payment-options.refund-method-strategy.checkbox.description": "Creează automat o factură de ramburs în OMS pentru cereri", @@ -328,5 +243,106 @@ "return-app.return-request-details.cancellation.modal.adminAllow": "

Atenție: Statusul acestei cereri va fi setat ca ANULATĂ.

Astfel, utilizatorul va fi notificat prin e-mail și va putea crea o nouă cerere de retur cu articolele cererii anulate.

Dacă nu asta ai intenționat, setează cererea ca REFUZATĂ.

", "return-app.return-request-details.cancellation.modal.adminRefuse": "

Ne pare rău, această cerere nu se poate anula din cauza statusului actual.

", "return-app.return-request-details.cancellation.modal.storeAllow": "

Anularea acestei cereri va permite ca articolele actuale să fie folosite într-o nouă cerere de retur.

Această acțiune e ireversibilă.

", - "return-app.return-request-details.cancellation.modal.storeRefuse": "

Ne pare rău, trebuie să contactezi echipa de asistență pentru a anula această cerere din cauza statusului actual.

" + "return-app.return-request-details.cancellation.modal.storeRefuse": "

Ne pare rău, trebuie să contactezi echipa de asistență pentru a anula această cerere din cauza statusului actual.

", + "return-app.return-order-details.page-header.link": "Înapoi la comenzi", + "return-app.return-order-details.page-header.title": "Formular de cerere de retur", + "return-app.return-order-details.page-header.subtitle": "Selectați produsele pe care doriți să le rambursați", + "return-app.return-order-details.section-products": "Produse disponibile pentru returnare", + "return-app.return-order-details.section-details": "Informații de contact", + "return-app.return-order-details.section-payment": "Metoda de plată a rambursării", + "return-app.return-order-details.page-header.creation-date": "Data crearii", + "return-app.return-order-details.table-header.product": "Produs", + "return-app.return-order-details.table-header.quantity": "Cantitate", + "return-app.return-order-details.table-header.available-to-return": "Disponibil pentru returnare", + "return-app.return-order-details.table-header.quantity-to-return": "Cantitate de returnat", + "return-app.return-order-details.table-header.reason": "Motiv", + "return-app.return-order-details.table-header.condition": "Condiție", + "return-app.return-order-details.dropdown-reasons.accidental-order": "Ordine accidentala", + "return-app.return-order-details.dropdown-reasons.better-price": "Pret mai bun", + "return-app.return-order-details.dropdown-reasons.performance": "Performanţă", + "return-app.return-order-details.dropdown-reasons.incompatible": "Incompatibil", + "return-app.return-order-details.dropdown-reasons.item-damaged": "Articol deteriorat", + "return-app.return-order-details.dropdown-reasons.missed-delivery": "Livrare ratată", + "return-app.return-order-details.dropdown-reasons.missing-parts": "Părți lipsă", + "return-app.return-order-details.dropdown-reasons.box-damaged": "Cutie deteriorată", + "return-app.return-order-details.dropdown-reasons.different-product": "Produs diferit", + "return-app.return-order-details.dropdown-reasons.defective": "Defect", + "return-app.return-order-details.dropdown-reasons.arrived-in-addition": "A sosit ca Extra", + "return-app.return-order-details.dropdown-reasons.no-longer-needed": "Nu mai e nevoie", + "return-app.return-order-details.dropdown-reasons.unauthorized-purchase": "Achiziție neautorizată", + "return-app.return-order-details.dropdown-reasons.different-from-website": "Diferit de site-ul web", + "return-app.return-order-details.dropdown-reasons.other-reason": "Alt motiv", + "return-app.return-order-details.dropdown-reasons.placeholder.select-reason": "Selectați motivul", + "return-app.return-order-details.title.contact-details": "Detalii de contact", + "return-app.return-order-details.inputs.name-input": "Nume", + "return-app.return-order-details.inputs.email-input": "E-mail", + "return-app.return-order-details.inputs.phone-input": "Telefon", + "return-app.return-order-details.title.pickup-address": "Adresă de livrare", + "return-app.return-order-details.title.tooltip.pickup-address": "Selectați adresa de livrare pe care o doriți pentru livrare sau ridicare", + "return-app.return-order-details.title.extra-comment": "Comentariu adițional", + "return-app.return-order-details.payment-options.card": "Card", + "return-app.return-order-details.payment-options.bank": "bancă", + "return-app.return-order-details.payment-options.gift-card": "Card cadou", + "return-app.return-order-details.payment-method.description": "Selectați metoda de plată pentru care va fi emisă rambursarea", + "return-app.return-order-details.payment-method.default": "Rambursarea va fi emisă prin metoda de plată utilizată pentru această comandă", + "return-app.return-order-details.payment-method.account-holder": "Numele deținătorului contului", + "return-app.return-order-details.payment-method.iban": "MERGEAU", + "return-app.return-order-details.terms-and-conditions.form-agree": "Am citit și accept {link}", + "return-app.return-order-details.terms-and-conditions.link": "Termeni și condiții", + "return-app.return-order-details.button.next": "Următorul", + "return-app.return-order-details.page-header.order-id": "Comanda ID", + "return-app.return-item-details.excluded-items.warning": "Magazinul nu permite returnarea acestui produs", + "return-app.return-item-details.dropdown-reason.error": "Se cere un motiv", + "return-app.return-item-details.dropdown-condition.error": "Este necesară condiția", + "return-app.return-payment-methods.input-payment-method.error": "Metoda de plată este necesară", + "return-app.return-payment-methods.input-iban.error": "IBAN este necesar", + "return-app.return-payment-methods.input-iban-invalid.error": "IBAN-ul nu este valid", + "return-app.return-payment-methods.input-account-holder.error": "Este necesar titularul de cont", + "return-app.return-terms-and-conditions.checkbox.error": "Vă rugăm să acceptați termenii și condițiile.", + "return-app.return-items-list.no-items-selected.error": "Niciun element selectat", + "return-app.return-address-details.address-input.error": "Adresa este obligatorie", + "return-app.return-address-details.city-input.error": "Orașul este necesar", + "return-app.return-address-details.state-input.error": "Se cere statul", + "return-app.return-address-details.zip-input.error": "Codul poștal este obligatoriu", + "return-app.return-address-details.country-input.error": "Țara este obligatorie", + "return-app.return-contact-details.name-input.error": "Numele este obligatoriu", + "return-app.return-contact-details.phone-input.error": "Este necesar telefonul", + "return-app.confirm-and-submit.page-header.title": "Confirmați detaliile de retur", + "return-app.confirm-and-submit.refund-method.title": "Metoda de plată a rambursării", + "return-app.confirm-and-submit.alert.label": "Vizualizați lista de returnări", + "return-app.confirm-and-submit.alert.error.label": "Reîncercați", + "return-app.confirm-and-submit.alert.success": "Solicitarea de returnare a fost creată cu succes.", + "return-app.confirm-and-submit.alert.error": "Ceva n-a mers bine. Vă rugăm să încercați din nou.", + "return-app.confirm-and-submit.button.back": "Înapoi", + "return-app.confirm-and-submit.button.submit": "Trimite", + "return-app.confirm-and-submit.pickup-address.title": "Adresă de livrare", + "return-app.confirm-and-submit.contact-details.title": "Detalii de contact", + "return-app.confirm-and-submit.user-comment.title": "cometariu", + "return-app.confirm-payment-methods.refund-method.p-account-holder-name": "Nume Destinatar:", + "return-app.confirm-payment-methods.refund-method.p-iban": "Transfer bancar in cont:", + "return-app.confirm-payment-methods.refund-method.p-same-as-purchase": "La fel ca și achiziția", + "return-app.return-information-table.table-row.p-condition": "Condiție:", + "return-app.return-information-table.table-row.p-reason": "Motiv:", + "return-app.return-order-details.pickup-address.drop-off-points": "Selectați un punct de predare", + "return-app.return-order-details.pickup-address.drop-off-points.tooltip": "Vă puteți returna articolele într-unul dintre punctele noastre de predare selectate", + "return-app.return-order-details.pickup-address.drop-off-points.dropdown.placehoder": "Selectați un punct de predare", + "return-app.return-order-details.pickup-address.drop-off-points.dropdown.error": "A apărut o eroare la încărcarea punctelor de predare", + "admin/return-app.sellers.settings.navigation.label": "Setări pentru returnări ale vânzătorilor", + "admin/return-app.sellers-settings-list.page-header.title": "Lista de setări ale vânzătorilor", + "admin/return-app.sellers-settings-list.page-header.subTitle": "Toate setările create de către vânzători returnează aplicația. Faceți clic pe un ID de setări pentru a vedea mai multe.", + "admin/return-app.return-add.page-header.title": "Noua revenire", + "admin/return-app.return-add.page-header.subTitle": "Selectați un articol pentru a începe procesul de solicitare de returnare.", + "return-app.sellers-settings-list.table-data.settingId": "Setare ID", + "return-app.return-request-list.table-data.sellerName": "Titlul datelor unei cereri de retur: numele vânzătorului", + "store/return-app.return-order-details.error.order-not-invoiced": "Comanda nu este facturată", + "store/return-app.return-order-details.setting-provider.error.retry-action": "Încearcă din nou", + "store/return-app.return-order-details.setting-provider.error": "A apărut o eroare la încărcarea setărilor aplicației.", + "store/return-app.return-order-details.error.out-of-max-days": "Comanda depășește perioada maximă de retur", + "store/return-app.return-order-details.error.order-not-found": "Comanda nu a fost găsită", + "store/return-app.return-order-details.error.forbidden": "Nu ai acces la această comandă", + "store/return-app.return-order-details.error.unknown": "Ceva nu a funcționat, te rugăm să încerci din nou.", + "admin/return-app.settings.order-status.label": "Starea comenzii", + "admin/return-app.settings.order-status.placeholder": "Selectați opțiunea", + "return-app.return-request-list.table-data.searchBySellerName": "ID vânzătorului", + "return-app.return-request-list.table-filters.export-returns": "EXPORTĂ" } diff --git a/messages/th.json b/messages/th.json index 2ec1aba28..0febb20dd 100644 --- a/messages/th.json +++ b/messages/th.json @@ -53,107 +53,26 @@ "store/return-app.link": "การคืนของฉัน", "store/return-app.request-return.page.header": "ขอเพิ่มการคืน", "store/return-app.request-return.page.header.subtitle": "เลือกคำสั่งเพื่อเริ่มขั้นตอนคำขอส่งคืน", - "store/return-app.return-order-list.table-header.order-id": "รหัสคำสั่งซื้อ", - "store/return-app.return-order-list.table-header.creation-date": "วันที่สร้าง", - "store/return-app.return-order-list.table-header.items-to-return": "สินค้าที่มีให้ส่งคืน", - "store/return-app.return-order-list.table-header.select-order": "เลือกคำสั่งซื้อ", - "store/return-app.return-order-list.table-empty-state-label.no-orders-available": "ไม่มีคำสั่งซื้อให้ส่งคืน", - "store/return-app.return-order-list.table-pagination.text-of": "of", - "store/return-app.return-order-details.page-header.link": "กลับไปยังคำสั่งซื้อ", - "store/return-app.return-order-details.page-header.title": "แบบฟอร์มการขอส่งคืน", - "store/return-app.return-order-details.page-header.subtitle": "เลือกผลิตภัณฑ์ที่คุณต้องการเงินคืน", - "store/return-app.return-order-details.section-products": "ผลิตภัณฑ์ที่มีให้ส่งคืน", - "store/return-app.return-order-details.section-details": "รายละเอียดที่ติดต่อ", - "store/return-app.return-order-details.section-payment": "วิธีชำระเงินคืน", - "store/return-app.return-order-details.page-header.creation-date": "วันที่สร้าง", - "store/return-app.return-order-details.table-header.product": "ผลิตภัณฑ์", - "store/return-app.return-order-details.table-header.quantity": "จำนวน", - "store/return-app.return-order-details.table-header.available-to-return": "ให้ส่งคืนได้", - "store/return-app.return-order-details.table-header.quantity-to-return": "จำนวนที่ส่งคืน", - "store/return-app.return-order-details.table-header.reason": "สาเหตุ", - "store/return-app.return-order-details.table-header.condition": "เงื่อนไข", + "return-app.return-order-list.table-header.order-id": "รหัสคำสั่งซื้อ", + "return-app.return-order-list.table-header.creation-date": "วันที่สร้าง", + "return-app.return-order-list.table-header.items-to-return": "สินค้าที่มีให้ส่งคืน", + "return-app.return-order-list.table-header.select-order": "เลือกคำสั่งซื้อ", + "return-app.return-order-list.table-empty-state-label.no-orders-available": "ไม่มีคำสั่งซื้อให้ส่งคืน", + "return-app.return-order-list.table-pagination.text-of": "of", + "return-app.return-order-list.table-header.linkLabel": "กลับไปยังการคืนสินค้า", + "return-app.return-order-list.page-header.title": "รายการสั่งซื้อ", + "return-app.return-order-list.table-header.seller-name": "ชื่อผู้ขาย", + "return-app.return-order-list.page-header.subTitle": "การสั่งซื้อทั้งหมดที่คืนสินค้า คลิกที่รหัสการสั่งซื้อเพื่อสร้างการคืนสินค้า", "return-app.return-order-details.conditions.new-with-box": "ใหม่ พร้อมกล่อง", "return-app.return-order-details.conditions.new-without-box": "ใหม่ ไม่มีกล่อง", "return-app.return-order-details.conditions.used-with-box": "ใช้แล้ว พร้อมกล่อง", "return-app.return-order-details.conditions.used-without-box": "ใช้แล้ว ไม่มีกล่อง", "return-app.return-order-details.dropdown-conditions.placeholder.select-condition": "เลือกเงื่อนไข", - "store/return-app.return-order-details.dropdown-reasons.accidental-order": "คำสั่งซื้อโดยบังเอิญ", - "store/return-app.return-order-details.dropdown-reasons.better-price": "ราคาดีกว่า", - "store/return-app.return-order-details.dropdown-reasons.performance": "ประสิทธิภาพ", - "store/return-app.return-order-details.dropdown-reasons.incompatible": "ไม่เข้ากัน", - "store/return-app.return-order-details.dropdown-reasons.item-damaged": "สินค้าที่เสียหาย", - "store/return-app.return-order-details.dropdown-reasons.missed-delivery": "พลาดการจัดส่ง", - "store/return-app.return-order-details.dropdown-reasons.missing-parts": "บางส่วนขาดหาย", - "store/return-app.return-order-details.dropdown-reasons.box-damaged": "กล่องชำรุด", - "store/return-app.return-order-details.dropdown-reasons.different-product": "ผลิตภัณฑ์คนละตัว", - "store/return-app.return-order-details.dropdown-reasons.defective": "มีตำหนิ", - "store/return-app.return-order-details.dropdown-reasons.arrived-in-addition": "มาถึงแบบเพิ่มพิเศษ", - "store/return-app.return-order-details.dropdown-reasons.no-longer-needed": "ไม่ต้องใช้แล้ว", - "store/return-app.return-order-details.dropdown-reasons.unauthorized-purchase": "การซื้อที่ไม่อนุมัติ", - "store/return-app.return-order-details.dropdown-reasons.different-from-website": "ต่างจากเว็บไซต์", - "store/return-app.return-order-details.dropdown-reasons.other-reason": "สาเหตุอื่น", - "store/return-app.return-order-details.dropdown-reasons.placeholder.select-reason": "เลือกสาเหตุ", - "store/return-app.return-order-details.error.order-not-invoiced": "คำสั่งซื้อไม่ถูกเรียกเก็บ", - "store/return-app.return-order-details.error.out-of-max-days": "คำสั่งซื้อเกินเวลาสูงสุดที่ส่งคืนได้", - "store/return-app.return-order-details.error.order-not-found": "ไม่พบคำสั่งซื้อ", - "store/return-app.return-order-details.error.forbidden": "คุณไม่สามารถดูคำสั่งซื้อนี้", - "store/return-app.return-order-details.error.unknown": "มีบางอย่างผิดปกติ โปรดลองอีกครั้ง", - "store/return-app.return-order-details.title.contact-details": "รายละเอียดที่ติดต่อ", - "store/return-app.return-order-details.inputs.name-input": "ชื่อ", - "store/return-app.return-order-details.inputs.email-input": "อีเมล", - "store/return-app.return-order-details.inputs.phone-input": "โทร", - "store/return-app.return-order-details.title.pickup-address": "ที่อยู่การจัดส่ง", - "store/return-app.return-order-details.title.tooltip.pickup-address": "เลือกอัตราการขนส่งที่คุณต้องการจัดส่งหรือรับของ", - "store/return-app.return-order-details.title.extra-comment": "ความคิดเห็นเพิ่มเติม", - "store/return-app.return-order-details.inputs.address-input": "ที่อยู่", - "store/return-app.return-order-details.inputs.city-input": "เมือง", - "store/return-app.return-order-details.inputs.state-input": "รัฐ", - "store/return-app.return-order-details.inputs.zip-input": "รหัสไปรษณีย์", - "store/return-app.return-order-details.inputs.country-input": "ประเทศ", - "store/return-app.return-order-details.setting-provider.error.retry-action": "โปรดลองอีกครั้ง", - "store/return-app.return-order-details.setting-provider.error": "มีข้อผิดพลาดในการโหลดการตั้งค่าแอป", - "store/return-app.return-order-details.payment-options.card": "การ์ด", - "store/return-app.return-order-details.payment-options.bank": "ธนาคาร", - "store/return-app.return-order-details.payment-options.gift-card": "บัตรของขวัญ", - "store/return-app.return-order-details.payment-method.description": "เลือกวิธีการชำระเงินที่จะคืนเงินให้", - "store/return-app.return-order-details.payment-method.default": "เงินคืนจะจ่ายออกด้วยวิธีชำระเงินสำหรับคำสั่งซื้อนี้", - "store/return-app.return-order-details.payment-method.account-holder": "ชื่อผู้ถือบัญชี", - "store/return-app.return-order-details.payment-method.iban": "IBAN", - "store/return-app.return-order-details.terms-and-conditions.form-agree": "ฉันได้อ่านและยอมรับ", - "store/return-app.return-order-details.terms-and-conditions.link": "ข้อกำหนดและเงื่อนไขใน {link} แล้ว", - "store/return-app.return-order-details.button.next": "ถัดไป", - "store/return-app.return-order-details.page-header.order-id": "ID คำสั่งซื้อ", - "store/return-app.return-item-details.excluded-items.warning": "ร้านค้าไม่อนุญาตให้คืนผลิตภัณฑ์นี้", - "store/return-app.return-item-details.dropdown-reason.error": "ต้องระบุสาเหตุ", - "store/return-app.return-item-details.dropdown-condition.error": "ต้องระบุสภาพเงื่อนไข", - "store/return-app.return-payment-methods.input-payment-method.error": "ต้องระบุวิธีชำระเงิน", - "store/return-app.return-payment-methods.input-iban.error": "ต้องระบุ IBAN", - "store/return-app.return-payment-methods.input-account-holder.error": "ต้องระบุผู้ถือบัญชี", - "store/return-app.return-terms-and-conditions.checkbox.error": "โปรดยอมรับข้อกำหนดและเงื่อนไข", - "store/return-app.return-items-list.no-items-selected.error": "ไม่ได้เลือกรายการ", - "store/return-app.return-address-details.address-input.error": "ต้องระบุที่อยู่", - "store/return-app.return-address-details.city-input.error": "ต้องระบุชื่อเมือง", - "store/return-app.return-address-details.state-input.error": "ต้องระบุชื่อรัฐ", - "store/return-app.return-address-details.zip-input.error": "ต้องระบุรหัสไปรษณีย์", - "store/return-app.return-address-details.country-input.error": "ต้องระบุประเทศ", - "store/return-app.return-contact-details.name-input.error": "ต้องมีชื่อ", - "store/return-app.return-contact-details.phone-input.error": "ต้องระบุเบอร์โทร", - "store/return-app.confirm-and-submit.page-header.title": "ยืนยันรายละเอียดการคืน", - "store/return-app.confirm-and-submit.refund-method.title": "วิธีชำระเงินคืน", - "store/return-app.confirm-and-submit.alert.label": "ดูรายการการคืนของคุณ", - "store/return-app.confirm-and-submit.alert.error.label": "ลองใหม่", - "store/return-app.confirm-and-submit.alert.success": "สร้างคำขอการคืนเรียบร้อยแล้ว", - "store/return-app.confirm-and-submit.alert.error": "มีบางอย่างผิดปกติ โปรดลองอีกครั้ง", - "store/return-app.confirm-and-submit.button.back": "กลับ", - "store/return-app.confirm-and-submit.button.submit": "ส่ง", - "store/return-app.confirm-and-submit.pickup-address.title": "ที่อยู่การจัดส่ง", - "store/return-app.confirm-and-submit.contact-details.title": "รายละเอียดที่ติดต่อ", - "store/return-app.confirm-and-submit.user-comment.title": "ความคิดเห็น", - "store/return-app.confirm-payment-methods.refund-method.p-account-holder-name": "ชื่อผู้รับ: ", - "store/return-app.confirm-payment-methods.refund-method.p-iban": "การโอนผ่านธนาคารเข้าบัญชี: ", - "store/return-app.confirm-payment-methods.refund-method.p-same-as-purchase": "เหมือนกับการซื้อ", - "store/return-app.return-information-table.table-row.p-condition": "เงื่อนไข:", - "store/return-app.return-information-table.table-row.p-reason": "เหตุผล:", + "return-app.return-order-details.inputs.address-input": "ที่อยู่", + "return-app.return-order-details.inputs.city-input": "เมือง", + "return-app.return-order-details.inputs.state-input": "รัฐ", + "return-app.return-order-details.inputs.zip-input": "รหัสไปรษณีย์", + "return-app.return-order-details.inputs.country-input": "ประเทศ", "admin/return-app.settings.section.payment-options.available-payment-methods.card": "บัตรเครดิต", "admin/return-app.settings.section.payment-options.available-payment-methods.gift-card": "บัตรกำนัล", "admin/return-app.settings.section.payment-options.available-payment-methods.bank": "การโอนผ่านธนาคาร", @@ -180,7 +99,7 @@ "return-app-status.package-verified": "แพคเกจที่ตรวจสอบแล้ว", "return-app-status.refunded": "คืนเงินแล้ว", "return-app-status.denied": "ปฏิเสธแล้ว", - "return-app-status.cancelled": "ยกเลิกแล้ว", + "return-app-status.canceled": "ยกเลิกแล้ว", "admin/return-app.return-request-details.verify-items.button": "ตรวจสอบสินค้า", "admin/return-app.return-request-details.verify-items.action.confirm": "สถานะการอัพเดท", "admin/return-app.return-request-details.verify-items.action.cancel": "ยกเลิก", @@ -213,7 +132,6 @@ "return-app.return-request-details.table.product-info.sold-by": "ขายโดย: {seller}", "return-app.return-request-details.table.product-info.condition": "Condition: {condition}", "return-app.return-request-details.table.verification-status.denied": "ปฏิเสธแล้ว", - "return-app.return-request-details.table.verification-status.cancelled": "ยกเลิกแล้ว", "return-app.return-request-details.table.verification-status.approved": "อนุมัติแล้ว", "return-app.return-request-details.table.verification-status.new": "ใหม่", "return-app.return-request-details.table.verification-status.partially-approved": "อนุมัติแล้ว {quantityRefunded}/{quantity} ส่วน", @@ -267,7 +185,7 @@ "return-app-status.timeline.package-verified": "แพคเกจที่ตรวจสอบแล้ว", "return-app-status.timeline.refunded": "คืนเงินแล้ว", "return-app-status.timeline.denied": "ปฏิเสธแล้ว", - "return-app-status.timeline.cancelled": "ยกเลิกแล้ว", + "return-app-status.timeline.canceled": "ยกเลิกแล้ว", "admin/return-app.return-request-list.page-header.title": "รายการคำขอส่งคืน", "admin/return-app.return-request-list.page-header.subTitle": "ผู้ใช้ร้านค้าสร้างคำขอส่งคืนทั้งหมดแล้ว คลิกรหัสคำขอเพื่อดูเพิ่มเติม", "return-app.return-request-list.error.title": "มีข้อผิดพลาดเมื่อโหลดรายการ", @@ -288,7 +206,7 @@ "return-app.return-request-list.table-jumpToPage.cta": "ไป", "store/return-app.return-request-list.page-header.title": "การคืนของฉัน", "store/return-app.return-request-list.page-header.goBack": "กลับไป", - "store/return-app.return-request-list.page-header.cta": "คำขอใหม่", + "return-app.return-request-list.page-header.cta": "คำขอใหม่", "return-app.return-request-list.table.status.new": "ใหม่", "return-app.return-request-list.table.status.processing": "กำลังประมวลผล", "return-app.return-request-list.table.status.pickedup-from-client": "รับของจากลูกค้าแล้ว", @@ -296,7 +214,7 @@ "return-app.return-request-list.table.status.package-verified": "แพคเกจที่ตรวจสอบแล้ว", "return-app.return-request-list.table.status.refunded": "คืนเงินแล้ว", "return-app.return-request-list.table.status.denied": "ปฏิเสธแล้ว", - "return-app.return-request-list.table.status.cancelled": "ยกเลิกแล้ว", + "return-app.return-request-list.table.status.canceled": "ยกเลิกแล้ว", "return-app.return-request-list.table.status.allStatus": "สถานะ", "return-app.return-request-details.table.status-history.header.created-at": "สร้างเมื่อ", "return-app.return-request-details.table.status-history.header.status": "สถานะ", @@ -307,6 +225,7 @@ "return-app.return-request-details.order-id.link": "คำสั่ง {orderId}", "return-app.return-request-details.current-status.request-id": "รหัสอ้างอิง: {id}", "return-app.return-request-details.current-status.status": "สถานะ:", + "return-app.return-request-details.current-status.sellerName": "SellerName: {sellerName}", "admin/return-app.return-request-list.table-data.requestId.tooltip": "ลูกค้าสามารถมองเห็นรหัสคำขอของตนได้ในรายละเอียดคำสั่งซื้อ", "admin/return-app.settings.modal-warning.title": "โปรดทบทวนการตั้งค่าของงคุณ", "admin/return-app.settings.modal-warning.first-paragraph": "ดูเหมือนว่าคุณกำลังพยายามบันทึกตัวเลือกการคืนแบบกำหนดเองและยังไม่มีตัวใดถึง {maxDays} ซึ่งเป็นจำนวนวันสูงสุดที่กำหนดไว้สำหรับการคืน", @@ -314,10 +233,6 @@ "admin/return-app.settings.modal-warning.third-paragraph": "หากคุณคลิก แก้ไข จำนวนวันสูงสุดสำหรับการคืนจะถูกลดจาก {maxDays} เป็น {customMaxDays} นี่จะเป็นจำนวนวันสูงสุดที่แสดงในตัวเลือกการคืนแบบกำหนดเองของคุณ", "admin/return-app.settings.modal-warning.confirm": "แก้ไข", "admin/return-app.settings.modal-warning.cancel": "ยกเลิก", - "store/return-app.return-order-details.pickup-address.drop-off-points": "เลือกจุดส่ง", - "store/return-app.return-order-details.pickup-address.drop-off-points.tooltip": "คุณสามารถคืนสินค้าไปยังหนี่งในจุดส่งของเราที่เลือกไว้", - "store/return-app.return-order-details.pickup-address.drop-off-points.dropdown.placehoder": "เลือกจุดส่ง", - "store/return-app.return-order-details.pickup-address.drop-off-points.dropdown.error": "มีข้อผิดพลาดการโหลดจุดส่ง", "admin/return-app.return-request-details.localized-product-name.tooltip": "ชื่อสินค้าจากคำสั่งซื้อเมื่อตอนเริ่มแรก", "admin/return-app.settings.section.payment-options.refund-method-strategy.checkbox.label": "คำขอการคืนเงินอัตโนมัติ", "admin/return-app.settings.section.payment-options.refund-method-strategy.checkbox.description": "สร้างใบเรียกเก็บการคืนโดยอัตโนมัติใน OMS สำหรับคำขอ", @@ -328,5 +243,106 @@ "return-app.return-request-details.cancellation.modal.adminAllow": "

ข้อควรทราบ: สถานะคำขอจะถูกตั้งค่าเป็น ยกเลิกแล้ว

โดยจะอีเมลแจ้งให้ผู้ใช้ทราบและอนุญาตให้สร้างคำขอการคืนครั้งใหม่สำหรับสินค้าในคำขอที่ยกเลิกแล้ว

หากไม่ต้องการทำเช่นนี้ ให้ตั้งค่าคำขอเป็น ปฏิเสธแล้ว

", "return-app.return-request-details.cancellation.modal.adminRefuse": "

ขออภัย ไม่สามารถยกเลิกคำขอนี้ สืบเนื่องจากสถานะปัจจุบัน

", "return-app.return-request-details.cancellation.modal.storeAllow": "

การยกเลิกคำขอนี้จะทำให้สามารถใช้สินค้าปัจจุบันในคำขอสำหรับการคืนครั้งใหม่ได้

รายการนี้จะไม่สามารถเลิกทำได้

", - "return-app.return-request-details.cancellation.modal.storeRefuse": "

ขออภัย คุณต้องติดต่อทีมสนับสนุนเพื่อยกเลิกคำขอนี้ สืบเนื่องจากสถานะปัจจุบัน

" + "return-app.return-request-details.cancellation.modal.storeRefuse": "

ขออภัย คุณต้องติดต่อทีมสนับสนุนเพื่อยกเลิกคำขอนี้ สืบเนื่องจากสถานะปัจจุบัน

", + "return-app.return-order-details.page-header.link": "กลับไปที่คำสั่ง", + "return-app.return-order-details.page-header.title": "แบบฟอร์มขอคืนสินค้า", + "return-app.return-order-details.page-header.subtitle": "เลือกสินค้าที่คุณต้องการคืนเงิน", + "return-app.return-order-details.section-products": "สินค้าพร้อมคืน", + "return-app.return-order-details.section-details": "ข้อมูลติดต่อ", + "return-app.return-order-details.section-payment": "วิธีการชำระเงินคืน", + "return-app.return-order-details.page-header.creation-date": "วันที่สร้าง", + "return-app.return-order-details.table-header.product": "ผลิตภัณฑ์", + "return-app.return-order-details.table-header.quantity": "ปริมาณ", + "return-app.return-order-details.table-header.available-to-return": "สามารถส่งคืนได้", + "return-app.return-order-details.table-header.quantity-to-return": "ปริมาณที่จะส่งคืน", + "return-app.return-order-details.table-header.reason": "เหตุผล", + "return-app.return-order-details.table-header.condition": "เงื่อนไข", + "return-app.return-order-details.dropdown-reasons.accidental-order": "การสั่งซื้อโดยไม่ได้ตั้งใจ", + "return-app.return-order-details.dropdown-reasons.better-price": "ราคาดีกว่า", + "return-app.return-order-details.dropdown-reasons.performance": "ผลงาน", + "return-app.return-order-details.dropdown-reasons.incompatible": "เข้ากันไม่ได้", + "return-app.return-order-details.dropdown-reasons.item-damaged": "รายการที่เสียหาย", + "return-app.return-order-details.dropdown-reasons.missed-delivery": "ขาดการจัดส่ง", + "return-app.return-order-details.dropdown-reasons.missing-parts": "ส่วนที่หายไป", + "return-app.return-order-details.dropdown-reasons.box-damaged": "กล่องเสียหาย", + "return-app.return-order-details.dropdown-reasons.different-product": "ผลิตภัณฑ์ที่แตกต่างกัน", + "return-app.return-order-details.dropdown-reasons.defective": "มีข้อบกพร่อง", + "return-app.return-order-details.dropdown-reasons.arrived-in-addition": "มาถึงเป็น Extra", + "return-app.return-order-details.dropdown-reasons.no-longer-needed": "ไม่ต้องการอีกต่อไป", + "return-app.return-order-details.dropdown-reasons.unauthorized-purchase": "การซื้อที่ไม่ได้รับอนุญาต", + "return-app.return-order-details.dropdown-reasons.different-from-website": "แตกต่างจากเว็บไซต์", + "return-app.return-order-details.dropdown-reasons.other-reason": "เหตุผลอื่น", + "return-app.return-order-details.dropdown-reasons.placeholder.select-reason": "เลือกเหตุผล", + "return-app.return-order-details.title.contact-details": "รายละเอียดการติดต่อ", + "return-app.return-order-details.inputs.name-input": "ชื่อ", + "return-app.return-order-details.inputs.email-input": "อีเมล", + "return-app.return-order-details.inputs.phone-input": "โทรศัพท์", + "return-app.return-order-details.title.pickup-address": "ที่อยู่สำหรับการจัดส่ง", + "return-app.return-order-details.title.tooltip.pickup-address": "เลือกที่อยู่สำหรับจัดส่งที่คุณต้องการสำหรับการจัดส่งหรือรับสินค้า", + "return-app.return-order-details.title.extra-comment": "ความคิดเห็นเพิ่มเติม", + "return-app.return-order-details.payment-options.card": "การ์ด", + "return-app.return-order-details.payment-options.bank": "ธนาคาร", + "return-app.return-order-details.payment-options.gift-card": "บัตรของขวัญ", + "return-app.return-order-details.payment-method.description": "เลือกวิธีการชำระเงินที่จะคืนเงิน", + "return-app.return-order-details.payment-method.default": "การคืนเงินจะออกไปยังวิธีการชำระเงินที่ใช้สำหรับคำสั่งซื้อนี้", + "return-app.return-order-details.payment-method.account-holder": "ชื่อเจ้าของบัญชี", + "return-app.return-order-details.payment-method.iban": "กำลังไป", + "return-app.return-order-details.terms-and-conditions.form-agree": "ฉันได้อ่านและยอมรับ {link}", + "return-app.return-order-details.terms-and-conditions.link": "ข้อกำหนดและเงื่อนไข", + "return-app.return-order-details.button.next": "ต่อไป", + "return-app.return-order-details.page-header.order-id": "รหัสคำสั่งซื้อ", + "return-app.return-item-details.excluded-items.warning": "ร้านค้าไม่อนุญาตให้ส่งคืนสินค้านี้", + "return-app.return-item-details.dropdown-reason.error": "ต้องระบุเหตุผล", + "return-app.return-item-details.dropdown-condition.error": "จำเป็นต้องมีเงื่อนไข", + "return-app.return-payment-methods.input-payment-method.error": "ต้องระบุวิธีการชำระเงิน", + "return-app.return-payment-methods.input-iban.error": "จำเป็นต้องมี IBAN", + "return-app.return-payment-methods.input-iban-invalid.error": "IBAN ไม่ถูกต้อง", + "return-app.return-payment-methods.input-account-holder.error": "จำเป็นต้องมีเจ้าของบัญชี", + "return-app.return-terms-and-conditions.checkbox.error": "โปรดยอมรับข้อกำหนดและเงื่อนไข", + "return-app.return-items-list.no-items-selected.error": "ไม่มีรายการที่เลือก", + "return-app.return-address-details.address-input.error": "ต้องระบุที่อยู่", + "return-app.return-address-details.city-input.error": "ต้องระบุเมือง", + "return-app.return-address-details.state-input.error": "จำเป็นต้องมีรัฐ", + "return-app.return-address-details.zip-input.error": "ต้องระบุรหัสไปรษณีย์", + "return-app.return-address-details.country-input.error": "ต้องระบุประเทศ", + "return-app.return-contact-details.name-input.error": "ต้องระบุชื่อ", + "return-app.return-contact-details.phone-input.error": "จำเป็นต้องใช้โทรศัพท์", + "return-app.confirm-and-submit.page-header.title": "ยืนยันรายละเอียดการคืนสินค้า", + "return-app.confirm-and-submit.refund-method.title": "วิธีการชำระเงินคืน", + "return-app.confirm-and-submit.alert.label": "ดูรายการส่งคืนของคุณ", + "return-app.confirm-and-submit.alert.error.label": "ลองอีกครั้ง", + "return-app.confirm-and-submit.alert.success": "สร้างคำขอส่งคืนสำเร็จแล้ว", + "return-app.confirm-and-submit.alert.error": "บางอย่างผิดพลาด. กรุณาลองอีกครั้ง.", + "return-app.confirm-and-submit.button.back": "กลับ", + "return-app.confirm-and-submit.button.submit": "ส่ง", + "return-app.confirm-and-submit.pickup-address.title": "ที่อยู่สำหรับการจัดส่ง", + "return-app.confirm-and-submit.contact-details.title": "รายละเอียดการติดต่อ", + "return-app.confirm-and-submit.user-comment.title": "ความคิดเห็น", + "return-app.confirm-payment-methods.refund-method.p-account-holder-name": "ชื่อผู้รับ:", + "return-app.confirm-payment-methods.refund-method.p-iban": "โอนเงินเข้าบัญชี:", + "return-app.confirm-payment-methods.refund-method.p-same-as-purchase": "เช่นเดียวกับการซื้อ", + "return-app.return-information-table.table-row.p-condition": "เงื่อนไข:", + "return-app.return-information-table.table-row.p-reason": "เหตุผล:", + "return-app.return-order-details.pickup-address.drop-off-points": "เลือกจุดส่ง", + "return-app.return-order-details.pickup-address.drop-off-points.tooltip": "คุณสามารถคืนสินค้าได้ที่จุดส่งของที่เราเลือกไว้", + "return-app.return-order-details.pickup-address.drop-off-points.dropdown.placehoder": "เลือกจุดส่ง", + "return-app.return-order-details.pickup-address.drop-off-points.dropdown.error": "เกิดข้อผิดพลาดในการโหลดจุดส่ง", + "admin/return-app.sellers.settings.navigation.label": "ผู้ขายส่งคืนการตั้งค่า", + "admin/return-app.sellers-settings-list.page-header.title": "รายการการตั้งค่าผู้ขาย", + "admin/return-app.sellers-settings-list.page-header.subTitle": "การตั้งค่าทั้งหมดที่สร้างโดยผู้ขายคืนแอป คลิก ID การตั้งค่าเพื่อดูเพิ่มเติม", + "admin/return-app.return-add.page-header.title": "การกลับมาใหม่", + "admin/return-app.return-add.page-header.subTitle": "เลือกรายการเพื่อเริ่มกระบวนการขอคืนสินค้า", + "return-app.sellers-settings-list.table-data.settingId": "รหัสการตั้งค่า", + "return-app.return-request-list.table-data.sellerName": "ชื่อข้อมูลของคำขอคืนสินค้า: ชื่อผู้ขาย", + "store/return-app.return-order-details.error.order-not-invoiced": "คำสั่งซื้อไม่ถูกเรียกเก็บ", + "store/return-app.return-order-details.setting-provider.error.retry-action": "โปรดลองอีกครั้ง", + "store/return-app.return-order-details.setting-provider.error": "มีข้อผิดพลาดในการโหลดการตั้งค่าแอป", + "store/return-app.return-order-details.error.out-of-max-days": "คำสั่งซื้อเกินเวลาสูงสุดที่ส่งคืนได้", + "store/return-app.return-order-details.error.order-not-found": "ไม่พบคำสั่งซื้อ", + "store/return-app.return-order-details.error.forbidden": "คุณไม่สามารถดูคำสั่งซื้อนี้", + "store/return-app.return-order-details.error.unknown": "มีบางอย่างผิดปกติ โปรดลองอีกครั้ง", + "admin/return-app.settings.order-status.label": "สถานะการสั่งซื้อ", + "admin/return-app.settings.order-status.placeholder": "เลือกตัวเลือก", + "return-app.return-request-list.table-data.searchBySellerName": "ชื่อผู้ขาย", + "return-app.return-request-list.table-filters.export-returns": "ส่งออก" } diff --git a/node/.DS_Store b/node/.DS_Store new file mode 100644 index 000000000..a1564b94b Binary files /dev/null and b/node/.DS_Store differ diff --git a/node/clients/checkout.ts b/node/clients/checkout.ts index 53dd2670e..24b66e071 100644 --- a/node/clients/checkout.ts +++ b/node/clients/checkout.ts @@ -1,6 +1,7 @@ import type { InstanceOptions, IOContext } from '@vtex/api' import { JanusClient } from '@vtex/api' -import type { NearPickupPointQueryResponse } from 'vtex.return-app' + +import type { NearPickupPointQueryResponse } from '../../typings/PickupPoints' export default class Checkout extends JanusClient { constructor(ctx: IOContext, options?: InstanceOptions) { diff --git a/node/clients/index.ts b/node/clients/index.ts index 2a1a2d876..30e06930a 100644 --- a/node/clients/index.ts +++ b/node/clients/index.ts @@ -1,7 +1,9 @@ import { IOClients, Sphinx } from '@vtex/api' import { vbaseFor, masterDataFor } from '@vtex/clients' -import { ReturnAppSettings, ReturnRequest } from 'vtex.return-app' +import type { ReturnAppSettings } from '../../typings/ReturnAppSettings' +import type { ReturnRequest } from '../../typings/ReturnRequest' +import type { SellerSetting } from '../../typings/SellerSetting' import { Catalog } from './catalog' import { OMSCustom as OMS } from './oms' import { GiftCard } from './giftCard' @@ -9,9 +11,19 @@ import { MailClient } from './mail' import Checkout from './checkout' import { VtexId } from './vtexId' import { CatalogGQL } from './catalogGQL' +import { ProfileClient } from './profile' +import { Marketplace } from './marketplace' +import Scheduler from './scheduler' -const ReturnAppSettings = vbaseFor('appSettings') -const ReturnRequest = masterDataFor('returnRequest') +const ReturnAppSettingsClient = vbaseFor( + 'appSettings' +) + +const ReturnRequestClient = masterDataFor('returnRequest') +const GoodwillClient = masterDataFor('goodwill') +const SellerSettingClient = masterDataFor('sellerSetting') +const OrderRefundDetails = + masterDataFor('orderRefundDetails') export class Clients extends IOClients { public get oms() { @@ -19,7 +31,7 @@ export class Clients extends IOClients { } public get appSettings() { - return this.getOrSet('appSettings', ReturnAppSettings) + return this.getOrSet('appSettings', ReturnAppSettingsClient) } public get catalog() { @@ -31,7 +43,19 @@ export class Clients extends IOClients { } public get returnRequest() { - return this.getOrSet('returnRequest', ReturnRequest) + return this.getOrSet('returnRequest', ReturnRequestClient) + } + + public get goodwill() { + return this.getOrSet('goodwill', GoodwillClient) + } + + public get orderRefundDetails() { + return this.getOrSet('orderRefundDetails', OrderRefundDetails) + } + + public get sellerSetting() { + return this.getOrSet('sellerSetting', SellerSettingClient) } public get giftCard() { @@ -53,4 +77,16 @@ export class Clients extends IOClients { public get sphinx() { return this.getOrSet('sphinx', Sphinx) } + + public get profile() { + return this.getOrSet('profile', ProfileClient) + } + + public get marketplace() { + return this.getOrSet('marketplace', Marketplace) + } + + public get scheduler() { + return this.getOrSet('scheduler', Scheduler) + } } diff --git a/node/clients/mail.ts b/node/clients/mail.ts index 8aee9ad4c..d40a91048 100644 --- a/node/clients/mail.ts +++ b/node/clients/mail.ts @@ -38,7 +38,7 @@ export class MailClient extends JanusClient { return this.http.post(TEMPLATE_RENDER_PATH, template, { headers: { ...this.options?.headers, - VtexIdClientAutCookie: this.context.adminUserAuthToken, + VtexIdClientAutCookie: this.context.adminUserAuthToken || '', }, metric: 'mail-post-template', }) diff --git a/node/clients/marketplace.ts b/node/clients/marketplace.ts new file mode 100644 index 000000000..cbf209f00 --- /dev/null +++ b/node/clients/marketplace.ts @@ -0,0 +1,26 @@ +import type { InstanceOptions, IOContext } from '@vtex/api' +import { JanusClient } from '@vtex/api' + +export class Marketplace extends JanusClient { + constructor(ctx: IOContext, options?: InstanceOptions) { + super(ctx, { + ...options, + headers: { + VtexIdClientAutCookie: ctx.adminUserAuthToken ?? ctx.authToken, + }, + }) + } + + public getSellers = async (seller?: string): Promise => + this.http.get('/api/seller-register/pvt/sellers', { + metric: 'marketplace-get-seller-list', + params: { + ...(seller ? { keyword: seller } : {}), + }, + }) + + public getSeller = async (sellerId: string): Promise => + this.http.get(`api/seller-register/pvt/sellers/${sellerId}`, { + metric: 'marketplace-get-seller-by-id', + }) +} diff --git a/node/clients/oms.ts b/node/clients/oms.ts index 8c65a4f6b..3888b2975 100644 --- a/node/clients/oms.ts +++ b/node/clients/oms.ts @@ -26,12 +26,15 @@ type InputInvoiceFields = Omit< > interface OrderListParams { + q: string clientEmail: string orderBy: 'creationDate,desc' - f_status: 'invoiced' - f_creationDate: string + f_status: string + f_creationDate?: string + f_authorizedDate?: string + f_invoicedDate?: string page: number - per_page: 10 + per_page: number } export class OMSCustom extends OMS { @@ -41,14 +44,19 @@ export class OMSCustom extends OMS { }) } - public listOrdersWithParams(params?: OrderListParams) { - return this.http.get(routes.orders, { + public listOrdersWithParams({ q, ...params }: OrderListParams) { + const requets = this.http.get(routes.orders, { headers: { VtexIdClientAutCookie: this.context.authToken, }, metric: 'oms-list-order-with-params', - ...(params ? { params } : {}), + params: { + q, + ...params, + }, }) + + return requets } public createInvoice(orderId: string, invoice: InputInvoiceFields) { @@ -57,7 +65,8 @@ export class OMSCustom extends OMS { invoice, { headers: { - VtexIdClientAutCookie: this.context.adminUserAuthToken, + VtexIdClientAutCookie: this.context.adminUserAuthToken ?? this.context.authToken ?? '', + 'X-Vtex-Use-Https': 'true', }, metric: 'oms-create-invoice', } diff --git a/node/clients/profile.ts b/node/clients/profile.ts new file mode 100644 index 000000000..91a5f199f --- /dev/null +++ b/node/clients/profile.ts @@ -0,0 +1,50 @@ +import type { IOContext, InstanceOptions } from '@vtex/api' +import { JanusClient } from '@vtex/api' + +export class ProfileClient extends JanusClient { + constructor(context: IOContext, options?: InstanceOptions) { + super(context, { + ...options, + headers: { + ...options?.headers, + 'x-vtex-user-agent': context.userAgent, + }, + }) + } + + public searchEmailByUserId(userId: string, token: string | undefined) { + return this.http.get( + `/api/dataentities/CL/search?userId=${userId}&_fields=email,firstName,lastName,phone`, + { + metric: 'get-email-by-userId', + headers: { + VtexIdClientAutCookie: token, + }, + } + ) + } + + public getProfileUnmask(userId: string, token: string | undefined) { + return this.http.get( + `/api/storage/profile-system/profiles/${userId}/unmask`, + { + metric: 'get-profile-unmask', + headers: { + VtexIdClientAutCookie: token, + }, + } + ) + } + + public getAddressUnmask(userId: string, token: string | undefined) { + return this.http.get( + `/api/storage/profile-system/profiles/${userId}/addresses/unmask`, + { + metric: 'get-address-unmask', + headers: { + VtexIdClientAutCookie: token, + }, + } + ) + } +} diff --git a/node/clients/scheduler.ts b/node/clients/scheduler.ts new file mode 100644 index 000000000..d032b09df --- /dev/null +++ b/node/clients/scheduler.ts @@ -0,0 +1,36 @@ +import type { InstanceOptions, IOContext } from '@vtex/api' +import { JanusClient } from '@vtex/api' + +export default class Scheduler extends JanusClient { + constructor(context: IOContext, options?: InstanceOptions) { + super(context, { + ...options, + headers: { + ...options?.headers, + VtexIdclientAutCookie: context.authToken, + }, + }) + } + + public createlScheduler = async ( + appName: string, + schedulerData: SchedulerRequest + ): Promise => { + await this.http.put( + `/api/scheduler/master/${appName}/?version=4`, + schedulerData, + { + metric: `create-scheduler-return-app-setup`, + } + ) + } + + public deleteScheduler = async ( + appName: string, + id: string + ): Promise => { + await this.http.delete(`/api/scheduler/master/${appName}/${id}?version=4`, { + metric: `delete-scheduler-return-app-setup`, + }) + } +} diff --git a/node/clients/vtexId.ts b/node/clients/vtexId.ts index 888240c13..d412c4032 100644 --- a/node/clients/vtexId.ts +++ b/node/clients/vtexId.ts @@ -1,5 +1,5 @@ import type { IOContext, InstanceOptions } from '@vtex/api' -import { JanusClient } from '@vtex/api' +import { AuthenticationError, JanusClient } from '@vtex/api' interface VtexIdLoginResponse { authStatus: string @@ -46,11 +46,30 @@ export class VtexId extends JanusClient { public getAuthenticatedUser( authToken: string ): Promise { - return this.http.get('/api/vtexid/pub/authenticated/user/', { + return this.http.get('/api/vtexid/pub/authenticated/user', { metric: 'vtexid-get-authenticated-user', params: { authToken, }, }) } + + public async getAccount(token: string, account: string): Promise { + try { + const response = await this.http.get(`/api/vlm/account?an=${account}`, { + metric: 'vtexid-get-account', + headers: { + VtexIdClientAutCookie: token || '', + }, + }) + + return response + } catch (error) { + throw new AuthenticationError('Request failed with status code 401') + } + } + + public getAuthToken() { + return this.context.adminUserAuthToken ?? this.context.authToken + } } diff --git a/node/config/schedulerTemplate.ts b/node/config/schedulerTemplate.ts new file mode 100644 index 000000000..180fc8702 --- /dev/null +++ b/node/config/schedulerTemplate.ts @@ -0,0 +1,22 @@ +export const schedulerTemplate = { + id: 'TO_BE_REPLACED', + scheduler: { + expression: '1 0 * * *', + endDate: '2029-12-30T23:29:00', + }, + retry: { + delay: { + addMinutes: 5, + addHours: 0, + addDays: 0, + }, + times: 2, + backOffRate: 1, + }, + request: { + uri: '', + method: 'POST', + headers: {}, + body: {}, + }, +} diff --git a/node/events/keepAlive.ts b/node/events/keepAlive.ts new file mode 100644 index 000000000..1d8a66d1a --- /dev/null +++ b/node/events/keepAlive.ts @@ -0,0 +1,83 @@ +import type { EventContext } from '@vtex/api' + +import type { Clients } from '../clients' +import { schedulerTemplate } from '../config/schedulerTemplate' + +const setupScheduler = async (ctx: EventContext) => { + const { + clients: { scheduler }, + body: { to, from }, + vtex: { logger, production }, + } = ctx + + if (production !== true) { + logger.info({ + message: 'setup-scheduler-not-production', + data: `production: ${production}`, + }) + + return true + } + + if (to) { + const [appName] = to?.id?.split('@') + + if ( + appName.length && + `${process.env.VTEX_APP_VENDOR}.${process.env.VTEX_APP_NAME}` === appName + ) { + const schedulerPingRequest: SchedulerRequest = schedulerTemplate + + schedulerPingRequest.id = 'return-app-ping' + schedulerPingRequest.request.uri = `https://${ctx.vtex.workspace}--${ctx.vtex.account}.myvtex.com/_v/return-app/ping` + schedulerPingRequest.request.method = 'POST' + schedulerPingRequest.request.headers = { + 'cache-control': 'no-store', + pragma: 'no-store', + } + schedulerPingRequest.scheduler.expression = '*/1 * * * *' + schedulerPingRequest.scheduler.endDate = '2100-01-01T23:30:00' + + try { + await scheduler.createlScheduler(appName, schedulerPingRequest) + logger.info({ + message: 'create-scheduler-return-app-ping', + }) + } catch (error) { + logger.error({ + message: 'error-create-scheduler-return-app-ping', + error, + }) + } + + return true + } + } else if (from) { + const [appName] = from?.id?.split('@') + + if ( + appName.length && + `${process.env.VTEX_APP_VENDOR}.${process.env.VTEX_APP_NAME}` === appName + ) { + const idName = 'return-app-ping' + + try { + await scheduler.deleteScheduler(appName, idName) + logger.info({ + message: 'delete-scheduler-return-app-ping', + }) + } catch (error) { + logger.error({ + message: 'error-delete-scheduler-return-app-ping', + error, + }) + } + + return true + } + } + + return null +} + +export default setupScheduler diff --git a/node/index.ts b/node/index.ts index a6181e080..b8534d5e9 100644 --- a/node/index.ts +++ b/node/index.ts @@ -1,3 +1,4 @@ +/* eslint-disable prettier/prettier */ import type { ClientsConfig, ServiceContext, @@ -10,11 +11,31 @@ import { Clients } from './clients' import { errorHandler } from './middlewares/errorHandler' import { mutations, queries, resolvers } from './resolvers' import { schemaDirectives } from './directives' -import { auth } from './middlewares/auth' -import { createReturn } from './middlewares/createReturn' -import { getRequest } from './middlewares/getRequest' -import { getRequestList } from './middlewares/getRequestList' -import { updateRequestStatus } from './middlewares/updateRequestStatus' +import { middlewares } from './middlewares' +import { exportRequests } from './middlewares/exportRequests' +import { ping } from './middlewares/ping' +import setupScheduler from './events/keepAlive' +import { createGoodwill } from './middlewares/goodwill/createGoodwill' +import { getGoodwills } from './middlewares/goodwill/getGoodwills' +import { setSchemaVersion } from './middlewares/setSchema' + +const { + auth, + authSelf, + createReturn, + getRequest, + getRequestList, + updateRequestStatus, + saveAppSetting, + returnAppSetting, + saveSellerSetting, + returnSellerSetting, + sellerValidation, + getOrdersList, + createGiftcard, + createPrerefund, + invoice, +} = middlewares const TIMEOUT_MS = 5000 const catalogMemoryCache = new LRUCache({ max: 5000 }) @@ -40,19 +61,154 @@ declare global { userProfile?: UserProfile // Added in the state via auth middleware when request has appkey and apptoken. appkey?: string + sellerId?: string } } export default new Service({ clients, + events: { + keepALive: setupScheduler, + }, routes: { returnRequests: method({ - POST: [errorHandler, auth, createReturn], - GET: [errorHandler, auth, getRequestList], + POST: [setSchemaVersion, errorHandler, sellerValidation, createReturn], + GET: [setSchemaVersion, errorHandler, sellerValidation, getRequestList], + }), + _returnRequests: method({ + POST: [ + setSchemaVersion, + errorHandler, + auth, + sellerValidation, + createReturn, + ], + GET: [ + setSchemaVersion, + errorHandler, + auth, + sellerValidation, + getRequestList, + ], }), returnRequest: method({ - GET: [errorHandler, auth, getRequest], - PUT: [errorHandler, auth, updateRequestStatus], + GET: [setSchemaVersion, errorHandler, getRequest], + PUT: [setSchemaVersion, errorHandler, updateRequestStatus], + }), + _returnRequest: method({ + GET: [setSchemaVersion, errorHandler, auth, getRequest], + PUT: [setSchemaVersion, errorHandler, auth, updateRequestStatus], + }), + exportRequests: method({ + GET: [setSchemaVersion, errorHandler, authSelf, exportRequests], + }), + goodwill: method({ + POST: [ + setSchemaVersion, + setSchemaVersion, + errorHandler, + sellerValidation, + createGoodwill, + ], + GET: [ + setSchemaVersion, + setSchemaVersion, + errorHandler, + sellerValidation, + getGoodwills, + ], + }), + _goodwill: method({ + POST: [ + setSchemaVersion, + setSchemaVersion, + errorHandler, + auth, + sellerValidation, + createGoodwill, + ], + GET: [ + setSchemaVersion, + setSchemaVersion, + errorHandler, + auth, + sellerValidation, + getGoodwills, + ], + }), + preRefund: method({ + GET: [setSchemaVersion, errorHandler, createPrerefund], + }), + _preRefund: method({ + GET: [setSchemaVersion, errorHandler, auth, createPrerefund], + }), + settings: method({ + POST: [setSchemaVersion, errorHandler, saveAppSetting], + PUT: [setSchemaVersion, errorHandler, saveAppSetting], + GET: [setSchemaVersion, errorHandler, returnAppSetting], + }), + _settings: method({ + POST: [setSchemaVersion, errorHandler, auth, saveAppSetting], + PUT: [setSchemaVersion, errorHandler, auth, saveAppSetting], + GET: [setSchemaVersion, errorHandler, auth, returnAppSetting], + }), + sellerSetting: method({ + POST: [ + setSchemaVersion, + errorHandler, + sellerValidation, + saveSellerSetting, + ], + }), + _sellerSetting: method({ + POST: [ + setSchemaVersion, + errorHandler, + auth, + sellerValidation, + saveSellerSetting, + ], + }), + sellerSettings: method({ + GET: [ + setSchemaVersion, + errorHandler, + sellerValidation, + returnSellerSetting, + ], + }), + _sellerSettings: method({ + GET: [ + setSchemaVersion, + errorHandler, + auth, + sellerValidation, + returnSellerSetting, + ], + }), + orderList: method({ + POST: [setSchemaVersion, errorHandler, sellerValidation, getOrdersList], + }), + _orderList: method({ + POST: [ + setSchemaVersion, + errorHandler, + auth, + sellerValidation, + getOrdersList, + ], + }), + giftcard: method({ + POST: [errorHandler, createGiftcard], + }), + _giftcard: method({ + POST: [errorHandler, auth, createGiftcard], + }), + ping: method({ + POST: [ping], + }), + invoice: method({ + POST: [auth, invoice], }), }, graphql: { diff --git a/node/middlewares/appSettings.ts b/node/middlewares/appSettings.ts new file mode 100644 index 000000000..0e1f9cf74 --- /dev/null +++ b/node/middlewares/appSettings.ts @@ -0,0 +1,47 @@ +import { json } from 'co-body' + +import { SETTINGS_PATH } from '../utils/constants' +import schemaAppSetting from '../utils/appSettingSchema' + +export async function saveAppSetting(ctx: Context) { + const { + req, + clients: { appSettings }, + } = ctx + + const body = await json(req) + + try { + await schemaAppSetting.validateAsync(body) + + const settings = await appSettings.get(SETTINGS_PATH, true) + + const newSettings = { + ...settings, + ...body, + } + + await appSettings.save(SETTINGS_PATH, newSettings) + + ctx.body = { settingsSaved: newSettings } + ctx.status = 201 + } catch (error) { + const errors = error.details + ? error.details.map((detail: any) => detail.message) + : [error.message] + + ctx.body = { errors } + ctx.status = 400 + } +} + +export async function returnAppSetting(ctx: Context) { + const { + clients: { appSettings }, + } = ctx + + const settings = await appSettings.get(SETTINGS_PATH, true) + + ctx.body = settings + ctx.status = 201 +} diff --git a/node/middlewares/authSelf.ts b/node/middlewares/authSelf.ts new file mode 100644 index 000000000..69e36fdde --- /dev/null +++ b/node/middlewares/authSelf.ts @@ -0,0 +1,37 @@ +import { AuthenticationError } from '@vtex/api' + +export async function authSelf(ctx: Context, next: () => Promise) { + const { + clients: { vtexId, sphinx }, + state, + } = ctx + + const authCookie = vtexId.getAuthToken() + + const authenticatedUser = await vtexId.getAuthenticatedUser(authCookie) + + if (authenticatedUser) { + const isAdmin = await sphinx.isAdmin(authenticatedUser.user) + + const { user, userId } = authenticatedUser + + state.userProfile = { + userId, + email: user, + role: isAdmin ? 'admin' : 'store-user', + } + + if (isAdmin) { + ctx.vtex.adminUserAuthToken = authCookie + } + } + + const { userProfile, appkey: appKeyState } = state + + // Either userProfile or appKeyState must be on state to continue + if (!userProfile && !appKeyState) { + throw new AuthenticationError('Request failed with status code 401') + } + + await next() +} diff --git a/node/middlewares/createPrerefund.ts b/node/middlewares/createPrerefund.ts new file mode 100644 index 000000000..4c6e9bb71 --- /dev/null +++ b/node/middlewares/createPrerefund.ts @@ -0,0 +1,26 @@ +import { UserInputError } from '@vtex/api' + +import { createReturnRequestService } from '../services/createReturnRequestService' + +export async function createPrerefund(ctx: Context) { + const { body }: any = ctx || {} + const locale = body?.cultureInfoData?.locale || body?.locale + + if (!locale) { + throw new UserInputError('Locale is required.') + } + + ctx.vtex.locale = locale + + try { + ctx.body = await createReturnRequestService(ctx, { ...body, locale }) + ctx.status = 200 + } catch (error) { + ctx.body = + error?.message || + error?.response?.data || + error.response?.statusText || + error + ctx.status = error.response?.status || 400 + } +} diff --git a/node/middlewares/createReturn.ts b/node/middlewares/createReturn.ts index c13a0802c..796d702de 100644 --- a/node/middlewares/createReturn.ts +++ b/node/middlewares/createReturn.ts @@ -1,14 +1,10 @@ import { UserInputError } from '@vtex/api' -import { json } from 'co-body' import { createReturnRequestService } from '../services/createReturnRequestService' export async function createReturn(ctx: Context) { - const { req } = ctx - - const body = await json(req) - - const { locale } = body + const { body }: any = ctx || {} + const locale = body?.cultureInfoData?.locale || body?.locale if (!locale) { throw new UserInputError('Locale is required.') @@ -16,6 +12,15 @@ export async function createReturn(ctx: Context) { ctx.vtex.locale = locale - ctx.body = await createReturnRequestService(ctx, body) - ctx.status = 201 + try { + ctx.body = await createReturnRequestService(ctx, { ...body, locale }) + ctx.status = 200 + } catch (error) { + ctx.body = + error?.message || + error?.response?.data || + error.response?.statusText || + error + ctx.status = error.response?.status || 400 + } } diff --git a/node/middlewares/exportRequests.ts b/node/middlewares/exportRequests.ts new file mode 100644 index 000000000..a4d03a32c --- /dev/null +++ b/node/middlewares/exportRequests.ts @@ -0,0 +1,141 @@ +import XLSX from 'xlsx' + +import type { Status } from '../../typings/ReturnRequest' +import { returnRequestListService } from '../services/returnRequestListService' + +const createXLSBuffer = (data: any[]) => { + const flattenedData = data.map((item: any) => ({ + 'Return Request ID': item?.id, + 'Order ID': item?.orderId, + 'Return Request Status': item?.status, + 'Return Reason': item?.items + ?.map((reason: any) => `${reason?.id}-${reason?.returnReason?.reason}`) + .join(','), + 'Customer Name': item?.customerProfileData?.name, + 'Customer Email': item?.customerProfileData?.email, + 'Seller Name': item?.sellerName || '', + Carrier: item?.logisticsInfo?.currier || '', + 'Shipping method': item?.logisticsInfo?.sla || '', + 'Sequence Number': item?.sequenceNumber, + 'Creation date': item?.createdIn, + 'Creation time': item?.dateSubmitted, + })) + + const workbook = XLSX.utils.book_new() + const worksheet = XLSX.utils.json_to_sheet(flattenedData) + + XLSX.utils.book_append_sheet(workbook, worksheet, 'return-requests') + + return XLSX.write(workbook, { bookType: 'xls', type: 'buffer' }) +} + +export async function exportRequests(ctx: Context, next: () => Promise) { + const { query } = ctx + + const { + _page, + _perPage, + _status, + _sequenceNumber, + _id, + _dateSubmitted, + _orderId, + _userEmail, + _allFields, + _sellerName, + _onlyData = false, + } = query + + try { + if (!_dateSubmitted) { + throw new Error("The '_dateSubmitted' query parameter is required") + } + + const [from, to] = (_dateSubmitted as string | undefined)?.split(',') ?? [] + + const getAllFields = Boolean(_allFields) + + const params = { + perPage: _perPage ? Number(_perPage) : 100, + filter: { + status: _status as Status | undefined, + sequenceNumber: _sequenceNumber as string | undefined, + id: _id as string | undefined, + createdIn: _dateSubmitted ? { from, to } : undefined, + orderId: _orderId as string | undefined, + userEmail: _userEmail as string | undefined, + sellerName: _sellerName as string | undefined, + }, + } + + const requests = await returnRequestListService( + ctx, + { + page: _page ? Number(_page) : 1, + ...params, + }, + getAllFields + ) + + const { paging, list } = requests + + let responseRequests = list + + if (paging.currentPage !== paging.pages) { + const arrayRequests = Array.from({ length: paging.pages - 1 }) + + const nextRequest = await Promise.all( + arrayRequests.map(async (_, index) => { + try { + const page = index + 2 + + const nextRequestResponse = await returnRequestListService( + ctx, + { + page, + ...params, + }, + getAllFields + ) + + return nextRequestResponse.list + } catch (error) { + console.error(`Error fetching page ${index + 2}:`, error) + + return undefined + } + }) + ) + + // eslint-disable-next-line @typescript-eslint/ban-ts-comment + // @ts-ignore + responseRequests = responseRequests.concat(nextRequest.flat()) + } + + if (_onlyData) { + ctx.status = 200 + ctx.body = responseRequests + } else { + const file = createXLSBuffer(responseRequests) + + ctx.status = 200 + ctx.set( + 'Content-Type', + 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet' + ) + ctx.set( + 'Content-Disposition', + `attachment; filename=return-requests-${new Date() + .toJSON() + .slice(0, 10)}.xls` + ) + ctx.body = file + } + } catch (error) { + ctx.status = 500 + ctx.body = { error: error.message } + } + + ctx.set('Cache-Control', 'no-cache') + await next() +} diff --git a/node/middlewares/getOrdersList.ts b/node/middlewares/getOrdersList.ts new file mode 100644 index 000000000..c8ed90b9d --- /dev/null +++ b/node/middlewares/getOrdersList.ts @@ -0,0 +1,9 @@ +import { returnOrdersListService } from '../services/returnOrdersListService' + +export async function getOrdersList(ctx: Context) { + const { body } = ctx + + ctx.set('Cache-Control', 'no-cache') + + return (ctx.body = await returnOrdersListService(ctx, body)) +} diff --git a/node/middlewares/getRequestList.ts b/node/middlewares/getRequestList.ts index 86342c8c1..5cb41d8db 100644 --- a/node/middlewares/getRequestList.ts +++ b/node/middlewares/getRequestList.ts @@ -1,9 +1,11 @@ -import type { Status } from 'vtex.return-app' - +import type { Status } from '../../typings/ReturnRequest' import { returnRequestListService } from '../services/returnRequestListService' export async function getRequestList(ctx: Context) { - const { query } = ctx + const { + query, + state: { sellerId }, + } = ctx const { _page, @@ -35,6 +37,7 @@ export async function getRequestList(ctx: Context) { createdIn: _dateSubmitted ? { from, to } : undefined, orderId: _orderId as string | undefined, userEmail: _userEmail as string | undefined, + sellerName: sellerId as string | undefined, }, }, getAllFields diff --git a/node/middlewares/giftcard.ts b/node/middlewares/giftcard.ts new file mode 100644 index 000000000..b5e471c8b --- /dev/null +++ b/node/middlewares/giftcard.ts @@ -0,0 +1,13 @@ +import { json } from 'co-body' + +import { createGiftcardService } from '../services/createGiftcardService' + +export async function createGiftcard(ctx: Context) { + const { req } = ctx + + const body = await json(req) + + ctx.set('Cache-Control', 'no-cache') + + ctx.body = await createGiftcardService(ctx, body) +} diff --git a/node/middlewares/goodwill/createGoodwill.ts b/node/middlewares/goodwill/createGoodwill.ts new file mode 100644 index 000000000..d78c828b3 --- /dev/null +++ b/node/middlewares/goodwill/createGoodwill.ts @@ -0,0 +1,23 @@ +import createGoodwillService from '../../services/goodwill/createGoodwillService' + +export async function createGoodwill( + ctx: Context, + next: () => Promise +): Promise { + const { body } = ctx + + try { + ctx.body = await createGoodwillService(ctx, body as Goodwill) + } catch (error) { + ctx.status = error.response?.status || 500 + ctx.body = { + message: + error.response?.data?.Message || + error.response?.data?.error || + error.message, + } + } + + ctx.set('Cache-Control', 'no-cache') + await next() +} diff --git a/node/middlewares/goodwill/getGoodwills.ts b/node/middlewares/goodwill/getGoodwills.ts new file mode 100644 index 000000000..a441fcf93 --- /dev/null +++ b/node/middlewares/goodwill/getGoodwills.ts @@ -0,0 +1,26 @@ +import getGoodwillsService from '../../services/goodwill/getGoodwillService' + +export async function getGoodwills( + ctx: Context, + next: () => Promise +): Promise { + const { + vtex: { + route: { + params: { id }, + }, + }, + } = ctx + + try { + ctx.body = await getGoodwillsService(ctx, id as string) + } catch (error) { + ctx.status = error.response?.status || error.status || 500 + ctx.body = { + message: error.response?.data?.Message || error.message || error, + } + } + + ctx.set('Cache-Control', 'no-cache') + await next() +} diff --git a/node/middlewares/index.ts b/node/middlewares/index.ts new file mode 100644 index 000000000..7779aaa70 --- /dev/null +++ b/node/middlewares/index.ts @@ -0,0 +1,35 @@ +import { saveAppSetting, returnAppSetting } from './appSettings' +import { auth } from './auth' +import { authSelf } from './authSelf' +import { createReturn } from './createReturn' +import { errorHandler } from './errorHandler' +import { getRequest } from './getRequest' +import { getRequestList } from './getRequestList' +import { updateRequestStatus } from './updateRequestStatus' +import { saveSellerSetting, returnSellerSetting } from './sellerSetting' +import { sellerValidation } from './sellerValidation' +import { getOrdersList } from './getOrdersList' +import { createGiftcard } from './giftcard' +import { exportRequests } from './exportRequests' +import { createPrerefund } from './createPrerefund' +import { invoice } from './invoice' + +export const middlewares = { + saveAppSetting, + returnAppSetting, + auth, + authSelf, + createReturn, + errorHandler, + getRequest, + getRequestList, + updateRequestStatus, + saveSellerSetting, + returnSellerSetting, + sellerValidation, + getOrdersList, + createGiftcard, + exportRequests, + createPrerefund, + invoice +} diff --git a/node/middlewares/invoice.ts b/node/middlewares/invoice.ts new file mode 100644 index 000000000..a4761cb7e --- /dev/null +++ b/node/middlewares/invoice.ts @@ -0,0 +1,17 @@ +import { json } from "co-body" +import { createInvoice } from "../services/createInvoice" + +export async function invoice(ctx: Context): Promise { + const { + req, + vtex: { + route: { + params: { orderId }, + }, + }, + } = ctx + const body = await json(req) + + ctx.body = await createInvoice(ctx, orderId, body) + +} diff --git a/node/middlewares/ping.ts b/node/middlewares/ping.ts new file mode 100644 index 000000000..0ecfb1872 --- /dev/null +++ b/node/middlewares/ping.ts @@ -0,0 +1,13 @@ +export async function ping( + ctx: Context, + next: () => Promise +): Promise { + ctx.response.status = 200 + + ctx.set('Cache-Control', 'no-cache, no-store') + ctx.set('pragma', 'no-cache, no-store') + + ctx.response.body = `Ping check` + + await next() +} diff --git a/node/middlewares/sellerSetting.ts b/node/middlewares/sellerSetting.ts new file mode 100644 index 000000000..5ff74a500 --- /dev/null +++ b/node/middlewares/sellerSetting.ts @@ -0,0 +1,79 @@ +import { UserInputError } from '@vtex/api' + +import { + saveSellerSettingService, + returnSellerSettingService, +} from '../services/SellerSettingService' +import { SETTINGS_PATH } from '../utils/constants' + +export async function saveSellerSetting(ctx: Context) { + const { body }: any = ctx || {} + + ctx.set('Cache-Control', 'no-cache') + + try { + const settings = await returnSellerSettingService( + ctx, + body?.settings?.sellerId + ) + + if (settings) { + body.settings.id = settings.id + } + + ctx.body = await saveSellerSettingService(ctx, body) + + ctx.status = 200 + } catch (error) { + ctx.body = error?.response?.data || error.response?.statusText || error + ctx.status = error.response?.status || 400 + } +} + +export async function returnSellerSetting(ctx: Context) { + const { + clients: { appSettings }, + vtex: { + route: { params }, + }, + } = ctx + + const { sellerId } = params as { sellerId: string } + + ctx.set('Cache-Control', 'no-cache') + + try { + if (sellerId) { + const settings = await returnSellerSettingService(ctx, sellerId) + + if (!settings) { + const settingsMkt: any = await appSettings.get(SETTINGS_PATH, true) + + const newSettings = { + settings: { + ...settingsMkt, + sellerId, + parentAccount: ctx.vtex.account, + }, + } + + const res = await saveSellerSettingService(ctx, newSettings) + + ctx.body = { + ...newSettings?.settings, + id: res.DocumentId, + } + + ctx.status = 200 + } else { + ctx.body = settings + ctx.status = 200 + } + } else { + throw new UserInputError('sellerId is required') + } + } catch (error) { + ctx.body = error?.response?.data || error.response?.statusText || error + ctx.status = error.response?.status || 400 + } +} diff --git a/node/middlewares/sellerValidation.ts b/node/middlewares/sellerValidation.ts new file mode 100644 index 000000000..699ed226b --- /dev/null +++ b/node/middlewares/sellerValidation.ts @@ -0,0 +1,66 @@ +import { json } from 'co-body' +import { AuthenticationError } from '@vtex/api' + +export async function sellerValidation( + ctx: Context, + next: () => Promise +) { + const { + req, + query, + vtex: { + route: { params }, + }, + clients: { marketplace }, + } = ctx + + const { _sellerName, _sellerId } = query + + const body = await json(req) + + const { settings, sellerName } = body + let seller = '' + const sellerNameSettintgs = settings?.sellerId + + seller = sellerNameSettintgs || sellerName + const { sellerId } = params as { sellerId: string } + if ( + (_sellerName || _sellerId || seller || sellerId || body.sellerId) + ) { + const accountName = String( + _sellerName || _sellerId || seller || sellerId || body.sellerId + ) + + const { items } = await marketplace.getSellers(accountName) + + if (items.length > 0) { + const currentSeller = items.find( + (item: any) => + item?.id === accountName || + item?.account === accountName || + item?.name === accountName + ) + + if (!currentSeller) { + throw new AuthenticationError( + `The ${accountName} account does not exist.` + ) + } + + if (!currentSeller.isActive) { + throw new AuthenticationError(`The ${accountName} account is inactive.`) + } + + ctx.state.sellerId = currentSeller.id + ctx.body = body + + await next() + } else { + throw new AuthenticationError( + 'An error occurred while trying to validate your sellerId, please try again.' + ) + } + } else { + throw new AuthenticationError('_sellerName or _sellerId is required.') + } +} diff --git a/node/middlewares/setSchema.ts b/node/middlewares/setSchema.ts new file mode 100644 index 000000000..4bbcf7653 --- /dev/null +++ b/node/middlewares/setSchema.ts @@ -0,0 +1,12 @@ +import { SCHEMAS } from "../utils/constants" + +export async function setSchemaVersion( + ctx: Context, + next: () => Promise +): Promise { + ctx.clients.returnRequest.schema = SCHEMAS.DEFAULT + ctx.clients.goodwill.schema = SCHEMAS.DEFAULT + ctx.clients.sellerSetting.schema = SCHEMAS.DEFAULT + ctx.clients.orderRefundDetails.schema = SCHEMAS.DEFAULT + await next() +} diff --git a/node/middlewares/updateRequestStatus.ts b/node/middlewares/updateRequestStatus.ts index e1e063933..a64348087 100644 --- a/node/middlewares/updateRequestStatus.ts +++ b/node/middlewares/updateRequestStatus.ts @@ -13,11 +13,12 @@ export async function updateRequestStatus(ctx: Context) { const { requestId } = params as { requestId: string } const body = await json(req) - const updatedRequest = await updateRequestStatusService(ctx, { ...body, requestId, }) + ctx.set('Cache-Control', 'no-cache') ctx.body = updatedRequest + ctx.status = 200 } diff --git a/node/package.json b/node/package.json index c39e70938..8c8567b2b 100644 --- a/node/package.json +++ b/node/package.json @@ -1,35 +1,31 @@ { "dependencies": { - "@vtex/api": "6.45.15", + "@vtex/api": "6.45.24", "@vtex/clients": "^2.13.0", "co-body": "^6.0.0", "graphql": "^14.0.0", "graphql-tools": "^4.0.0", - "html-template-tag": "^4.0.1" + "html-template-tag": "^4.0.1", + "joi": "^17.9.2", + "ramda": "^0.29.0", + "uuid": "^8.3.2", + "xlsx": "^0.18.5" }, "devDependencies": { "@types/co-body": "^0.0.3", - "@types/jest": "^24.0.18", "@types/node": "^12.0.0", - "@vtex/api": "6.45.15", + "@types/ramda": "types/npm-ramda#dist", + "@types/uuid": "^9.0.5", + "@types/xlsx": "^0.0.36", + "@vtex/api": "6.45.24", "@vtex/test-tools": "^1.0.0", "@vtex/tsconfig": "^0.6.0", "tslint": "^6.1.3", "tslint-config-vtex": "^2.1.0", - "vtex.catalog-graphql": "http://vtex.vtexassets.com/_v/public/typings/v1/vtex.catalog-graphql@1.101.1/public/@types/vtex.catalog-graphql", - "vtex.css-handles": "http://vtex.vtexassets.com/_v/public/typings/v1/vtex.css-handles@0.4.4/public/@types/vtex.css-handles", - "vtex.easypost": "http://vtex.vtexassets.com/_v/public/typings/v1/vtex.easypost@0.1.1/public/@types/vtex.easypost", - "vtex.format-currency": "http://vtex.vtexassets.com/_v/public/typings/v1/vtex.format-currency@0.4.1/public/@types/vtex.format-currency", - "vtex.my-account": "http://vtex.vtexassets.com/_v/public/typings/v1/vtex.my-account@1.25.0/public/@types/vtex.my-account", - "vtex.my-account-commons": "http://vtex.vtexassets.com/_v/public/typings/v1/vtex.my-account-commons@1.6.0/public/@types/vtex.my-account-commons", - "vtex.render-runtime": "http://vtex.vtexassets.com/_v/public/typings/v1/vtex.render-runtime@8.132.4/public/@types/vtex.render-runtime", - "vtex.return-app": "http://vtex.vtexassets.com/_v/public/typings/v1/vtex.return-app@3.5.0/public/@types/vtex.return-app", - "vtex.store-graphql": "http://vtex.vtexassets.com/_v/public/typings/v1/vtex.store-graphql@2.155.32/public/@types/vtex.store-graphql", - "vtex.styleguide": "http://vtex.vtexassets.com/_v/public/typings/v1/vtex.styleguide@9.146.1/public/@types/vtex.styleguide", - "vtex.tenant-graphql": "http://vtex.vtexassets.com/_v/public/typings/v1/vtex.tenant-graphql@0.1.2/public/@types/vtex.tenant-graphql" + "typescript": "3.9.7" }, "scripts": { "lint": "tsc --noEmit --pretty && tslint -c tslint.json --fix './**/*.ts'" }, "version": "3.5.6" -} +} \ No newline at end of file diff --git a/node/resolvers/ReturnRequestResponse.ts b/node/resolvers/ReturnRequestResponse.ts index c3a3de160..6000dac67 100644 --- a/node/resolvers/ReturnRequestResponse.ts +++ b/node/resolvers/ReturnRequestResponse.ts @@ -1,4 +1,4 @@ -import type { ReturnRequest } from 'vtex.return-app' +import type { ReturnRequest } from '../../typings/ReturnRequest' type VtexProduct = 'admin' | 'store' | undefined diff --git a/node/resolvers/appSettings.ts b/node/resolvers/appSettings.ts index 2f93cc131..03027d4ba 100644 --- a/node/resolvers/appSettings.ts +++ b/node/resolvers/appSettings.ts @@ -1,8 +1,7 @@ import type { ReturnAppSettings, MutationSaveReturnAppSettingsArgs, -} from 'vtex.return-app' - +} from '../../typings/ReturnAppSettings' import { validateMaxDaysCustomReasons, validatePaymentOptions, diff --git a/node/resolvers/categoryTreeName.ts b/node/resolvers/categoryTreeName.ts index 5c41ee5f8..ebe57c264 100644 --- a/node/resolvers/categoryTreeName.ts +++ b/node/resolvers/categoryTreeName.ts @@ -1,4 +1,4 @@ -import type { CategoryInfo } from 'vtex.return-app' +import type { CategoryInfo } from '../../typings/Category' const transformCategoryTree = ( categoryTree: CategoryTree[], diff --git a/node/resolvers/createReturnRequest.ts b/node/resolvers/createReturnRequest.ts index a175df82a..05740b2ff 100644 --- a/node/resolvers/createReturnRequest.ts +++ b/node/resolvers/createReturnRequest.ts @@ -1,5 +1,4 @@ -import type { MutationCreateReturnRequestArgs } from 'vtex.return-app' - +import type { MutationCreateReturnRequestArgs } from '../../typings/ReturnRequest' import { createReturnRequestService } from '../services/createReturnRequestService' export const createReturnRequest = async ( diff --git a/node/resolvers/index.ts b/node/resolvers/index.ts index e462ffcbf..181f623c0 100644 --- a/node/resolvers/index.ts +++ b/node/resolvers/index.ts @@ -8,24 +8,31 @@ import { ordersAvailableToReturn } from './ordersAvailableToReturn' import { orderToReturnSummary } from './orderToReturnSummary' import { returnRequest } from './returnRequest' import { returnRequestList } from './returnRequestList' +import { returnSettingsList } from './returnSettingsList' import { ReturnRequestResponse } from './ReturnRequestResponse' import { updateReturnRequestStatus } from './updateReturnRequestStatus' import { nearestPickupPoints } from './nearestPickupPoints' +import { returnSellerSettings } from './returnSellerSettings' +import { updateSellerSetting } from './updateSellerSetting' +import { resolversWrapper } from '../utils/resolversWrapper' -export const mutations = { +export const mutations = resolversWrapper( { createReturnRequest, updateReturnRequestStatus, + updateSellerSetting, ...settingsMutation, -} +}) -export const queries = { +export const queries = resolversWrapper({ ...settingsQuery, + returnSellerSettings, categoryTreeName, ordersAvailableToReturn, orderToReturnSummary, returnRequest, returnRequestList, nearestPickupPoints, -} + returnSettingsList, +}) export const resolvers = { ReturnRequestResponse } diff --git a/node/resolvers/nearestPickupPoints.ts b/node/resolvers/nearestPickupPoints.ts index 9fc715569..421f38171 100644 --- a/node/resolvers/nearestPickupPoints.ts +++ b/node/resolvers/nearestPickupPoints.ts @@ -1,7 +1,7 @@ import type { QueryNearestPickupPointsArgs, NearPickupPointQueryResponse, -} from 'vtex.return-app' +} from '../../typings/PickupPoints' export const nearestPickupPoints = async ( _: unknown, diff --git a/node/resolvers/orderToReturnSummary.ts b/node/resolvers/orderToReturnSummary.ts index e0d92170d..bd83cd78b 100644 --- a/node/resolvers/orderToReturnSummary.ts +++ b/node/resolvers/orderToReturnSummary.ts @@ -1,11 +1,12 @@ import { ResolverError, UserInputError } from '@vtex/api' -import type { OrderToReturnSummary } from 'vtex.return-app' +import type { OrderToReturnSummary } from '../../typings/OrderToReturn' import { SETTINGS_PATH } from '../utils/constants' import { createOrdersToReturnSummary } from '../utils/createOrdersToReturnSummary' import { isUserAllowed } from '../utils/isUserAllowed' import { canOrderBeReturned } from '../utils/canOrderBeReturned' import { getCustomerEmail } from '../utils/getCostumerEmail' +import { calculateAvailableAmountsService } from '../services/calculateAvailableAmountsService' export const orderToReturnSummary = async ( _: unknown, @@ -13,15 +14,17 @@ export const orderToReturnSummary = async ( ctx: Context ): Promise => { const { orderId, storeUserEmail } = args + const { - state: { userProfile, appkey }, + state: { userProfile, appkey , sellerId }, clients: { appSettings, oms, returnRequest: returnRequestClient, catalogGQL, + profile, }, - vtex: { logger }, + vtex: { logger, adminUserAuthToken }, } = ctx const settings = await appSettings.get(SETTINGS_PATH, true) @@ -30,7 +33,7 @@ export const orderToReturnSummary = async ( throw new ResolverError('Return App settings is not configured', 500) } - const { maxDays, excludedCategories } = settings + const { maxDays, excludedCategories, orderStatus } = settings // For requests where orderId is an empty string if (!orderId) { @@ -41,33 +44,110 @@ export const orderToReturnSummary = async ( const { creationDate, clientProfileData, status } = order + let userEmail = '' + sellerId isUserAllowed({ requesterUser: userProfile, clientProfile: clientProfileData, appkey, + sellerId }) canOrderBeReturned({ creationDate, maxDays, status, + orderStatus, }) + if (userProfile?.role === 'admin') { + try { + const profileUnmask = await profile.getProfileUnmask( + clientProfileData?.userProfileId, + adminUserAuthToken + ) + + if (profileUnmask?.[0]?.document?.email) { + const currenProfile = profileUnmask?.[0]?.document + + userEmail = currenProfile.email + + order.clientProfileData = { + ...order.clientProfileData, + email: userEmail, + firstName: currenProfile?.firstName, + lastName: currenProfile?.lastName, + phone: currenProfile?.homePhone, + } + } else { + const response = await profile.searchEmailByUserId( + clientProfileData?.userProfileId, + adminUserAuthToken + ) + + if (response.length > 0) { + const currenProfile = response?.[0] + + userEmail = currenProfile?.email + + order.clientProfileData = { + ...order.clientProfileData, + email: userEmail, + firstName: currenProfile?.email?.firstName, + lastName: currenProfile?.email?.lastName, + phone: currenProfile?.email?.phone, + } + } + } + } catch (error) {} + + try { + const addressUnmask = await profile.getAddressUnmask( + clientProfileData?.userProfileId, + adminUserAuthToken + ) + + if (addressUnmask?.[0]?.document) { + const address = addressUnmask?.[0]?.document + + order.shippingData.address = { + ...order.shippingData.address, + receiverName: address.receiverName, + city: address.locality, + postalCode: address.postalCode, + street: address.route, + number: address.streetNumber, + } + } + } catch (error) {} + } + const customerEmail = getCustomerEmail( clientProfileData, { userProfile, appkey, - inputEmail: storeUserEmail, + inputEmail: storeUserEmail || userEmail || clientProfileData?.email, + sellerId }, { logger, } ) - return createOrdersToReturnSummary(order, customerEmail, { + const availableAmountsToRefund = await calculateAvailableAmountsService( + ctx, + { + order, + }, + 'GET' + ) + + const response = await createOrdersToReturnSummary(order, customerEmail, { excludedCategories, returnRequestClient, catalogGQL, }) + + return { ...response, availableAmountsToRefund } } diff --git a/node/resolvers/ordersAvailableToReturn.ts b/node/resolvers/ordersAvailableToReturn.ts index 1d0b0729a..5da1bfceb 100644 --- a/node/resolvers/ordersAvailableToReturn.ts +++ b/node/resolvers/ordersAvailableToReturn.ts @@ -1,6 +1,9 @@ import { ResolverError } from '@vtex/api' -import type { OrdersToReturnList, OrderToReturnSummary } from 'vtex.return-app' +import type { + OrdersToReturnList, + OrderToReturnSummary, +} from '../../typings/OrderToReturn' import { SETTINGS_PATH } from '../utils/constants' import { createOrdersToReturnSummary } from '../utils/createOrdersToReturnSummary' import { getCurrentDate, substractDays } from '../utils/dateHelpers' @@ -19,21 +22,58 @@ const createParams = ({ maxDays, userEmail, page = 1, + filter, + orderStatus = 'f_creationDate', }: { maxDays: number userEmail: string page: number + orderStatus?: string | any + filter?: { + orderId: string + sellerName: string + createdIn: { from: string; to: string } + } }) => { const currentDate = getCurrentDate() + const orderStatusName = orderStatus?.replace('f_', '') + + let query = '' + let seller = '' + let creationDate = `${orderStatusName}:[${substractDays( + currentDate, + maxDays || 0 + )} TO ${currentDate}]` + + if (filter) { + const { orderId, sellerName, createdIn } = filter + + query = orderId || '' + seller = sellerName || '' + creationDate = createdIn + ? `${orderStatusName}:[${createdIn.from} TO ${createdIn.to}]` + : creationDate + } + + if (orderStatus === 'partial-invoiced') { + return { + clientEmail: userEmail, + orderBy: 'creationDate,desc' as const, + f_status: 'invoiced,payment-approved,handling,payment-pending', + q: query, + f_sellerNames: seller, + page, + per_page: 20 as const, + } + } return { clientEmail: userEmail, orderBy: 'creationDate,desc' as const, - f_status: 'invoiced' as const, - f_creationDate: `creationDate:[${substractDays( - currentDate, - maxDays - )} TO ${currentDate}]`, + f_status: 'invoiced', + [orderStatus]: creationDate, + q: query, + f_sellerNames: seller, page, per_page: 10 as const, } @@ -41,7 +81,16 @@ const createParams = ({ export const ordersAvailableToReturn = async ( _: unknown, - args: { page: number; storeUserEmail?: string }, + args: { + page: number + storeUserEmail?: string + isAdmin?: boolean + filter?: { + orderId: string + sellerName: string + createdIn: { from: string; to: string } + } + }, ctx: Context ): Promise => { const { @@ -54,7 +103,7 @@ export const ordersAvailableToReturn = async ( }, } = ctx - const { page, storeUserEmail } = args + const { page, storeUserEmail, isAdmin, filter } = args const settings = await appSettings.get(SETTINGS_PATH, true) @@ -62,21 +111,23 @@ export const ordersAvailableToReturn = async ( throw new ResolverError('Return App settings is not configured') } - const { maxDays, excludedCategories } = settings + const { maxDays, excludedCategories, orderStatus } = settings const { email } = userProfile ?? {} - const userEmail = storeUserEmail ?? email + let userEmail = (storeUserEmail ?? email) as string - if (!userEmail) { - throw new ResolverError('Missing user email', 400) + if (isAdmin) { + userEmail = '' } // Fetch order associated to the user email const { list, paging } = await oms.listOrdersWithParams( - createParams({ maxDays, userEmail, page }) + createParams({ maxDays, userEmail, page, filter, orderStatus }) ) const orderListPromises = [] + let orders: any = [] + let orderError = false for (const order of list) { // Fetch order details to get items and packages @@ -88,21 +139,89 @@ export const ordersAvailableToReturn = async ( await pacer(2000) } - const orders = await Promise.all(orderListPromises) + try { + orders = await Promise.all(orderListPromises) + } catch (error) { + orderError = true + } + + if (orderError) { + for (const order of list) { + // Fetch order details to get items and packages + oms.order(order.orderId).then((data) => orders.push(data)) + + // eslint-disable-next-line no-await-in-loop + await pacer(2000) + } + } const orderSummaryPromises: Array> = [] for (const order of orders) { - const orderToReturnSummary = createOrdersToReturnSummary(order, userEmail, { - excludedCategories, - returnRequestClient, - catalogGQL, - }) - - orderSummaryPromises.push(orderToReturnSummary) + if (orderStatus === 'partial-invoiced' && order.status !== 'invoiced') { + const currentDate = getCurrentDate() + const startDate = substractDays(currentDate, maxDays || 0) + const endDate = currentDate + + const deliveredDate = order.packageAttachment.packages.filter( + (item: any) => { + if (item?.courierStatus?.deliveredDate || item?.issuanceDate) { + return item + } + } + ) + + if (deliveredDate.length > 0) { + const haspackage = deliveredDate.map((delivered: any) => { + const currentDeliveredDate = + delivered?.courierStatus?.deliveredDate || delivered?.issuanceDate + + if ( + currentDeliveredDate && + currentDeliveredDate >= startDate && + currentDeliveredDate <= endDate + ) { + return delivered + } + }) + + if (haspackage.length > 0) { + const orderToReturnSummary = createOrdersToReturnSummary( + order, + userEmail, + { + excludedCategories, + returnRequestClient, + catalogGQL, + } + ) + + orderSummaryPromises.push(orderToReturnSummary) + } + } + } else { + const orderToReturnSummary = createOrdersToReturnSummary( + order, + userEmail, + { + excludedCategories, + returnRequestClient, + catalogGQL, + } + ) + + orderSummaryPromises.push(orderToReturnSummary) + } } const orderList = await Promise.all(orderSummaryPromises) - return { list: orderList, paging } + return { + list: orderList, + paging: { + ...paging, + perPage: orderList?.length || 0, + total: paging.total <= 20 ? orderList.length : paging.total, + }, + } } diff --git a/node/resolvers/returnRequest.ts b/node/resolvers/returnRequest.ts index 1f6f21426..72a5d1ef1 100644 --- a/node/resolvers/returnRequest.ts +++ b/node/resolvers/returnRequest.ts @@ -1,5 +1,4 @@ -import type { QueryReturnRequestArgs } from 'vtex.return-app' - +import type { QueryReturnRequestArgs } from '../../typings/ReturnRequest' import { returnRequestService } from '../services/returnRequestService' export const returnRequest = async ( diff --git a/node/resolvers/returnRequestList.ts b/node/resolvers/returnRequestList.ts index 51ba25467..8c83abbac 100644 --- a/node/resolvers/returnRequestList.ts +++ b/node/resolvers/returnRequestList.ts @@ -1,5 +1,4 @@ -import type { QueryReturnRequestListArgs } from 'vtex.return-app' - +import type { QueryReturnRequestListArgs } from '../../typings/ReturnRequest' import { returnRequestListService } from '../services/returnRequestListService' export const returnRequestList = ( diff --git a/node/resolvers/returnSellerSettings.ts b/node/resolvers/returnSellerSettings.ts new file mode 100644 index 000000000..5e5c5ccff --- /dev/null +++ b/node/resolvers/returnSellerSettings.ts @@ -0,0 +1,10 @@ +import type { QueryReturnSellerSettingsArgs } from '../../typings/SellerSetting' +import { returnSellerSettingsService } from '../services/returnSellerSettingsService' + +export const returnSellerSettings = async ( + _: unknown, + { sellerId }: QueryReturnSellerSettingsArgs, + ctx: Context +) => { + return returnSellerSettingsService(ctx, sellerId) +} diff --git a/node/resolvers/returnSettingsList.ts b/node/resolvers/returnSettingsList.ts new file mode 100644 index 000000000..43858e739 --- /dev/null +++ b/node/resolvers/returnSettingsList.ts @@ -0,0 +1,10 @@ +import type { QueryReturnRequestListArgs } from '../../typings/ReturnRequest' +import { returnSettingsListService } from '../services/returnSettingsListService' + +export const returnSettingsList = ( + _: unknown, + args: QueryReturnRequestListArgs, + ctx: Context +) => { + return returnSettingsListService(ctx, args) +} diff --git a/node/resolvers/updateReturnRequestStatus.ts b/node/resolvers/updateReturnRequestStatus.ts index 60aba4c91..bcb96824f 100644 --- a/node/resolvers/updateReturnRequestStatus.ts +++ b/node/resolvers/updateReturnRequestStatus.ts @@ -1,8 +1,7 @@ import type { MutationUpdateReturnRequestStatusArgs, ReturnRequest, -} from 'vtex.return-app' - +} from '../../typings/ReturnRequest' import { updateRequestStatusService } from '../services/updateRequestStatusService' export const updateReturnRequestStatus = ( diff --git a/node/resolvers/updateSellerSetting.ts b/node/resolvers/updateSellerSetting.ts new file mode 100644 index 000000000..3ac5bc0aa --- /dev/null +++ b/node/resolvers/updateSellerSetting.ts @@ -0,0 +1,38 @@ +import type { MutationUpdateSellerSettingArgs } from '../../typings/SellerSetting' +import { + validateMaxDaysCustomReasons, + validatePaymentOptions, + valideteUniqueCustomReasonsPerLocale, +} from '../utils/appSettingsValidation' + +export const updateSellerSetting = async ( + _: unknown, + args: MutationUpdateSellerSettingArgs, + ctx: Context +) => { + const { + clients: { sellerSetting }, + } = ctx + + const { id, settings } = args || {} + + // validate if all custom reasons have max days smaller than the general max days + validateMaxDaysCustomReasons(settings.maxDays, settings.customReturnReasons) + + // validate if all custom reasons have unique locales for their translations + valideteUniqueCustomReasonsPerLocale(settings.customReturnReasons) + + const currentSettings: any = { + ...settings, + // validate that there is at least one payment method selected or user has to use the same as in the order + paymentOptions: validatePaymentOptions(settings.paymentOptions), + } + + if (id) { + await sellerSetting.update(id, currentSettings) + + return true + } + + return false +} diff --git a/node/service.json b/node/service.json index 709aa46e5..c5d4c091a 100644 --- a/node/service.json +++ b/node/service.json @@ -6,12 +6,184 @@ "maxReplicas": 4, "routes": { "returnRequests": { + "path": "/_v/return-request", + "public": false, + "policies": [ + { + "effect": "allow", + "actions": ["post", "get"], + "principals": [ + "vrn:apps:*:*:*:app/*.return-app-sellers@*", + "vrn:vtex.vtex-id:*:*:*:user/*" + ] + } + ] + }, + "_returnRequests": { "path": "/_v/return-request", "public": true }, "returnRequest": { "path": "/_v/return-request/:requestId", + "public": false, + "policies": [ + { + "effect": "allow", + "actions": ["put", "get"], + "principals": [ + "vrn:apps:*:*:*:app/*.return-app-sellers@*", + "vrn:vtex.vtex-id:*:*:*:user/*" + ] + } + ] + }, + "_returnRequest": { + "path": "/_v/return-request/:requestId", + "public": true + }, + "preRefund": { + "path": "/_v/return-request/prerefund", + "public": false, + "policies": [ + { + "effect": "allow", + "actions": ["post", "get"], + "principals": [ + "vrn:apps:*:*:*:app/*.return-app-sellers@*", + "vrn:vtex.vtex-id:*:*:*:user/*" + ] + } + ] + }, + "_preRefund": { + "path": "/_v/return-request/prerefund", + "public": true + }, + "exportRequests": { + "path": "/_v/return-request/export", + "public": true + }, + "goodwill": { + "path": "/_v/goodwill/*id", + "public": false, + "policies": [ + { + "effect": "allow", + "actions": ["post", "get"], + "principals": [ + "vrn:apps:*:*:*:app/*.return-app-sellers@*", + "vrn:vtex.vtex-id:*:*:*:user/*" + ] + } + ] + }, + "_goodwill": { + "path": "/_v/goodwill/*id", + "public": true + }, + "settings": { + "path": "/_v/returns/settings", + "public": false, + "policies": [ + { + "effect": "allow", + "actions": ["post", "get", "put"], + "principals": [ + "vrn:apps:*:*:*:app/*.return-app-sellers@*", + "vrn:vtex.vtex-id:*:*:*:user/*" + ] + } + ] + }, + "_settings": { + "path": "/_v/returns/settings", + "public": true + }, + "sellerSetting": { + "path": "/_v/returns/seller/settings", + "public": false, + "policies": [ + { + "effect": "allow", + "actions": ["post", "get"], + "principals": [ + "vrn:apps:*:*:*:app/*.return-app-sellers@*", + "vrn:vtex.vtex-id:*:*:*:user/*" + ] + } + ] + }, + "_sellerSetting": { + "path": "/_v/returns/seller/settings", + "public": true + }, + "sellerSettings": { + "path": "/_v/returns/seller/settings/:sellerId", + "public": false, + "policies": [ + { + "effect": "allow", + "actions": ["post", "get"], + "principals": [ + "vrn:apps:*:*:*:app/*.return-app-sellers@*", + "vrn:vtex.vtex-id:*:*:*:user/*" + ] + } + ] + }, + "_sellerSettings": { + "path": "/_v/returns/seller/settings/:sellerId", + "public": true + }, + "orderList": { + "path": "/_v/returns/seller/orderList", + "public": false, + "policies": [ + { + "effect": "allow", + "actions": ["post", "get"], + "principals": [ + "vrn:apps:*:*:*:app/*.return-app-sellers@*", + "vrn:vtex.vtex-id:*:*:*:user/*" + ] + } + ] + }, + "_orderList": { + "path": "/_v/returns/seller/orderList", "public": true + }, + "giftcard": { + "path": "/_v/returns/seller/giftcard", + "public": false, + "policies": [ + { + "effect": "allow", + "actions": ["post", "get"], + "principals": [ + "vrn:apps:*:*:*:app/*.return-app-sellers@*", + "vrn:vtex.vtex-id:*:*:*:user/*" + ] + } + ] + }, + "_giftcard": { + "path": "/_v/returns/seller/giftcard", + "public": true + }, + "ping": { + "path": "/_v/return-app/ping", + "public": true + }, + "invoice": { + "path": "/_v/return-app/invoice/:orderId", + "public": true + } + }, + "events": { + "keepALive": { + "sender": "apps", + "topics": ["setup"] } } } diff --git a/node/services/AppSettingsService.ts b/node/services/AppSettingsService.ts new file mode 100644 index 000000000..670699371 --- /dev/null +++ b/node/services/AppSettingsService.ts @@ -0,0 +1,52 @@ +import type { + ReturnAppSettings, + MutationSaveReturnAppSettingsArgs, +} from '../../typings/ReturnAppSettings' +import { SETTINGS_PATH } from '../utils/constants' +import { + validateMaxDaysCustomReasons, + validatePaymentOptions, + valideteUniqueCustomReasonsPerLocale, +} from '../utils/appSettingsValidation' + +export async function saveAppSettingService( + ctx: Context, + args: MutationSaveReturnAppSettingsArgs +): Promise { + const { + clients: { appSettings }, + } = ctx + + const { settings } = args ?? {} + const { maxDays, customReturnReasons, paymentOptions } = settings ?? {} + + // validate if all custom reasons have max days smaller than the general max days + validateMaxDaysCustomReasons(maxDays, customReturnReasons) + + // validate if all custom reasons have unique locales for their translations + valideteUniqueCustomReasonsPerLocale(customReturnReasons) + + const currentSettings = { + ...settings, + // validate that there is at least one payment method selected or user has to use the same as in the order + paymentOptions: validatePaymentOptions(paymentOptions), + } + + await appSettings.save(SETTINGS_PATH, currentSettings) + + return true +} + +export async function returnAppSettingService( + ctx: Context +): Promise { + const { + clients: { appSettings }, + } = ctx + + const settings = await appSettings.get(SETTINGS_PATH, true) + + if (!settings) return null + + return settings +} diff --git a/node/services/SellerSettingService.ts b/node/services/SellerSettingService.ts new file mode 100644 index 000000000..9fc8751d1 --- /dev/null +++ b/node/services/SellerSettingService.ts @@ -0,0 +1,70 @@ +import type { + SellerSetting, + MutationSaveSellerSettingArgs, +} from '../../typings/SellerSetting' +import { + validateMaxDaysCustomReasons, + validatePaymentOptions, + valideteUniqueCustomReasonsPerLocale, +} from '../utils/appSettingsValidation' + +export async function saveSellerSettingService( + ctx: Context, + args: MutationSaveSellerSettingArgs +): Promise { + const { + clients: { sellerSetting }, + } = ctx + + const { settings } = args ?? {} + const { maxDays, customReturnReasons, paymentOptions } = settings ?? {} + + // validate if all custom reasons have max days smaller than the general max days + validateMaxDaysCustomReasons(maxDays, customReturnReasons) + + // validate if all custom reasons have unique locales for their translations + valideteUniqueCustomReasonsPerLocale(customReturnReasons) + + const currentSettings: any = { + ...settings, + // validate that there is at least one payment method selected or user has to use the same as in the order + paymentOptions: validatePaymentOptions(paymentOptions), + } + + const response = await sellerSetting.saveOrUpdate({ + ...currentSettings, + id: currentSettings.id || undefined, + }) + + return response +} + +export async function returnSellerSettingService( + ctx: Context, + sellerId: string +): Promise { + const { + clients: { sellerSetting }, + } = ctx + + const fields = [ + 'id', + 'sellerId', + 'parentAccount', + 'maxDays', + 'excludedCategories', + 'paymentOptions', + 'termsUrl', + 'customReturnReasons', + 'options', + ] + + const settings = await sellerSetting.search( + { page: 1, pageSize: 1 }, + fields, + undefined, + `sellerId=${sellerId}` + ) + + return settings?.[0] || null +} diff --git a/node/services/calculateAvailableAmountsService.ts b/node/services/calculateAvailableAmountsService.ts new file mode 100644 index 000000000..ddc1bd4da --- /dev/null +++ b/node/services/calculateAvailableAmountsService.ts @@ -0,0 +1,216 @@ +import type { ItemTotal, OrderDetailResponse } from '@vtex/clients' + +import { cleanObject } from '../utils' + +type RefundDetail = + | { + order: OrderDetailResponse + amountToBeRefund?: number + amountRefunded?: number + shippingCostToBeRefund?: number + shippingCostRefunded?: number + } + | { [key: string]: any } + +type ActionRouteFunction = { + GET: () => OrderRefundDetails & { action: string } + CREATE: () => Promise + UPDATE: () => Promise +} + +const actionRoute = ( + { clients: { orderRefundDetails } }: Context, + refundDetail: RefundDetail, + refundData: OrderRefundDetails +): ActionRouteFunction => { + const { + order: { orderId, value }, + } = refundDetail + + const getAvailableAmounts = () => { + const availableAmounts = refundData || { + id: orderId, + orderID: orderId, + initialInvoicedAmount: value, + totalRefunded: 0, + amountToBeRefundedInProcess: 0, + remainingRefundableAmount: value, + lastUpdated: new Date(), + } + + return { ...availableAmounts, action: 'GET' } + } + + const updateAvailableAmounts = async () => { + let { amountRefunded, amountToBeRefund, shippingCostRefunded } = + refundDetail + + let { + totalRefunded = 0, + initialInvoicedAmount, + amountToBeRefundedInProcess = 0, + totalShippingCostRefunded, + remainingRefundableShippingCost, + remainingRefundableAmount, + } = refundData + + let refundDateToUpdate: OrderRefundDetails = { + ...refundData, + lastUpdated: new Date(), + } + + if (shippingCostRefunded) { + refundDateToUpdate = { + ...refundData, + shippingCostToBeRefundedInProcess: 0, + totalShippingCostRefunded: + (totalShippingCostRefunded ?? 0) + Number(shippingCostRefunded), + remainingRefundableShippingCost: Math.abs( + (remainingRefundableShippingCost ?? 0) - Number(shippingCostRefunded) + ), + lastUpdated: new Date(), + } + } + + if (amountRefunded) { + const possibleToRefund = totalRefunded + Number(amountRefunded) + + if (possibleToRefund > initialInvoicedAmount) { + amountRefunded = amountToBeRefundedInProcess + } + + if ( + amountToBeRefundedInProcess > 0 && + amountToBeRefundedInProcess - amountRefunded >= 0 + ) { + amountToBeRefundedInProcess -= amountRefunded + } else if (amountToBeRefundedInProcess - amountRefunded <= 0) { + amountToBeRefundedInProcess = 0 + } + + totalRefunded += Number(amountRefunded) + refundDateToUpdate = { + ...refundData, + totalRefunded, + remainingRefundableAmount: initialInvoicedAmount - totalRefunded, + amountToBeRefundedInProcess, + lastUpdated: new Date(), + } + } + + if (amountToBeRefund) { + totalRefunded += Number(amountToBeRefund) + + if (totalRefunded > initialInvoicedAmount) { + amountToBeRefundedInProcess = remainingRefundableAmount ?? 0 + } else { + amountToBeRefundedInProcess += Number(amountToBeRefund) + } + + refundDateToUpdate = { + ...refundData, + amountToBeRefundedInProcess, + lastUpdated: new Date(), + } + } + + refundDateToUpdate = cleanObject(refundDateToUpdate) + + await orderRefundDetails.update(orderId, refundDateToUpdate) + + return { ...refundDateToUpdate, amountRefunded, action: 'UPDATE' } + } + + const createAvailableAmounts = async () => { + const { order, amountToBeRefund, amountRefunded } = refundDetail + + if ( + (amountToBeRefund && amountToBeRefund > order.value) || + (amountRefunded && amountRefunded > order.value) + ) { + throw new Error("Can't refund more than the invoiced amount") + } else { + if (!refundData && amountToBeRefund) { + const initialShippingCost = order.totals.find( + (total: ItemTotal) => total.id === 'Shipping' + ).value + + const refundDataToCreate = { + id: order.orderId, + orderID: order.orderId, + initialInvoicedAmount: order.value, + remainingRefundableAmount: order.value, + amountToBeRefundedInProcess: amountToBeRefund, + initialShippingCost, + shippingCostToBeRefundedInProcess: initialShippingCost, + remainingRefundableShippingCost: initialShippingCost, + lastUpdated: new Date(), + } + + await orderRefundDetails.save(refundDataToCreate) + + return { ...refundDataToCreate, action: 'CREATE' } + } + + if (!refundData && amountRefunded) { + const refundDataToCreate = { + id: order.orderId, + orderID: order.orderId, + initialInvoicedAmount: order.value, + totalRefunded: Number(amountRefunded), + amountToBeRefundedInProcess: 0, + remainingRefundableAmount: order.value - amountRefunded, + lastUpdated: new Date(), + } + + await orderRefundDetails.save(refundDataToCreate) + + return { ...refundDataToCreate, action: 'CREATE' } + } + + return updateAvailableAmounts() + } + } + + return { + GET: () => getAvailableAmounts(), + CREATE: () => createAvailableAmounts(), + UPDATE: () => updateAvailableAmounts(), + } +} + +export const calculateAvailableAmountsService = async ( + ctx: Context, + refundDetail: RefundDetail, + action: 'GET' | 'CREATE' | 'UPDATE' +): Promise => { + try { + const { + clients: { orderRefundDetails }, + } = ctx + + const { + order: { orderId }, + } = refundDetail + + const refundData = await orderRefundDetails.get(orderId, [ + 'orderID', + 'initialInvoicedAmount', + 'amountToBeRefundedInProcess', + 'totalRefunded', + 'remainingRefundableAmount', + 'lastUpdated', + 'initialShippingCost', + 'shippingCostToBeRefundedInProcess', + 'totalShippingCostRefunded', + 'remainingRefundableShippingCost', + ]) + + const actionToResolve = actionRoute(ctx, refundDetail, refundData) + const reponse = await actionToResolve[action]() + + return reponse + } catch (error) { + throw new Error(error.message) + } +} diff --git a/node/services/createGiftcardService.ts b/node/services/createGiftcardService.ts new file mode 100644 index 000000000..4e81e0b53 --- /dev/null +++ b/node/services/createGiftcardService.ts @@ -0,0 +1,43 @@ +import { ResolverError } from '@vtex/api' + +export const createGiftcardService = async (ctx: Context, body: any) => { + const { + clients: { giftCard: giftCardClient }, + } = ctx + + const getOneYearLaterDate = (createdAt: string) => { + const date = new Date(createdAt) + const year = date.getFullYear() + const month = date.getMonth() + const day = date.getDate() + const oneYearLater = new Date(year + 1, month, day) + + return oneYearLater.toISOString() + } + + try { + const { id, redemptionCode } = await giftCardClient.createGiftCard({ + relationName: body?.invoiceNumber as string, + caption: 'Gift Card from Return Request', + expiringDate: getOneYearLaterDate(body?.createdAt), + balance: 0, + profileId: body?.userEmail, + discount: true, + }) + + const giftCardIdSplit = id.split('_') + + const giftCardId = giftCardIdSplit[giftCardIdSplit.length - 1] + + await giftCardClient.updateGiftCard(giftCardId, { + description: 'Initial Charge', + value: body?.invoiceValue as number, + }) + + return { + giftCard: { id: giftCardId, redemptionCode }, + } + } catch (error) { + throw new ResolverError('Error creating/updating gift card') + } +} diff --git a/node/services/createInvoice.ts b/node/services/createInvoice.ts new file mode 100644 index 000000000..39ea8808a --- /dev/null +++ b/node/services/createInvoice.ts @@ -0,0 +1,156 @@ +import { UserInputError, ResolverError } from '@vtex/api' + +import { + SETTINGS_PATH +} from '../utils/constants' +import { isUserAllowed } from '../utils/isUserAllowed' +import { InvoiceRequest } from '../typings/InvoiceRequest' +import { calculateAvailableAmountsService } from './calculateAvailableAmountsService' + +export const createInvoice = async ( + ctx: Context, + id: string | string[] , + args: InvoiceRequest +) => { + const { + clients: { + oms, + appSettings, + }, + state: { userProfile, appkey }, + } = ctx + const orderId = String(id) + const { + type, + issuanceDate, + invoiceNumber, + invoiceValue, + dispatchDate, + items, + } = args + + if (!appkey && !userProfile) { + throw new ResolverError('Missing appkey or userProfile') + } + + const { firstName, lastName, email } = userProfile ?? {} + + const submittedByNameOrEmail = + firstName || lastName ? `${firstName} ${lastName}` : email + + // If request was validated using appkey and apptoken, we assign the appkey as a sender + // Otherwise, we try to use requester name. Email is the last resort. + const submittedBy = appkey ?? submittedByNameOrEmail + + if (!submittedBy) { + throw new ResolverError( + 'Unable to get submittedBy from context. The request is missing the userProfile info or the appkey' + ) + } + + // Check items since a request via endpoint might not have it. + // Graphql validation doesn't prevent user to send empty items + if (!items || items.length === 0) { + throw new UserInputError('There are no items in the request') + } + + // For requests where orderId is an empty string + if (!orderId) { + throw new UserInputError('Order ID is missing') + } + + // For requests where type is not correct + if (type !== 'Input' && type !== 'Output' ) { + throw new UserInputError('Required type Input or Output') + } + + const orderPromise = oms.order(orderId, 'AUTH_TOKEN') + + + const settingsPromise = appSettings.get(SETTINGS_PATH, true) + + // If order doesn't exist, it throws an error and stop the process. + // If there is no request created for that order, request searchRMA will be an empty array. + const [order, settings] = await Promise.all([ + orderPromise, + settingsPromise, + ]) + + if (!settings) { + throw new ResolverError('Return App settings is not configured', 500) + } + + const { + clientProfileData, + // @ts-expect-error itemMetadata is not typed in the OMS client project + itemMetadata, + } = order + + isUserAllowed({ + requesterUser: userProfile, + clientProfile: clientProfileData, + appkey, + }) + //Validate type + //GET availableAmount + let availableAmount = await calculateAvailableAmountsService( + ctx, + { + order: { orderId: id }, + }, + 'GET' + ) + + if(type === 'Input'){ + //If is INPUT validate valueAvailabeToReturn + let available = availableAmount.remainingRefundableAmount - availableAmount.amountToBeRefundedInProcess + if(invoiceValue > available){ + throw new ResolverError('Return App already have a amountToBeRefundedInProcess that is greater than the invoiceValue', 500) + } + + } + try { + const response = await oms.createInvoice(orderId, { + type, + issuanceDate, + invoiceNumber, + invoiceValue, + dispatchDate, + items, + }) + if(type === 'Input'){ + if(availableAmount.initialInvoicedAmount){ + calculateAvailableAmountsService( + ctx, + { + order: { orderId: orderId}, + amountRefunded: invoiceValue, + }, + 'UPDATE' + ) + }else{ + calculateAvailableAmountsService( + ctx, + { + order, + amountRefunded: invoiceValue, + }, + 'CREATE' + ) + } + } + availableAmount = await calculateAvailableAmountsService( + ctx, + { + order: { orderId: id }, + }, + 'GET' + ) + return { response , availableAmount} + + } catch (error) { + throw new ResolverError(`Return App invoice error ${error.message}`, 500 ) + + } + +} diff --git a/node/services/createReturnRequestSellerService.ts b/node/services/createReturnRequestSellerService.ts new file mode 100644 index 000000000..882566073 --- /dev/null +++ b/node/services/createReturnRequestSellerService.ts @@ -0,0 +1,228 @@ +import { UserInputError, ResolverError } from '@vtex/api' +import type { DocumentResponse } from '@vtex/clients' + +import type { ReturnRequestCreated } from '../../typings/ReturnRequest' +import { + SETTINGS_PATH, + OMS_RETURN_REQUEST_CONFIRMATION, +} from '../utils/constants' +import { isUserAllowed } from '../utils/isUserAllowed' +import { OMS_RETURN_REQUEST_CONFIRMATION_TEMPLATE } from '../utils/templates' +import type { ConfirmationMailData } from '../typings/mailClient' +import { getCustomerEmail } from '../utils/getCostumerEmail' + +export const createReturnRequestSellerService = async ( + ctx: Context, + args: any +): Promise => { + const { + header, + clients: { oms, returnRequest: returnRequestClient, appSettings, mail }, + state: { userProfile, appkey }, + vtex: { logger }, + } = ctx + + let { sellerId } = ctx.state + + const { + orderId, + sellerName, + refundableAmount, + sequenceNumber, + status, + refundableAmountTotals, + customerProfileData, + pickupReturnData, + refundPaymentData, + items, + dateSubmitted, + refundData, + refundStatusData, + cultureInfoData, + logisticInfo, + locale, + } = args + + const { firstName, lastName, email } = userProfile ?? {} + + const submittedByNameOrEmail = + firstName || lastName ? `${firstName} ${lastName}` : email + + // If request was validated using appkey and apptoken, we assign the appkey as a sender + // Otherwise, we try to use requester name. Email is the last resort. + sellerId = sellerId ?? header['x-vtex-caller'] as string | undefined + const submittedBy = appkey ?? submittedByNameOrEmail ?? sellerId + + if (!submittedBy) { + throw new ResolverError( + 'Unable to get submittedBy from context. The request is missing the userProfile info or the appkey' + ) + } + + // Check items since a request via endpoint might not have it. + // Graphql validation doesn't prevent user to send empty items + if (!items || items.length === 0) { + throw new UserInputError('There are no items in the request') + } + + // For requests where orderId is an empty string + if (!orderId) { + throw new UserInputError('Order ID is missing') + } + + const orderPromise = oms.order(orderId, 'AUTH_TOKEN') + + const searchRMAPromise = returnRequestClient.searchRaw( + { page: 1, pageSize: 1 }, + ['id'], + undefined, + `orderId=${orderId}` + ) + + const settingsPromise = appSettings.get(SETTINGS_PATH, true) + + // If order doesn't exist, it throws an error and stop the process. + // If there is no request created for that order, request searchRMA will be an empty array. + const [order, settings, searchRMA] = await Promise.all([ + orderPromise, + settingsPromise, + searchRMAPromise, + ]) + + if (!settings) { + throw new ResolverError('Return App settings is not configured', 500) + } + + const { + clientProfileData, + // @ts-expect-error itemMetadata is not typed in the OMS client project + itemMetadata, + shippingData, + sellers, + sequence, + storePreferencesData: { currencyCode }, + } = order + + const { + pagination: { total }, + } = searchRMA + + isUserAllowed({ + requesterUser: userProfile , + clientProfile: clientProfileData, + appkey, + sellerId + }) + + const currentSequenceNumber = `${sequence}-${total + 1}` + + // customerProfileData can be undefined when coming from a endpoint request + const { email: inputEmail } = customerProfileData ?? {} + + const customerEmail = getCustomerEmail( + clientProfileData, + { + userProfile, + appkey, + inputEmail, + sellerId + }, + { + logger, + } + ) + + let rmaDocument: DocumentResponse + + try { + rmaDocument = await returnRequestClient.save({ + orderId, + sellerName: sellers?.[0]?.id || sellerName || undefined, + refundableAmount, + sequenceNumber: sequenceNumber || currentSequenceNumber, + status: status || 'new', + refundableAmountTotals, + customerProfileData: { + userId: clientProfileData.userProfileId, + name: customerProfileData.name, + email: customerEmail, + phoneNumber: customerProfileData.phoneNumber, + }, + pickupReturnData, + refundPaymentData, + items, + dateSubmitted: dateSubmitted || new Date(), + refundData, + refundStatusData, + cultureInfoData: cultureInfoData || { locale, currencyCode }, + logisticInfo, + createdIn: dateSubmitted || new Date(), + }) + } catch (error) { + const mdValidationErrors = error?.response?.data?.errors[0]?.errors + + const errorMessageString = mdValidationErrors + ? JSON.stringify( + { + message: 'Schema Validation error', + errors: mdValidationErrors, + }, + null, + 2 + ) + : error.message + + throw new ResolverError(errorMessageString, error.response?.status || 500) + } + + // We add a try/catch here so we avoid sending an error to the browser only if the email fails. + try { + const templateExists = await mail.getTemplate( + OMS_RETURN_REQUEST_CONFIRMATION(cultureInfoData.locale) + ) + + if (!templateExists) { + await mail.publishTemplate( + OMS_RETURN_REQUEST_CONFIRMATION_TEMPLATE(cultureInfoData.locale) + ) + } + + const { + firstName: clientFirstName, + lastName: clientLastName, + phone, + } = clientProfileData + + const { + address: { country, city, street }, + } = shippingData + + const mailData: ConfirmationMailData = { + templateName: OMS_RETURN_REQUEST_CONFIRMATION(cultureInfoData.locale), + jsonData: { + data: { + status: 'new', + name: `${clientFirstName} ${clientLastName}`, + DocumentId: rmaDocument.DocumentId, + email: customerEmail, + phoneNumber: phone, + country, + locality: city, + address: street, + paymentMethod: refundPaymentData.refundPaymentMethod, + }, + products: [...items], + refundStatusData, + }, + } + + await mail.sendMail(mailData) + } catch (error) { + logger.warn({ + message: `Failed to send email for return request ${rmaDocument.DocumentId}`, + error, + }) + } + + return { returnRequestId: rmaDocument.DocumentId } +} diff --git a/node/services/createReturnRequestService.ts b/node/services/createReturnRequestService.ts index 55c30b8ab..e46b6eef1 100644 --- a/node/services/createReturnRequestService.ts +++ b/node/services/createReturnRequestService.ts @@ -1,7 +1,10 @@ -import type { ReturnRequestCreated, ReturnRequestInput } from 'vtex.return-app' import { UserInputError, ResolverError } from '@vtex/api' import type { DocumentResponse } from '@vtex/clients' +import type { + ReturnRequestCreated, + ReturnRequestInput, +} from '../../typings/ReturnRequest' import { SETTINGS_PATH, OMS_RETURN_REQUEST_CONFIRMATION, @@ -18,12 +21,14 @@ import { OMS_RETURN_REQUEST_CONFIRMATION_TEMPLATE } from '../utils/templates' import type { ConfirmationMailData } from '../typings/mailClient' import { getCustomerEmail } from '../utils/getCostumerEmail' import { validateItemCondition } from '../utils/validateItemCondition' +import { calculateAvailableAmountsService } from './calculateAvailableAmountsService' export const createReturnRequestService = async ( ctx: Context, args: ReturnRequestInput ): Promise => { const { + header, clients: { oms, returnRequest: returnRequestClient, @@ -35,8 +40,10 @@ export const createReturnRequestService = async ( vtex: { logger }, } = ctx + let { sellerId } = ctx.state const { orderId, + sellerName, items, customerProfileData, pickupReturnData, @@ -45,10 +52,6 @@ export const createReturnRequestService = async ( locale, } = args - if (!appkey && !userProfile) { - throw new ResolverError('Missing appkey or userProfile') - } - const { firstName, lastName, email } = userProfile ?? {} const submittedByNameOrEmail = @@ -56,7 +59,8 @@ export const createReturnRequestService = async ( // If request was validated using appkey and apptoken, we assign the appkey as a sender // Otherwise, we try to use requester name. Email is the last resort. - const submittedBy = appkey ?? submittedByNameOrEmail + sellerId = sellerId ?? header['x-vtex-caller'] as string | undefined + const submittedBy = appkey ?? submittedByNameOrEmail ?? sellerId if (!submittedBy) { throw new ResolverError( @@ -116,6 +120,7 @@ export const createReturnRequestService = async ( itemMetadata, shippingData, storePreferencesData: { currencyCode }, + sellerOrderId, } = order const { @@ -124,18 +129,21 @@ export const createReturnRequestService = async ( customReturnReasons, paymentOptions, options: settingsOptions, + orderStatus, } = settings isUserAllowed({ requesterUser: userProfile, clientProfile: clientProfileData, appkey, + sellerId }) canOrderBeReturned({ creationDate, maxDays, status, + orderStatus, }) // Validate if all items are available to be returned @@ -206,6 +214,7 @@ export const createReturnRequestService = async ( userProfile, appkey, inputEmail, + sellerId }, { logger, @@ -232,8 +241,23 @@ export const createReturnRequestService = async ( let rmaDocument: DocumentResponse try { + const amountToBeRefund = refundableAmountTotals.find( + (item) => item.id === 'items' + )?.value + + await calculateAvailableAmountsService( + ctx, + { + order, + amountToBeRefund, + }, + 'CREATE' + ) + rmaDocument = await returnRequestClient.save({ orderId, + sellerOrderId, + sellerName: sellerName || sellers?.[0]?.id || undefined, refundableAmount, sequenceNumber, status: 'new', @@ -264,6 +288,14 @@ export const createReturnRequestService = async ( currencyCode, locale, }, + logisticsInfo: { + currier: shippingData?.logisticsInfo + .map((logisticInfo: any) => logisticInfo?.deliveryCompany) + ?.join(','), + sla: shippingData?.logisticsInfo + .map((logisticInfo: any) => logisticInfo?.selectedSla) + ?.join(','), + }, }) } catch (error) { const mdValidationErrors = error?.response?.data?.errors[0]?.errors diff --git a/node/services/goodwill/createGoodwillService.ts b/node/services/goodwill/createGoodwillService.ts new file mode 100644 index 000000000..87aab4495 --- /dev/null +++ b/node/services/goodwill/createGoodwillService.ts @@ -0,0 +1,62 @@ +import { v4 as uuidv4 } from 'uuid' + +import { SETTINGS_PATH } from '../../utils/constants' +import { calculateAvailableAmountsService } from '../calculateAvailableAmountsService' + +const createGoodwillService = async (ctx: Context, goodwill: Goodwill) => { + const { + clients: { oms, appSettings, goodwill: goodwillClient }, + } = ctx + + const settings = await appSettings.get(SETTINGS_PATH, true) + + if (!settings?.options?.enableGoodwill) { + throw new Error('Goodwill is not enabled.') + } + + const { orderId } = goodwill + const order = await oms.order(orderId) + + if (order.status !== 'invoiced') { + throw new Error('Order is not invoiced.') + } + + await calculateAvailableAmountsService( + ctx, + { + order, + amountRefunded: goodwill.creditAmount, + }, + 'CREATE' + ) + + goodwill.status = 'amountRefunded' + goodwill.creditnoteID = uuidv4() + + await goodwillClient.save({ + ...goodwill, + id: goodwill.orderId, + }) + + const goodwillData = await goodwillClient.get(goodwill.orderId, ['createdIn']) + + await oms.createInvoice(goodwill.orderId, { + type: 'Input', + issuanceDate: goodwillData.createdIn, + invoiceNumber: JSON.stringify({ + type: 'Goodwill', + creditnoteID: goodwill.creditnoteID, + createdBy: 'CusCare', + reason: goodwill.reason, + }), + invoiceValue: goodwill.creditAmount as number, + items: [], + }) + + return { + message: `Goodwill created successfully for orderId: ${orderId}`, + goodwill, + } +} + +export default createGoodwillService diff --git a/node/services/goodwill/getGoodwillService.ts b/node/services/goodwill/getGoodwillService.ts new file mode 100644 index 000000000..d79e0e6f3 --- /dev/null +++ b/node/services/goodwill/getGoodwillService.ts @@ -0,0 +1,50 @@ +import { UserInputError } from '@vtex/api' + +import { calculateAvailableAmountsService } from '../calculateAvailableAmountsService' + +const getGoodwillsService = async (ctx: Context, id?: string) => { + const { + clients: { goodwill }, + } = ctx + + const fields = [ + 'id', + 'creditnoteID', + 'orderId', + 'creditAmount', + 'status', + 'createdIn', + ] + + if (!id) { + const pagination = { + page: 1, + pageSize: 100, + } + + const sort = 'createdIn DESC' + + return goodwill.searchRaw(pagination, fields, sort) + } + + const response = await goodwill.get(id, fields) + + if (!response) { + throw new UserInputError("Goodwill doesn't exist") + } + + const availableAmount = await calculateAvailableAmountsService( + ctx, + { + order: { orderId: id }, + }, + 'GET' + ) + + return { + ...response, + availableAmount, + } +} + +export default getGoodwillsService diff --git a/node/services/returnOrdersListService.ts b/node/services/returnOrdersListService.ts new file mode 100644 index 000000000..6035691ab --- /dev/null +++ b/node/services/returnOrdersListService.ts @@ -0,0 +1,14 @@ +export const returnOrdersListService = async (ctx: Context, body: any) => { + const { + clients: { returnRequest: returnRequestClient }, + } = ctx + + const returnRequestSameOrder = await returnRequestClient.searchRaw( + { page: 1, pageSize: 100 }, + body?.fields, + undefined, + body?.filter + ) + + return returnRequestSameOrder +} diff --git a/node/services/returnRequestListService.ts b/node/services/returnRequestListService.ts index 955f8d612..00371363e 100644 --- a/node/services/returnRequestListService.ts +++ b/node/services/returnRequestListService.ts @@ -2,8 +2,7 @@ import type { QueryReturnRequestListArgs, ReturnRequestFilters, Maybe, -} from 'vtex.return-app' -import { ForbiddenError } from '@vtex/api' +} from '../../typings/ReturnRequest' const filterDate = (date: string): string => { const newDate = new Date(date) @@ -23,6 +22,11 @@ const buildWhereClause = (filter: Maybe | undefined) => { const whereFilter = returnFilters.reduce((where, [key, value]) => { if (!value) return where + if (typeof value === 'string' && value.trim() === '') { + // throw new Error(`Fields cannot be empty: ${key}`) + return where + } + if (where.length) { where += ` AND ` } @@ -39,6 +43,12 @@ const buildWhereClause = (filter: Maybe | undefined) => { return where } + if (key === 'sellerName') { + where += `sellerName = "${value}"` + + return where + } + if (key === 'createdIn' && typeof value !== 'string') { where += `dateSubmitted between ${filterDate( value.from @@ -65,7 +75,6 @@ export const returnRequestListService = async ( request: { header }, state: { userProfile, appkey }, } = ctx - const { page, perPage, filter } = args const { userId: userIdProfile, @@ -92,15 +101,23 @@ export const returnRequestListService = async ( const requireFilterByUser = !userIsAdmin || vtexProduct === 'store' || role === 'store-user' - const hasUserIdOrEmail = Boolean(userId || userEmail) + const removeBlankSpace = (object: any) => { + if (typeof object === 'string') { + return object.trim() + } + + if (typeof object === 'object' && object !== null) { + for (const key in object) { + object[key] = removeBlankSpace(object[key]) + } + } - if (requireFilterByUser && !hasUserIdOrEmail) { - throw new ForbiddenError('Missing params to filter by store user') + return object } const adjustedFilter = requireFilterByUser - ? { ...filter, userId, userEmail } - : filter + ? removeBlankSpace({ ...filter, userId, userEmail }) + : removeBlankSpace(filter) const resultFields = getAllFields ? ['_all'] @@ -111,6 +128,11 @@ export const returnRequestListService = async ( 'createdIn', 'status', 'dateSubmitted', + 'sellerName', + 'customerProfileData', + 'items', + 'logisticsInfo', + 'refundableAmount', ] const rmaSearchResult = await returnRequestClient.searchRaw( diff --git a/node/services/returnRequestService.ts b/node/services/returnRequestService.ts index d4a25a722..af5b7b347 100644 --- a/node/services/returnRequestService.ts +++ b/node/services/returnRequestService.ts @@ -1,29 +1,33 @@ -import { ResolverError, ForbiddenError } from '@vtex/api' -import type { ReturnRequest } from 'vtex.return-app' +import { ResolverError } from '@vtex/api' -export const returnRequestService = async (ctx: Context, requestId: string) => { +import { calculateAvailableAmountsService } from './calculateAvailableAmountsService' + + + +export const returnRequestService = async ( + ctx: Context, + requestId: string, + fields = ['_all'] +) => { const { clients: { returnRequest: returnRequestClient }, - state: { userProfile, appkey }, } = ctx - const { userId, role } = userProfile ?? {} - const userIsAdmin = Boolean(appkey) || role === 'admin' - - const returnRequestResult = await returnRequestClient.get(requestId, ['_all']) + const returnRequestResult = await returnRequestClient.get(requestId, fields) if (!returnRequestResult) { // Code error 'E_HTTP_404' to match the one when failing to find and order by OMS throw new ResolverError(`Request ${requestId} not found`, 404, 'E_HTTP_404') } - const { customerProfileData } = returnRequestResult as ReturnRequest - - const requestBelongsToUser = userId === customerProfileData?.userId - if (!requestBelongsToUser && !userIsAdmin) { - throw new ForbiddenError('User cannot access this request') - } + const availableAmountsToRefund = await calculateAvailableAmountsService( + ctx, + { + order: { orderId: returnRequestResult.orderId }, + }, + 'GET' + ) - return returnRequestResult + return { ...returnRequestResult, availableAmountsToRefund } } diff --git a/node/services/returnSellerSettingsService.ts b/node/services/returnSellerSettingsService.ts new file mode 100644 index 000000000..5ef33a357 --- /dev/null +++ b/node/services/returnSellerSettingsService.ts @@ -0,0 +1,44 @@ +import type { SellerSetting } from '../../typings/SellerSetting' + +export async function returnSellerSettingsService( + ctx: Context, + sellerId: string +): Promise { + const { + clients: { sellerSetting }, + } = ctx + + const fields = [ + 'id', + 'sellerId', + 'parentAccount', + 'maxDays', + 'excludedCategories', + 'paymentOptions', + 'termsUrl', + 'customReturnReasons', + 'options', + ] + + const settings = await sellerSetting.search( + { page: 1, pageSize: 1 }, + fields, + undefined, + `sellerId=${sellerId}` + ) + + // if(settings?.[0]){ + // const response: ReturnAppSettings = { + // maxDays: settings?.[0]?.maxDays, + // excludedCategories: settings?.[0]?.excludedCategories, + // paymentOptions: settings?.[0]?.paymentOptions, + // termsUrl: settings?.[0]?.termsUrl, + // customReturnReasons:settings?.[0]?.customReturnReasons, + // options: settings?.[0]?.options, + // } + // return response + // }else{ + // return null + // } + return settings?.[0] || null +} diff --git a/node/services/returnSettingsListService.ts b/node/services/returnSettingsListService.ts new file mode 100644 index 000000000..7536a2cee --- /dev/null +++ b/node/services/returnSettingsListService.ts @@ -0,0 +1,118 @@ +import type { + QueryReturnRequestListArgs, + ReturnRequestFilters, + Maybe, +} from '../../typings/ReturnRequest' +/* +const filterDate = (date: string): string => { + const newDate = new Date(date) + const day = newDate.getDate() + const month = newDate.getMonth() + 1 + const year = newDate.getFullYear() + + return `${year}-${month < 10 ? `0${month}` : `${month}`}-${ + day < 10 ? `0${day}` : `${day}` + }` +} */ + +const buildWhereClause = (filter: Maybe | undefined) => { + if (!filter) return + + const returnFilters = Object.entries(filter) + const whereFilter = returnFilters.reduce((where, [key, value]) => { + if (!value) return where + + if (where.length) { + where += ` AND ` + } + + if (key === 'sellerName') { + where += `sellerId = "${value}"` + + return where + } + + where += `${key}=${value}` + + return where + }, '') + + return whereFilter +} + +export const returnSettingsListService = async ( + ctx: Context, + args: QueryReturnRequestListArgs, + getAllFields = true +) => { + const { + clients: { sellerSetting: sellerSettingClient }, + request: { header }, + state: { userProfile, appkey }, + } = ctx + + const { page, perPage, filter } = args + const { + userId: userIdProfile, + email: userEmailProfile, + role, + } = userProfile ?? {} + + const { userId: userIdArg, userEmail: userEmailArg } = filter ?? {} + + const userIsAdmin = Boolean(appkey) || role === 'admin' + + // only admin users can pass userId or userEmail in the request. + // For non admin users, the userId or userEmail must be gotten from cookie session. + // Otherwise, a non admin user could search for another user's return requests + const userId = userIsAdmin ? userIdArg || userIdProfile : userIdProfile + const userEmail = userIsAdmin + ? userEmailArg || userEmailProfile + : userEmailProfile + + // vtexProduct is undefined when coming from GraphQL IDE or from a external request + const vtexProduct = header['x-vtex-product'] as 'admin' | 'store' | undefined + + // When the user is not admin or the request is coming from the store, we need to apply the user filter to get the right requests + const requireFilterByUser = + !userIsAdmin || vtexProduct === 'store' || role === 'store-user' + + const adjustedFilter = requireFilterByUser + ? { ...filter, userId, userEmail } + : filter + + const resultFields = getAllFields + ? ['_all'] + : [ + 'id', + 'sellerId', + 'maxDays', + 'paymentOptions', + 'customReturnReasons', + 'excludedCategories', + 'createdIn', + ] + + const rmaSearchResult = await sellerSettingClient.searchRaw( + { + page, + pageSize: perPage && perPage <= 100 ? perPage : 25, + }, + resultFields, + 'createdIn DESC', + buildWhereClause(adjustedFilter) + ) + + const { data, pagination } = rmaSearchResult + const { page: currentPage, pageSize, total } = pagination + + return { + list: data, + paging: { + total, + perPage: pageSize, + currentPage, + pages: Math.ceil(total / pageSize), + }, + } +} diff --git a/node/services/updateRequestStatusService.ts b/node/services/updateRequestStatusService.ts index f1d21ead3..55fbf4885 100644 --- a/node/services/updateRequestStatusService.ts +++ b/node/services/updateRequestStatusService.ts @@ -1,16 +1,15 @@ -import type { - MutationUpdateReturnRequestStatusArgs, - ReturnRequest, - Status, - RefundItemInput, -} from 'vtex.return-app' import { ResolverError, - ForbiddenError, NotFoundError, UserInputError, } from '@vtex/api' +import type { + MutationUpdateReturnRequestStatusArgs, + ReturnRequest, + Status, + RefundItemInput, +} from '../../typings/ReturnRequest' import { validateStatusUpdate } from '../utils/validateStatusUpdate' import { createOrUpdateStatusPayload } from '../utils/createOrUpdateStatusPayload' import { createRefundData } from '../utils/createRefundData' @@ -18,6 +17,7 @@ import { handleRefund } from '../utils/handleRefund' import { OMS_RETURN_REQUEST_STATUS_UPDATE } from '../utils/constants' import { OMS_RETURN_REQUEST_STATUS_UPDATE_TEMPLATE } from '../utils/templates' import type { StatusUpdateMailData } from '../typings/mailClient' +import { calculateAvailableAmountsService } from './calculateAvailableAmountsService' // A partial update on MD requires all required field to be sent. https://vtex.slack.com/archives/C8EE14F1C/p1644422359807929 // And the request to update fails when we pass the auto generated ones. @@ -91,6 +91,7 @@ export const updateRequestStatusService = async ( args: MutationUpdateReturnRequestStatusArgs ): Promise => { const { + header, state: { userProfile, appkey }, clients: { returnRequest: returnRequestClient, @@ -100,16 +101,17 @@ export const updateRequestStatusService = async ( }, vtex: { logger }, } = ctx + let { sellerId } = ctx.state + const { status, comment, refundData, requestId, sellerName } = args - const { status, requestId, comment, refundData } = args - - const { role, firstName, lastName, email, userId } = userProfile ?? {} + const { firstName, lastName, email } = userProfile ?? {} const requestDate = new Date().toISOString() const submittedByNameOrEmail = - firstName || lastName ? `${firstName} ${lastName}` : email + firstName || lastName ? `${firstName} ${lastName}` : email - const submittedBy = appkey ?? submittedByNameOrEmail + sellerId = sellerId ?? header['x-vtex-caller'] as string | undefined + const submittedBy = appkey ?? submittedByNameOrEmail ?? sellerId if (!submittedBy) { throw new ResolverError( @@ -125,16 +127,6 @@ export const updateRequestStatusService = async ( throw new NotFoundError(`Request ${requestId} not found`) } - const userIsAdmin = Boolean(appkey) || role === 'admin' - - const belongsToStoreUser = - returnRequest.customerProfileData.userId === userId && - returnRequest.status === 'new' - - if (!userIsAdmin && !belongsToStoreUser) { - throw new ForbiddenError('Not authorized') - } - validateStatusUpdate(status, returnRequest.status as Status) // when a request is made for the same status, it means admin user is adding a new comment @@ -183,34 +175,37 @@ export const updateRequestStatusService = async ( }) : returnRequest.refundData - const refundReturn = await handleRefund({ - currentStatus: requestStatus, - previousStatus: returnRequest.status, - refundPaymentData: returnRequest.refundPaymentData ?? {}, - orderId: returnRequest.orderId as string, - createdAt: requestDate, - refundInvoice, - userEmail: returnRequest.customerProfileData?.email as string, - clients: { - omsClient: oms, - giftCardClient, - }, - }) - - const giftCard = refundReturn?.giftCard + let availableAmountsToRefund + let updatedRequest + try { + const refundReturn = await handleRefund({ + currentStatus: requestStatus, + previousStatus: returnRequest.status, + refundPaymentData: returnRequest.refundPaymentData ?? {}, + orderId: returnRequest.orderId as string, + createdAt: requestDate, + refundInvoice, + userEmail: returnRequest.customerProfileData?.email as string, + clients: { + omsClient: oms, + giftCardClient, + }, + }) - const updatedRequest = { - ...formatRequestToPartialUpdate(returnRequest), - status: requestStatus, - refundStatusData, - refundData: refundInvoice - ? { ...refundInvoice, ...(giftCard ? { giftCard } : null) } - : null, - } + const giftCard = refundReturn?.giftCard - try { + updatedRequest = { + ...formatRequestToPartialUpdate(returnRequest), + sellerName: sellerName ?? undefined, + status: requestStatus, + refundStatusData, + refundData: refundInvoice + ? { ...refundInvoice, ...(giftCard ? { giftCard } : null) } + : null, + } await returnRequestClient.update(requestId, updatedRequest) } catch (error) { + console.error('error: ', error) const mdValidationErrors = error?.response?.data?.errors[0]?.errors const errorMessageString = mdValidationErrors @@ -227,6 +222,42 @@ export const updateRequestStatusService = async ( throw new ResolverError(errorMessageString, error.response?.status || 500) } + try { + if (requestStatus === 'amountRefunded' && refundInvoice) { + availableAmountsToRefund = await calculateAvailableAmountsService( + ctx, + { + order: { orderId: returnRequest.orderId }, + amountRefunded: refundInvoice.refundedItemsValue, + }, + 'UPDATE' + ) + + refundInvoice.invoiceValue = availableAmountsToRefund.amountRefunded + } else if (requestStatus === 'packageVerified' && refundInvoice) { + availableAmountsToRefund = await calculateAvailableAmountsService( + ctx, + { + order: { orderId: returnRequest.orderId }, + shippingCostRefunded: refundInvoice.refundedShippingValue, + }, + 'UPDATE' + ) + } else { + availableAmountsToRefund = await calculateAvailableAmountsService( + ctx, + { + order: { orderId: returnRequest.orderId }, + }, + 'GET' + ) + } + } catch (error) { + console.error('error: ', error) + throw new Error("Can't calculate available amounts to refund") + } + + console.log("availableAmountsToRefund",availableAmountsToRefund) const { cultureInfoData } = updatedRequest // We add a try/catch here so we avoid sending an error to the browser only if the email fails. @@ -277,5 +308,5 @@ export const updateRequestStatusService = async ( }) } - return { id: requestId, ...updatedRequest } + return { id: requestId, ...updatedRequest, availableAmountsToRefund } } diff --git a/node/tsconfig.json b/node/tsconfig.json index cd249d19f..11d46ef13 100644 --- a/node/tsconfig.json +++ b/node/tsconfig.json @@ -2,6 +2,7 @@ "extends": "@vtex/tsconfig", "include": ["./typings/*.d.ts", "./**/*.tsx", "./**/*.ts"], "compilerOptions": { - "types": ["node", "jest"] + "types": ["node", "jest"], + "lib": ["es2019", "dom"] } } diff --git a/node/typings/InvoiceRequest.d.ts b/node/typings/InvoiceRequest.d.ts new file mode 100644 index 000000000..f21eee8bd --- /dev/null +++ b/node/typings/InvoiceRequest.d.ts @@ -0,0 +1,25 @@ +export interface InvoiceRequest { + type: string + items: Item[] + issuanceDate: string + invoiceNumber: string + invoiceValue: number + invoiceUrl: string + courier: string + trackingNumber: string + trackingUrl: string + dispatchDate: string | null | undefined +} + +export interface Item { + id: string + description: string + price: number + quantity: number +} + +export interface InvoiceResponse { + date: string + orderId: string + receipt: string +} diff --git a/node/typings/mailClient.d.ts b/node/typings/mailClient.d.ts index ddf9d8987..86cc77894 100644 --- a/node/typings/mailClient.d.ts +++ b/node/typings/mailClient.d.ts @@ -1,4 +1,4 @@ -import type { ReturnRequestItem, Status } from 'vtex.return-app' +import type { ReturnRequestItem, Status } from '../../typings/ReturnRequest' export type ReturnRequestConfirmation = string diff --git a/node/typings/scheduler.d.ts b/node/typings/scheduler.d.ts new file mode 100644 index 000000000..55eea580b --- /dev/null +++ b/node/typings/scheduler.d.ts @@ -0,0 +1,22 @@ +interface SchedulerRequest { + id: string + scheduler: { + expression: string + endDate: string + } + retry: { + delay: { + addMinutes: number + addHours: number + addDays: number + } + times: number + backOffRate: number + } + request: { + uri: string + method: string + headers: { [k: string]: unknown } + body: { [k: string]: unknown } + } +} diff --git a/node/typings/vtex.return-app.d.ts b/node/typings/vtex.return-app.d.ts index 33088dea2..4a5282fa2 100644 --- a/node/typings/vtex.return-app.d.ts +++ b/node/typings/vtex.return-app.d.ts @@ -37,3 +37,32 @@ interface AuthenticationSession { value: string } } + +interface OrderRefundDetails { + id: string + orderID: string + initialInvoicedAmount: number + totalRefunded?: number | undefined + remainingRefundableAmount?: number | undefined + amountToBeRefundedInProcess: number | undefined + initialShippingCost?: number + shippingCostToBeRefundedInProcess?: number | undefined + totalShippingCostRefunded?: number | undefined + remainingRefundableShippingCost?: number | undefined + lastUpdated: Date +} + +type RefundPaymentData = { + transactionId?: string + refundPaymentMethod: 'bank' | 'card' | 'giftCard' | 'sameAsPurchase' +} + +interface Goodwill { + orderId: string + creditnoteID: string + sellerId: string + status: 'new' | 'processing' | 'amountRefunded' + creditAmount: number + reason: string + refundPaymentData: RefundPaymentData +} diff --git a/node/utils/appSettingSchema.ts b/node/utils/appSettingSchema.ts new file mode 100644 index 000000000..30ec38c34 --- /dev/null +++ b/node/utils/appSettingSchema.ts @@ -0,0 +1,41 @@ +import Joi from 'joi' + +const customReturnReasonSchema = Joi.object({ + reason: Joi.string().optional(), + maxDays: Joi.number().optional(), + translations: Joi.array() + .items( + Joi.object({ + locale: Joi.string().pattern(/^[a-z]{2}-[A-Z]{2}$/), + translation: Joi.string(), + }) + ) + .allow(null) + .optional(), +}) + +const schemaAppSetting = Joi.object({ + maxDays: Joi.number().max(730).optional(), + excludedCategories: Joi.array().items(Joi.string()).optional(), + paymentOptions: Joi.object({ + enablePaymentMethodSelection: Joi.boolean().optional(), + allowedPaymentTypes: Joi.object({ + bank: Joi.boolean(), + card: Joi.boolean(), + giftCard: Joi.boolean(), + }).optional(), + automaticallyRefundPaymentMethod: Joi.boolean().optional(), + }).optional(), + termsUrl: Joi.string().uri().optional(), + customReturnReasons: Joi.array().items(customReturnReasonSchema).optional(), + options: Joi.object({ + enableOtherOptionSelection: Joi.boolean().optional(), + enablePickupPoints: Joi.boolean().optional(), + enableProportionalShippingValue: Joi.boolean().optional(), + enableSelectItemCondition: Joi.boolean().optional(), + enableHighlightFormMessage: Joi.allow(null).optional(), + }).optional(), + orderStatus: Joi.string().optional(), +}) + +export default schemaAppSetting diff --git a/node/utils/appSettingsValidation.ts b/node/utils/appSettingsValidation.ts index f096a74c3..b0fb91299 100644 --- a/node/utils/appSettingsValidation.ts +++ b/node/utils/appSettingsValidation.ts @@ -3,7 +3,7 @@ import type { PaymentTypeInput, CustomReturnReasonInput, PaymentOptions, -} from 'vtex.return-app' +} from '../../typings/ReturnAppSettings' export const validatePaymentOptions = ( paymentOptions: PaymentOptionsInput @@ -28,7 +28,7 @@ export const validatePaymentOptions = ( // Make automaticallyRefundPaymentMethod null when enablePaymentMethodSelection is true. This way we avoid confusion. We cannot have this value as true when payment method selection is eneble. const adjustedPaymentOptions = { ...paymentOptions, - automaticallyRefundPaymentMethod: null, + automaticallyRefundPaymentMethod: false, } for (const paymentType of Object.keys(allowedPaymentTypes)) { diff --git a/node/utils/canOrderBeReturned.ts b/node/utils/canOrderBeReturned.ts index 3a0c3aab8..18eabe430 100644 --- a/node/utils/canOrderBeReturned.ts +++ b/node/utils/canOrderBeReturned.ts @@ -1,7 +1,7 @@ import { ResolverError } from '@vtex/api' import { isWithinMaxDaysToReturn } from './dateHelpers' -import { ORDER_TO_RETURN_VALIDATON } from './constants' +import { ORDER_TO_RETURN_VALIDATON, STATUS_INVOICED } from './constants' const { ORDER_NOT_INVOICED, OUT_OF_MAX_DAYS } = ORDER_TO_RETURN_VALIDATON @@ -9,10 +9,12 @@ export const canOrderBeReturned = ({ creationDate, maxDays, status, + orderStatus, }: { creationDate: string maxDays: number status: string + orderStatus: string }) => { if (!isWithinMaxDaysToReturn(creationDate, maxDays)) { throw new ResolverError( @@ -22,7 +24,7 @@ export const canOrderBeReturned = ({ ) } - if (status !== 'invoiced') { + if (orderStatus !== 'partial-invoiced' && status !== STATUS_INVOICED) { throw new ResolverError('Order is not invoiced', 400, ORDER_NOT_INVOICED) } } diff --git a/node/utils/canReturnAllItems.ts b/node/utils/canReturnAllItems.ts index b305ec8da..9745868f7 100644 --- a/node/utils/canReturnAllItems.ts +++ b/node/utils/canReturnAllItems.ts @@ -1,11 +1,11 @@ import type { OrderDetailResponse, MasterDataEntity } from '@vtex/clients' +import { ResolverError } from '@vtex/api' + +import type { ReturnAppSettings } from '../../typings/ReturnAppSettings' import type { ReturnRequestItemInput, - ReturnAppSettings, ReturnRequest, -} from 'vtex.return-app' -import { ResolverError } from '@vtex/api' - +} from '../../typings/ReturnRequest' import { createOrdersToReturnSummary } from './createOrdersToReturnSummary' import type { CatalogGQL } from '../clients/catalogGQL' diff --git a/node/utils/constants.ts b/node/utils/constants.ts index 6ddfc5ddd..0a5fdfdef 100644 --- a/node/utils/constants.ts +++ b/node/utils/constants.ts @@ -1,11 +1,12 @@ -import type { OrderToReturnValidation } from 'vtex.return-app' - +import type { OrderToReturnValidation } from '../../typings/OrderToReturn' import type { ReturnRequestConfirmation, ReturnRequestStatusUpdate, } from '../typings/mailClient' export const SETTINGS_PATH = 'app-settings' +export const STATUS_INVOICED = 'invoiced' +export const STATUS_PAYMENT_APPROVE = 'payment-approved' export const ORDER_TO_RETURN_VALIDATON: Record< OrderToReturnValidation, @@ -28,3 +29,11 @@ export const OMS_RETURN_REQUEST_STATUS_UPDATE = ( export const OMS_RETURN_REQUEST_STATUS_UPDATE_FRIENDLY_NAME = ( locale = 'en-GB' ) => `[OMS] Return Request Status Update_${locale}` + +export const SCHEMAS = { + DEFAULT: '3.16.1-hkignore', + GOODWILL: '3.16.1-hkignore', + ORDER_REFUND_DETAILS: '3.16.1-hkignore', + RETURN_REQUEST: '3.16.1-hkignore', + SELLER_SETTING: '3.16.1-hkignore' +} diff --git a/node/utils/createItemsToReturn.ts b/node/utils/createItemsToReturn.ts index ad78fe015..1086b04b6 100644 --- a/node/utils/createItemsToReturn.ts +++ b/node/utils/createItemsToReturn.ts @@ -4,8 +4,11 @@ import type { PriceTag, SellerDetail, } from '@vtex/clients' -import type { ReturnRequestItemInput, ReturnRequestItem } from 'vtex.return-app' +import type { + ReturnRequestItemInput, + ReturnRequestItem, +} from '../../typings/ReturnRequest' import type { CatalogGQL } from '../clients/catalogGQL' import { translateItemName } from './translateItems' diff --git a/node/utils/createOrUpdateStatusPayload.ts b/node/utils/createOrUpdateStatusPayload.ts index 6e87fe5c0..a42507a45 100644 --- a/node/utils/createOrUpdateStatusPayload.ts +++ b/node/utils/createOrUpdateStatusPayload.ts @@ -1,10 +1,11 @@ import { ResolverError } from '@vtex/api' + import type { Maybe, ReturnRequest, ReturnRequestCommentInput, Status, -} from 'vtex.return-app' +} from '../../typings/ReturnRequest' export const createOrUpdateStatusPayload = ({ refundStatusData, diff --git a/node/utils/createOrdersToReturnSummary.ts b/node/utils/createOrdersToReturnSummary.ts index ba6105845..ba39fa95a 100644 --- a/node/utils/createOrdersToReturnSummary.ts +++ b/node/utils/createOrdersToReturnSummary.ts @@ -1,13 +1,13 @@ import type { OrderDetailResponse, MasterDataEntity } from '@vtex/clients' + import type { OrderToReturnSummary, InvoicedItem, ExcludedItem, ProcessedItem, - ReturnAppSettings, - ReturnRequest, -} from 'vtex.return-app' - +} from '../../typings/OrderToReturn' +import type { ReturnAppSettings } from '../../typings/ReturnAppSettings' +import type { ReturnRequest } from '../../typings/ReturnRequest' import { getInvoicedItems } from './getInvoicedItems' import { mapItemIndexAndQuantity } from './mapItemIndexAndQuantity' import { transformOrderClientProfileData } from './transformOrderClientProfileData' @@ -37,7 +37,7 @@ export const createOrdersToReturnSummary = async ( { page: 1, pageSize: 100 }, ['items', 'refundData', 'refundPaymentData'], undefined, - `orderId=${orderId} AND status <> cancelled` + `orderId=${orderId} AND status <> canceled` ) const invoicesCreatedByReturnApp: string[] = [] @@ -112,13 +112,14 @@ export const createOrdersToReturnSummary = async ( // Associate itemIndex with the correspondent item in the order.item for (const [index, quantity] of quantityInvoiced.entries()) { + const newIndex = index === -1 ? 0 : index const { id, productId, name, imageUrl, additionalInfo: { categoriesIds }, - } = items[index] + } = items[newIndex] // Here we can add the fields we want to have in the final item array. TBD the needed ones const currentLength = invoicedItems.push({ @@ -160,15 +161,18 @@ export const createOrdersToReturnSummary = async ( } } + const sellerName = order.sellers[0].name + return { orderId, creationDate, + sellerName, invoicedItems: await handleTranlateItems(invoicedItems, catalogGQL), processedItems, excludedItems, clientProfileData: transformOrderClientProfileData( order.clientProfileData, - email + email || order.clientProfileData.email ), shippingData: transformShippingData(order.shippingData), paymentData: { diff --git a/node/utils/createRefundData.ts b/node/utils/createRefundData.ts index f364558ea..4982c562b 100644 --- a/node/utils/createRefundData.ts +++ b/node/utils/createRefundData.ts @@ -1,6 +1,11 @@ -import type { Maybe, RefundDataInput, ReturnRequest } from 'vtex.return-app' import { UserInputError } from '@vtex/api' +import type { + Maybe, + RefundDataInput, + ReturnRequest, +} from '../../typings/ReturnRequest' + export const createRefundData = ({ requestId, refundData, @@ -76,6 +81,7 @@ export const createRefundData = ({ // invoiceNumber has to match the requestId. // This values is used to filter the invoices created via Return app when calculating the items available to be returned. invoiceNumber: requestId, + // eslint-disable-next-line @typescript-eslint/restrict-plus-operands invoiceValue: refundedItemsValue + refundedShippingValue, refundedItemsValue, refundedShippingValue, diff --git a/node/utils/createRefundableTotals.ts b/node/utils/createRefundableTotals.ts index 9e1b0070c..f897d9403 100644 --- a/node/utils/createRefundableTotals.ts +++ b/node/utils/createRefundableTotals.ts @@ -1,6 +1,10 @@ -import type { RefundableAmountTotal, ReturnRequest } from 'vtex.return-app' import type { ItemTotal } from '@vtex/clients' +import type { + RefundableAmountTotal, + ReturnRequest, +} from '../../typings/ReturnRequest' + export const createRefundableTotals = ( itemsToReturn: ReturnRequest['items'], totals: ItemTotal[], @@ -14,20 +18,26 @@ export const createRefundableTotals = ( totals.find(({ id }) => id === 'Discounts')?.value ?? 0 const itemsAmount = - itemsToReturn?.reduce((total, item) => { - const { quantity, sellingPrice } = item + itemsToReturn?.reduce( + (total: number, item: { quantity: any; sellingPrice: any }) => { + const { quantity, sellingPrice } = item - return total + (quantity ?? 0) * (sellingPrice ?? 0) - }, 0) ?? 0 + return total + (quantity ?? 0) * (sellingPrice ?? 0) + }, + 0 + ) ?? 0 const itemsTotal = { id: 'items' as const, value: itemsAmount } const taxAmount = - itemsToReturn?.reduce((total, item) => { - const { quantity, tax } = item - - return total + (quantity ?? 0) * (tax ?? 0) - }, 0) ?? 0 + itemsToReturn?.reduce( + (total: number, item: { quantity: any; tax: any }) => { + const { quantity, tax } = item + + return total + (quantity ?? 0) * (tax ?? 0) + }, + 0 + ) ?? 0 const taxTotal = { id: 'tax' as const, value: taxAmount } diff --git a/node/utils/getCostumerEmail.ts b/node/utils/getCostumerEmail.ts index 1adc18d3a..9db2a6961 100644 --- a/node/utils/getCostumerEmail.ts +++ b/node/utils/getCostumerEmail.ts @@ -14,6 +14,7 @@ export const getCustomerEmail = ( userProfile, appkey, inputEmail, + sellerId }: { userProfile?: UserProfile appkey?: string @@ -21,7 +22,8 @@ export const getCustomerEmail = ( * Email sent via args, either via GraphQL or request body in REST * @type {string} */ - inputEmail?: string | null + inputEmail?: string | null, + sellerId?: string }, { logger, @@ -35,6 +37,9 @@ export const getCustomerEmail = ( // when the requester is the owner of the order, we can use the email parsed from the session cookie if (userProfile && requesterIsStoreUser) return userProfile.email + // when the requester is to seller, we can use the email session + if(sellerId) return String(inputEmail) + // Case: Request made by an admin user for a store user (e.g. via GraphQL IDE or endpoint using auth cookie) if (userProfile && userProfile.role === 'admin' && !requesterIsStoreUser) { if (!inputEmail) { diff --git a/node/utils/handleRefund.ts b/node/utils/handleRefund.ts index 949a5d382..b11ecdc9a 100644 --- a/node/utils/handleRefund.ts +++ b/node/utils/handleRefund.ts @@ -1,6 +1,11 @@ -import type { Status, Maybe, ReturnRequest, GiftCard } from 'vtex.return-app' import { ResolverError } from '@vtex/api' +import type { + Status, + Maybe, + ReturnRequest, + GiftCard, +} from '../../typings/ReturnRequest' import type { OMSCustom } from '../clients/oms' import type { GiftCard as GiftCardClient } from '../clients/giftCard' diff --git a/node/utils/index.ts b/node/utils/index.ts new file mode 100644 index 000000000..1393c49dd --- /dev/null +++ b/node/utils/index.ts @@ -0,0 +1,7 @@ +export const cleanObject = >( + objectData: T +): T => { + return Object.fromEntries( + Object.entries(objectData).filter(([_, value]) => value !== null) + ) as T +} diff --git a/node/utils/isUserAllowed.ts b/node/utils/isUserAllowed.ts index 5c8d44e9d..daf7a8590 100644 --- a/node/utils/isUserAllowed.ts +++ b/node/utils/isUserAllowed.ts @@ -5,14 +5,19 @@ export const isUserAllowed = ({ requesterUser, clientProfile, appkey, + sellerId }: { requesterUser?: UserProfile clientProfile: ClientProfileDetail appkey?: string + sellerId?: string }) => { // If appkey is in the request, it means that the request was authenticated with appkey and apptoken if (appkey) return + // If sellerId is in the request, it means that the request was from app seller + if (sellerId) return + // if appkey doesn't exist, we need a UserProfile if (!requesterUser) { throw new ResolverError('Missing User Profile data') diff --git a/node/utils/resolversWrapper.ts b/node/utils/resolversWrapper.ts new file mode 100644 index 000000000..a7dccf9f9 --- /dev/null +++ b/node/utils/resolversWrapper.ts @@ -0,0 +1,28 @@ +import { SCHEMAS } from "./constants" + + +interface ContextFunction { + (_: any, params: any, ctx: Context): Promise +} + +export const wrapperFunction = (originalFunction: ContextFunction) => { + return async (_: any, params: any, ctx: Context): Promise => { + ctx.clients.returnRequest.schema = SCHEMAS.DEFAULT + ctx.clients.goodwill.schema = SCHEMAS.DEFAULT + ctx.clients.sellerSetting.schema = SCHEMAS.DEFAULT + ctx.clients.orderRefundDetails.schema = SCHEMAS.DEFAULT + + const result = await originalFunction(_, params, ctx) + + return result + } +} + +export const resolversWrapper = (items: { + [key: string]: (...args: any[]) => any +}) => + Object.fromEntries( + Object.entries(items).map(([name, originalFunction]) => { + return [name, wrapperFunction(originalFunction)] + }) + ) diff --git a/node/utils/templates/templateMessages.ts b/node/utils/templates/templateMessages.ts index dd0857a9c..dacee2a98 100644 --- a/node/utils/templates/templateMessages.ts +++ b/node/utils/templates/templateMessages.ts @@ -254,7 +254,7 @@ const STATUS_UPDATE = html` verification {{/eq}} {{#eq data.status 'packageVerified'}} Package verified {{/eq}} {{#eq data.status 'amountRefunded'}} Amount refunded {{/eq}} {{#eq data.status 'denied'}} Denied {{/eq}} {{#eq data.status - 'cancelled'}} Cancelled {{/eq}} + 'canceled'}} Canceled {{/eq}} @@ -341,7 +341,7 @@ const STATUS_TIMELINE = html` {{#eq status 'packageVerified'}} Package verified {{/eq}} {{#eq status 'amountRefunded'}} Amount refunded {{/eq}} {{#eq status 'denied'}} Denied {{/eq}} {{#eq status - 'cancelled'}} Cancelled {{/eq}} + 'canceled'}} Canceled {{/eq}}
    @@ -366,7 +366,7 @@ const STATUS_TIMELINE = html` {{#eq status 'packageVerified'}} Package verified {{/eq}} {{#eq status 'amountRefunded'}} Amount refunded {{/eq}} {{#eq status 'denied'}} Denied {{/eq}} {{#eq status - 'cancelled'}} Cancelled {{/eq}} + 'canceled'}} Canceled {{/eq}}
      @@ -379,7 +379,7 @@ const STATUS_TIMELINE = html` {{#compare status '!=' 'amountRefunded'}} {{#compare status '!=' 'denied'}} - {{#compare status '!=' 'cancelled'}} + {{#compare status '!=' 'canceled'}} diff --git a/node/utils/transformOrderClientProfileData.ts b/node/utils/transformOrderClientProfileData.ts index 8d860b9d7..8303c9631 100644 --- a/node/utils/transformOrderClientProfileData.ts +++ b/node/utils/transformOrderClientProfileData.ts @@ -1,5 +1,6 @@ import type { ClientProfileDetail } from '@vtex/clients' -import type { ClientProfileData } from 'vtex.return-app' + +import type { ClientProfileData } from '../../typings/OrderToReturn' export const transformOrderClientProfileData = ( clientProfileData: ClientProfileDetail, diff --git a/node/utils/transformShippingData.ts b/node/utils/transformShippingData.ts index 38779deb4..ed3c7bf44 100644 --- a/node/utils/transformShippingData.ts +++ b/node/utils/transformShippingData.ts @@ -1,5 +1,6 @@ import type { ShippingDetail } from '@vtex/clients' -import type { ShippingData } from 'vtex.return-app' + +import type { ShippingData } from '../../typings/OrderToReturn' export const transformShippingData = ( shippingData: ShippingDetail @@ -21,7 +22,7 @@ export const transformShippingData = ( country: address.country, city: address.city, address: `${address.street}, ${address.number ?? ''} ${complement}`.trim(), - state: address.state, + state: address.state || '', zipCode: address.postalCode, addressType, // @ts-expect-error geoCoordinates is not typed in the OMS client project diff --git a/node/utils/translateItems.ts b/node/utils/translateItems.ts index fd3a156e5..ecc998121 100644 --- a/node/utils/translateItems.ts +++ b/node/utils/translateItems.ts @@ -1,5 +1,4 @@ -import type { InvoicedItem } from 'vtex.return-app' - +import type { InvoicedItem } from '../../typings/OrderToReturn' import type { CatalogGQL } from '../clients/catalogGQL' /** diff --git a/node/utils/validateCanUseDropoffPoints.ts b/node/utils/validateCanUseDropoffPoints.ts index 9c925ea7f..a41f376ce 100644 --- a/node/utils/validateCanUseDropoffPoints.ts +++ b/node/utils/validateCanUseDropoffPoints.ts @@ -1,6 +1,7 @@ -import type { PickupReturnDataInput } from 'vtex.return-app' import { ResolverError, UserInputError } from '@vtex/api' +import type { PickupReturnDataInput } from '../../typings/ReturnRequest' + export const validateCanUsedropoffPoints = ( pickupReturnData: PickupReturnDataInput, isPickupPointsEnabled?: boolean | null diff --git a/node/utils/validateItemCondition.ts b/node/utils/validateItemCondition.ts index a85ea2bca..32cb43d71 100644 --- a/node/utils/validateItemCondition.ts +++ b/node/utils/validateItemCondition.ts @@ -1,6 +1,7 @@ -import type { ReturnRequestItemInput } from 'vtex.return-app' import { UserInputError } from '@vtex/api' +import type { ReturnRequestItemInput } from '../../typings/ReturnRequest' + export const validateItemCondition = ( itemsToReturn: ReturnRequestItemInput[], considerCondition?: boolean | null diff --git a/node/utils/validatePaymentMethod.ts b/node/utils/validatePaymentMethod.ts index 3d27c54f0..32bf34571 100644 --- a/node/utils/validatePaymentMethod.ts +++ b/node/utils/validatePaymentMethod.ts @@ -1,6 +1,7 @@ -import type { RefundPaymentDataInput, PaymentOptions } from 'vtex.return-app' import { ResolverError } from '@vtex/api' +import type { PaymentOptions } from '../../typings/ReturnAppSettings' +import type { RefundPaymentDataInput } from '../../typings/ReturnRequest' import { isValidIBANNumber } from './isValidIBANNumber' export const validatePaymentMethod = ( diff --git a/node/utils/validateReturnReason.ts b/node/utils/validateReturnReason.ts index 5ffc21360..311960084 100644 --- a/node/utils/validateReturnReason.ts +++ b/node/utils/validateReturnReason.ts @@ -1,9 +1,7 @@ -import type { - ReturnRequestItemInput, - CustomReturnReason, -} from 'vtex.return-app' import { ResolverError, UserInputError } from '@vtex/api' +import type { CustomReturnReason } from '../../typings/ReturnAppSettings' +import type { ReturnRequestItemInput } from '../../typings/ReturnRequest' import { isWithinMaxDaysToReturn } from './dateHelpers' export const validateReturnReason = ( diff --git a/node/utils/validateStatusUpdate.ts b/node/utils/validateStatusUpdate.ts index a7548344e..018fb1c10 100644 --- a/node/utils/validateStatusUpdate.ts +++ b/node/utils/validateStatusUpdate.ts @@ -1,16 +1,17 @@ import { ResolverError, UserInputError } from '@vtex/api' -import type { Status } from 'vtex.return-app' + +import type { Status } from '../../typings/ReturnRequest' const statusAllowed: Record = { - new: ['new', 'processing', 'denied', 'cancelled'], - processing: ['processing', 'pickedUpFromClient', 'denied', 'cancelled'], + new: ['new', 'processing', 'packageVerified', 'denied', 'canceled'], + processing: ['processing', 'pickedUpFromClient', 'denied', 'canceled'], pickedUpFromClient: ['pickedUpFromClient', 'pendingVerification', 'denied'], pendingVerification: ['pendingVerification', 'packageVerified'], // In this step, when sending the items to the resolver, it will assign the status denied or packageVerified based on the items sent. packageVerified: ['packageVerified', 'amountRefunded'], amountRefunded: ['amountRefunded'], denied: ['denied'], - cancelled: ['cancelled'], + canceled: ['canceled'], } export const validateStatusUpdate = ( diff --git a/node/yarn.lock b/node/yarn.lock index cd5405e8f..12866816f 100644 --- a/node/yarn.lock +++ b/node/yarn.lock @@ -986,6 +986,18 @@ typescript "3.0.3" uuid "3.2.1" +"@hapi/hoek@^9.0.0": + version "9.3.0" + resolved "https://registry.yarnpkg.com/@hapi/hoek/-/hoek-9.3.0.tgz#8368869dcb735be2e7f5cb7647de78e167a251fb" + integrity sha512-/c6rf4UJlmHlC9b5BaNvzAcFv7HZ2QHaV0D4/HNlBdvFnvQq8RI4kYdhyPCl7Xj+oWvTWQ8ujhqS53LIgAe6KQ== + +"@hapi/topo@^5.0.0": + version "5.1.0" + resolved "https://registry.yarnpkg.com/@hapi/topo/-/topo-5.1.0.tgz#dc448e332c6c6e37a4dc02fd84ba8d44b9afb012" + integrity sha512-foQZKJig7Ob0BMAYBfcJk8d77QtOe7Wo4ox7ff1lQYoNNAb6jwcY1ncdoy2e9wQZzvNy7ODZCYJkK8kzmcAnAg== + dependencies: + "@hapi/hoek" "^9.0.0" + "@jest/console@^24.7.1", "@jest/console@^24.9.0": version "24.9.0" resolved "https://registry.yarnpkg.com/@jest/console/-/console-24.9.0.tgz#79b1bc06fb74a8cfb01cbdedf945584b1b9707f0" @@ -1160,6 +1172,23 @@ resolved "https://registry.yarnpkg.com/@sheerun/mutationobserver-shim/-/mutationobserver-shim-0.3.3.tgz#5405ee8e444ed212db44e79351f0c70a582aae25" integrity sha512-DetpxZw1fzPD5xUBrIAoplLChO2VB8DlL5Gg+I1IR9b2wPqYIca2WSUxL5g1vLeR4MsQq1NeWriXAVffV+U1Fw== +"@sideway/address@^4.1.3": + version "4.1.4" + resolved "https://registry.yarnpkg.com/@sideway/address/-/address-4.1.4.tgz#03dccebc6ea47fdc226f7d3d1ad512955d4783f0" + integrity sha512-7vwq+rOHVWjyXxVlR76Agnvhy8I9rpzjosTESvmhNeXOXdZZB15Fl+TI9x1SiHZH5Jv2wTGduSxFDIaq0m3DUw== + dependencies: + "@hapi/hoek" "^9.0.0" + +"@sideway/formula@^3.0.1": + version "3.0.1" + resolved "https://registry.yarnpkg.com/@sideway/formula/-/formula-3.0.1.tgz#80fcbcbaf7ce031e0ef2dd29b1bfc7c3f583611f" + integrity sha512-/poHZJJVjx3L+zVD6g9KgHfYnb443oi7wLu/XKojDviHy6HOEOA6z1Trk5aR1dGcmPenJEgb2sK2I80LeS3MIg== + +"@sideway/pinpoint@^2.0.0": + version "2.0.0" + resolved "https://registry.yarnpkg.com/@sideway/pinpoint/-/pinpoint-2.0.0.tgz#cff8ffadc372ad29fd3f78277aeb29e632cc70df" + integrity sha512-RNiOoTPkptFtSVzQevY/yWtZwf/RxyVnPy/OcA9HBM3MlGDnBEYL5B41H0MTn0Uec8Hi+2qUtTfG2WWZBmMejQ== + "@testing-library/dom@*": version "8.1.0" resolved "https://registry.yarnpkg.com/@testing-library/dom/-/dom-8.1.0.tgz#f8358b1883844ea569ba76b7e94582168df5370d" @@ -1358,7 +1387,7 @@ dependencies: "@types/istanbul-lib-report" "*" -"@types/jest@^24.0.11", "@types/jest@^24.0.18": +"@types/jest@^24.0.11": version "24.9.1" resolved "https://registry.yarnpkg.com/@types/jest/-/jest-24.9.1.tgz#02baf9573c78f1b9974a5f36778b366aa77bd534" integrity sha512-Fb38HkXSVA4L8fGKEZ6le5bB8r6MRWlOCZbVuWZcmOMSCd2wCYOwN1ibj8daIoV9naq7aaOZjrLCoCMptKU/4Q== @@ -1421,6 +1450,10 @@ resolved "https://registry.yarnpkg.com/@types/qs/-/qs-6.9.7.tgz#63bb7d067db107cc1e457c303bc25d511febf6cb" integrity sha512-FGa1F62FT09qcrueBA6qYTrJPVDzah9a+493+o2PCXsesWHIn27G98TsSMs3WPNbZIEj4+VJf6saSFpvD+3Zsw== +"@types/ramda@types/npm-ramda#dist": + version "0.25.0" + resolved "https://codeload.github.com/types/npm-ramda/tar.gz/9529aa3c8ff70ff84afcbc0be83443c00f30ea90" + "@types/range-parser@*": version "1.2.4" resolved "https://registry.yarnpkg.com/@types/range-parser/-/range-parser-1.2.4.tgz#cd667bcfdd025213aafb7ca5915a932590acdcdc" @@ -1497,6 +1530,13 @@ "@types/testing-library__dom" "*" pretty-format "^25.1.0" +"@types/xlsx@^0.0.36": + version "0.0.36" + resolved "https://registry.yarnpkg.com/@types/xlsx/-/xlsx-0.0.36.tgz#b5062003e5c5374ab4f08fdd3bf69da4d4013af8" + integrity sha512-mvfrKiKKMErQzLMF8ElYEH21qxWCZtN59pHhWGmWCWFJStYdMWjkDSAy6mGowFxHXaXZWe5/TW7pBUiWclIVOw== + dependencies: + xlsx "*" + "@types/yargs-parser@*": version "20.2.1" resolved "https://registry.yarnpkg.com/@types/yargs-parser/-/yargs-parser-20.2.1.tgz#3b9ce2489919d9e4fea439b76916abc34b2df129" @@ -1528,10 +1568,10 @@ resolved "https://registry.yarnpkg.com/@types/zen-observable/-/zen-observable-0.8.3.tgz#781d360c282436494b32fe7d9f7f8e64b3118aa3" integrity sha512-fbF6oTd4sGGy0xjHPKAt+eS2CrxJ3+6gQ3FGcBoIJR2TLAyCkCyI8JqZNy+FeON0AhVgNJoUumVoZQjBFUqHkw== -"@vtex/api@6.45.15": - version "6.45.15" - resolved "https://registry.yarnpkg.com/@vtex/api/-/api-6.45.15.tgz#aa987d22f7df16ce2861130deda6ffd63156817b" - integrity sha512-Rg1VGDzJ4hHUNp1vSidMdGGPojr1PikMTptlZsJ3oNZVdEo4cPx2l8ZcAEwHWORL7QjPjXaEgmeA5ZOSf+boCQ== +"@vtex/api@6.45.22": + version "6.45.22" + resolved "https://registry.yarnpkg.com/@vtex/api/-/api-6.45.22.tgz#fa9bbfde1a4d4fbbaf6cce9f6dbc9bb9ee929ba3" + integrity sha512-g5cGUDhF4FADgSMpQmce/bnIZumwGlPG2cabwbQKIQ+cCFMZqOEM/n+YQb1+S8bCyHkzW3u/ZABoyCKi5/nxxg== dependencies: "@types/koa" "^2.11.0" "@types/koa-compose" "^3.2.3" @@ -1551,7 +1591,7 @@ fs-extra "^7.0.0" graphql "^14.5.8" graphql-tools "^4.0.6" - graphql-upload "^8.1.0" + graphql-upload "^13.0.0" jaeger-client "^3.18.0" js-base64 "^2.5.1" koa "^2.11.0" @@ -1562,7 +1602,7 @@ mime-types "^2.1.12" opentracing "^0.14.4" p-limit "^2.2.0" - prom-client "^12.0.0" + prom-client "^14.2.0" qs "^6.5.1" querystring "^0.2.0" ramda "^0.26.0" @@ -1681,6 +1721,11 @@ acorn@^6.0.1: resolved "https://registry.yarnpkg.com/acorn/-/acorn-6.4.2.tgz#35866fd710528e92de10cf06016498e47e39e1e6" integrity sha512-XtGIhXwF8YM8bJhGxG5kXgjkEuNGLTkoYqVE+KMR+aspr4KGYmKYg7yUe3KghyQ9yheNwLnjmzh/7+gfDBmHCQ== +adler-32@~1.3.0: + version "1.3.1" + resolved "https://registry.yarnpkg.com/adler-32/-/adler-32-1.3.1.tgz#1dbf0b36dda0012189a32b3679061932df1821e2" + integrity sha512-ynZ4w/nUUv5rrsR8UUGoe1VC9hZj6V5hU9Qw1HlMDJGEJw5S7TfTErWTjMys6M7vr0YWcPqs3qAr4ss0nDfP+A== + agentkeepalive@^4.0.2: version "4.1.4" resolved "https://registry.yarnpkg.com/agentkeepalive/-/agentkeepalive-4.1.4.tgz#d928028a4862cb11718e55227872e842a44c945b" @@ -1959,11 +2004,11 @@ axios@0.18.0: is-buffer "^1.1.5" axios@^0.21.1: - version "0.21.1" - resolved "https://registry.yarnpkg.com/axios/-/axios-0.21.1.tgz#22563481962f4d6bde9a76d516ef0e5d3c09b2b8" - integrity sha512-dKQiRHxGD9PPRIUNIWvZhPTPpl1rf/OxTYKsqKUDjBwYylTvV7SjSHJb9ratfyzM6wCdLCOYLzs73qpg5c4iGA== + version "0.21.4" + resolved "https://registry.yarnpkg.com/axios/-/axios-0.21.4.tgz#c67b90dc0568e5c1cf2b0b858c43ba28e2eda575" + integrity sha512-ut5vewkiu8jjGBdqpM44XxjuCjq9LAKeHVmoVfHVzy8eHgxxq8SbAVQNovDA8mVi05kP0Ea/n/UzcSHcTJQfNg== dependencies: - follow-redirects "^1.10.0" + follow-redirects "^1.14.0" babel-jest@^24.4.0, babel-jest@^24.9.0: version "24.9.0" @@ -2260,6 +2305,14 @@ caseless@~0.12.0: resolved "https://registry.yarnpkg.com/caseless/-/caseless-0.12.0.tgz#1b681c21ff84033c826543090689420d187151dc" integrity sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw= +cfb@~1.2.1: + version "1.2.2" + resolved "https://registry.yarnpkg.com/cfb/-/cfb-1.2.2.tgz#94e687628c700e5155436dac05f74e08df23bc44" + integrity sha512-KfdUZsSOw19/ObEWasvBP/Ac4reZvAGauZhs6S/gqNhXhI7cKwvlH7ulj+dOEYnca4bm4SGo8C1bTAQvnTjgQA== + dependencies: + adler-32 "~1.3.0" + crc-32 "~1.2.0" + chalk@^2.0.0, chalk@^2.0.1, chalk@^2.3.0, chalk@^2.4.1, chalk@^2.4.2: version "2.4.2" resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.4.2.tgz#cd42541677a54333cf541a49108c1432b44c9424" @@ -2329,6 +2382,11 @@ co@^4.6.0: resolved "https://registry.yarnpkg.com/co/-/co-4.6.0.tgz#6ea6bdf3d853ae54ccb8e47bfa0bf3f9031fb184" integrity sha1-bqa989hTrlTMuOR7+gvz+QMfsYQ= +codepage@~1.15.0: + version "1.15.0" + resolved "https://registry.yarnpkg.com/codepage/-/codepage-1.15.0.tgz#2e00519024b39424ec66eeb3ec07227e692618ab" + integrity sha512-3g6NUTPd/YtuuGrhMnOMRjFc+LJw/bnMp3+0r/Wcz3IXUuCosKRJvMphm5+Q+bvTVGcJJuRvVLuYba+WojaFaA== + collection-visit@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/collection-visit/-/collection-visit-1.0.0.tgz#4bc0373c164bc3291b4d368c829cf1a80a59dca0" @@ -2465,6 +2523,11 @@ core-util-is@1.0.2, core-util-is@~1.0.0: resolved "https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.2.tgz#b5fd54220aa2bc5ab57aab7140c940754503c1a7" integrity sha1-tf1UIgqivFq1eqtxQMlAdUUDwac= +crc-32@~1.2.0, crc-32@~1.2.1: + version "1.2.2" + resolved "https://registry.yarnpkg.com/crc-32/-/crc-32-1.2.2.tgz#3cad35a934b8bf71f25ca524b6da51fb7eace2ff" + integrity sha512-ROmzCKrTnOwybPcJApAA6WBWij23HVfGVNKqqrZpuyZOHqK2CwHSvpGuyt/UNNvaIjEd8X5IFGp4Mh+Ie1IHJQ== + crc32-stream@^3.0.1: version "3.0.1" resolved "https://registry.yarnpkg.com/crc32-stream/-/crc32-stream-3.0.1.tgz#cae6eeed003b0e44d739d279de5ae63b171b4e85" @@ -2985,10 +3048,10 @@ find-up@^3.0.0: dependencies: locate-path "^3.0.0" -follow-redirects@^1.10.0: - version "1.13.0" - resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.13.0.tgz#b42e8d93a2a7eea5ed88633676d6597bc8e384db" - integrity sha512-aq6gF1BEKje4a9i9+5jimNFIpq4Q1WiwBToeRK5NvZBd/TRsmW8BsJfOEGkr76TbOyPVD3OVDN910EcUNtRYEA== +follow-redirects@^1.14.0: + version "1.15.2" + resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.15.2.tgz#b460864144ba63f2681096f274c4e57026da2c13" + integrity sha512-VQLG33o04KaQ8uYi2tVNbdrWp1QWxNNea+nmIB4EVM28v0hmP17z7aG1+wAkNzVq4KeXTq3221ye5qTJP91JwA== follow-redirects@^1.3.0: version "1.14.1" @@ -3021,6 +3084,11 @@ form-data@~2.3.2: combined-stream "^1.0.6" mime-types "^2.1.12" +frac@~1.1.2: + version "1.1.2" + resolved "https://registry.yarnpkg.com/frac/-/frac-1.1.2.tgz#3d74f7f6478c88a1b5020306d747dc6313c74d0b" + integrity sha512-w/XBfkibaTl3YDqASwfDUqkna4Z2p9cFSr1aHDt0WoMTECnRfBOv2WArlZILlqgWlmdIlALXGpM2AOhEk5W3IA== + fragment-cache@^0.2.1: version "0.2.1" resolved "https://registry.yarnpkg.com/fragment-cache/-/fragment-cache-0.2.1.tgz#4290fad27f13e89be7f33799c6bc5a0abfff0d19" @@ -3033,10 +3101,10 @@ fresh@~0.5.2: resolved "https://registry.yarnpkg.com/fresh/-/fresh-0.5.2.tgz#3d8cadd90d976569fa835ab1f8e4b23a105605a7" integrity sha1-PYyt2Q2XZWn6g1qx+OSyOhBWBac= -fs-capacitor@^2.0.4: - version "2.0.4" - resolved "https://registry.yarnpkg.com/fs-capacitor/-/fs-capacitor-2.0.4.tgz#5a22e72d40ae5078b4fe64fe4d08c0d3fc88ad3c" - integrity sha512-8S4f4WsCryNw2mJJchi46YgB6CR5Ze+4L1h8ewl9tEpL4SJ3ZO+c/bS4BWhB8bK+O3TMqhuZarTitd0S0eh2pA== +fs-capacitor@^6.2.0: + version "6.2.0" + resolved "https://registry.yarnpkg.com/fs-capacitor/-/fs-capacitor-6.2.0.tgz#fa79ac6576629163cb84561995602d8999afb7f5" + integrity sha512-nKcE1UduoSKX27NSZlg879LdQc94OtbOsEmKMN2MBNudXREvijRKx2GEBsTMTfws+BrbkJoEuynbGSVRSpauvw== fs-constants@^1.0.0: version "1.0.0" @@ -3155,15 +3223,15 @@ graphql-tools@^4.0.0, graphql-tools@^4.0.6: iterall "^1.1.3" uuid "^3.1.0" -graphql-upload@^8.1.0: - version "8.1.0" - resolved "https://registry.yarnpkg.com/graphql-upload/-/graphql-upload-8.1.0.tgz#6d0ab662db5677a68bfb1f2c870ab2544c14939a" - integrity sha512-U2OiDI5VxYmzRKw0Z2dmfk0zkqMRaecH9Smh1U277gVgVe9Qn+18xqf4skwr4YJszGIh7iQDZ57+5ygOK9sM/Q== +graphql-upload@^13.0.0: + version "13.0.0" + resolved "https://registry.yarnpkg.com/graphql-upload/-/graphql-upload-13.0.0.tgz#1a255b64d3cbf3c9f9171fa62a8fb0b9b59bb1d9" + integrity sha512-YKhx8m/uOtKu4Y1UzBFJhbBGJTlk7k4CydlUUiNrtxnwZv0WigbRHP+DVhRNKt7u7DXOtcKZeYJlGtnMXvreXA== dependencies: busboy "^0.3.1" - fs-capacitor "^2.0.4" - http-errors "^1.7.3" - object-path "^0.11.4" + fs-capacitor "^6.2.0" + http-errors "^1.8.1" + object-path "^0.11.8" graphql@*: version "15.5.1" @@ -3341,7 +3409,7 @@ http-errors@^1.3.1, http-errors@^1.6.3: statuses ">= 1.5.0 < 2" toidentifier "1.0.0" -http-errors@^1.7.3: +http-errors@^1.8.1: version "1.8.1" resolved "https://registry.yarnpkg.com/http-errors/-/http-errors-1.8.1.tgz#7c3f28577cbc8a207388455dbd62295ed07bd68c" integrity sha512-Kpk9Sm7NmI+RHhnj6OIWDI1d6fIoFAtFt9RLaTMRlg/8w49juAStsrBgp0Dp4OdxdVbRIeKhtCUvoi/RuAhO4g== @@ -4120,6 +4188,17 @@ jest@^24.4.0: import-local "^2.0.0" jest-cli "^24.9.0" +joi@^17.9.2: + version "17.10.1" + resolved "https://registry.yarnpkg.com/joi/-/joi-17.10.1.tgz#f908ee1617137cca5d83b91587cde80e472b5753" + integrity sha512-vIiDxQKmRidUVp8KngT8MZSOcmRVm2zV7jbMjNYWuHcJWI0bUck3nRTGQjhpPlQenIQIBC5Vp9AhcnHbWQqafw== + dependencies: + "@hapi/hoek" "^9.0.0" + "@hapi/topo" "^5.0.0" + "@sideway/address" "^4.1.3" + "@sideway/formula" "^3.0.1" + "@sideway/pinpoint" "^2.0.0" + js-base64@^2.5.1: version "2.6.4" resolved "https://registry.yarnpkg.com/js-base64/-/js-base64-2.6.4.tgz#f4e686c5de1ea1f867dbcad3d46d969428df98c4" @@ -4709,7 +4788,7 @@ object-keys@^1.0.12, object-keys@^1.1.1: resolved "https://registry.yarnpkg.com/object-keys/-/object-keys-1.1.1.tgz#1c47f272df277f3b1daf061677d9c82e2322c60e" integrity sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA== -object-path@^0.11.4: +object-path@^0.11.8: version "0.11.8" resolved "https://registry.yarnpkg.com/object-path/-/object-path-0.11.8.tgz#ed002c02bbdd0070b78a27455e8ae01fc14d4742" integrity sha512-YJjNZrlXJFM42wTBn6zgOJVar9KFJvzx6sTWDte8sWZF//cnjl0BxHNpfZx+ZffXX63A9q0b1zsFiBX4g4X5KA== @@ -4967,10 +5046,10 @@ process@^0.10.0: resolved "https://registry.yarnpkg.com/process/-/process-0.10.1.tgz#842457cc51cfed72dc775afeeafb8c6034372725" integrity sha1-hCRXzFHP7XLcd1r+6vuMYDQ3JyU= -prom-client@^12.0.0: - version "12.0.0" - resolved "https://registry.yarnpkg.com/prom-client/-/prom-client-12.0.0.tgz#9689379b19bd3f6ab88a9866124db9da3d76c6ed" - integrity sha512-JbzzHnw0VDwCvoqf8y1WDtq4wSBAbthMB1pcVI/0lzdqHGJI3KBJDXle70XK+c7Iv93Gihqo0a5LlOn+g8+DrQ== +prom-client@^14.2.0: + version "14.2.0" + resolved "https://registry.yarnpkg.com/prom-client/-/prom-client-14.2.0.tgz#ca94504e64156f6506574c25fb1c34df7812cf11" + integrity sha512-sF308EhTenb/pDRPakm+WgiN+VdM/T1RaHj1x+MvAuT8UiQP8JmOEbxVqtkbfR4LrvOg5n7ic01kRBDGXjYikA== dependencies: tdigest "^0.1.1" @@ -5031,6 +5110,11 @@ ramda@^0.26.0, ramda@^0.26.1: resolved "https://registry.yarnpkg.com/ramda/-/ramda-0.26.1.tgz#8d41351eb8111c55353617fc3bbffad8e4d35d06" integrity sha512-hLWjpy7EnsDBb0p+Z3B7rPi3GDeRG5ZtiI33kJhTt+ORCd38AbAIjB/9zRIUoeTbE/AVX5ZkU7m6bznsvrf8eQ== +ramda@^0.29.0: + version "0.29.0" + resolved "https://registry.yarnpkg.com/ramda/-/ramda-0.29.0.tgz#fbbb67a740a754c8a4cbb41e2a6e0eb8507f55fb" + integrity sha512-BBea6L67bYLtdbOqfp8f58fPMqEwx0doL+pAi8TZyp2YWz8R9G8z9x75CZI8W+ftqhFHCpEX2cRnUUXK130iKA== + raw-body@^2.3.3: version "2.4.1" resolved "https://registry.yarnpkg.com/raw-body/-/raw-body-2.4.1.tgz#30ac82f98bb5ae8c152e67149dac8d55153b168c" @@ -5580,6 +5664,13 @@ sprintf-js@~1.0.2: resolved "https://registry.yarnpkg.com/sprintf-js/-/sprintf-js-1.0.3.tgz#04e6926f662895354f3dd015203633b857297e2c" integrity sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw= +ssf@~0.11.2: + version "0.11.2" + resolved "https://registry.yarnpkg.com/ssf/-/ssf-0.11.2.tgz#0b99698b237548d088fc43cdf2b70c1a7512c06c" + integrity sha512-+idbmIXoYET47hH+d7dfm2epdOMUDjqcB4648sTZ+t2JwoyBFL/insLfB/racrDmsKB3diwsDA696pZMieAC5g== + dependencies: + frac "~1.1.2" + sshpk@^1.7.0: version "1.16.1" resolved "https://registry.yarnpkg.com/sshpk/-/sshpk-1.16.1.tgz#fb661c0bef29b39db40769ee39fa70093d6f6877" @@ -5610,7 +5701,7 @@ static-extend@^0.1.1: define-property "^0.2.5" object-copy "^0.1.0" -"stats-lite@github:vtex/node-stats-lite#dist": +stats-lite@vtex/node-stats-lite#dist: version "2.2.0" resolved "https://codeload.github.com/vtex/node-stats-lite/tar.gz/1b0d39cc41ef7aaecfd541191f877887a2044797" dependencies: @@ -5986,6 +6077,11 @@ typescript@3.0.3: resolved "https://registry.yarnpkg.com/typescript/-/typescript-3.0.3.tgz#4853b3e275ecdaa27f78fda46dc273a7eb7fc1c8" integrity sha512-kk80vLW9iGtjMnIv11qyxLqZm20UklzuR2tL0QAnDIygIUIemcZMxlMWudl9OOt76H3ntVzcTiddQ1/pAAJMYg== +typescript@3.9.7: + version "3.9.7" + resolved "https://registry.yarnpkg.com/typescript/-/typescript-3.9.7.tgz#98d600a5ebdc38f40cb277522f12dc800e9e25fa" + integrity sha512-BLbiRkiBzAwsjut4x/dsibSTB6yWpwT5qWmC2OfuCg3GgVQCSgMs4vEctYPhsaGtd0AeuuHMkjZ2h2WG8MSzRw== + typescript@^3.3.3333: version "3.9.10" resolved "https://registry.yarnpkg.com/typescript/-/typescript-3.9.10.tgz#70f3910ac7a51ed6bef79da7800690b19bf778b8" @@ -6127,45 +6223,45 @@ verror@1.10.0: core-util-is "1.0.2" extsprintf "^1.2.0" -"vtex.catalog-graphql@http://vtex.vtexassets.com/_v/public/typings/v1/vtex.catalog-graphql@1.101.1/public/@types/vtex.catalog-graphql": - version "1.101.1" - resolved "http://vtex.vtexassets.com/_v/public/typings/v1/vtex.catalog-graphql@1.101.1/public/@types/vtex.catalog-graphql#8f4d8981c04429e94b30188acb9c6f1a6b912197" +"vtex.catalog-graphql@http://vtex.vtexassets.com/_v/public/typings/v1/vtex.catalog-graphql@1.102.3/public/@types/vtex.catalog-graphql": + version "1.102.3" + resolved "http://vtex.vtexassets.com/_v/public/typings/v1/vtex.catalog-graphql@1.102.3/public/@types/vtex.catalog-graphql#ce99343170d314d3231612357ef62e3356b50d81" "vtex.css-handles@http://vtex.vtexassets.com/_v/public/typings/v1/vtex.css-handles@0.4.4/public/@types/vtex.css-handles": version "0.4.4" resolved "http://vtex.vtexassets.com/_v/public/typings/v1/vtex.css-handles@0.4.4/public/@types/vtex.css-handles#8c45c6decf9acd2b944e07261686decff93d6422" -"vtex.easypost@http://vtex.vtexassets.com/_v/public/typings/v1/vtex.easypost@0.1.1/public/@types/vtex.easypost": - version "0.1.1" - resolved "http://vtex.vtexassets.com/_v/public/typings/v1/vtex.easypost@0.1.1/public/@types/vtex.easypost#078a135b63bb4fc5e39e6ad789d0caf9ea368f35" +"vtex.easypost@http://vtex.vtexassets.com/_v/public/typings/v1/vtex.easypost@0.2.0/public/@types/vtex.easypost": + version "0.2.0" + resolved "http://vtex.vtexassets.com/_v/public/typings/v1/vtex.easypost@0.2.0/public/@types/vtex.easypost#15fa1217e3a63a39787ac881b744e67d0b72f25d" "vtex.format-currency@http://vtex.vtexassets.com/_v/public/typings/v1/vtex.format-currency@0.4.1/public/@types/vtex.format-currency": version "0.4.1" resolved "http://vtex.vtexassets.com/_v/public/typings/v1/vtex.format-currency@0.4.1/public/@types/vtex.format-currency#aaed82b498270f0bb6f37e93eff7e7f401e4d283" -"vtex.my-account-commons@http://vtex.vtexassets.com/_v/public/typings/v1/vtex.my-account-commons@1.6.0/public/@types/vtex.my-account-commons": - version "1.6.0" - resolved "http://vtex.vtexassets.com/_v/public/typings/v1/vtex.my-account-commons@1.6.0/public/@types/vtex.my-account-commons#3715228fb82e81e955e6a90d11e7975e72b37b2e" +"vtex.my-account-commons@http://vtex.vtexassets.com/_v/public/typings/v1/vtex.my-account-commons@1.7.1/public/@types/vtex.my-account-commons": + version "1.7.1" + resolved "http://vtex.vtexassets.com/_v/public/typings/v1/vtex.my-account-commons@1.7.1/public/@types/vtex.my-account-commons#2ef5346cfcb342a528ac03b7e583d87d1f6b4745" -"vtex.my-account@http://vtex.vtexassets.com/_v/public/typings/v1/vtex.my-account@1.25.0/public/@types/vtex.my-account": - version "1.25.0" - resolved "http://vtex.vtexassets.com/_v/public/typings/v1/vtex.my-account@1.25.0/public/@types/vtex.my-account#3bc46389c0aa28f4e3e2e008fe3690f5901b1f2a" +"vtex.my-account@http://vtex.vtexassets.com/_v/public/typings/v1/vtex.my-account@1.27.0/public/@types/vtex.my-account": + version "1.27.0" + resolved "http://vtex.vtexassets.com/_v/public/typings/v1/vtex.my-account@1.27.0/public/@types/vtex.my-account#a0d6dc12364422b9e649aa1e4da4b2756453fdfe" -"vtex.render-runtime@http://vtex.vtexassets.com/_v/public/typings/v1/vtex.render-runtime@8.132.4/public/@types/vtex.render-runtime": - version "8.132.4" - resolved "http://vtex.vtexassets.com/_v/public/typings/v1/vtex.render-runtime@8.132.4/public/@types/vtex.render-runtime#66bb41bd4d342e37c9d85172aad5f7eefebfb6dc" +"vtex.render-runtime@http://vtex.vtexassets.com/_v/public/typings/v1/vtex.render-runtime@8.134.2/public/@types/vtex.render-runtime": + version "8.134.2" + resolved "http://vtex.vtexassets.com/_v/public/typings/v1/vtex.render-runtime@8.134.2/public/@types/vtex.render-runtime#ae69e2b2a471291c6c6b155e17510150fbfc2d0e" -"vtex.return-app@http://vtex.vtexassets.com/_v/public/typings/v1/vtex.return-app@3.5.0/public/@types/vtex.return-app": - version "3.5.0" - resolved "http://vtex.vtexassets.com/_v/public/typings/v1/vtex.return-app@3.5.0/public/@types/vtex.return-app#29e8ca8294b52af366586fcea7ae995870bc0271" +"vtex.return-app@https://jmartinez--obidev.myvtex.com/_v/private/typings/linked/v1/vtex.return-app@3.16.1-hkignore+build1696444869/public/@types/vtex.return-app": + version "3.16.1-hkignore" + resolved "https://jmartinez--obidev.myvtex.com/_v/private/typings/linked/v1/vtex.return-app@3.16.1-hkignore+build1696444869/public/@types/vtex.return-app#67cd7f2fdd194d71c8e37b8a28377628c1877e2e" -"vtex.store-graphql@http://vtex.vtexassets.com/_v/public/typings/v1/vtex.store-graphql@2.155.32/public/@types/vtex.store-graphql": - version "2.155.32" - resolved "http://vtex.vtexassets.com/_v/public/typings/v1/vtex.store-graphql@2.155.32/public/@types/vtex.store-graphql#abafbe1d80f453bbebc70024a829e4226bf6cc20" +"vtex.sellers-graphql@http://vtex.vtexassets.com/_v/public/typings/v1/vtex.sellers-graphql@8.5.4/public/@types/vtex.sellers-graphql": + version "8.5.4" + resolved "http://vtex.vtexassets.com/_v/public/typings/v1/vtex.sellers-graphql@8.5.4/public/@types/vtex.sellers-graphql#abb5f85a55bd7e7f810e297c4716d9fb1c6cb6f9" -"vtex.styleguide@http://vtex.vtexassets.com/_v/public/typings/v1/vtex.styleguide@9.146.1/public/@types/vtex.styleguide": - version "9.146.1" - resolved "http://vtex.vtexassets.com/_v/public/typings/v1/vtex.styleguide@9.146.1/public/@types/vtex.styleguide#66db40ca1b78ad77ce4beedabecee320e1ef2ead" +"vtex.styleguide@http://vtex.vtexassets.com/_v/public/typings/v1/vtex.styleguide@9.146.9/public/@types/vtex.styleguide": + version "9.146.9" + resolved "http://vtex.vtexassets.com/_v/public/typings/v1/vtex.styleguide@9.146.9/public/@types/vtex.styleguide#d1601fedfb665c6173334753171717da64e670bc" "vtex.tenant-graphql@http://vtex.vtexassets.com/_v/public/typings/v1/vtex.tenant-graphql@0.1.2/public/@types/vtex.tenant-graphql": version "0.1.2" @@ -6248,11 +6344,21 @@ which@^1.2.9, which@^1.3.0: dependencies: isexe "^2.0.0" +wmf@~1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/wmf/-/wmf-1.0.2.tgz#7d19d621071a08c2bdc6b7e688a9c435298cc2da" + integrity sha512-/p9K7bEh0Dj6WbXg4JG0xvLQmIadrner1bi45VMJTfnbVHsc7yIajZyoSoK60/dtVBs12Fm6WkUI5/3WAVsNMw== + word-wrap@~1.2.3: version "1.2.3" resolved "https://registry.yarnpkg.com/word-wrap/-/word-wrap-1.2.3.tgz#610636f6b1f703891bd34771ccb17fb93b47079c" integrity sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ== +word@~0.3.0: + version "0.3.0" + resolved "https://registry.yarnpkg.com/word/-/word-0.3.0.tgz#8542157e4f8e849f4a363a288992d47612db9961" + integrity sha512-OELeY0Q61OXpdUfTp+oweA/vtLVg5VDOXh+3he3PNzLGG/y0oylSOC1xRVj0+l4vQ3tj/bB1HVHv1ocXkQceFA== + wrap-ansi@^5.1.0: version "5.1.0" resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-5.1.0.tgz#1fd1f67235d5b6d0fee781056001bfb694c03b09" @@ -6283,6 +6389,19 @@ ws@^5.2.0: dependencies: async-limiter "~1.0.0" +xlsx@*, xlsx@^0.18.5: + version "0.18.5" + resolved "https://registry.yarnpkg.com/xlsx/-/xlsx-0.18.5.tgz#16711b9113c848076b8a177022799ad356eba7d0" + integrity sha512-dmg3LCjBPHZnQp5/F/+nnTa+miPJxUXB6vtk42YjBBKayDNagxGEeIdWApkYPOf3Z3pm3k62Knjzp7lMeTEtFQ== + dependencies: + adler-32 "~1.3.0" + cfb "~1.2.1" + codepage "~1.15.0" + crc-32 "~1.2.1" + ssf "~0.11.2" + wmf "~1.0.1" + word "~0.3.0" + xml-name-validator@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/xml-name-validator/-/xml-name-validator-3.0.0.tgz#6ae73e06de4d8c6e47f9fb181f78d648ad457c6a" diff --git a/package.json b/package.json index b15d7d29e..1e2501585 100644 --- a/package.json +++ b/package.json @@ -36,4 +36,4 @@ "@typescript-eslint/parser": "^4.14.1", "axios": "^0.20.0" } -} +} \ No newline at end of file diff --git a/react/.DS_Store b/react/.DS_Store new file mode 100644 index 000000000..2e6caadb1 Binary files /dev/null and b/react/.DS_Store differ diff --git a/react/AdminReturnAdd.tsx b/react/AdminReturnAdd.tsx new file mode 100644 index 000000000..582f65315 --- /dev/null +++ b/react/AdminReturnAdd.tsx @@ -0,0 +1,4 @@ +import { AdminReturnAdd } from './admin/AdminReturnAdd' +import './styles.global.css' + +export default AdminReturnAdd diff --git a/react/AdminReturnOrderList.tsx b/react/AdminReturnOrderList.tsx new file mode 100644 index 000000000..6ec24c488 --- /dev/null +++ b/react/AdminReturnOrderList.tsx @@ -0,0 +1,4 @@ +import { AdminOrderList } from './admin/AdminReturnOrderList' +import './styles.global.css' + +export default AdminOrderList diff --git a/react/AdminSettingDetail.tsx b/react/AdminSettingDetail.tsx new file mode 100644 index 000000000..6178c96a4 --- /dev/null +++ b/react/AdminSettingDetail.tsx @@ -0,0 +1,4 @@ +import { AdminSettingDetail } from './admin/AdminSettingDetail' +import './styles.global.css' + +export default AdminSettingDetail diff --git a/react/AdminSettingReturnList.tsx b/react/AdminSettingReturnList.tsx new file mode 100644 index 000000000..bc2709813 --- /dev/null +++ b/react/AdminSettingReturnList.tsx @@ -0,0 +1,3 @@ +import AdminSettingReturnList from './admin/AdminSettingReturnList' + +export default AdminSettingReturnList diff --git a/react/admin/AdminLoader.tsx b/react/admin/AdminLoader.tsx index bf388b6c9..d9d0be1ef 100644 --- a/react/admin/AdminLoader.tsx +++ b/react/admin/AdminLoader.tsx @@ -29,7 +29,11 @@ export const AdminLoader: FC = ({ } if (loading || !data) { - return + return ( + + + + ) } return <>{children} diff --git a/react/admin/AdminReturnAdd.tsx b/react/admin/AdminReturnAdd.tsx new file mode 100644 index 000000000..0b32e32f9 --- /dev/null +++ b/react/admin/AdminReturnAdd.tsx @@ -0,0 +1,24 @@ +import React from 'react' +import type { RouteComponentProps } from 'react-router' + +import { AlertProvider } from './provider/AlertProvider' +// import { ReturnAddContainer } from './ReturnAdd/ReturnAddContainer' +import { StoreSettingsPovider } from '../store/provider/StoreSettingsProvider' +import { OrderToReturnProvider } from '../store/provider/OrderToReturnProvider' +import { CreateReturnRequest } from '../store/createReturnRequest/CreateReturnRequest' + +type RouteProps = RouteComponentProps<{ orderId: string }> + +export const AdminReturnAdd = (props: RouteProps) => { + return ( + + {/* */} + + + + + + {/* */} + + ) +} diff --git a/react/admin/AdminReturnOrderList.tsx b/react/admin/AdminReturnOrderList.tsx new file mode 100644 index 000000000..b2cf610e5 --- /dev/null +++ b/react/admin/AdminReturnOrderList.tsx @@ -0,0 +1,28 @@ +import React from 'react' + +import { AlertProvider } from './provider/AlertProvider' +import { OrderListContainer } from './OrderList/OrderListContainer' + +// import { ReturnDetailsContainer } from './ReturnDetails/ReturnDetailsContainer' +// import { ReturnDetailsProvider } from '../common/provider/ReturnDetailsProvider' +// import { UpdateRequestStatusProvider } from './provider/UpdateRequestStatusProvider' + +// interface CustomRouteProps { +// params: { +// id: string +// } +// } + +export const AdminOrderList = () => { + // export const AdminReturnAdd = ({ params }: CustomRouteProps) => { + return ( + + + {/* + + + + */} + + ) +} diff --git a/react/admin/AdminSettingDetail.tsx b/react/admin/AdminSettingDetail.tsx new file mode 100644 index 000000000..d3a8a8354 --- /dev/null +++ b/react/admin/AdminSettingDetail.tsx @@ -0,0 +1,21 @@ +import React from 'react' + +import { AlertProvider } from './provider/AlertProvider' +import { SettingsProvider } from './settings/provider/SettingsProvider' +import { SettingDetailsContainer } from './settings/SettingDetails/SettingDetailsContainer' + +interface CustomRouteProps { + params: { + id: string + } +} + +export const AdminSettingDetail = ({ params }: CustomRouteProps) => { + return ( + + + + + + ) +} diff --git a/react/admin/AdminSettingReturnList.tsx b/react/admin/AdminSettingReturnList.tsx new file mode 100644 index 000000000..232d2aae0 --- /dev/null +++ b/react/admin/AdminSettingReturnList.tsx @@ -0,0 +1,3 @@ +import { AdminSettingReturnList } from './ReturnSettingsList/ReturnSettingsListContainer' + +export default AdminSettingReturnList diff --git a/react/admin/OrderList/OrderListContainer.tsx b/react/admin/OrderList/OrderListContainer.tsx new file mode 100644 index 000000000..8c2f526a3 --- /dev/null +++ b/react/admin/OrderList/OrderListContainer.tsx @@ -0,0 +1,123 @@ +import React, { useState, useEffect } from 'react' +import { useQuery } from 'react-apollo' +import { FormattedMessage } from 'react-intl' +import { Layout, PageHeader, PageBlock } from 'vtex.styleguide' +import { useRuntime } from 'vtex.render-runtime' + +import type { + OrdersToReturnList, + QueryOrdersAvailableToReturnArgs, +} from '../../../typings/OrderToReturn' +import ORDERS_AVAILABLE_TO_RETURN from '../../store/createReturnRequest/graphql/getOrdersAvailableToReturn.gql' +import { OrderList } from '../../common/components/ordersList/ListTable' +import { AdminLoader } from '../AdminLoader' + +export const OrderListContainer = () => { + const [ordersToReturn, setOrdersToReturn] = useState([]) + const [currentPage, setCurrentPage] = useState(1) + const { navigate } = useRuntime() + + const { data, loading, error, fetchMore, refetch } = useQuery< + { ordersAvailableToReturn: OrdersToReturnList }, + QueryOrdersAvailableToReturnArgs + >(ORDERS_AVAILABLE_TO_RETURN, { + variables: { + page: 1, + isAdmin: true, + }, + fetchPolicy: 'no-cache', + }) + + useEffect(() => { + if (data) { + setOrdersToReturn([data.ordersAvailableToReturn]) + } + }, [data]) + + const handlePagination = async ( + page: number, + operation: 'next' | 'previous' + ): Promise => { + const alreadyFetched = ordersToReturn.find((ordersItem) => { + return ordersItem?.paging?.currentPage === page + }) + + if (!alreadyFetched) { + await fetchMore({ + variables: { + page, + }, + updateQuery: (prevResult, { fetchMoreResult }) => { + if (!fetchMoreResult) return prevResult + + setOrdersToReturn((prevState) => [ + ...prevState, + fetchMoreResult.ordersAvailableToReturn, + ]) + + setCurrentPage( + Number(fetchMoreResult.ordersAvailableToReturn?.paging?.currentPage) + ) + + return prevResult + }, + }) + + return + } + + operation === 'next' && setCurrentPage(page) + operation === 'previous' && setCurrentPage(page) + } + + return ( + + } + subtitle={ + + } + linkLabel={ + + } + onLinkClick={() => { + navigate({ + to: '/admin/app/returns/requests', + }) + }} + /> + } + > + + <> + {loading || error || !ordersToReturn.length ? ( + + ), + errorDescription: ( + + ), + }} + /> + ) : ( + + )} + + + + ) +} diff --git a/react/admin/ReturnAdd/ReturnAddContainer.tsx b/react/admin/ReturnAdd/ReturnAddContainer.tsx new file mode 100644 index 000000000..03e2a2612 --- /dev/null +++ b/react/admin/ReturnAdd/ReturnAddContainer.tsx @@ -0,0 +1,25 @@ +import React from 'react' +import { Layout, PageHeader, PageBlock } from 'vtex.styleguide' +import { FormattedMessage } from 'react-intl' + +export const ReturnAddContainer = ({ children }) => { + return ( + + } + subtitle={ + + } + /> + } + > + + {children} + + + ) +} diff --git a/react/admin/ReturnDetails/ReturnDetailsContainer.tsx b/react/admin/ReturnDetails/ReturnDetailsContainer.tsx index 3e8778d43..f0b7a1c60 100644 --- a/react/admin/ReturnDetails/ReturnDetailsContainer.tsx +++ b/react/admin/ReturnDetails/ReturnDetailsContainer.tsx @@ -17,16 +17,19 @@ import { StatusHistory } from '../../common/components/ReturnDetails/StatusHisto import { OrderLink } from '../../common/components/ReturnDetails/OrderLink' import { CurrentRequestStatus } from '../../common/components/ReturnDetails/CurrentRequestStatus' import RequestCancellation from '../../common/components/ReturnDetails/RequestCancellation' +import ApproveRequest from '../../common/components/ReturnDetails/ApproveRequest' type Pages = 'return-details' | 'verify-items' export const ReturnDetailsContainer = () => { const [detailsPage, setDetailsPage] = useState('return-details') + const [showButtons, setShowButtons] = useState(true) const returnDetails = useReturnDetails() const { navigate } = useRuntime() const handleViewVerifyItems = (page: Pages) => { + setShowButtons(page === 'return-details') setDetailsPage(page) } @@ -47,7 +50,16 @@ export const ReturnDetailsContainer = () => { }) }} > - + {showButtons ? ( +
      +
      + +
      + handleViewVerifyItems('verify-items')} + /> +
      + ) : null} } > diff --git a/react/admin/ReturnDetails/components/UpdateRequestStatus.tsx b/react/admin/ReturnDetails/components/UpdateRequestStatus.tsx index b45e652d7..30914351e 100644 --- a/react/admin/ReturnDetails/components/UpdateRequestStatus.tsx +++ b/react/admin/ReturnDetails/components/UpdateRequestStatus.tsx @@ -1,45 +1,20 @@ import type { FormEvent, ChangeEvent } from 'react' import React, { useState } from 'react' -import type { IntlFormatters } from 'react-intl' -import { FormattedMessage, useIntl } from 'react-intl' -import { - Dropdown, - Textarea, - Checkbox, - Button, - Tooltip, - IconInfo, -} from 'vtex.styleguide' -import type { Status } from 'vtex.return-app' +import { FormattedMessage } from 'react-intl' +import { Textarea, Checkbox, Button, Tooltip, IconInfo } from 'vtex.styleguide' +import type { Status } from '../../../../typings/ReturnRequest' import { useReturnDetails } from '../../../common/hooks/useReturnDetails' -import { - statusAllowed, - statusMessageIdAdmin, -} from '../../../utils/requestStatus' import { useUpdateRequestStatus } from '../../hooks/useUpdateRequestStatus' -const createStatusOptions = ( - currentStatus: Status, - formatMessage: IntlFormatters['formatMessage'] -): Array<{ value: string; label: string }> => { - const allowedStatus = statusAllowed[currentStatus] - - return allowedStatus.map((status) => ({ - value: status, - label: formatMessage(statusMessageIdAdmin[status]), - })) -} - interface Props { onViewVerifyItems: () => void } -export const UpdateRequestStatus = ({ onViewVerifyItems }: Props) => { - const [selectedStatus, setSelectedStatus] = useState('') +export const UpdateRequestStatus = (_: Props) => { + const [selectedStatus] = useState('') const [comment, setComment] = useState('') const [visibleForCustomer, setVisibleForCustomer] = useState(false) - const { formatMessage } = useIntl() const { data } = useReturnDetails() const { submitting, handleStatusUpdate } = useUpdateRequestStatus() @@ -50,7 +25,7 @@ export const UpdateRequestStatus = ({ onViewVerifyItems }: Props) => { const handleSubmit = async (event: FormEvent) => { event.preventDefault() - if (submitting || selectedStatus === '' || !data?.returnRequestDetails) { + if (submitting || !data?.returnRequestDetails) { return } @@ -63,18 +38,12 @@ export const UpdateRequestStatus = ({ onViewVerifyItems }: Props) => { handleStatusUpdate({ id: data.returnRequestDetails?.id, - status: selectedStatus, + status: data.returnRequestDetails?.status, comment: newComment, cleanUp, }) } - const handleStatusChange = (event: ChangeEvent) => { - const { value } = event.target - - setSelectedStatus(value as Status) - } - const handleCommentsChange = (event: ChangeEvent) => { const { value } = event.target @@ -114,22 +83,6 @@ export const UpdateRequestStatus = ({ onViewVerifyItems }: Props) => { className="flex flex-column items-stretch w-50" onSubmit={handleSubmit} > -
      - - {(placeholder) => ( - - )} - -