summaryrefslogtreecommitdiffstats
path: root/admin/WebConsole3/frontend/src/app/serializer/client.serializer.ts
diff options
context:
space:
mode:
Diffstat (limited to 'admin/WebConsole3/frontend/src/app/serializer/client.serializer.ts')
-rw-r--r--admin/WebConsole3/frontend/src/app/serializer/client.serializer.ts20
1 files changed, 15 insertions, 5 deletions
diff --git a/admin/WebConsole3/frontend/src/app/serializer/client.serializer.ts b/admin/WebConsole3/frontend/src/app/serializer/client.serializer.ts
index ac2b88a9..694e15f9 100644
--- a/admin/WebConsole3/frontend/src/app/serializer/client.serializer.ts
+++ b/admin/WebConsole3/frontend/src/app/serializer/client.serializer.ts
@@ -1,5 +1,15 @@
-import { Serializer } from "globunet-angular/core/providers/api/serializer";
-
-export class ClientSerializer extends Serializer {
-
-} \ No newline at end of file
+import { Serializer } from 'globunet-angular/core/providers/api/serializer';
+import {Client} from '../model/client';
+
+export class ClientSerializer extends Serializer {
+
+ toJson(client: Client): any {
+ // @ts-ignore
+ client.repository = (client.repository) ? client.repository.id : null;
+ // @ts-ignore
+ client.hardwareProfile = (client.hardwareProfile) ? client.hardwareProfile.id : null;
+ // @ts-ignore
+ client.netboot = (client.netboot) ? client.netboot.id : null;
+ return super.toJson(client);
+ }
+}