From d102f00c5cbdb28a55779ee0c4396813c5aa5ae8 Mon Sep 17 00:00:00 2001 From: Andrey Platov Date: Mon, 30 Aug 2021 19:03:31 +0200 Subject: [PATCH] save show/hide Signed-off-by: Andrey Platov --- packages/ui/src/components/EditBox.svelte | 5 +++- .../src/components/CreateCandidate.svelte | 2 +- .../src/components/DialogHeader.svelte | 25 ++++++++++++++++--- .../src/components/EditCandidate.svelte | 4 ++- 4 files changed, 29 insertions(+), 7 deletions(-) diff --git a/packages/ui/src/components/EditBox.svelte b/packages/ui/src/components/EditBox.svelte index 84fd52d9e2..06a611f758 100644 --- a/packages/ui/src/components/EditBox.svelte +++ b/packages/ui/src/components/EditBox.svelte @@ -14,7 +14,7 @@ --> - + diff --git a/plugins/recruit-resources/src/components/DialogHeader.svelte b/plugins/recruit-resources/src/components/DialogHeader.svelte index 3850b28ca3..f55e905d72 100644 --- a/plugins/recruit-resources/src/components/DialogHeader.svelte +++ b/plugins/recruit-resources/src/components/DialogHeader.svelte @@ -41,8 +41,23 @@ export let resumeSize: number export let resumeType: string + export let create = false + let dragover = false let loading = false + let changed = false + + function isChanged(): void { + console.log(object) + console.log(newValue) + for (const key in object) { + if ((newValue as any)[key] !== (object as any)[key]) { + changed = true + return + } + } + changed = false + } async function createAttachment(file: File) { loading = true @@ -84,10 +99,10 @@
showModal(AvatarEditor, { label: 'Profile photo' })}>
- - + +
-
+
@@ -99,7 +114,9 @@ {/if}
-
diff --git a/plugins/recruit-resources/src/components/EditCandidate.svelte b/plugins/recruit-resources/src/components/EditCandidate.svelte index 17f927baf5..c90a482cc9 100644 --- a/plugins/recruit-resources/src/components/EditCandidate.svelte +++ b/plugins/recruit-resources/src/components/EditCandidate.svelte @@ -46,6 +46,8 @@ } } await client.updateDoc(recruit.class.Candidate, object.space, object._id, attributes) + + dispatch('close') } const tabModel = [ @@ -78,7 +80,7 @@
- +