psi_mmobile

Untitled

Oct 24th, 2025
151
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.39 KB | None | 0 0
  1.  
  2. if (!this.personsPresenceService.readOnly && this.personsPresence.selectedPerson) {
  3. const file = event[0];
  4. if (
  5. file.type === 'image/jpeg' ||
  6. file.type === 'image/png' ||
  7. file.type === 'image/bmp' ||
  8. file.type === 'image/jpg'
  9. ) {
  10. const document = {
  11. data: {
  12. name: file.name,
  13. document_type_id: 1007,
  14. traxxeo_ai_verified: 'N',
  15. lm_name: this.userDataService.username,
  16. validated: false,
  17. validation_date: null,
  18. validation_gui_user_id: null,
  19. validation_person: null,
  20. person_id: this.personsPresence.selectedPerson.person_id,
  21. file
  22. }
  23. };
  24.  
  25. this.personsPresenceService
  26. .addAttachDoc(document, this.personsPresence.selectedPerson.person_id)
  27. .pipe(
  28. concatMap((returnedFileId: any) => {
  29. this.personsPresence.selectedPerson.id_image_path = returnedFileId.attach_doc_id;
  30. let fuckingAss = this.personsPresenceService.getPersonImageAttachDoc(returnedFileId.attach_doc_id);
  31. return fuckingAss;
  32. })
  33. )
  34. .subscribe((returnedFile) => {
  35. this.personsPresence.imgSrc = returnedFile;
  36. });
  37. }
  38. }
  39. }
Advertisement
Add Comment
Please, Sign In to add comment