From e18c605c8c1caaac7b18e85995720e136f7331f4 Mon Sep 17 00:00:00 2001 From: "selina.mail" Date: Fri, 16 Feb 2024 15:53:27 +0100 Subject: [PATCH] addded single asset --- components/server/Accounting.vue | 185 ++-- components/server/Asset.vue | 78 +- components/server/AssetSolutionList.vue | 30 +- components/server/AssetTable.vue | 85 +- components/server/AssetTableNoClient.vue | 50 +- components/server/ClientTable.vue | 36 +- components/server/HardwareSpecifications.vue | 9 +- components/server/InstanceChecklist.vue | 64 +- components/server/IssueSlipTable.vue | 66 +- components/server/IssueSlipTableNoClient.vue | 49 +- components/server/IssueTable.vue | 52 +- components/server/IssueVariants.vue | 65 +- .../server/MaintenanceVisitsInstanceTable.vue | 72 +- .../server/MaintenanceVisitsTemplateTable.vue | 66 +- ...MaintenanceVisitsTemplateTableNoClient.vue | 52 +- components/server/OrderingInformation.vue | 50 +- .../server/ProductionOrdersInstanceTable.vue | 84 +- .../server/ProductionOrdersTemplateTable.vue | 54 +- .../ProductionOrdersTemplateTableNoClient.vue | 40 +- components/server/SoftwareSpecifications.vue | 41 +- components/server/SolutionChecklist.vue | 53 +- components/server/SolutionTable.vue | 64 +- components/server/SolutionTableNoClient.vue | 53 +- components/server/TemplateChecklist.vue | 53 +- components/server/UserRightsList.vue | 70 +- documentation/.$Datenbankmodell.drawio.dtmp | 974 ------------------ documentation/Datenbankmodell.drawio | 6 +- layouts/Actionbar.vue | 2 +- layouts/Navigationbar.vue | 12 +- pages/assets.vue | 41 +- plugins/vuex.js | 35 + router/index.js | 65 ++ routerFrontend/index.js | 63 -- server/api/login.ts | 2 +- 34 files changed, 972 insertions(+), 1749 deletions(-) delete mode 100644 documentation/.$Datenbankmodell.drawio.dtmp create mode 100644 router/index.js delete mode 100644 routerFrontend/index.js diff --git a/components/server/Accounting.vue b/components/server/Accounting.vue index 57e6ad8..b072f7d 100644 --- a/components/server/Accounting.vue +++ b/components/server/Accounting.vue @@ -3,96 +3,98 @@
Accounting:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
- Action - DateComments
- Supplier request - ......
- Supplier offer - ......
- Client offer - ......
- Client order - ......
- Supplier order - ......
- Ingress - ......
- Egress - ......
- Ingress bill - ......
- Egress bill - ......
+ Action + DateComments
+ Supplier request + ......
+ Supplier offer + ......
+ Client offer + ......
+ Client order + ......
+ Supplier order + ......
+ Ingress + ......
+ Egress + ......
+ Ingress bill + ......
+ Egress bill + ......
@@ -257,4 +259,5 @@ tr#row-2 { .Comments { width: 40%; -} \ No newline at end of file +} + \ No newline at end of file diff --git a/components/server/Asset.vue b/components/server/Asset.vue index 88f6558..ad3f49a 100644 --- a/components/server/Asset.vue +++ b/components/server/Asset.vue @@ -53,8 +53,8 @@

Description:

-
{{ item.description }}
+
@@ -62,8 +62,8 @@

Notes:

-
{{ item.notes }}
+
@@ -84,11 +84,10 @@ const item = ref({}); // get config item from id const getItemById = async () => { - // later itemIndex from route params - let itemIndex = 9; + console.log(this.chosenAssetId) try { const response = await Axios.get( - `https://${serversideConfig.url}:3000/api/getConfigItem/${itemIndex}` + `https://${serversideConfig.url}:3000/api/getConfigItem/${chosenAssetId}` ); item.value = response.data; } catch (err) { @@ -96,6 +95,63 @@ const getItemById = async () => { } } +//update data +const updateConfigItem = async () => { + if (item.assetName.trim() === "") { + alert("Please add a config item name!"); + return; + } else { + var counter = 0; + //later check if ci already exists + // for (let key in item.value) { + // if (this.configItems[key].assetName === this.item.assetName) { + // counter += 1; + // } + // } + if (counter == 1) { + alert("This asset name already exists. Please choose an unique asset name or modify respectively delete the old one!"); + return; + } + try { + await Axios.put( + `https://${serversideConfig.url}:3000/api/updateConfigItem/${itemIndex}`, + { + primaryID: item.primaryID, + assetName: item.assetName, + customerID: item.customerID, + customer: item.customer, + location: item.location, + remoteLocation: item.remoteLocation, + type: item.type, + description: item.description, + notes: item.notes, + state: item.state, + lastView: item.lastView, + user: item.user, + hardwareBool: item.hardwareBool, + model: item.model, + serialnumber: item.serialnumber, + CPU: item.CPU, + RAM: item.RAM, + storageConfiguration: item.storageConfiguration, + miscellaneous: item.miscellaneous, + softwareBool: item.softwareBool, + software: item.software, + version: item.version, + licence: item.licence, + networkBool: item.networkBool, + IPv4: item.IPv4, + IPv6: item.IPv6, + MAC: item.MAC, + subnetmask: item.subnetmask, + } + ); + } catch (err) { + console.log(err); + } + } +} + onMounted(() => { getItemById(); // console.log(editable.value) @@ -109,6 +165,9 @@ export default { computed: { editable() { return this.$store.state.assetEditable + }, + chosenAssetId() { + return this.$store.state.chosenAssetId } }, } @@ -209,7 +268,7 @@ export default { .data { display: flex; - flex-direction: row; + overflow-x: auto; align-items: flex-start; padding: 0 0.625rem; border-radius: 0.3125rem; @@ -231,6 +290,9 @@ export default { .data#notes, .data#description { align-self: stretch; + /* width: 45%; */ + scrollbar-width: none; + overflow-x: auto; } .asset-data { diff --git a/components/server/AssetSolutionList.vue b/components/server/AssetSolutionList.vue index cfe2cd3..c17c152 100644 --- a/components/server/AssetSolutionList.vue +++ b/components/server/AssetSolutionList.vue @@ -2,18 +2,21 @@
Solutions:
- - - - - - - - + + + + + + + + + + +
- SolutionType
- ......
+ SolutionType
+ ......
@@ -168,4 +171,5 @@ th { .label-lightmode { color: #000; -} \ No newline at end of file +} + \ No newline at end of file diff --git a/components/server/AssetTable.vue b/components/server/AssetTable.vue index d51fbf3..cda9f06 100644 --- a/components/server/AssetTable.vue +++ b/components/server/AssetTable.vue @@ -1,42 +1,48 @@ @@ -67,6 +73,13 @@ onMounted(async () => { diff --git a/components/server/AssetTableNoClient.vue b/components/server/AssetTableNoClient.vue index 6ef1e2d..18de26f 100644 --- a/components/server/AssetTableNoClient.vue +++ b/components/server/AssetTableNoClient.vue @@ -2,30 +2,32 @@
Assets:
- - - - - - - - - - - - + + + + + + + + + + + + + +
- Name - Type - StateUser
- ... - ... - ......
+ Name + Type + StateUser
+ ... + ... + ......
diff --git a/components/server/ClientTable.vue b/components/server/ClientTable.vue index 50b521c..f2a9326 100644 --- a/components/server/ClientTable.vue +++ b/components/server/ClientTable.vue @@ -1,20 +1,25 @@ @@ -126,5 +131,4 @@ th { .Name { width: 60%; -} - \ No newline at end of file +} \ No newline at end of file diff --git a/components/server/HardwareSpecifications.vue b/components/server/HardwareSpecifications.vue index 1b0a68f..ae8832e 100644 --- a/components/server/HardwareSpecifications.vue +++ b/components/server/HardwareSpecifications.vue @@ -39,8 +39,9 @@

Storage configuration:

-
{{ item.storageConfiguration }}
+ @@ -49,8 +50,8 @@

Miscellaneous:

-
{{ item.miscellaneous }}
+
diff --git a/components/server/InstanceChecklist.vue b/components/server/InstanceChecklist.vue index 6570d0c..2707f3e 100644 --- a/components/server/InstanceChecklist.vue +++ b/components/server/InstanceChecklist.vue @@ -2,37 +2,39 @@
Checklist:
- - - - - - - - - - - - - - + + + + + + + + + + + + + + + +
- Step - Asset - Task - CommentsDone
- ... - ... - ... - ...
+ Step + Asset + Task + CommentsDone
+ ... + ... + ... + ...
diff --git a/components/server/IssueSlipTable.vue b/components/server/IssueSlipTable.vue index 5dfc07a..db0e3a9 100644 --- a/components/server/IssueSlipTable.vue +++ b/components/server/IssueSlipTable.vue @@ -2,35 +2,40 @@
Last viewed:
- - - - - - - - - - - - - - + + + + + + + + + + + + + + + +
- ClientID - - Ticket No. - Creation DateUser
- {{ issueSlip.customer }} - {{ issueSlip.primaryID }} - {{ issueSlip.ticketNo }} - {{ issueSlip.creationDate }} {{ issueSlip.user }}
+ Client + ID + + Ticket No. + Creation DateUser
+ {{ issueSlip.customer }} + {{ issueSlip.primaryID }} + {{ issueSlip.ticketNo }} + {{ issueSlip.creationDate }} {{ issueSlip.user }}
@@ -213,5 +218,4 @@ th { .label-lightmode { color: #000; -} - \ No newline at end of file +} \ No newline at end of file diff --git a/components/server/IssueSlipTableNoClient.vue b/components/server/IssueSlipTableNoClient.vue index 20990bf..54714e0 100644 --- a/components/server/IssueSlipTableNoClient.vue +++ b/components/server/IssueSlipTableNoClient.vue @@ -2,28 +2,33 @@
Issue slip:
- - - - - - - - - - - - + + + + + + + + + + + + + +
ID - - Ticket No. - Creation DateUser
- ... - ... - ......
+ ID + + Ticket No. + Creation DateUser
+ ... + ... + ......
diff --git a/components/server/IssueTable.vue b/components/server/IssueTable.vue index 460fa83..67697cc 100644 --- a/components/server/IssueTable.vue +++ b/components/server/IssueTable.vue @@ -2,31 +2,33 @@
Issues:
- - - - - - - - - - - - + + + + + + + + + + + + + +
- Name - Type - StateAmount
- {{ issue.name }} - {{ issue.type }} - {{ issue.state }}{{ issue.amount }}
+ Name + Type + StateAmount
+ {{ issue.name }} + {{ issue.type }} + {{ issue.state }}{{ issue.amount }}
diff --git a/components/server/IssueVariants.vue b/components/server/IssueVariants.vue index fa3af27..0bad0ef 100644 --- a/components/server/IssueVariants.vue +++ b/components/server/IssueVariants.vue @@ -2,36 +2,38 @@
Variants:
- - - - - - - - - - - - - - + + + + + + + + + + + + + + + +
- Name - Properties - State - AmountPrice
- ... - ... - ... - ......
+ Name + Properties + State + AmountPrice
+ ... + ... + ... + ......
@@ -198,4 +200,5 @@ th { .label-lightmode { color: #000; -} \ No newline at end of file +} + \ No newline at end of file diff --git a/components/server/MaintenanceVisitsInstanceTable.vue b/components/server/MaintenanceVisitsInstanceTable.vue index e2c4776..0ad927e 100644 --- a/components/server/MaintenanceVisitsInstanceTable.vue +++ b/components/server/MaintenanceVisitsInstanceTable.vue @@ -2,40 +2,44 @@
Instances:
- - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + +
- ID - Maintenance type - State - Creation date - Completion dateUser
- ... - ... - ... - ... - ......
+ ID + Maintenance type + State + Creation date + Completion dateUser
+ ... + ... + ... + ... + ......
diff --git a/components/server/MaintenanceVisitsTemplateTable.vue b/components/server/MaintenanceVisitsTemplateTable.vue index c9d3564..902ce6c 100644 --- a/components/server/MaintenanceVisitsTemplateTable.vue +++ b/components/server/MaintenanceVisitsTemplateTable.vue @@ -2,35 +2,40 @@
Last viewed:
- - - - - - - - - - - - - - + + + + + + + + + + + + + + + +
- Client - NameID - - TypeUser
- {{ template.customer }} - {{ template.name }} - {{ template.checklistID }} - {{ template.type }} {{ template.user }}
+ Client + Name + ID + + TypeUser
+ {{ template.customer }} + {{ template.name }} + {{ template.checklistID }} + {{ template.type }} {{ template.user }}
@@ -215,5 +220,4 @@ th { .label-lightmode { color: #000; -} - \ No newline at end of file +} \ No newline at end of file diff --git a/components/server/MaintenanceVisitsTemplateTableNoClient.vue b/components/server/MaintenanceVisitsTemplateTableNoClient.vue index 27ecfca..e4dc813 100644 --- a/components/server/MaintenanceVisitsTemplateTableNoClient.vue +++ b/components/server/MaintenanceVisitsTemplateTableNoClient.vue @@ -2,28 +2,33 @@
Templates:
- - - - - - - - - - - - + + + + + + + + + + + + + +
- NameID - - TypeUser
- ... - ... - ......
+ Name + ID + + TypeUser
+ ... + ... + ......
@@ -179,5 +184,4 @@ th { .label-lightmode { color: #000; -} - \ No newline at end of file +} \ No newline at end of file diff --git a/components/server/OrderingInformation.vue b/components/server/OrderingInformation.vue index 84b8abf..a7d932f 100644 --- a/components/server/OrderingInformation.vue +++ b/components/server/OrderingInformation.vue @@ -3,30 +3,32 @@
Ordering information:
- - - - - - - - - - - - + + + + + + + + + + + + + +
- Article - Amount - PriceComments
- ... - ... - ......
+ Article + Amount + PriceComments
+ ... + ... + ......
diff --git a/components/server/ProductionOrdersInstanceTable.vue b/components/server/ProductionOrdersInstanceTable.vue index 1160d8a..05f071f 100644 --- a/components/server/ProductionOrdersInstanceTable.vue +++ b/components/server/ProductionOrdersInstanceTable.vue @@ -2,46 +2,50 @@
Instances:
- - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + +
- ID - Ticket No. - Asset - State - Creation date - Completion dateUser
- ... - ... - ... - ... - ... - ......
+ ID + Ticket No. + Asset + State + Creation date + Completion dateUser
+ ... + ... + ... + ... + ... + ......
diff --git a/components/server/ProductionOrdersTemplateTable.vue b/components/server/ProductionOrdersTemplateTable.vue index 5c65f80..d71ed70 100644 --- a/components/server/ProductionOrdersTemplateTable.vue +++ b/components/server/ProductionOrdersTemplateTable.vue @@ -2,29 +2,34 @@
Last viewed:
- - - - - - - - - - - - + + + + + + + + + + + + + +
- Client - NameID - User
- {{ template.customer }} - {{ template.name }} - {{ template.templateID }} {{ template.user }}
+ Client + Name + ID + User
+ {{ template.customer }} + {{ template.name }} + {{ template.templateID }} {{ template.user }}
@@ -196,5 +201,4 @@ th { .label-lightmode { color: #000; -} - \ No newline at end of file +} \ No newline at end of file diff --git a/components/server/ProductionOrdersTemplateTableNoClient.vue b/components/server/ProductionOrdersTemplateTableNoClient.vue index b6e3053..01cbe48 100644 --- a/components/server/ProductionOrdersTemplateTableNoClient.vue +++ b/components/server/ProductionOrdersTemplateTableNoClient.vue @@ -2,22 +2,27 @@
Templates:
- - - - - - - - - - + + + + + + + + + + + +
- NameID - User
- ... - ......
+ Name + ID + User
+ ... + ......
@@ -160,5 +165,4 @@ th { .label-lightmode { color: #000; -} - \ No newline at end of file +} \ No newline at end of file diff --git a/components/server/SoftwareSpecifications.vue b/components/server/SoftwareSpecifications.vue index 2c20710..608aac0 100644 --- a/components/server/SoftwareSpecifications.vue +++ b/components/server/SoftwareSpecifications.vue @@ -3,24 +3,26 @@
Software specifications:
- - - - - - - - - - + + + + + + + + + + + +
- Software - VersionLicense
- {{ item.software }} - {{ item.version }}{{ item.license }}
+ Software + VersionLicense
+ {{ item.software }} + {{ item.version }}{{ item.license }}
@@ -201,4 +203,5 @@ th { .License { width: 25%; -} \ No newline at end of file +} + \ No newline at end of file diff --git a/components/server/SolutionChecklist.vue b/components/server/SolutionChecklist.vue index f06822c..0e503ed 100644 --- a/components/server/SolutionChecklist.vue +++ b/components/server/SolutionChecklist.vue @@ -2,30 +2,32 @@
Checklist:
- - - - - - - - - - - - + + + + + + + + + + + + + +
- Step - Asset - TaskComments
- ... - ... - ......
+ Step + Asset + TaskComments
+ ... + ... + ......
@@ -180,4 +182,5 @@ th { .label-lightmode { color: #000; -} \ No newline at end of file +} + \ No newline at end of file diff --git a/components/server/SolutionTable.vue b/components/server/SolutionTable.vue index 3d24632..4d7b800 100644 --- a/components/server/SolutionTable.vue +++ b/components/server/SolutionTable.vue @@ -2,37 +2,39 @@
Last viewed:
- - - - - - - - - - - - - - + + + + + + + + + + + + + + + +
- Client - Name - Asset - TypeUser
- {{ sol.customer }} - {{ sol.solutionName }} - {{ sol.assetName }} - {{ sol.type }} {{ sol.user }}
+ Client + Name + Asset + TypeUser
+ {{ sol.customer }} + {{ sol.solutionName }} + {{ sol.assetName }} + {{ sol.type }} {{ sol.user }}
diff --git a/components/server/SolutionTableNoClient.vue b/components/server/SolutionTableNoClient.vue index 315ea65..7fb2c00 100644 --- a/components/server/SolutionTableNoClient.vue +++ b/components/server/SolutionTableNoClient.vue @@ -2,30 +2,32 @@
Solutions:
- - - - - - - - - - - - + + + + + + + + + + + + + +
- Name - Asset - TypeUser
- ... - ... - ......
+ Name + Asset + TypeUser
+ ... + ... + ......
@@ -180,4 +182,5 @@ th { .label-lightmode { color: #000; -} \ No newline at end of file +} + \ No newline at end of file diff --git a/components/server/TemplateChecklist.vue b/components/server/TemplateChecklist.vue index ee1a576..9b6be34 100644 --- a/components/server/TemplateChecklist.vue +++ b/components/server/TemplateChecklist.vue @@ -2,30 +2,32 @@
Checklist:
- - - - - - - - - - - - + + + + + + + + + + + + + +
- Step - Asset - TaskComments
- ... - ... - ......
+ Step + Asset + TaskComments
+ ... + ... + ......
@@ -180,4 +182,5 @@ th { .label-lightmode { color: #000; -} \ No newline at end of file +} + \ No newline at end of file diff --git a/components/server/UserRightsList.vue b/components/server/UserRightsList.vue index 5ca3dc4..19a52e2 100644 --- a/components/server/UserRightsList.vue +++ b/components/server/UserRightsList.vue @@ -2,40 +2,42 @@
Rights:
- - - - - - - - - - - - - - + + + + + + + + + + + + + + + +
- User - Admin - Edit/Delete - CreateView
- ... - - - - - -
+ User + Admin + Edit/Delete + CreateView
+ ... + + + + + +
diff --git a/documentation/.$Datenbankmodell.drawio.dtmp b/documentation/.$Datenbankmodell.drawio.dtmp deleted file mode 100644 index 51a6170..0000000 --- a/documentation/.$Datenbankmodell.drawio.dtmp +++ /dev/null @@ -1,974 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/documentation/Datenbankmodell.drawio b/documentation/Datenbankmodell.drawio index 9ebfbe2..3ada053 100644 --- a/documentation/Datenbankmodell.drawio +++ b/documentation/Datenbankmodell.drawio @@ -1,6 +1,6 @@ - + - + @@ -130,7 +130,7 @@ - + diff --git a/layouts/Actionbar.vue b/layouts/Actionbar.vue index dfc00c1..dc1ed3b 100644 --- a/layouts/Actionbar.vue +++ b/layouts/Actionbar.vue @@ -4,7 +4,7 @@
+ src="../icons/actionbar-icons/Indicator-Icon-Opened.svg"/>
- - - - - - - - - + + + + + + + + +
@@ -36,20 +36,27 @@ definePageMeta({ }) const darkMode = ref(true) - -// to render the right components -const onAssetlist = ref(true) -const onCustomerAssetlist = ref(false) -const onAsset = ref(true) -const onSolutionlistAsset = ref(false) - +