optimize UI
hide maintenance
This commit is contained in:
parent
8e64b549d7
commit
2c541eb5aa
18 changed files with 30 additions and 26 deletions
|
@ -36,12 +36,9 @@ export default defineComponent({
|
|||
document.getSelection()?.toString() || this.clickedOnEl.value || this.clickedOnEl.innerText || "";
|
||||
|
||||
let selection = document.getSelection()?.toString();
|
||||
console.log(selection);
|
||||
if (selection == "") {
|
||||
console.log("jo");
|
||||
const range = document.createRange();
|
||||
range.selectNode(this.clickedOnEl);
|
||||
console.log(range);
|
||||
window.getSelection()?.removeAllRanges();
|
||||
window.getSelection()?.addRange(range);
|
||||
}
|
||||
|
|
|
@ -72,7 +72,7 @@ import { ChevronRightIcon, ChevronLeftIcon, XMarkIcon } from "@heroicons/vue/20/
|
|||
import Spinner from "./Spinner.vue";
|
||||
import type { FieldType } from "@/types/dynamicQueries";
|
||||
import { QrCodeIcon } from "@heroicons/vue/24/outline";
|
||||
import { useModalStore } from "../stores/modal";
|
||||
import { useModalStore } from "@/stores/modal";
|
||||
|
||||
const props = defineProps({
|
||||
items: { type: Array<T>, default: [] },
|
||||
|
|
|
@ -27,7 +27,7 @@ import { useModalStore } from "@/stores/modal";
|
|||
import { XMarkIcon } from "@heroicons/vue/24/outline";
|
||||
import Scanner from "./Scanner.vue";
|
||||
import Phone from "./Phone.vue";
|
||||
import { useScannerStore } from "../../stores/admin/scanner";
|
||||
import { useScannerStore } from "@/stores/admin/scanner";
|
||||
</script>
|
||||
|
||||
<script lang="ts">
|
||||
|
|
|
@ -37,7 +37,7 @@
|
|||
<script setup lang="ts">
|
||||
import { defineComponent } from "vue";
|
||||
import { mapActions, mapState } from "pinia";
|
||||
import { useScannerStore } from "../../stores/admin/scanner";
|
||||
import { useScannerStore } from "@/stores/admin/scanner";
|
||||
import { ArrowRightIcon, QrCodeIcon, TrashIcon } from "@heroicons/vue/24/outline";
|
||||
import TextCopy from "../TextCopy.vue";
|
||||
import QRCode from "qrcode";
|
||||
|
@ -84,9 +84,7 @@ export default defineComponent({
|
|||
.then((res) => {
|
||||
(this.$refs.qr as HTMLImageElement).src = res;
|
||||
})
|
||||
.catch((err) => {
|
||||
console.log(err);
|
||||
});
|
||||
.catch((err) => {});
|
||||
},
|
||||
},
|
||||
});
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
<script setup lang="ts">
|
||||
import { defineComponent, markRaw, defineAsyncComponent } from "vue";
|
||||
import { QrCodeIcon } from "@heroicons/vue/24/outline";
|
||||
import { useModalStore } from "../../stores/modal";
|
||||
import { useModalStore } from "@/stores/modal";
|
||||
import { mapActions } from "pinia";
|
||||
</script>
|
||||
|
||||
|
|
|
@ -18,9 +18,9 @@
|
|||
<script setup lang="ts">
|
||||
import { defineAsyncComponent, defineComponent, markRaw } from "vue";
|
||||
import { mapState, mapActions } from "pinia";
|
||||
import { useScannerStore } from "../../stores/admin/scanner";
|
||||
import { useScannerStore } from "@/stores/admin/scanner";
|
||||
import { LinkIcon, LinkSlashIcon, NoSymbolIcon, QrCodeIcon, RectangleStackIcon } from "@heroicons/vue/24/outline";
|
||||
import { useModalStore } from "../../stores/modal";
|
||||
import { useModalStore } from "@/stores/modal";
|
||||
</script>
|
||||
|
||||
<script lang="ts">
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
import { useEquipmentStore } from "@/stores/admin/unit/equipment/equipment";
|
||||
import { useEquipmentDamageReportStore } from "@/stores/admin/unit/equipment/damageReport";
|
||||
import { useEquipmentInspectionStore } from "@/stores/admin/unit/equipment/inspection";
|
||||
import { useEquipmentRepairStore } from "@/stores/admin/unit/equipment/repair";
|
||||
|
||||
export async function setEquipmentId(to: any, from: any, next: any) {
|
||||
const equipmentStore = useEquipmentStore();
|
||||
|
@ -8,6 +9,7 @@ export async function setEquipmentId(to: any, from: any, next: any) {
|
|||
|
||||
useEquipmentDamageReportStore().$reset();
|
||||
useEquipmentInspectionStore().$reset();
|
||||
useEquipmentRepairStore().$reset();
|
||||
|
||||
next();
|
||||
}
|
||||
|
@ -19,6 +21,7 @@ export async function resetEquipmentStores(to: any, from: any, next: any) {
|
|||
|
||||
useEquipmentDamageReportStore().$reset();
|
||||
useEquipmentInspectionStore().$reset();
|
||||
useEquipmentRepairStore().$reset();
|
||||
|
||||
next();
|
||||
}
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
import { useVehicleStore } from "@/stores/admin/unit/vehicle/vehicle";
|
||||
import { useVehicleDamageReportStore } from "@/stores/admin/unit/vehicle/damageReport";
|
||||
import { useVehicleInspectionStore } from "@/stores/admin/unit/vehicle/inspection";
|
||||
import { useVehicleRepairStore } from "@/stores/admin/unit/vehicle/repair";
|
||||
|
||||
export async function setVehicleId(to: any, from: any, next: any) {
|
||||
const vehicleStore = useVehicleStore();
|
||||
|
@ -8,6 +9,7 @@ export async function setVehicleId(to: any, from: any, next: any) {
|
|||
|
||||
useVehicleDamageReportStore().$reset();
|
||||
useVehicleInspectionStore().$reset();
|
||||
useVehicleRepairStore().$reset();
|
||||
|
||||
next();
|
||||
}
|
||||
|
@ -19,6 +21,7 @@ export async function resetVehicleStores(to: any, from: any, next: any) {
|
|||
|
||||
useVehicleDamageReportStore().$reset();
|
||||
useVehicleInspectionStore().$reset();
|
||||
useVehicleRepairStore().$reset();
|
||||
|
||||
next();
|
||||
}
|
||||
|
|
|
@ -1,13 +1,15 @@
|
|||
import { useWearableStore } from "@/stores/admin/unit/wearable/wearable";
|
||||
import { useWearableDamageReportStore } from "@/stores/admin/unit/wearable/damageReport";
|
||||
import { useWearableTypeInspectionPlanStore } from "@/stores/admin/unit/wearableType/inspectionPlan";
|
||||
import { useWearableRepairStore } from "@/stores/admin/unit/wearable/repair";
|
||||
import { useWearableInspectionStore } from "@/stores/admin/unit/wearable/inspection";
|
||||
|
||||
export async function setWearableId(to: any, from: any, next: any) {
|
||||
const wearableStore = useWearableStore();
|
||||
wearableStore.activeWearable = to.params?.wearableId ?? null;
|
||||
|
||||
useWearableDamageReportStore().$reset();
|
||||
useWearableTypeInspectionPlanStore().$reset();
|
||||
useWearableInspectionStore().$reset();
|
||||
useWearableRepairStore().$reset();
|
||||
|
||||
next();
|
||||
}
|
||||
|
@ -18,7 +20,8 @@ export async function resetWearableStores(to: any, from: any, next: any) {
|
|||
wearableStore.activeWearableObj = null;
|
||||
|
||||
useWearableDamageReportStore().$reset();
|
||||
useWearableTypeInspectionPlanStore().$reset();
|
||||
useWearableInspectionStore().$reset();
|
||||
useWearableRepairStore().$reset();
|
||||
|
||||
next();
|
||||
}
|
||||
|
|
|
@ -125,7 +125,9 @@ export const useNavigationStore = defineStore("navigation", {
|
|||
? [{ key: "respiratory_mission", title: "Atemschutz-Einsätze" }]
|
||||
: []),
|
||||
...(abilityStore.can("create", "unit", "inspection") ? [{ key: "inspection", title: "Prüfungen" }] : []),
|
||||
...(abilityStore.can("read", "unit", "maintenance") ? [{ key: "maintenance", title: "Wartungen" }] : []),
|
||||
...(false && abilityStore.can("read", "unit", "maintenance")
|
||||
? [{ key: "maintenance", title: "Wartungen" }]
|
||||
: []),
|
||||
...(abilityStore.can("read", "unit", "damage_report")
|
||||
? [{ key: "damage_report", title: "Schadensmeldungen" }]
|
||||
: []),
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import { defineStore } from "pinia";
|
||||
import { v4 as uuid } from "uuid";
|
||||
import { SocketManager } from "../../socketManager";
|
||||
import { SocketConnectionTypes } from "../../enums/socketEnum";
|
||||
import { SocketManager } from "@/socketManager";
|
||||
import { SocketConnectionTypes } from "@/enums/socketEnum";
|
||||
import { useNotificationStore } from "../notification";
|
||||
|
||||
export const useScannerStore = defineStore("scanner", {
|
||||
|
|
|
@ -46,8 +46,8 @@ import SidebarTemplate from "@/templates/Sidebar.vue";
|
|||
import RoutingLink from "@/components/admin/RoutingLink.vue";
|
||||
import { useAbilityStore } from "@/stores/ability";
|
||||
import { RouterView } from "vue-router";
|
||||
import { useScannerStore } from "../../stores/admin/scanner";
|
||||
import ScanSidebarInfo from "../../components/scanner/ScanSidebarInfo.vue";
|
||||
import { useScannerStore } from "@/stores/admin/scanner";
|
||||
import ScanSidebarInfo from "@/components/scanner/ScanSidebarInfo.vue";
|
||||
</script>
|
||||
|
||||
<script lang="ts">
|
||||
|
|
|
@ -56,7 +56,7 @@ export default defineComponent({
|
|||
tabs: [
|
||||
{ route: "admin-unit-equipment-overview", title: "Übersicht" },
|
||||
{ route: "admin-unit-equipment-inspection", title: "Prüfungen" },
|
||||
{ route: "admin-unit-equipment-maintenance", title: "Wartungen" },
|
||||
// { route: "admin-unit-equipment-maintenance", title: "Wartungen" },
|
||||
{ route: "admin-unit-equipment-damage_report", title: "Schadensmeldungen" },
|
||||
{ route: "admin-unit-equipment-repair", title: "Reparaturen" },
|
||||
],
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<template>
|
||||
<MainTemplate title="Wartungen / Reparaturen">
|
||||
<MainTemplate title="Wartungen">
|
||||
<template #diffMain>
|
||||
<div class="flex flex-col gap-2 grow px-7 overflow-hidden">
|
||||
<div class="flex flex-col grow gap-2 overflow-hidden">
|
||||
|
|
|
@ -56,7 +56,7 @@ export default defineComponent({
|
|||
tabs: [
|
||||
{ route: "admin-unit-vehicle-overview", title: "Übersicht" },
|
||||
{ route: "admin-unit-vehicle-inspection", title: "Prüfungen" },
|
||||
{ route: "admin-unit-vehicle-maintenance", title: "Wartungen" },
|
||||
// { route: "admin-unit-vehicle-maintenance", title: "Wartungen" },
|
||||
{ route: "admin-unit-vehicle-damage_report", title: "Schadensmeldungen" },
|
||||
{ route: "admin-unit-vehicle-repair", title: "Reparaturen" },
|
||||
],
|
||||
|
|
|
@ -56,7 +56,7 @@ export default defineComponent({
|
|||
tabs: [
|
||||
{ route: "admin-unit-wearable-overview", title: "Übersicht" },
|
||||
{ route: "admin-unit-wearable-inspection", title: "Prüfungen" },
|
||||
{ route: "admin-unit-wearable-maintenance", title: "Wartungen" },
|
||||
// { route: "admin-unit-wearable-maintenance", title: "Wartungen" },
|
||||
{ route: "admin-unit-wearable-damage_report", title: "Schadensmeldungen" },
|
||||
{ route: "admin-unit-wearable-repair", title: "Reparaturen" },
|
||||
],
|
||||
|
|
|
@ -101,7 +101,6 @@ export default defineComponent({
|
|||
if (d.image) this.content.image = d.image;
|
||||
},
|
||||
stepBack() {
|
||||
console.log("hi");
|
||||
if (this.step == 2 && this.usingBarcode) this.step = 0;
|
||||
else this.step--;
|
||||
this.successfull = Math.max(0, this.step - 1);
|
||||
|
|
|
@ -95,7 +95,6 @@ export default defineComponent({
|
|||
}
|
||||
},
|
||||
leave() {
|
||||
console.log("hi");
|
||||
SocketManager.getConnection(SocketConnectionTypes.pscanner)?.emit("session:leave");
|
||||
SocketManager.closeConnection(SocketConnectionTypes.pscanner);
|
||||
},
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue