update to angular 21
This commit is contained in:
@@ -1,35 +1,11 @@
|
||||
import { ApplicationConfig, provideAppInitializer, provideBrowserGlobalErrorListeners, provideZonelessChangeDetection } from '@angular/core';
|
||||
import { provideRouter, withComponentInputBinding } from '@angular/router';
|
||||
import { JwtInterceptor, ErrorInterceptor, initializeApp } from './shares';
|
||||
import { provideAnimationsAsync } from '@angular/platform-browser/animations/async';
|
||||
import { providePrimeNG } from 'primeng/config';
|
||||
import { provideHttpClient, withInterceptors } from '@angular/common/http';
|
||||
import { ConfirmationService, MessageService } from 'primeng/api';
|
||||
import { ApplicationConfig, provideBrowserGlobalErrorListeners } from '@angular/core';
|
||||
import { provideRouter } from '@angular/router';
|
||||
|
||||
import { routes } from './app.routes';
|
||||
import MyPreset from './mythem';
|
||||
|
||||
export const appConfig: ApplicationConfig = {
|
||||
providers: [
|
||||
provideBrowserGlobalErrorListeners(),
|
||||
MessageService, ConfirmationService,
|
||||
provideAppInitializer(initializeApp()),
|
||||
provideHttpClient(withInterceptors([JwtInterceptor, ErrorInterceptor])),
|
||||
provideZonelessChangeDetection(),
|
||||
provideAnimationsAsync(),
|
||||
providePrimeNG({
|
||||
theme: {
|
||||
preset: MyPreset,
|
||||
options: {
|
||||
cssLayer: {
|
||||
name: 'primeng',
|
||||
order: 'theme, base, primeng'
|
||||
}
|
||||
}
|
||||
}
|
||||
}),
|
||||
provideRouter(routes, withComponentInputBinding())
|
||||
provideRouter(routes)
|
||||
]
|
||||
};
|
||||
/*
|
||||
ng build --base-href "/familytreeui/" -c production
|
||||
*/
|
||||
@@ -1,3 +1,4 @@
|
||||
|
||||
import { Component, signal } from '@angular/core';
|
||||
import { RouterOutlet } from '@angular/router';
|
||||
import { ToolbarComponent } from './toolbar/toolbar.component';
|
||||
|
||||
@@ -1,71 +0,0 @@
|
||||
|
||||
|
||||
//mypreset.ts
|
||||
import { definePreset } from '@primeuix/themes';
|
||||
import Aura from '@primeuix/themes/aura';
|
||||
import { primitive } from '@primeuix/themes/aura/base';
|
||||
|
||||
const MyPreset = definePreset(Aura, {
|
||||
semantic: {
|
||||
colorScheme: {
|
||||
primitive: {
|
||||
cyan: {
|
||||
50: '{cyan.50}',
|
||||
100: '{cyan.100}',
|
||||
200: '{cyan.200}',
|
||||
300: '{cyan.300}',
|
||||
400: '{cyan.400}',
|
||||
500: '{cyan.500}',
|
||||
}
|
||||
|
||||
},
|
||||
primary: {
|
||||
50: '{zinc.50}',
|
||||
100: '{zinc.100}',
|
||||
200: '{zinc.200}',
|
||||
300: '{zinc.300}',
|
||||
400: '{zinc.400}',
|
||||
500: '{zinc.500}',
|
||||
600: '{zinc.600}',
|
||||
700: '{zinc.700}',
|
||||
800: '{zinc.800}',
|
||||
900: '{zinc.900}',
|
||||
950: '{zinc.950}'
|
||||
},
|
||||
light: {
|
||||
surface: {
|
||||
0: '#ffffff',
|
||||
50: '{zinc.50}',
|
||||
100: '{zinc.100}',
|
||||
200: '{zinc.200}',
|
||||
300: '{zinc.300}',
|
||||
400: '{zinc.400}',
|
||||
500: '{zinc.500}',
|
||||
600: '{zinc.600}',
|
||||
700: '{zinc.700}',
|
||||
800: '{zinc.800}',
|
||||
900: '{zinc.900}',
|
||||
950: '{zinc.950}'
|
||||
}
|
||||
},
|
||||
dark: {
|
||||
surface: {
|
||||
0: '#ffffff',
|
||||
50: '{slate.50}',
|
||||
100: '{slate.100}',
|
||||
200: '{slate.200}',
|
||||
300: '{slate.300}',
|
||||
400: '{slate.400}',
|
||||
500: '{slate.500}',
|
||||
600: '{slate.600}',
|
||||
700: '{slate.700}',
|
||||
800: '{slate.800}',
|
||||
900: '{slate.900}',
|
||||
950: '{slate.950}'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
export default MyPreset;
|
||||
@@ -192,7 +192,8 @@ nodeDoubleSelect(event:TreeNodeDoubleClickEvent) : void {
|
||||
width: '80%',
|
||||
maximizable: true
|
||||
});
|
||||
|
||||
if (ref)
|
||||
{
|
||||
ref.onClose.subscribe((item: Person) => {
|
||||
if (item) {
|
||||
//console.log("after close ward edit", item);
|
||||
@@ -201,7 +202,7 @@ nodeDoubleSelect(event:TreeNodeDoubleClickEvent) : void {
|
||||
this.updateList(item);
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
}
|
||||
updateList(item: Person) :void {
|
||||
const idx = this.familyList.findIndex( x => x.id == item.id);
|
||||
|
||||
@@ -166,7 +166,8 @@ nodeDoubleSelect(event:TreeNodeDoubleClickEvent) : void {
|
||||
width: '80%',
|
||||
maximizable: true
|
||||
});
|
||||
|
||||
if (ref)
|
||||
{
|
||||
ref.onClose.subscribe((item: Person) => {
|
||||
if (item) {
|
||||
//console.log("after close ward edit", item);
|
||||
@@ -175,7 +176,7 @@ nodeDoubleSelect(event:TreeNodeDoubleClickEvent) : void {
|
||||
this.updateList(item);
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
}
|
||||
updateList(item: Person) :void {
|
||||
const idx = this.familyList.findIndex( x => x.id == item.id);
|
||||
|
||||
@@ -282,15 +282,17 @@ export class FamilyList implements OnInit, OnDestroy{
|
||||
draggable: true,
|
||||
maximizable: true
|
||||
});
|
||||
|
||||
ref.onClose.subscribe((item: Person) => {
|
||||
if (item) {
|
||||
//console.log("after close ward edit", item);
|
||||
// this.messageService.add({severity:'success', summary: 'Save Family', detail: item.firstName!});
|
||||
//update the current list
|
||||
this.updateList(item);
|
||||
}
|
||||
});
|
||||
if (ref)
|
||||
{
|
||||
ref.onClose.subscribe((item: Person) => {
|
||||
if (item) {
|
||||
//console.log("after close ward edit", item);
|
||||
// this.messageService.add({severity:'success', summary: 'Save Family', detail: item.firstName!});
|
||||
//update the current list
|
||||
this.updateList(item);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
showOrganise(id:number) {
|
||||
@@ -304,7 +306,8 @@ export class FamilyList implements OnInit, OnDestroy{
|
||||
maximizable: true,
|
||||
closable: true
|
||||
});
|
||||
|
||||
if (ref)
|
||||
{
|
||||
ref.onClose.subscribe((item: Person) => {
|
||||
if (item) {
|
||||
//console.log("after close ward edit", item);
|
||||
@@ -313,6 +316,7 @@ export class FamilyList implements OnInit, OnDestroy{
|
||||
//this.updateList(item);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
updateList(item: Person) :void {
|
||||
|
||||
@@ -316,15 +316,17 @@ doViewImage(imageName:string): void {
|
||||
modal:true,
|
||||
maximizable: true
|
||||
});
|
||||
|
||||
ref.onClose.subscribe((item: Person) => {
|
||||
if (item) {
|
||||
//console.log("after close ward edit", item);
|
||||
this.messageService.add({severity:'success', summary: 'Select', detail: item.firstName!});
|
||||
//update the current list
|
||||
if (ref)
|
||||
{
|
||||
ref.onClose.subscribe((item: Person) => {
|
||||
if (item) {
|
||||
//console.log("after close ward edit", item);
|
||||
this.messageService.add({severity:'success', summary: 'Select', detail: item.firstName!});
|
||||
//update the current list
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
assignValue(item:Person): void {
|
||||
@@ -628,7 +630,8 @@ showPickPerson(title:string, callback:(id: Person) => void) :void {
|
||||
draggable: true,
|
||||
maximizable: true
|
||||
});
|
||||
|
||||
if (ref)
|
||||
{
|
||||
ref.onClose.subscribe((item: Person) => {
|
||||
if (item) {
|
||||
//console.log("after close ward edit", item);
|
||||
@@ -637,6 +640,7 @@ showPickPerson(title:string, callback:(id: Person) => void) :void {
|
||||
callback(item);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
showAttachment(title:string): void {
|
||||
@@ -650,7 +654,8 @@ showAttachment(title:string): void {
|
||||
draggable: true,
|
||||
maximizable: true
|
||||
});
|
||||
|
||||
if (ref)
|
||||
{
|
||||
ref.onClose.subscribe((ritem: any) => {
|
||||
const item = ritem.list;
|
||||
const deleteIds = ritem.deleteIds;
|
||||
@@ -682,6 +687,7 @@ showAttachment(title:string): void {
|
||||
}
|
||||
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
updatePhotoList(list: PersonPhotoDto[]): void {
|
||||
|
||||
+1
-1
@@ -2,7 +2,7 @@
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>FamilyTree</title>
|
||||
<title>FamilyTreeUI</title>
|
||||
<base href="/">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<link rel="icon" type="image/x-icon" href="favicon.ico">
|
||||
|
||||
Reference in New Issue
Block a user