From 1837e2366ba18fc8fc208e3c0511cc95221443eb Mon Sep 17 00:00:00 2001 From: lucasgbezerra Date: Wed, 21 Jun 2023 05:05:13 -0300 Subject: [PATCH 1/2] #137 FIX: Corrige data e cor da tabela de OS --- src/constants/orderservice.ts | 2 +- src/pages/order-service/OrderServiceControl.tsx | 13 +++++++------ 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/src/constants/orderservice.ts b/src/constants/orderservice.ts index 905c93c0..09277db8 100644 --- a/src/constants/orderservice.ts +++ b/src/constants/orderservice.ts @@ -16,7 +16,7 @@ export const OSStatusStyleMap = new Map< ], [ 'CONCLUDED', - { color: colors.green[100], fontWeight: 'bold', fontSize: '16px' }, + { color: colors.green[700], fontWeight: 'bold', fontSize: '16px' }, ], ['WARRANTY', { color: colors.red, fontWeight: 'bold', fontSize: '16px' }], ]); diff --git a/src/pages/order-service/OrderServiceControl.tsx b/src/pages/order-service/OrderServiceControl.tsx index 3d89e84c..b1ab2452 100644 --- a/src/pages/order-service/OrderServiceControl.tsx +++ b/src/pages/order-service/OrderServiceControl.tsx @@ -55,15 +55,15 @@ export interface Equipment { export interface OrderServiceData { id: string; - date: Date; + date: string; description?: string; authorId: string; receiverName: string; sender?: string; equipmentSnapshot: any; senderFunctionalNumber: string; - createdAt: Date; - updatedAt: Date; + createdAt: string; + updatedAt: string; equipment: Equipment; history: History; receiverFunctionalNumber: string; @@ -201,6 +201,7 @@ function OrderServiceTable() { offset + limit }&${filter}` ); + console.log(data); setNextOrderServices(data); } catch (error) { setNextOrderServices([]); @@ -391,9 +392,9 @@ function OrderServiceTable() { - {new Date(orderService.date).toLocaleDateString( - 'pt-BR' - )} + {new Date( + orderService.createdAt + ).toLocaleDateString('pt-BR', { timeZone: 'UTC' })} Date: Wed, 21 Jun 2023 13:01:27 -0300 Subject: [PATCH 2/2] #137 FIX: Remove console.log --- src/pages/order-service/OrderServiceControl.tsx | 1 - 1 file changed, 1 deletion(-) diff --git a/src/pages/order-service/OrderServiceControl.tsx b/src/pages/order-service/OrderServiceControl.tsx index b1ab2452..37aa9989 100644 --- a/src/pages/order-service/OrderServiceControl.tsx +++ b/src/pages/order-service/OrderServiceControl.tsx @@ -201,7 +201,6 @@ function OrderServiceTable() { offset + limit }&${filter}` ); - console.log(data); setNextOrderServices(data); } catch (error) { setNextOrderServices([]);