feat: simplify internship document viewer and add support for reports

This commit is contained in:
2025-11-03 18:23:13 +01:00
parent 3e1783f733
commit f32ce9fc99
3 changed files with 64 additions and 117 deletions

View File

@@ -0,0 +1,61 @@
<script setup lang="ts">
import type { Internship } from '~/types/internships';
const props = defineProps<{
internship: Internship
}>();
</script>
<template>
<div>
<v-row>
<!-- Podpísaná zmluva -->
<v-col cols="12" md="6">
<v-card variant="outlined">
<v-card-title class="d-flex align-center ga-2">
<v-icon icon="mdi mdi-file-document-outline" />
Podpísaná zmluva / dohoda
</v-card-title>
<v-card-text>
<v-alert v-if="!props.internship.agreement" type="warning" variant="tonal" title="Neodovzdané"
text="Zmluva zatiaľ nebola nahratá." />
<div v-else>
<v-alert type="success" variant="tonal" title="Odovzdané" text="Zmluva bola nahratá." />
<v-btn prepend-icon="mdi-download" color="blue" class="mr-2 mt-2" to="/" block>
Stiahnuť
</v-btn>
</div>
</v-card-text>
</v-card>
</v-col>
<!-- Výkaz -->
<v-col cols="12" md="6">
<v-card variant="outlined">
<v-card-title class="d-flex align-center ga-2">
<v-icon icon="mdi-file-clock-outline" />
Výkaz
</v-card-title>
<v-card-text>
<v-alert v-if="!props.internship.report" type="info" variant="tonal" title="Neodovzdané"
text="Výkaz zatiaľ nebol nahratý." />
<div v-else>
<v-alert v-if="!props.internship.report_confirmed" type="error" variant="tonal"
title="Nepotvrdené" text="Výkaz bol nahratý, ale zatiaľ nebol potvrdený firmou." />
<v-alert v-else type="success" variant="tonal" title="Potvrdené"
text="Výkaz bol nahratý, aj potvrdený firmou." />
<v-btn prepend-icon="mdi-download" color="blue" class="mr-2 mt-2" to="/" block>
Stiahnuť
</v-btn>
</div>
</v-card-text>
</v-card>
</v-col>
</v-row>
</div>
</template>