Skip to content

Commit 63632f7

Browse files
committed
made internships show up on all needed pages
1 parent 441c5cf commit 63632f7

7 files changed

Lines changed: 136 additions & 72 deletions

File tree

graphql/client/gql.ts

Lines changed: 2 additions & 2 deletions
Large diffs are not rendered by default.

graphql/client/graphql.ts

Lines changed: 7 additions & 7 deletions
Large diffs are not rendered by default.

graphql/documents/queries.graphql

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -207,6 +207,8 @@ fragment frag_Internship on ApplicationInternship {
207207
workingPeriodEnd
208208
url
209209
duration
210+
places
211+
signed
210212
company {
211213
uid
212214
brandName

graphql/schema.ts

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4534,7 +4534,7 @@ export type IFrag_CompanyApplicationFragment_CompanyApplication_internships_Appl
45344534

45354535
export type IFrag_CompanyApplicationFragment_CompanyApplication_internships_ApplicationInternship_company_Company = { uid: string, brandName: string, rasterLogo?: IFrag_CompanyApplicationFragment_CompanyApplication_internships_ApplicationInternship_company_Company_rasterLogo_Image | null };
45364536

4537-
export type IFrag_CompanyApplicationFragment_CompanyApplication_internships_ApplicationInternship = { uid: string, position: string, competencies?: string | null, description: string, workingPeriodStart: string | Date, workingPeriodEnd: string | Date, url?: string | null, duration?: string | null, company?: IFrag_CompanyApplicationFragment_CompanyApplication_internships_ApplicationInternship_company_Company | null };
4537+
export type IFrag_CompanyApplicationFragment_CompanyApplication_internships_ApplicationInternship = { uid: string, position: string, competencies?: string | null, description: string, workingPeriodStart: string | Date, workingPeriodEnd: string | Date, url?: string | null, duration?: string | null, places?: number | null, signed?: boolean | null, company?: IFrag_CompanyApplicationFragment_CompanyApplication_internships_ApplicationInternship_company_Company | null };
45384538

45394539
export type IFrag_CompanyApplicationFragment_CompanyApplication_panelParticipants_ApplicationPresenter = { firstName: string, lastName: string, bioHr: string, bioEn: string, photo?: IFrag_ApplicationPresenterFragment_ApplicationPresenter_photo_Image | null };
45404540

@@ -4552,7 +4552,7 @@ export type IFrag_NewsFragment = { lang: string, slug: string, date: string | Da
45524552

45534553
export type IFrag_GalleryImageFragment = { uid: string, name: string, order: number, visible: boolean, photo?: IEditGalleryImageMutation_editGalleryImage_CreateGalleryImageResponse_entity_GalleryImage_photo_Image | null };
45544554

4555-
export type IFrag_InternshipFragment = { uid: string, position: string, competencies?: string | null, description: string, workingPeriodStart: string | Date, workingPeriodEnd: string | Date, url?: string | null, duration?: string | null, company?: IFrag_CompanyApplicationFragment_CompanyApplication_internships_ApplicationInternship_company_Company | null };
4555+
export type IFrag_InternshipFragment = { uid: string, position: string, competencies?: string | null, description: string, workingPeriodStart: string | Date, workingPeriodEnd: string | Date, url?: string | null, duration?: string | null, places?: number | null, signed?: boolean | null, company?: IFrag_CompanyApplicationFragment_CompanyApplication_internships_ApplicationInternship_company_Company | null };
45564556

45574557
export type IProfileQuery_profile_User = { uid: string, name: string, firstName: string, lastName: string, email: string, phone: string, language: string, roles: Array<ILoginMutation_login_AuthResponse_entity_User_roles_Role>, companies: Array<ILoginMutation_login_AuthResponse_entity_User_companies_Company> };
45584558

@@ -4666,7 +4666,7 @@ export type ICompanyInfoQuery_companyInfo_Company_program_CompanyProgram_panel_C
46664666

46674667
export type ICompanyInfoQuery_companyInfo_Company_program_CompanyProgram_panel_CompanyPanel = { uid: string, name: string, description: string, reservation: number, companies: Array<ICompanyInfoQuery_companyInfo_Company_program_CompanyProgram_panel_CompanyPanel_companies_Company>, event?: ICompanyInfoQuery_companyInfo_Company_program_CompanyProgram_panel_CompanyPanel_event_CalendarItem | null };
46684668

4669-
export type ICompanyInfoQuery_companyInfo_Company_program_CompanyProgram_internships_ApplicationInternship = { uid: string, position: string, competencies?: string | null, description: string, workingPeriodStart: string | Date, workingPeriodEnd: string | Date, url?: string | null, duration?: string | null, company?: IFrag_CompanyApplicationFragment_CompanyApplication_internships_ApplicationInternship_company_Company | null };
4669+
export type ICompanyInfoQuery_companyInfo_Company_program_CompanyProgram_internships_ApplicationInternship = { uid: string, position: string, competencies?: string | null, description: string, workingPeriodStart: string | Date, workingPeriodEnd: string | Date, url?: string | null, duration?: string | null, places?: number | null, signed?: boolean | null, company?: IFrag_CompanyApplicationFragment_CompanyApplication_internships_ApplicationInternship_company_Company | null };
46704670

46714671
export type ICompanyInfoQuery_companyInfo_Company_program_CompanyProgram = { booth?: string | null, talk?: ICompanyInfoQuery_companyInfo_Company_program_CompanyProgram_talk_ApplicationTalk | null, workshop?: ICompanyInfoQuery_companyInfo_Company_program_CompanyProgram_workshop_ApplicationWorkshop | null, fusion?: ICompanyInfoQuery_companyInfo_Company_program_CompanyProgram_fusion_ApplicationFusion | null, panelParticipants: Array<ICompanyInfoQuery_companyInfo_Company_program_CompanyProgram_panelParticipants_ApplicationPresenter>, panel?: ICompanyInfoQuery_companyInfo_Company_program_CompanyProgram_panel_CompanyPanel | null, internships: Array<ICompanyInfoQuery_companyInfo_Company_program_CompanyProgram_internships_ApplicationInternship> };
46724672

@@ -4839,7 +4839,7 @@ export type IAllGalleryImagesQueryVariables = Exact<{ [key: string]: never; }>;
48394839

48404840
export type IAllGalleryImagesQuery = IAllGalleryImagesQuery_Query;
48414841

4842-
export type IInternshipsQuery_internships_ApplicationInternship = { uid: string, position: string, competencies?: string | null, description: string, workingPeriodStart: string | Date, workingPeriodEnd: string | Date, url?: string | null, duration?: string | null, company?: IFrag_CompanyApplicationFragment_CompanyApplication_internships_ApplicationInternship_company_Company | null };
4842+
export type IInternshipsQuery_internships_ApplicationInternship = { uid: string, position: string, competencies?: string | null, description: string, workingPeriodStart: string | Date, workingPeriodEnd: string | Date, url?: string | null, duration?: string | null, places?: number | null, signed?: boolean | null, company?: IFrag_CompanyApplicationFragment_CompanyApplication_internships_ApplicationInternship_company_Company | null };
48434843

48444844
export type IInternshipsQuery_Query = { internships: Array<IInternshipsQuery_internships_ApplicationInternship> };
48454845

@@ -7791,6 +7791,8 @@ export const Frag_Internship = gql`
77917791
workingPeriodEnd
77927792
url
77937793
duration
7794+
places
7795+
signed
77947796
company {
77957797
uid
77967798
brandName

pages/company/[uid]/index.vue

Lines changed: 113 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -326,46 +326,80 @@
326326
</template>
327327
</TabPanel>
328328

329-
<TabPanel v-if="programItems.internship">
329+
<TabPanel v-if="programItems.internships && programItems.internships.length">
330330
<template #header>
331331
<translated-text trans-key="company.info.program.internship" />
332332
</template>
333333

334-
<div v-if="programItems.internship" :class="$style.itemHeader">
335-
<span
336-
:class="$style.text"
337-
v-text="toDateString(programItems.internship.workingPeriodStart)"
338-
/>
339-
<span
340-
:class="$style.text"
341-
>-</span>
342-
<span
343-
:class="$style.text"
344-
v-text="toDateString(programItems.internship.workingPeriodEnd)"
345-
/>
346-
<span
347-
:class="$style.text"
348-
>|</span>
349-
<span
350-
:class="$style.text"
351-
v-text="programItems.internship.duration"
352-
/>
353-
<a
354-
:href="programItems.internship.url"
355-
rel="noopener noreferrer"
356-
target="_blank"
357-
:class="$style.signupButton"
358-
role="button"
359-
>
360-
<translated-text
361-
trans-key="company.event.program.internship.more-info"
334+
<div
335+
v-for="(internship, index) in programItems.internships"
336+
:key="internship.uid"
337+
:class="$style.internshipItem"
338+
>
339+
<hr v-if="index > 0" :class="$style.internshipSeparator">
340+
341+
<div :class="$style.itemHeader">
342+
<span
343+
:class="$style.text"
344+
v-text="toDateString(internship.workingPeriodStart)"
362345
/>
363-
</a>
364-
</div>
346+
<span :class="$style.text">-</span>
347+
<span
348+
:class="$style.text"
349+
v-text="toDateString(internship.workingPeriodEnd)"
350+
/>
351+
<template v-if="internship.duration">
352+
<span :class="$style.text">|</span>
353+
<span
354+
:class="$style.text"
355+
v-text="internship.duration"
356+
/>
357+
</template>
358+
<a
359+
v-if="internship.url"
360+
:href="internship.url"
361+
rel="noopener noreferrer"
362+
target="_blank"
363+
:class="$style.signupButton"
364+
role="button"
365+
>
366+
<translated-text
367+
trans-key="company.event.program.internship.more-info"
368+
/>
369+
</a>
370+
<a
371+
:href="internshipApplyUrl"
372+
rel="noopener noreferrer"
373+
target="_blank"
374+
:class="$style.signupButton"
375+
role="button"
376+
>
377+
<translated-text
378+
trans-key="company.event.program.internship.apply.see-more"
379+
/>
380+
</a>
381+
</div>
382+
383+
<h3 :class="$style.itemTitle" v-text="internship.position" />
384+
385+
<div v-if="internship.places != null" :class="$style.internshipMeta">
386+
<span :class="$style.internshipMetaItem">
387+
<strong>
388+
<translated-text trans-key="company.event.program.internship.places" />:
389+
</strong>
390+
{{ internship.places }}
391+
</span>
392+
</div>
365393

366-
<h3 :class="$style.itemTitle" v-text="programItems.internship.position" />
394+
<template v-if="internship.competencies">
395+
<h4 :class="$style.internshipSubtitle">
396+
<translated-text trans-key="company.event.program.internship.competencies" />
397+
</h4>
398+
<p :class="$style.itemDescription" v-text="internship.competencies" />
399+
</template>
367400

368-
<p :class="$style.itemDescription" v-text="programItems.internship.description" />
401+
<p :class="$style.itemDescription" v-text="internship.description" />
402+
</div>
369403
</TabPanel>
370404
</TabView>
371405
</template>
@@ -465,14 +499,20 @@
465499
"workshop",
466500
"fusion",
467501
"panel",
468-
"internship",
502+
"internships",
469503
]
470-
.filter((x) => (unref(programItems) as Dict | null)?.[x])
504+
.filter((x) => {
505+
const v = (unref(programItems) as Dict | null)?.[x];
506+
if (Array.isArray(v)) {
507+
return 0 < v.length;
508+
}
509+
return Boolean(v);
510+
})
471511
.map((x, i) => [ x, i ] as const),
472512
);
473513
474514
const preselectedTab = String(route.query.tab) || "talk";
475-
const activeIndex = ref(tabs[preselectedTab] ?? 0);
515+
const activeIndex = ref(tabs[preselectedTab] ?? tabs[`${ preselectedTab }s`] ?? 0);
476516
const activeTab = computed(() => Object.keys(tabs)[activeIndex.value]);
477517
478518
watch(
@@ -537,14 +577,14 @@
537577
break;
538578
}
539579
540-
// case "internship": {
541-
// const item = unref(programItems).internship as { position: string; description: string } | undefined;
542-
// if (item) {
543-
// info.title = `[Summer Internship] ${ brandName }: ${ item.position }`;
544-
// info.description = item.description;
545-
// }
546-
// break;
547-
// }
580+
case "internships": {
581+
const items = unref(programItems).internships ?? [];
582+
if (items.length) {
583+
info.title = `[Summer Internships] ${ brandName }: ${ items.map((i) => i.position).join(", ") }`;
584+
info.description = items[0].description;
585+
}
586+
break;
587+
}
548588
}
549589
550590
return info;
@@ -599,6 +639,7 @@
599639
activeIndex,
600640
company,
601641
translateFor: computed(() => translationsStore.translateFor),
642+
internshipApplyUrl: computed(() => translationsStore.translation("company.event.program.internship.apply.url")),
602643
programItems,
603644
EventType,
604645
panelCompanies: computed(() => (unref(programItems)?.panel?.companies || []).filter((x) => x.uid !== unref(company).uid)),
@@ -949,4 +990,32 @@
949990
}
950991
}
951992
}
993+
994+
.internshipItem {
995+
& + .internshipItem {
996+
margin-top: 1.5rem;
997+
}
998+
}
999+
1000+
.internshipSeparator {
1001+
border: 0;
1002+
border-top: 1px solid rgba($fer-black, .12);
1003+
margin: 0 0 1.5rem;
1004+
}
1005+
1006+
.internshipMeta {
1007+
display: flex;
1008+
flex-wrap: wrap;
1009+
gap: 1rem 1.5rem;
1010+
margin: .5rem 0 1rem;
1011+
}
1012+
1013+
.internshipMetaItem {
1014+
font-size: 1rem;
1015+
}
1016+
1017+
.internshipSubtitle {
1018+
margin: 1rem 0 .25rem;
1019+
font-size: 1.0625rem;
1020+
}
9521021
</style>

pages/summer-internships.vue

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -61,8 +61,6 @@
6161
<span :class="$style.text" v-text="toDateString(internship.workingPeriodStart)" />
6262
<span :class="$style.text">-</span>
6363
<span :class="$style.text" v-text="toDateString(internship.workingPeriodEnd)" />
64-
<span :class="$style.text">|</span>
65-
<span :class="$style.text" v-text="internship.duration" />
6664
</dd>
6765
</dl>
6866
</div>
@@ -98,12 +96,8 @@
9896
import {
9997
computed,
10098
useQuery,
101-
createError,
10299
} from "#imports";
103100
import AppImg from "~/components/util/app-img.vue";
104-
import {
105-
graphql,
106-
} from "~/graphql/client";
107101
import {
108102
Internships,
109103
type IInternshipsQuery,
@@ -118,9 +112,6 @@
118112
119113
const participantsShown = computed(() => seasonsStore.areParticipantsShown);
120114
121-
throw createError({ statusCode: 404, statusMessage: "Page Not Found" });
122-
123-
// eslint-disable-next-line no-unreachable
124115
const InternshipsQuery = useQuery<
125116
IInternshipsQuery,
126117
IInternshipsQueryVariables
@@ -255,7 +246,7 @@
255246
.item .itemImage {
256247
257248
img {
258-
object-position: right;
249+
object-position: center;
259250
}
260251
}
261252

store/pages.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -58,11 +58,11 @@ export const usePagesStore = defineStore(
5858
to: { name: "participants" },
5959
if: () => seasonsStore.areParticipantsShown,
6060
},
61-
// {
62-
// name: "page.name.internships",
63-
// to: { name: "summer-internships" },
64-
// if: () => seasonsStore.areParticipantsShown,
65-
// },
61+
{
62+
name: "page.name.internships",
63+
to: { name: "summer-internships" },
64+
if: () => seasonsStore.areParticipantsShown,
65+
},
6666
// {
6767
// name: "page.name.contact",
6868
// to: { name: "contact" },

0 commit comments

Comments
 (0)