Fix date parsing in ContrattoImport and update last message time in getActiveInfos
This commit is contained in:
parent
a93be4d547
commit
61b1478cf3
2 changed files with 7 additions and 3 deletions
|
|
@ -196,8 +196,12 @@ const ContrattoImport = ({
|
|||
const { data } = useServizioAnnuncio();
|
||||
const [contratto, setContratto] = useState<ContrattoImportObj | undefined>({
|
||||
gestionale_id: data.gestionale_id,
|
||||
contratto_decorrenza: data.contratto_decorrenza,
|
||||
contratto_scadenza: data.contratto_scadenza,
|
||||
contratto_decorrenza: data.contratto_decorrenza
|
||||
? new Date(data.contratto_decorrenza)
|
||||
: null,
|
||||
contratto_scadenza: data.contratto_scadenza
|
||||
? new Date(data.contratto_scadenza)
|
||||
: null,
|
||||
contratto_tipo: data.contratto_tipo as ContrattoImportObj["contratto_tipo"],
|
||||
});
|
||||
const handleSave = () => {
|
||||
|
|
|
|||
|
|
@ -79,7 +79,7 @@ export const getActiveInfos = async ({
|
|||
lastmessage: chat.lastMessage
|
||||
? {
|
||||
message: chat.lastMessage.message,
|
||||
time: chat.lastMessage.time,
|
||||
time: new Date(chat.lastMessage.time),
|
||||
isLastSender: chat.lastMessage.sender === userId,
|
||||
}
|
||||
: null,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue