Skip to content

Commit

Permalink
Fix experience label
Browse files Browse the repository at this point in the history
  • Loading branch information
claudiabdm committed Feb 28, 2024
1 parent 596ddd5 commit dc38639
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 15 deletions.
7 changes: 4 additions & 3 deletions components/CvSettings.vue
Original file line number Diff line number Diff line change
Expand Up @@ -415,10 +415,11 @@ function getCurrentColor(colorValue: string): {

<!-- HISTORY SECTIONS -->
<CvSettingsHistorySection
v-for="section in SectionNameList"
:key="section"
v-for="(value, key) in SectionNameList"
:key="key"
:form-settings="formSettings"
:name="section"
:section="key"
:name="value"
/>
<!-- HISTORY SECTIONS -->

Expand Down
13 changes: 7 additions & 6 deletions components/CvSettingsHistorySection.vue
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
<script lang="ts" setup>
import type { Cv, OptionalSection, SectionName } from '~/types/cvfy'
import type { Cv, OptionalSection, SectionName, SectionNameList } from '~/types/cvfy'
const props = defineProps<
{
formSettings: Cv
name: SectionName
section: SectionName
name: typeof SectionNameList[SectionName]
}
>()
const displaySection = computed(() => `display${props.name[0].toLocaleUpperCase}${props.name.slice(1)}` as OptionalSection)
const displaySection = computed(() => `display${props.section[0].toLocaleUpperCase}${props.section.slice(1)}` as OptionalSection)
</script>

<template>
Expand All @@ -22,14 +23,14 @@ const displaySection = computed(() => `display${props.name[0].toLocaleUpperCase}
<template #content>
<div>
<CvDisplayCheckbox
v-if="name !== 'work'"
v-if="section !== 'work'"
class="form__display-checkbox"
:display-section="formSettings[displaySection]"
:section-name="name"
/>
<CvDynamicSection
:section-name="name"
:entries="formSettings[name]"
:section-name="section"
:entries="formSettings[section]"
/>
</div>
</template>
Expand Down
12 changes: 6 additions & 6 deletions types/cvfy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,9 @@ export interface DefaultSkill {
skillType: 'jobSkills' | 'softSkills'
}

export const SectionNameList = [
'work',
'education',
'projects',
] as const
export type SectionName = typeof SectionNameList[number]
export const SectionNameList = {
work: 'experience',
education: 'education',
projects: 'projects',
} as const
export type SectionName = keyof typeof SectionNameList

0 comments on commit dc38639

Please sign in to comment.