Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 11 additions & 1 deletion plugins/recruit-resources/src/components/CreateCandidate.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -68,14 +68,17 @@
MiniToggle,
showPopup,
Spinner,
ActionIcon
ActionIcon,
addNotification,
NotificationSeverity
} from '@hcengineering/ui'
import { createEventDispatcher, onDestroy } from 'svelte'
import recruit from '../plugin'
import { getCandidateIdentifier } from '../utils'
import YesNo from './YesNo.svelte'
import IconSwitch from './icons/Switch.svelte'
import IconShuffle from './icons/Shuffle.svelte'
import Notification from './Notification.svelte'

export let shouldSaveDraft: boolean = true

Expand Down Expand Up @@ -299,6 +302,13 @@
draftController.remove()
dispatch('close', _id)
resetObject()
addNotification(
await translate(presentation.string.Ok, {}, getCurrentLanguage()),
'',
Notification,
undefined,
NotificationSeverity.Info
)
}

function isUndef (value?: string): boolean {
Expand Down
27 changes: 27 additions & 0 deletions plugins/recruit-resources/src/components/Notification.svelte
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
<!--
//
// Copyright © 2024 Hardcore Engineering Inc.
//
// Licensed under the Eclipse Public License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License. You may
// obtain a copy of the License at https://www.eclipse.org/legal/epl-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
//
// See the License for the specific language governing permissions and
// limitations under the License.
//
-->

<script lang="ts">
import { Notification, NotificationToast } from '@hcengineering/ui'
import Label from '@hcengineering/ui/src/components/Label.svelte'

export let notification: Notification
export let onRemove: () => void
</script>

<NotificationToast title={notification.title} severity={notification.severity} onClose={onRemove}>
</NotificationToast>