put in tooltip for personphoto

This commit is contained in:
2025-10-27 18:10:47 +11:00
parent f5d210d854
commit 322a23b528
3 changed files with 12 additions and 5 deletions
+5 -2
View File
@@ -27,11 +27,14 @@
<td >{{item.photo}}</td>
<td>
<button pButton type="button" icon="pi pi-times" class="p-button-rounded text-red-500 p-button-text p-button-raised mr-2"
<button pButton type="button" icon="pi pi-times"
pTooltip="Delete" class="p-button-rounded text-red-500 p-button-text p-button-raised mr-2"
(click)="remove(item.id)"></button>
@if (item.id > 0) {
<button pButton type="button" icon="pi pi-file" class="p-button-rounded p-button-text p-button-raised"
<button pButton type="button" icon="pi pi-file"
pTooltip="Download Photo"
class="p-button-rounded p-button-text p-button-raised"
(click)="downloadAttachment(item.id)"></button>
}
</td>
+3 -2
View File
@@ -5,19 +5,20 @@ import { CommonUtilities, HttpUtility, LookupService } from '../shares';
import { DialogService ,DynamicDialogConfig,DynamicDialogModule, DynamicDialogRef} from 'primeng/dynamicdialog';
import { ConfirmationService, MessageService } from 'primeng/api';
import { AddPhoto } from './add.photo';
import { LookupEdit, PersonPhotoDto } from '../models';
import { PersonPhotoDto } from '../models';
import { CommonModule } from '@angular/common';
import { FormsModule } from '@angular/forms';
import { TableModule } from 'primeng/table';
import { ButtonModule } from 'primeng/button';
import { TooltipModule } from 'primeng/tooltip';
import { AuthenticationService } from '../user-services';
import { HttpResponse } from '@angular/common/http';
import { PersonService } from '../person';
@Component({
selector: 'photo-list',
imports: [CommonModule, FormsModule, DynamicDialogModule,
imports: [CommonModule, FormsModule, DynamicDialogModule,TooltipModule,
ButtonModule, TableModule],
templateUrl: './photolist.html',
styleUrls: ['./photolist.css'],
+4 -1
View File
@@ -656,7 +656,10 @@ showAttachment(title:string): void {
const deleteIds = ritem.deleteIds;
if (item) {
console.log("after close " + title, item);
this.messageService.add({severity:'success', summary: title, detail: "photo attachment " + item.length});
if (item.length > 0)
{
this.messageService.add({severity:'success', summary: title, detail: "photo attachment " + item.length});
}
//update the current list
// callback(item);
this.updatePhotoList(item);