put in ignore file

This commit is contained in:
2025-08-10 22:01:36 +10:00
parent c2bf5cad70
commit ba79e8f1c4
151 changed files with 21703 additions and 0 deletions
+47
View File
@@ -0,0 +1,47 @@
<div class="flex-row w-full h-full">
<p-table #dt2 [value]="familyList()" sortMode="multiple" styleClass="p-datatable-sm"
styleClass="p-datatable-sm" responsiveLayout="stack" paginatorDropdownAppendTo="body"
dataKey="id" selectionMode="single" [(selection)]="selectedPerson"
[paginator]="true" [globalFilterFields]="['lastName', 'firstName', 'sex']"
[rows]="10" [rowsPerPageOptions]="[5,10, 20,50]"
[loading]="loading">
<ng-template #caption>
<div class="flex">
<p-iconfield iconPosition="left" class="ml-auto">
<p-inputicon>
<i class="pi pi-search"></i>
</p-inputicon>
<input pInputText type="text" (input)="handleInput($event)" placeholder="Search keyword" />
</p-iconfield>
</div>
</ng-template>
<ng-template pTemplate="header">
<tr>
<th pSortableColumn="lastName">Last Name <p-sortIcon field="lastName"></p-sortIcon>
</th>
<th pSortableColumn="firstName">First Name <p-sortIcon field="firstName"></p-sortIcon>
</th>
<th pSortableColumn="sex">Sex<p-sortIcon field="sex"></p-sortIcon>
</th>
<th></th>
</tr>
</ng-template>
<ng-template pTemplate="body" let-user>
<tr [pSelectableRow]="user">
<td>{{user.lastName}}</td>
<td>{{user.firstName}}</td>
<td>{{user.sex}}</td>
<td></td>
</tr>
</ng-template>
</p-table>
<div class="flex justify-end mr-2 mb-2 p-2">
<button pButton type="submit" class="p-button-sm mr-2"
icon="pi pi-check" iconPos="left" label="Select"
(click)="select($event)" [disabled]="selectedPerson == null" ></button>
<button pButton pRipple class="p-button-sm" type="button"
icon="pi pi-times" iconPos="left"
label="Cancel" (click)="cancel($event)"></button>
</div>
</div>
+53
View File
@@ -0,0 +1,53 @@
import { CommonModule } from '@angular/common';
import { Component, OnDestroy, OnInit, signal, ViewChild } from '@angular/core';
import { FormsModule } from '@angular/forms';
import { Table, TableModule } from 'primeng/table';
import { Person } from '../models';
import { IconFieldModule } from 'primeng/iconfield';
import { InputIconModule } from 'primeng/inputicon';
import { DynamicDialogConfig, DynamicDialogRef } from 'primeng/dynamicdialog';
import { ButtonModule } from 'primeng/button';
import { InputTextModule } from 'primeng/inputtext';
@Component({
selector: 'app-pickperson',
imports: [TableModule, ButtonModule,CommonModule, InputTextModule, FormsModule,IconFieldModule,InputIconModule],
templateUrl: './pickperson.html',
styleUrl: './pickperson.css'
})
export class Pickperson implements OnInit, OnDestroy{
@ViewChild(Table) dt2!: Table;
constructor(public ref: DynamicDialogRef, public config: DynamicDialogConfig)
{
}
loading = false;
familyList = signal<Person[]>([]);
selectedPerson!: Person;
handleInput(event: Event) {
const value = (event.target as HTMLInputElement).value;
this.dt2.filterGlobal(value, 'contains');
}
edit(id: number): void {
}
cancel(e:Event):void {
e.preventDefault();
this.ref.close(null);
}
select(e:Event):void {
e.preventDefault();
this.ref.close(this.selectedPerson);
}
ngOnDestroy(): void {
}
ngOnInit(): void {
console.log("pick person the familyList", this.config);
this.familyList.set(this.config.data.familyList);
}
}