fixed signup and renaming problems

This commit is contained in:
2024-03-12 17:46:44 +01:00
parent d1bdffb834
commit acae90ee13
17 changed files with 96 additions and 78 deletions

View File

@ -1,7 +1,7 @@
<template>
<section v-if="!addBool" :class="['information', darkMode ? 'section-darkmode' : 'section-lightmode']">
<h2 v-if="!editable" :class="['production-orders-template-name', darkMode ? 'h2-darkmode' : 'h2-lightmode']">{{
pot.name }}</h2>
pot.name }}</h2>
<input v-if="editable" v-model="pot.name" @change="updatePOT()"
:class="['data', 'pot-name-input', darkMode ? 'h2-darkmode' : 'h2-lightmode', darkMode ? 'h2-input-darkmode' : 'h2-input-lightmode', 'input']">
<div class="production-orders-template-data">
@ -100,7 +100,7 @@
</div>
</section>
</template>
<script setup>
import { ref, onMounted, watch } from 'vue';
import Axios from '../axios.config.js';
@ -143,9 +143,6 @@ const confirmDeletePOT = async () => {
if (confirm("Do you really want to delete this production order template? It cannot be undone!")) {
try {
await Axios.delete(`https://${clientsideConfig.url}:${clientsideConfig.port}/api/deleteProductionOrderTemplate/${chosenPOTId.value}`);
store.commit('undoDelete');
store.commit('resetStore');
store.commit('changeToTemplatelist');
} catch (err) {
console.log(err.response.statusText);
}
@ -154,6 +151,9 @@ const confirmDeletePOT = async () => {
} catch (err) {
console.log(err.response.statusText);
}
store.commit('undoDelete');
store.commit('resetStore');
store.commit('changeToTemplatelist');
} else {
store.commit('undoDelete');
}
@ -283,9 +283,9 @@ onMounted(() => {
export default {
name: "ProductionOrdersTemplate",
};
</script>
</script>
<style scoped>
.information {
display: flex;
@ -440,7 +440,7 @@ export default {
border-radius: 0.3125rem;
}
.customer-ID,
.customer-ID,
.user {
display: flex;
flex-direction: column;