You've already forked isop-mirror
feat: rename internship route and replace internship page with internships page
This commit is contained in:
@@ -27,7 +27,7 @@ const user = useSanctumUser<User>();
|
|||||||
<v-btn prepend-icon="mdi-account-circle" color="blue" class="mr-2">
|
<v-btn prepend-icon="mdi-account-circle" color="blue" class="mr-2">
|
||||||
Môj profil
|
Môj profil
|
||||||
</v-btn>
|
</v-btn>
|
||||||
<v-btn prepend-icon="mdi-briefcase" color="blue" class="mr-2" to="/dashboard/company/internship">
|
<v-btn prepend-icon="mdi-briefcase" color="blue" class="mr-2" to="/dashboard/company/internships">
|
||||||
Praxe
|
Praxe
|
||||||
</v-btn>
|
</v-btn>
|
||||||
|
|
||||||
|
|||||||
@@ -181,26 +181,13 @@ async function submitFor(s: Student) {
|
|||||||
|
|
||||||
<div class="student-actions">
|
<div class="student-actions">
|
||||||
<!-- existujúci výkaz -->
|
<!-- existujúci výkaz -->
|
||||||
<v-btn
|
<v-btn v-if="s.existingReport?.url" :href="s.existingReport.url" target="_blank"
|
||||||
v-if="s.existingReport?.url"
|
variant="tonal" size="small" prepend-icon="mdi-open-in-new">
|
||||||
:href="s.existingReport.url"
|
|
||||||
target="_blank"
|
|
||||||
variant="tonal"
|
|
||||||
size="small"
|
|
||||||
prepend-icon="mdi-open-in-new"
|
|
||||||
>
|
|
||||||
Otvoriť
|
Otvoriť
|
||||||
</v-btn>
|
</v-btn>
|
||||||
|
|
||||||
<v-btn
|
<v-btn v-if="s.existingReport?.url" :href="s.existingReport.url" target="_blank"
|
||||||
v-if="s.existingReport?.url"
|
download variant="text" size="small" prepend-icon="mdi-download">
|
||||||
:href="s.existingReport.url"
|
|
||||||
target="_blank"
|
|
||||||
download
|
|
||||||
variant="text"
|
|
||||||
size="small"
|
|
||||||
prepend-icon="mdi-download"
|
|
||||||
>
|
|
||||||
Stiahnuť
|
Stiahnuť
|
||||||
</v-btn>
|
</v-btn>
|
||||||
</div>
|
</div>
|
||||||
@@ -210,43 +197,33 @@ async function submitFor(s: Student) {
|
|||||||
|
|
||||||
<v-card-text>
|
<v-card-text>
|
||||||
<!-- info o existujúcom výkaze -->
|
<!-- info o existujúcom výkaze -->
|
||||||
<v-alert
|
<v-alert v-if="s.existingReport" type="success" variant="tonal" class="mb-4"
|
||||||
v-if="s.existingReport"
|
:title="`Výkaz existuje (${s.existingReport.uploadedBy === 'STUDENT' ? 'nahral študent' : 'nahrala firma'})`">
|
||||||
type="success"
|
<div><strong>Súbor:</strong> {{ s.existingReport.fileName }} ({{
|
||||||
variant="tonal"
|
formatSize(s.existingReport.size) }})</div>
|
||||||
class="mb-4"
|
<div><strong>Nahraté:</strong> {{ new
|
||||||
:title="`Výkaz existuje (${s.existingReport.uploadedBy === 'STUDENT' ? 'nahral študent' : 'nahrala firma'})`"
|
Date(s.existingReport.uploadedAt).toLocaleString() }}</div>
|
||||||
>
|
|
||||||
<div><strong>Súbor:</strong> {{ s.existingReport.fileName }} ({{ formatSize(s.existingReport.size) }})</div>
|
|
||||||
<div><strong>Nahraté:</strong> {{ new Date(s.existingReport.uploadedAt).toLocaleString() }}</div>
|
|
||||||
</v-alert>
|
</v-alert>
|
||||||
|
|
||||||
<v-form :ref="el => (s.formRef = el)" @submit.prevent="submitFor(s)">
|
<v-form :ref="el => (s.formRef = el)" @submit.prevent="submitFor(s)">
|
||||||
<v-row>
|
<v-row>
|
||||||
<v-col cols="12" md="6">
|
<v-col cols="12" md="6">
|
||||||
<h4 class="section-title">Výkaz</h4>
|
<h4 class="section-title">Výkaz</h4>
|
||||||
<v-file-input
|
<v-file-input class="no-left-gap" :model-value="s.reportFile"
|
||||||
class="no-left-gap"
|
|
||||||
:model-value="s.reportFile"
|
|
||||||
@update:model-value="onReportChange(s, $event as any)"
|
@update:model-value="onReportChange(s, $event as any)"
|
||||||
:rules="[rules.reportRequiredIfMissing(s), rules.isPdf, rules.maxSize]"
|
:rules="[rules.reportRequiredIfMissing(s), rules.isPdf, rules.maxSize]"
|
||||||
accept=".pdf,application/pdf"
|
accept=".pdf,application/pdf" prepend-icon="" label="Nahrať PDF výkaz"
|
||||||
prepend-icon=""
|
variant="outlined" show-size clearable :disabled="s.loading"
|
||||||
label="Nahrať PDF výkaz"
|
hint="Povolené: PDF, max 10 MB" persistent-hint />
|
||||||
variant="outlined"
|
|
||||||
show-size
|
|
||||||
clearable
|
|
||||||
:disabled="s.loading"
|
|
||||||
hint="Povolené: PDF, max 10 MB"
|
|
||||||
persistent-hint
|
|
||||||
/>
|
|
||||||
|
|
||||||
<!-- lokálny náhľad/stiahnutie súboru -->
|
<!-- lokálny náhľad/stiahnutie súboru -->
|
||||||
<div v-if="s.localPreviewUrl" class="mt-2 d-flex ga-2">
|
<div v-if="s.localPreviewUrl" class="mt-2 d-flex ga-2">
|
||||||
<v-btn :href="s.localPreviewUrl" target="_blank" variant="tonal" prepend-icon="mdi-open-in-new">
|
<v-btn :href="s.localPreviewUrl" target="_blank" variant="tonal"
|
||||||
|
prepend-icon="mdi-open-in-new">
|
||||||
Otvoriť náhľad
|
Otvoriť náhľad
|
||||||
</v-btn>
|
</v-btn>
|
||||||
<v-btn :href="s.localPreviewUrl" :download="s.reportFile?.name" variant="text" prepend-icon="mdi-download">
|
<v-btn :href="s.localPreviewUrl" :download="s.reportFile?.name"
|
||||||
|
variant="text" prepend-icon="mdi-download">
|
||||||
Stiahnuť vybraný súbor
|
Stiahnuť vybraný súbor
|
||||||
</v-btn>
|
</v-btn>
|
||||||
</div>
|
</div>
|
||||||
@@ -254,20 +231,15 @@ async function submitFor(s: Student) {
|
|||||||
|
|
||||||
<v-col cols="12" md="6">
|
<v-col cols="12" md="6">
|
||||||
<h4 class="section-title">Rozhodnutie</h4>
|
<h4 class="section-title">Rozhodnutie</h4>
|
||||||
<v-radio-group v-model="s.decision" :rules="[rules.decisionRequired]" inline>
|
<v-radio-group v-model="s.decision" :rules="[rules.decisionRequired]"
|
||||||
|
inline>
|
||||||
<v-radio label="Potvrdiť" value="APPROVE" />
|
<v-radio label="Potvrdiť" value="APPROVE" />
|
||||||
<v-radio label="Zamietnuť" value="REJECT" />
|
<v-radio label="Zamietnuť" value="REJECT" />
|
||||||
</v-radio-group>
|
</v-radio-group>
|
||||||
|
|
||||||
<v-textarea
|
<v-textarea v-if="s.decision === 'REJECT'" v-model="s.rejectNote"
|
||||||
v-if="s.decision === 'REJECT'"
|
label="Dôvod zamietnutia (nepovinné)" variant="outlined" rows="3"
|
||||||
v-model="s.rejectNote"
|
auto-grow :disabled="s.loading" />
|
||||||
label="Dôvod zamietnutia (nepovinné)"
|
|
||||||
variant="outlined"
|
|
||||||
rows="3"
|
|
||||||
auto-grow
|
|
||||||
:disabled="s.loading"
|
|
||||||
/>
|
|
||||||
</v-col>
|
</v-col>
|
||||||
</v-row>
|
</v-row>
|
||||||
|
|
||||||
@@ -277,20 +249,9 @@ async function submitFor(s: Student) {
|
|||||||
</v-btn>
|
</v-btn>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<v-alert
|
<v-alert v-if="s.success" type="success" class="mt-3" title="Odoslané"
|
||||||
v-if="s.success"
|
text="Rozhodnutie bolo zaznamenané." />
|
||||||
type="success"
|
<v-alert v-if="s.error" type="error" class="mt-3" title="Chyba" :text="s.error" />
|
||||||
class="mt-3"
|
|
||||||
title="Odoslané"
|
|
||||||
text="Rozhodnutie bolo zaznamenané."
|
|
||||||
/>
|
|
||||||
<v-alert
|
|
||||||
v-if="s.error"
|
|
||||||
type="error"
|
|
||||||
class="mt-3"
|
|
||||||
title="Chyba"
|
|
||||||
:text="s.error"
|
|
||||||
/>
|
|
||||||
</v-form>
|
</v-form>
|
||||||
</v-card-text>
|
</v-card-text>
|
||||||
</v-card>
|
</v-card>
|
||||||
@@ -302,17 +263,18 @@ async function submitFor(s: Student) {
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<style scoped>
|
<style scoped>
|
||||||
|
|
||||||
.page-container {
|
.page-container {
|
||||||
max-width: 1120px;
|
max-width: 1120px;
|
||||||
margin: 0 auto;
|
margin: 0 auto;
|
||||||
padding-left: 24px;
|
padding-left: 24px;
|
||||||
padding-right: 24px;
|
padding-right: 24px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.form-left {
|
.form-left {
|
||||||
padding-left: 24px;
|
padding-left: 24px;
|
||||||
padding-right: 24px;
|
padding-right: 24px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.page-title {
|
.page-title {
|
||||||
font-size: 32px;
|
font-size: 32px;
|
||||||
line-height: 1.2;
|
line-height: 1.2;
|
||||||
@@ -320,39 +282,45 @@ async function submitFor(s: Student) {
|
|||||||
margin: 16px 0 8px;
|
margin: 16px 0 8px;
|
||||||
color: #1f1f1f;
|
color: #1f1f1f;
|
||||||
}
|
}
|
||||||
|
|
||||||
.page-lead {
|
.page-lead {
|
||||||
margin: 0 0 24px 0;
|
margin: 0 0 24px 0;
|
||||||
color: #6b6b6b;
|
color: #6b6b6b;
|
||||||
}
|
}
|
||||||
|
|
||||||
.section-title {
|
.section-title {
|
||||||
font-size: 18px;
|
font-size: 18px;
|
||||||
font-weight: 700;
|
font-weight: 700;
|
||||||
margin: 8px 0 8px;
|
margin: 8px 0 8px;
|
||||||
color: #1f1f1f;
|
color: #1f1f1f;
|
||||||
}
|
}
|
||||||
|
|
||||||
.student-header {
|
.student-header {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
padding: 12px 16px;
|
padding: 12px 16px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.student-title {
|
.student-title {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
gap: 8px;
|
gap: 8px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.student-name {
|
.student-name {
|
||||||
font-size: 20px;
|
font-size: 20px;
|
||||||
font-weight: 700;
|
font-weight: 700;
|
||||||
margin: 0;
|
margin: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.student-actions {
|
.student-actions {
|
||||||
display: flex;
|
display: flex;
|
||||||
gap: 8px;
|
gap: 8px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.actions {
|
.actions {
|
||||||
margin-top: 12px;
|
margin-top: 12px;
|
||||||
margin-bottom: 8px;
|
margin-bottom: 8px;
|
||||||
}
|
}
|
||||||
|
|
||||||
</style>
|
</style>
|
||||||
Reference in New Issue
Block a user