added new features

This commit is contained in:
Luca Haid
2025-08-26 09:57:56 +02:00
parent 8628e27b8e
commit 075aaaef5f
8 changed files with 186 additions and 74 deletions
@@ -1,33 +1,40 @@
/*
* CSS for Workorder Table Row Highlighting (Balanced Colors)
* CSS for Workorder Table Row Highlighting
*/
/* 🔴 Urgent: Deadline passed or less than 1 week away */
/* Urgent: Deadline passed or less than 1 week away */
.table-hover .tt-rml-workorder-urgent:hover,
.tt-rml-workorder-urgent {
background-color: #f8d7da !important; /* Balanced Red */
background-color: #fbe9e7 !important; /* Soft Red */
}
/* 🟠 High Priority: Deadline less than 2 weeks away */
.table-hover .tt-rml-workorder-high:hover,
.tt-rml-workorder-high {
background-color: #ffd5a1 !important; /* Balanced Orange */
}
/* 🟡 Medium: Deadline less than 3 weeks away */
/* Medium: Deadline less than 3 weeks away */
.table-hover .tt-rml-workorder-medium:hover,
.tt-rml-workorder-medium {
background-color: #fff3cd !important; /* Balanced Yellow */
background-color: #fff8e1 !important; /* Soft Yellow */
}
/* 🟢 On Track: Deadline more than 3 weeks away */
/* On Track: Deadline more than 3 weeks away */
.table-hover .tt-rml-workorder-ontrack:hover,
.tt-rml-workorder-ontrack {
background-color: #d4edda !important; /* Balanced Green */
background-color: #e8f5e9 !important; /* Soft Green */
}
/* Irrelevant: No deadline or status makes it not applicable */
/* Irrelevant: No deadline or status makes it not applicable */
.table-hover .tt-rml-workorder-irrelevant:hover,
.tt-rml-workorder-irrelevant {
background-color: #e9ecef !important; /* Balanced Grey */
}
background-color: #fafafa !important; /* Very light grey */
}
.table-hover .tt-rml-workorder-high:hover,
.tt-rml-workorder-high {
background-color: #f8d7da !important; /* A slightly more intense red for high priority issues */
}
.tt-file-gallery-item.border.border-danger {
border: 4px solid #f1556c!important;
}
.RMLWorkorderCompany-table .modal-body {
overflow-y: hidden;
}
@@ -55,7 +55,7 @@ Vue.component('r-m-l-workorder-admin', {
additional-class="btn-link btn-sm p-0"
title="Auftrag auf Problem behoben setzen"
/>
</template>
<template v-slot:companyname="{ row }">
@@ -297,10 +297,10 @@ Vue.component('r-m-l-workorder-admin', {
}
},
async setToProblemSolved(row) {
// add a browser dialog to add some text
const text = prompt('Bitte geben Sie einen kurzen Text für den Eintrag ein:', '');
const text = prompt('Bitte geben Sie einen kurzen Text für den Journaleintrag ein:', '');
if (!text) {
if (text === null) return; // User cancelled
if (!text.trim()) {
window.notify('error', 'Bitte geben Sie einen Text ein.');
return;
}
@@ -364,7 +364,14 @@ Vue.component('rml-documentation-viewer-admin', {
<div class="card mb-3">
<div class="card-header"><h5><i class="fas fa-check-circle text-success mr-2"></i>Dokumentation akzeptieren</h5></div>
<div class="card-body">
<p class="small text-muted">Wenn die Dokumentation korrekt ist, können Sie sie hier akzeptieren.</p>
<p class="small text-muted">Prüfen Sie, ob alle erforderlichen Dokumente vorhanden und korrekt sind.</p>
<ul class="list-unstyled">
<li v-for="docType in requiredDocTypes" :key="docType.value" class="mb-2 d-flex align-items-center small">
<i :class="isUploaded(docType.value) ? 'fas fa-check-circle text-success' : 'far fa-circle text-muted'" class="fa-fw mr-2"></i>
<span>{{ docType.text }}</span>
</li>
</ul>
<hr>
<tt-button text="Dokumentation akzeptieren"
@click="$emit('accept-documentation', workorderId)"
additional-class="btn-success float-right"
@@ -409,9 +416,23 @@ Vue.component('rml-documentation-viewer-admin', {
correctionText: '',
newJournalMessage: '',
addingJournalEntry: false,
requiredDocTypes: [
{ value: 'photo_hup_mounted', text: 'Foto vom montierten HÜP' },
{ value: 'photo_hup_open', text: 'Foto von dem offenen HÜP' },
{ value: 'photo_splice_cassette_hup', text: 'Foto der Spleißkassette HÜP' },
{ value: 'photo_splice_cassette_fcp', text: 'Foto der Spleißkassette - FCP' },
{ value: 'photo_hup_closed_stickers', text: 'Foto vom geschlossenen HÜP mit allen Aufklebern' },
{ value: 'photo_fcp_labeled', text: 'Foto vom FCP beschriftet' },
{ value: 'photo_patch_position_osp', text: 'Foto der Patch-Position - OSP-Seite' },
{ value: 'photo_patch_position_anb', text: 'Foto der Patch-Position - ANB-Seite' },
{ value: 'measurement_protocol_otdr', text: 'ODTR Messung (1310nm & 1550nm)' },
]
}
},
methods: {
isUploaded(docType) {
return this.docs.some(doc => doc.documentType === docType);
},
async fetchData() {
this.loading = true;
try {
@@ -25,6 +25,12 @@
.tt-rml-workorder-irrelevant {
background-color: #fafafa !important; /* Very light grey */
}
.table-hover .tt-rml-workorder-high:hover,
.tt-rml-workorder-high {
background-color: #f8d7da !important; /* A slightly more intense red for high priority issues */
}
.tt-file-gallery-item.border.border-danger {
border: 4px solid #f1556c!important;
}
@@ -266,7 +266,7 @@ Vue.component('documentation-manager', {
<div class="card mb-3" v-if="workorder.status !== 'documented' && workorder.status !== 'completed'">
<div class="card-body">
<h5 class="card-title">Neues Dokument hochladen</h5>
<tt-select label="Dokumententyp" :options="requiredDocTypes" v-model="uploadData.documentType" sm row />
<tt-select label="Dokumententyp" :options="allDocTypes" v-model="uploadData.documentType" sm row />
<tt-input label="Beschreibung" v-model="uploadData.description" sm row placeholder="Optional"/>
<div class="form-group row">
<label class="col-form-label col-sm-4 col-form-label-sm">Dateien</label>
@@ -288,7 +288,7 @@ Vue.component('documentation-manager', {
<template v-slot:file-edit="{ file }">
<tt-select
label="Dokumententyp"
:options="requiredDocTypes"
:options="allDocTypes"
v-model="file.documentType"
sm
/>
@@ -334,15 +334,23 @@ Vue.component('documentation-manager', {
requiredDocTypes: [
{ value: 'photo_hup_mounted', text: 'Foto vom montierten HÜP' },
{ value: 'photo_hup_open', text: 'Foto von dem offenen HÜP' },
{ value: 'photo_splice_cassette', text: 'Foto der Spleißkassette' },
{ value: 'photo_splice_cassette_hup', text: 'Foto der Spleißkassette HÜP' },
{ value: 'photo_splice_cassette_fcp', text: 'Foto der Spleißkassette - FCP' },
{ value: 'photo_hup_closed_stickers', text: 'Foto vom geschlossenen HÜP mit allen Aufklebern' },
{ value: 'photo_fcp_labeled', text: 'Foto vom FCP beschriftet' },
{ value: 'photo_patch_position', text: 'Foto der Patch-Position' },
{ value: 'photo_patch_position_osp', text: 'Foto der Patch-Position - OSP-Seite' },
{ value: 'photo_patch_position_anb', text: 'Foto der Patch-Position - ANB-Seite' },
{ value: 'measurement_protocol_otdr', text: 'ODTR Messung (1310nm & 1550nm)' },
]
}
},
computed: {
allDocTypes() {
return [
...this.requiredDocTypes,
{ value: 'other', text: 'Sonstiges Dokument (optional)' }
];
},
canComplete() {
return this.requiredDocTypes.every(docType => this.isUploaded(docType.value));
},