-
Notifications
You must be signed in to change notification settings - Fork 26
Fix/attachments duplicated #805
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
…eport - prevent using the same ids
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
| 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
the enclosing function
| } 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
the enclosing function
| removeMutationByScopeId(queryClient, MUTATION_SCOPE_DO_NOT_HYDRATE); | ||
| setAttachments((attachments) => | ||
| attachments.map((attachment) => | ||
| attachment.uploaded ? attachment : { ...attachment, id: Crypto.randomUUID() }, |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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 }> |
There was a problem hiding this comment.
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.", |
There was a problem hiding this comment.
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) |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
d
…rong texts on medialoading
No description provided.