Skip to content

Commit fee26ee

Browse files
committed
Add notification after talent creation
1 parent 14f5e99 commit fee26ee

File tree

2 files changed

+38
-1
lines changed

2 files changed

+38
-1
lines changed

plugins/recruit-resources/src/components/CreateCandidate.svelte

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,14 +68,17 @@
6868
MiniToggle,
6969
showPopup,
7070
Spinner,
71-
ActionIcon
71+
ActionIcon,
72+
addNotification,
73+
NotificationSeverity
7274
} from '@hcengineering/ui'
7375
import { createEventDispatcher, onDestroy } from 'svelte'
7476
import recruit from '../plugin'
7577
import { getCandidateIdentifier } from '../utils'
7678
import YesNo from './YesNo.svelte'
7779
import IconSwitch from './icons/Switch.svelte'
7880
import IconShuffle from './icons/Shuffle.svelte'
81+
import Notification from './Notification.svelte'
7982
8083
export let shouldSaveDraft: boolean = true
8184
@@ -299,6 +302,13 @@
299302
draftController.remove()
300303
dispatch('close', _id)
301304
resetObject()
305+
addNotification(
306+
await translate(presentation.string.Ok, {}, getCurrentLanguage()),
307+
'',
308+
Notification,
309+
undefined,
310+
NotificationSeverity.Info
311+
)
302312
}
303313
304314
function isUndef (value?: string): boolean {
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
<!--
2+
//
3+
// Copyright © 2024 Hardcore Engineering Inc.
4+
//
5+
// Licensed under the Eclipse Public License, Version 2.0 (the "License");
6+
// you may not use this file except in compliance with the License. You may
7+
// obtain a copy of the License at https://www.eclipse.org/legal/epl-2.0
8+
//
9+
// Unless required by applicable law or agreed to in writing, software
10+
// distributed under the License is distributed on an "AS IS" BASIS,
11+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
//
13+
// See the License for the specific language governing permissions and
14+
// limitations under the License.
15+
//
16+
-->
17+
18+
<script lang="ts">
19+
import { Notification, NotificationToast } from '@hcengineering/ui'
20+
import Label from '@hcengineering/ui/src/components/Label.svelte'
21+
22+
export let notification: Notification
23+
export let onRemove: () => void
24+
</script>
25+
26+
<NotificationToast title={notification.title} severity={notification.severity} onClose={onRemove}>
27+
</NotificationToast>

0 commit comments

Comments
 (0)