CreateCandidate: added a button to change the places of the first and last name (#7836)

This commit is contained in:
Alexander Platov 2025-01-30 06:10:47 +03:00 committed by GitHub
parent 80f3bbe851
commit 5c9e71be09
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
12 changed files with 61 additions and 12 deletions

View File

@ -121,7 +121,8 @@
"HideDoneState": "Skrýt dokončené přihlášky", "HideDoneState": "Skrýt dokončené přihlášky",
"HideArchivedVacancies": "Skrýt archivované pozice", "HideArchivedVacancies": "Skrýt archivované pozice",
"HideApplicantsFromArchivedVacancies": "Skrýt z archivovaných pozic", "HideApplicantsFromArchivedVacancies": "Skrýt z archivovaných pozic",
"CreateNewSkills": "Vytvořit nové dovednosti, pokud neexistují" "CreateNewSkills": "Vytvořit nové dovednosti, pokud neexistují",
"SwapFirstAndLastNames": "Vyměňte jméno a příjmení"
}, },
"status": { "status": {
"ApplicationExists": "Přihláška již existuje", "ApplicationExists": "Přihláška již existuje",

View File

@ -121,7 +121,8 @@
"HideDoneState": "Abgeschlossene Bewerbungen ausblenden", "HideDoneState": "Abgeschlossene Bewerbungen ausblenden",
"HideArchivedVacancies": "Archivierte Stellen ausblenden", "HideArchivedVacancies": "Archivierte Stellen ausblenden",
"HideApplicantsFromArchivedVacancies": "Aus archivierten Stellen ausblenden", "HideApplicantsFromArchivedVacancies": "Aus archivierten Stellen ausblenden",
"CreateNewSkills": "Neue Fähigkeiten erstellen, wenn keine bestehenden gefunden werden" "CreateNewSkills": "Neue Fähigkeiten erstellen, wenn keine bestehenden gefunden werden",
"SwapFirstAndLastNames": "Vor- und Nachnamen tauschen"
}, },
"status": { "status": {
"ApplicationExists": "Bewerbung existiert bereits", "ApplicationExists": "Bewerbung existiert bereits",

View File

@ -121,7 +121,8 @@
"HideDoneState": "Hide complete applications", "HideDoneState": "Hide complete applications",
"HideArchivedVacancies": "Hide archived Vacancies", "HideArchivedVacancies": "Hide archived Vacancies",
"HideApplicantsFromArchivedVacancies": "Hide from archived Vacancies", "HideApplicantsFromArchivedVacancies": "Hide from archived Vacancies",
"CreateNewSkills": "Create new skills if existing not found" "CreateNewSkills": "Create new skills if existing not found",
"SwapFirstAndLastNames": "Swap first and last names"
}, },
"status": { "status": {
"ApplicationExists": "Application already exists", "ApplicationExists": "Application already exists",

View File

@ -118,7 +118,8 @@
"HideDoneState": "Ocultar solicitudes completadas", "HideDoneState": "Ocultar solicitudes completadas",
"HideArchivedVacancies": "Ocultar vacantes archivadas", "HideArchivedVacancies": "Ocultar vacantes archivadas",
"HideApplicantsFromArchivedVacancies": "Ocultar de vacantes archivadas", "HideApplicantsFromArchivedVacancies": "Ocultar de vacantes archivadas",
"CreateNewSkills": "Crear nuevas habilidades si no se encuentran las existentes" "CreateNewSkills": "Crear nuevas habilidades si no se encuentran las existentes",
"SwapFirstAndLastNames": "Intercambie nombres y apellidos"
}, },
"status": { "status": {
"ApplicationExists": "La solicitud ya existe", "ApplicationExists": "La solicitud ya existe",

View File

@ -118,7 +118,8 @@
"HideDoneState": "Masquer les candidatures terminées", "HideDoneState": "Masquer les candidatures terminées",
"HideArchivedVacancies": "Masquer les postes vacants archivés", "HideArchivedVacancies": "Masquer les postes vacants archivés",
"HideApplicantsFromArchivedVacancies": "Masquer les candidats des postes vacants archivés", "HideApplicantsFromArchivedVacancies": "Masquer les candidats des postes vacants archivés",
"CreateNewSkills": "Créer de nouvelles compétences si les existantes ne sont pas trouvées" "CreateNewSkills": "Créer de nouvelles compétences si les existantes ne sont pas trouvées",
"SwapFirstAndLastNames": "Permuter le prénom et le nom"
}, },
"status": { "status": {
"ApplicationExists": "La candidature existe déjà", "ApplicationExists": "La candidature existe déjà",

View File

@ -119,7 +119,8 @@
"HideDoneState": "Nascondi candidature completate", "HideDoneState": "Nascondi candidature completate",
"HideArchivedVacancies": "Nascondi posizioni archiviate", "HideArchivedVacancies": "Nascondi posizioni archiviate",
"HideApplicantsFromArchivedVacancies": "Nascondi da posizioni archiviate", "HideApplicantsFromArchivedVacancies": "Nascondi da posizioni archiviate",
"CreateNewSkills": "Crea nuove competenze se quelle esistenti non vengono trovate" "CreateNewSkills": "Crea nuove competenze se quelle esistenti non vengono trovate",
"SwapFirstAndLastNames": "Scambia nome e cognome"
}, },
"status": { "status": {
"ApplicationExists": "La candidatura esiste già", "ApplicationExists": "La candidatura esiste già",

View File

@ -118,7 +118,8 @@
"HideDoneState": "Ocultar candidaturas concluídas", "HideDoneState": "Ocultar candidaturas concluídas",
"HideArchivedVacancies": "Ocultar vagas arquivadas", "HideArchivedVacancies": "Ocultar vagas arquivadas",
"HideApplicantsFromArchivedVacancies": "Ocultar de vagas arquivadas", "HideApplicantsFromArchivedVacancies": "Ocultar de vagas arquivadas",
"CreateNewSkills": "Criar novas competências se as existentes não forem encontradas" "CreateNewSkills": "Criar novas competências se as existentes não forem encontradas",
"SwapFirstAndLastNames": "Trocar primeiro e último nome"
}, },
"status": { "status": {
"ApplicationExists": "A candidatura já existe", "ApplicationExists": "A candidatura já existe",

View File

@ -121,7 +121,8 @@
"HideDoneState": "Скрыть завершенных кандидатов", "HideDoneState": "Скрыть завершенных кандидатов",
"HideArchivedVacancies": "Скрыть архивные вакансии", "HideArchivedVacancies": "Скрыть архивные вакансии",
"HideApplicantsFromArchivedVacancies": "Скрыть из архивных вакансии", "HideApplicantsFromArchivedVacancies": "Скрыть из архивных вакансии",
"CreateNewSkills": "Создать навыки, если не найдены существующие" "CreateNewSkills": "Создать навыки, если не найдены существующие",
"SwapFirstAndLastNames": "Поменять местами имя и фамилию"
}, },
"status": { "status": {
"ApplicationExists": "Кандидат уже существует", "ApplicationExists": "Кандидат уже существует",

View File

@ -121,7 +121,8 @@
"HideDoneState": "隐藏已完成的申请", "HideDoneState": "隐藏已完成的申请",
"HideArchivedVacancies": "隐藏已归档的职位", "HideArchivedVacancies": "隐藏已归档的职位",
"HideApplicantsFromArchivedVacancies": "从已归档职位中隐藏", "HideApplicantsFromArchivedVacancies": "从已归档职位中隐藏",
"CreateNewSkills": "如果未找到现有技能,则创建新技能" "CreateNewSkills": "如果未找到现有技能,则创建新技能",
"SwapFirstAndLastNames": "交换名字和姓氏"
}, },
"status": { "status": {
"ApplicationExists": "申请已存在", "ApplicationExists": "申请已存在",

View File

@ -67,12 +67,15 @@
Label, Label,
MiniToggle, MiniToggle,
showPopup, showPopup,
Spinner Spinner,
ActionIcon
} from '@hcengineering/ui' } from '@hcengineering/ui'
import { createEventDispatcher, onDestroy } from 'svelte' import { createEventDispatcher, onDestroy } from 'svelte'
import recruit from '../plugin' import recruit from '../plugin'
import { getCandidateIdentifier } from '../utils' import { getCandidateIdentifier } from '../utils'
import YesNo from './YesNo.svelte' import YesNo from './YesNo.svelte'
import IconSwitch from './icons/Switch.svelte'
import IconShuffle from './icons/Shuffle.svelte'
export let shouldSaveDraft: boolean = true export let shouldSaveDraft: boolean = true
@ -631,7 +634,7 @@
maxWidth={'30rem'} maxWidth={'30rem'}
/> />
</div> </div>
<div class="ml-4"> <div class="flex-col items-center flex-gap-2 ml-4">
<EditableAvatar <EditableAvatar
disabled={loading} disabled={loading}
bind:this={avatarEditor} bind:this={avatarEditor}
@ -642,6 +645,16 @@
size={'large'} size={'large'}
name={combineName(object?.firstName?.trim() ?? '', object?.lastName?.trim() ?? '')} name={combineName(object?.firstName?.trim() ?? '', object?.lastName?.trim() ?? '')}
/> />
<ActionIcon
icon={IconShuffle}
label={recruit.string.SwapFirstAndLastNames}
size={'medium'}
action={() => {
const first = object.firstName
object.firstName = object.lastName
object.lastName = first
}}
/>
</div> </div>
</div> </div>
<svelte:fragment slot="pool"> <svelte:fragment slot="pool">

View File

@ -0,0 +1,26 @@
<!--
// Copyright © 2025 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 { IconSize } from '@hcengineering/ui'
export let size: IconSize
export let fill: string = 'currentColor'
</script>
<svg class="svg-{size}" {fill} viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
<path
d="M21.9,16.6c-0.1-0.1-0.1-0.2-0.2-0.3l-3-3c-0.4-0.4-1-0.4-1.4,0s-0.4,1,0,1.4l1.3,1.3H16c-1.1,0-2.1-0.4-2.8-1.2C12.4,14.1,12,13.1,12,12s0.4-2.1,1.2-2.8C13.9,8.4,14.9,8,16,8h2.6l-1.3,1.3c-0.4,0.4-0.4,1,0,1.4c0.2,0.2,0.5,0.3,0.7,0.3s0.5-0.1,0.7-0.3l3-3c0.1-0.1,0.2-0.2,0.2-0.3c0.1-0.2,0.1-0.5,0-0.8c-0.1-0.1-0.1-0.2-0.2-0.3l-3-3c-0.4-0.4-1-0.4-1.4,0s-0.4,1,0,1.4L18.6,6H16c-1.6,0-3.1,0.6-4.2,1.8C11.5,8,11.2,8.4,11,8.7c-0.2-0.3-0.5-0.6-0.8-0.9C9.1,6.6,7.6,6,6,6H3C2.4,6,2,6.4,2,7s0.4,1,1,1h3c1.1,0,2.1,0.4,2.8,1.2C9.6,9.9,10,10.9,10,12s-0.4,2.1-1.2,2.8C8.1,15.6,7.1,16,6,16H3c-0.6,0-1,0.4-1,1s0.4,1,1,1h3c1.6,0,3.1-0.6,4.2-1.8c0.3-0.3,0.5-0.6,0.8-0.9c0.2,0.3,0.5,0.6,0.8,0.9c1.1,1.1,2.6,1.8,4.2,1.8h2.6l-1.3,1.3c-0.4,0.4-0.4,1,0,1.4c0.2,0.2,0.5,0.3,0.7,0.3s0.5-0.1,0.7-0.3l3-3c0.1-0.1,0.2-0.2,0.2-0.3C22,17.1,22,16.9,21.9,16.6z"
/>
</svg>

View File

@ -127,7 +127,8 @@ export default mergeIds(recruitId, recruit, {
OpenVacancyList: '' as IntlString, OpenVacancyList: '' as IntlString,
Export: '' as IntlString, Export: '' as IntlString,
GetTalentIds: '' as IntlString, GetTalentIds: '' as IntlString,
CreateNewSkills: '' as IntlString CreateNewSkills: '' as IntlString,
SwapFirstAndLastNames: '' as IntlString
}, },
category: { category: {
Other: '' as Ref<TagCategory>, Other: '' as Ref<TagCategory>,