Skip to content

Conversation

@dragos1195
Copy link
Collaborator

No description provided.

@dragos1195 dragos1195 added the bug Something isn't working label Nov 1, 2024
@dragos1195 dragos1195 self-assigned this Nov 1, 2024
@vercel
Copy link

vercel bot commented Nov 1, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
votemonitor ✅ Ready (Inspect) Visit Preview 💬 Add feedback Nov 6, 2024 1:59pm

if (file.type === "image") {
resultCompression = await Image.compress(file.uri);
} else if (file.type === "video") {
Video.activateBackgroundTask()

Check notice

Code scanning / CodeQL

Semicolon insertion Note

Avoid automated semicolon insertion (90% of all statements in
the enclosing function
have an explicit semicolon).
} else if (file.type === "video") {
Video.activateBackgroundTask()
resultCompression = await Video.compress(file.uri, { progressDivider: 10, }, onCompressionProgressCallback);
Video.deactivateBackgroundTask()

Check notice

Code scanning / CodeQL

Semicolon insertion Note

Avoid automated semicolon insertion (90% of all statements in
the enclosing function
have an explicit semicolon).
removeMutationByScopeId(queryClient, MUTATION_SCOPE_DO_NOT_HYDRATE);
setAttachments((attachments) =>
attachments.map((attachment) =>
attachment.uploaded ? attachment : { ...attachment, id: Crypto.randomUUID() },
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Facem asta ca sa nu mai ruleze init pe acelasi id?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Facem asta ca sa reinitializam id-urile in caz ca nu sunt completed upload-urile + pe cele uploaded sa le putem asocia corect la call-ul de trimitere a raportului.

const [uuid] = useState(Crypto.randomUUID());

const [attachments, setAttachments] = useState<
Array<{ fileMetadata: FileMetadata; id: string; uploaded: boolean }>
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

{ fileMetadata: FileMetadata; id: string; uploaded: boolean }

Export type

"completed": "Yükləmə tamamlandı.",
"aborted": "Yükləmə dayandırıldı.",
"offline": "Bu əməliyyatı yerinə yetirmək üçün sizə internet bağlantısı lazımdır."
"offline": "Bu əməliyyatı yerinə yetirmək üçün sizə internet bağlantısı lazımdır.",
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Traducerile pentru "abort_offline, abort_offline_button, uploaded, abort_offline_confirm, abort_offline_cancel" sunt validate cu ei?

};

const data = await addAttachmentCitizen(payload);
console.log('nr of parts', payload.numberOfUploadParts)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove log

isUploading={isUploading}
uploadedAttachments={Object.entries(attachments).map(([, attachments]) => attachments.filter((a) => a.uploaded)).flat().length}
onAbortUpload={onAbortUpload}
confirmAbort
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Avem cazuri in care nu afisam abort confirmation? Gen pe questionId or something?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Doar pe Citizen Report, unde se trimite raportul inainte si abortul ar insemna scoaterea din pagina. Pe celelalte flow-uri ai cum sa dai "retry" sau sa incepi iar incarcarea, pentru ca raportul sau raspunsul la intrebare nu se trimite inaintea atasamentelor. Pe Citizen Report se trimite raportul si abia dupa atasamentele.

Copy link
Collaborator

@radulescuandrew radulescuandrew left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

d

@dragos1195 dragos1195 merged commit e8c113e into mobile Nov 7, 2024
4 checks passed
@dragos1195 dragos1195 deleted the fix/attachments-duplicated branch November 7, 2024 11:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants