Compare commits
16 Commits
Accounting
...
modularAct
| Author | SHA1 | Date | |
|---|---|---|---|
| 29fd2e0a15 | |||
| 3613565b39 | |||
| 7af5c0ce0d | |||
| ba8073b6f4 | |||
| acae90ee13 | |||
| d1bdffb834 | |||
| 3f111743ed | |||
| cbc1e73bb0 | |||
| 9954158475 | |||
| a7bbfea9c1 | |||
| 6d6b36bdd9 | |||
| fa29921afe | |||
| 889eb3571f | |||
| 6a4a53ce4b | |||
| 7c19ee9215 | |||
| 601449d7e0 |
14
app.vue
14
app.vue
@ -7,9 +7,21 @@
|
|||||||
|
|
||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
|
//import { createPinia } from "pinia";
|
||||||
|
//import piniaPluginPersistedState from "pinia-plugin-persistedstate"
|
||||||
|
|
||||||
//const layout = "empty";
|
|
||||||
|
|
||||||
|
//const layout = "empty";
|
||||||
|
//const route = useRoute();
|
||||||
|
//const pinia = createPinia();
|
||||||
|
//pinia.use(piniaPluginPersistedState);
|
||||||
|
|
||||||
|
|
||||||
|
useHead({
|
||||||
|
//title: `Tüit ERP - ${route.meta.title}`,
|
||||||
|
title: `tüit app`,
|
||||||
|
link: [{ rel: "icon", type: "image/png", href: "/favicon-gelb-rot-32x32.png" }]
|
||||||
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -1,14 +1,30 @@
|
|||||||
import axios from 'axios';
|
import axios, {AxiosError} from 'axios';
|
||||||
|
import clientsideConfig from './clientsideConfig'
|
||||||
|
|
||||||
//create axios instance
|
//create axios instance
|
||||||
const Axios = axios.create({
|
const Axios = axios.create({
|
||||||
// baseURL: `https://${serversideConfig.url}:${serversideConfig.port}`,
|
//baseURL: `https://${serversideConfig.url}:${serversideConfig.port}/`,
|
||||||
|
baseURL: `https://${clientsideConfig.url}:${clientsideConfig.port}/`,
|
||||||
headers: {
|
headers: {
|
||||||
// 'Accept': 'application/json',
|
// 'Accept': 'application/json',
|
||||||
'Content-Type': 'application/json',
|
'Content-Type': 'application/json',
|
||||||
//Authorization: `Bearer`,
|
//Authorization: `Bearer`,
|
||||||
Accept: "*",
|
Accept: "*",
|
||||||
},
|
},
|
||||||
|
withCredentials: true,
|
||||||
|
credentials: true,
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
|
Axios.interceptors.response.use((response) => response, (error) => {
|
||||||
|
|
||||||
|
if (error instanceof AxiosError) {
|
||||||
|
console.error('Status: ', error.response?.status, '\nHeaders: '. error.response?.headers, '\nMessage: '. error.response?.data.message)
|
||||||
|
} else { console.error('Error: ', error); };
|
||||||
|
|
||||||
|
if (error.response?.status === 403) { window.location.href = '/login'; };
|
||||||
|
|
||||||
|
return Promise.reject(error);
|
||||||
|
});
|
||||||
|
|
||||||
export default Axios;
|
export default Axios;
|
||||||
|
|||||||
@ -93,7 +93,15 @@ export const login = async (req, res, next) => {
|
|||||||
}
|
}
|
||||||
if (bResult) {
|
if (bResult) {
|
||||||
// password match
|
// password match
|
||||||
const token = jwt.sign(
|
const authtoken = jwt.sign(
|
||||||
|
{
|
||||||
|
username: result[0].username,
|
||||||
|
userId: result[0].id,
|
||||||
|
},
|
||||||
|
'SECRETTUEITKEY',
|
||||||
|
{ expiresIn: '300s' } // 5min
|
||||||
|
);
|
||||||
|
const refreshtoken = jwt.sign(
|
||||||
{
|
{
|
||||||
username: result[0].username,
|
username: result[0].username,
|
||||||
userId: result[0].id,
|
userId: result[0].id,
|
||||||
@ -115,7 +123,7 @@ export const login = async (req, res, next) => {
|
|||||||
const results = await ownConn.query(sql1, [dateTimeString, result[0].id]);
|
const results = await ownConn.query(sql1, [dateTimeString, result[0].id]);
|
||||||
return res.status(200).send({
|
return res.status(200).send({
|
||||||
message: 'Logged in!',
|
message: 'Logged in!',
|
||||||
token,
|
token: { authToken: authtoken, refreshToken: refreshtoken },
|
||||||
user: result[0],
|
user: result[0],
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@ -103,8 +103,8 @@ export const getSelectedSolutionsBySolutionName = async (selected, result) => {
|
|||||||
//get all selected solutions by asset name
|
//get all selected solutions by asset name
|
||||||
export const getSelectedSolutionsByAssetName = async (selected, result) => {
|
export const getSelectedSolutionsByAssetName = async (selected, result) => {
|
||||||
try {
|
try {
|
||||||
let sql = `SELECT * FROM solutions WHERE LOWER(assetName) LIKE '%${selected.toLowerCase()}%' ORDER BY assetName ASC`;
|
let sql = `SELECT * FROM solutions WHERE assetName = ? ORDER BY solutionName ASC`;
|
||||||
const results = await ownConn.execute(sql)
|
const results = await ownConn.execute(sql, [selected])
|
||||||
result(null, results);
|
result(null, results);
|
||||||
}
|
}
|
||||||
catch (err) {
|
catch (err) {
|
||||||
|
|||||||
@ -1,15 +1,40 @@
|
|||||||
<template>
|
<template>
|
||||||
<section :class="['asset-search', darkMode ? 'section-darkmode' : 'section-lightmode']">
|
<section :class="['asset-search', darkMode ? 'section-darkmode' : 'section-lightmode']">
|
||||||
<div :class="['label', darkMode ? 'label-darkmode' : 'label-lightmode']">Asset:</div>
|
<div :class="['label', darkMode ? 'label-darkmode' : 'label-lightmode']">Asset:</div>
|
||||||
<pre :class="['data', darkMode ? 'pre-darkmode' : 'pre-lightmode']">Asset name</pre>
|
<pre :class="['data', darkMode ? 'pre-darkmode' : 'pre-lightmode']">{{ asset.assetName }}</pre>
|
||||||
</section>
|
</section>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
import { ref } from 'vue';
|
import { ref, onMounted } from 'vue';
|
||||||
|
import Axios from '../axios.config.js';
|
||||||
|
import clientsideConfig from '../../clientsideConfig.js';
|
||||||
|
import { useStore } from 'vuex';
|
||||||
|
import { computed } from 'vue';
|
||||||
|
|
||||||
|
const store = useStore();
|
||||||
|
const chosenAssetId = computed(() => store.state.chosenAssetId);
|
||||||
|
|
||||||
|
const asset = ref({});
|
||||||
const darkMode = ref(true)
|
const darkMode = ref(true)
|
||||||
|
|
||||||
|
// get config item from id
|
||||||
|
const getItemById = async () => {
|
||||||
|
try {
|
||||||
|
const response = await Axios.get(
|
||||||
|
`https://${clientsideConfig.url}:${clientsideConfig.port}/api/getConfigItem/${chosenAssetId.value}`
|
||||||
|
);
|
||||||
|
asset.value = response.data;
|
||||||
|
} catch (err) {
|
||||||
|
console.log(err.response.statusText);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
onMounted(() => {
|
||||||
|
getItemById();
|
||||||
|
});
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
|||||||
@ -1,8 +1,9 @@
|
|||||||
<template>
|
<template>
|
||||||
<section :class="['client-search', darkMode ? 'section-darkmode' : 'section-lightmode']">
|
<section :class="['customer-search', darkMode ? 'section-darkmode' : 'section-lightmode']">
|
||||||
<div :class="['label', darkMode ? 'label-darkmode' : 'label-lightmode']">Customer</div>
|
<div :class="['label', darkMode ? 'label-darkmode' : 'label-lightmode']">Customer</div>
|
||||||
<pre v-if="!filtered" :class="['data', 'pre-customer', darkMode ? 'pre-darkmode' : 'pre-lightmode']">{{ clientFilter }}</pre>
|
<pre v-if="!filtered"
|
||||||
<input v-if="filtered" v-model="clientFilter" @change="filterList()"
|
:class="['data', 'pre-customer', darkMode ? 'pre-darkmode' : 'pre-lightmode']">{{ customerFilter }}</pre>
|
||||||
|
<input v-if="filtered" v-model="customerFilter" @change="filterList()"
|
||||||
:class="['data', 'input-customer', darkMode ? 'data-darkmode' : 'data-lightmode']">
|
:class="['data', 'input-customer', darkMode ? 'data-darkmode' : 'data-lightmode']">
|
||||||
</section>
|
</section>
|
||||||
</template>
|
</template>
|
||||||
@ -14,26 +15,26 @@ import { computed } from 'vue';
|
|||||||
|
|
||||||
const store = useStore();
|
const store = useStore();
|
||||||
const filtered = computed(() => store.state.filtered);
|
const filtered = computed(() => store.state.filtered);
|
||||||
const filteredTerm = computed(() => store.state.filteredByClient);
|
const filteredTerm = computed(() => store.state.filteredByCustomer);
|
||||||
const clientFilter = ref(store.state.filteredByClient);
|
const customerFilter = ref(store.state.filteredByCustomer);
|
||||||
|
|
||||||
const darkMode = ref(true)
|
const darkMode = ref(true)
|
||||||
|
|
||||||
// update filtered term
|
// update filtered term
|
||||||
const updateFilterTerm = () => {
|
const updateFilterTerm = () => {
|
||||||
clientFilter.value = filteredTerm.value
|
customerFilter.value = filteredTerm.value
|
||||||
}
|
}
|
||||||
|
|
||||||
const checkFiltered = () => {
|
const checkFiltered = () => {
|
||||||
if (!filtered.value) {
|
if (!filtered.value) {
|
||||||
clientFilter.value = ''
|
customerFilter.value = ''
|
||||||
filterList();
|
filterList();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// update the filtered term in the store
|
// update the filtered term in the store
|
||||||
const filterList = () => {
|
const filterList = () => {
|
||||||
store.commit('updateFilterbyClient', clientFilter.value);
|
store.commit('updateFilterbyCustomer', customerFilter.value);
|
||||||
}
|
}
|
||||||
|
|
||||||
watch(filteredTerm, updateFilterTerm)
|
watch(filteredTerm, updateFilterTerm)
|
||||||
@ -42,12 +43,12 @@ watch(filtered, checkFiltered)
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
export default {
|
export default {
|
||||||
name: "ClientSearch",
|
name: "CustomerSearch",
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped>
|
<style scoped>
|
||||||
.client-search {
|
.customer-search {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
padding: 0.625em 1.875em;
|
padding: 0.625em 1.875em;
|
||||||
@ -15,8 +15,8 @@ import { computed } from 'vue';
|
|||||||
|
|
||||||
const store = useStore();
|
const store = useStore();
|
||||||
const filtered = computed(() => store.state.filtered);
|
const filtered = computed(() => store.state.filtered);
|
||||||
const filteredTerm = computed(() => store.state.filteredByClient);
|
const filteredTerm = computed(() => store.state.filteredByCustomer);
|
||||||
const issueStateFilter = ref(store.state.filteredByClient);
|
const issueStateFilter = ref(store.state.filteredByCustomer);
|
||||||
|
|
||||||
const darkMode = ref(true)
|
const darkMode = ref(true)
|
||||||
|
|
||||||
@ -34,7 +34,7 @@ const checkFiltered = () => {
|
|||||||
|
|
||||||
// update the filtered term in the store
|
// update the filtered term in the store
|
||||||
const filterList = () => {
|
const filterList = () => {
|
||||||
store.commit('updateFilterbyClient', issueStateFilter.value);
|
store.commit('updateFilterbyCustomer', issueStateFilter.value);
|
||||||
}
|
}
|
||||||
|
|
||||||
watch(filteredTerm, updateFilterTerm)
|
watch(filteredTerm, updateFilterTerm)
|
||||||
|
|||||||
@ -4,13 +4,13 @@
|
|||||||
<span class="title-icon" id="logo-icon">
|
<span class="title-icon" id="logo-icon">
|
||||||
<img loading="lazy" srcSet="../favicon-gelb-rot-32x32.png" />
|
<img loading="lazy" srcSet="../favicon-gelb-rot-32x32.png" />
|
||||||
</span>
|
</span>
|
||||||
<pre :class="['title', darkMode ? 'pre-darkmode' : 'pre-lightmode']">Login</pre>
|
<pre :class="['title', darkMode ? 'title-darkmode' : 'title-lightmode']">Login</pre>
|
||||||
</div>
|
</div>
|
||||||
<div class="login-field">
|
<div class="login-field">
|
||||||
<div class="form-field" id="username-field">
|
<div class="form-field" id="username-field">
|
||||||
<label for="username-input" id="username-label">
|
<label for="username-input" id="username-label">
|
||||||
<span :class="['icon', darkMode ? 'icon-darkmode' : 'icon-lightmode']" id="username-icon">
|
<span :class="['icon', darkMode ? 'icon-darkmode' : 'icon-lightmode']" id="username-icon">
|
||||||
<img loading="lazy" src="../icons/Mail-Icon.svg" />
|
<img loading="lazy" src="/icons/Mail-Icon.svg" />
|
||||||
</span>
|
</span>
|
||||||
<div :class="['label', darkMode ? 'label-darkmode' : 'label-lightmode']">Username:</div>
|
<div :class="['label', darkMode ? 'label-darkmode' : 'label-lightmode']">Username:</div>
|
||||||
</label>
|
</label>
|
||||||
@ -21,14 +21,13 @@
|
|||||||
<div class="form-field" id="password-field">
|
<div class="form-field" id="password-field">
|
||||||
<label for="password-input" id="password-label">
|
<label for="password-input" id="password-label">
|
||||||
<span :class="['icon', darkMode ? 'icon-darkmode' : 'icon-lightmode']" id="password-icon">
|
<span :class="['icon', darkMode ? 'icon-darkmode' : 'icon-lightmode']" id="password-icon">
|
||||||
<img loading="lazy" src="../icons/Lock-Icon.svg" />
|
<img loading="lazy" src="/icons/Lock-Icon.svg" />
|
||||||
</span>
|
</span>
|
||||||
<div :class="['label', darkMode ? 'label-darkmode' : 'label-lightmode']">Password:</div>
|
<div :class="['label', darkMode ? 'label-darkmode' : 'label-lightmode']">Password:</div>
|
||||||
</label>
|
</label>
|
||||||
<div :class="['input-field', darkMode ? 'input-darkmode' : 'input-lightmode']">
|
<div :class="['input-field', darkMode ? 'input-darkmode' : 'input-lightmode']">
|
||||||
<input type="text" id="password-input" placeholder="*******">
|
<input type="text" id="password-input" placeholder="*******">
|
||||||
<input type="button" :class="[darkMode ? 'button-darkmode' : 'button-lightmode']" id="show-password-toggle"
|
<input type="button" :class="[darkMode ? 'button-darkmode' : 'button-lightmode']" id="show-password-toggle" value="Show">
|
||||||
value="Show">
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -37,10 +36,10 @@
|
|||||||
<div :class="['label', darkMode ? 'label-darkmode' : 'label-lightmode']"> {{ errorMsg }} </div>
|
<div :class="['label', darkMode ? 'label-darkmode' : 'label-lightmode']"> {{ errorMsg }} </div>
|
||||||
</label>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
<input type="button" :class="[darkMode ? 'button-darkmode' : 'button-lightmode']" id="login-button" value="Login"
|
<div class="buttons">
|
||||||
@click="handleLogin">
|
<input type="button" :class="[darkMode ? 'button-darkmode' : 'button-lightmode']" id="login-button" value="Login" @click="handleLogin">
|
||||||
<input type="button" :class="[darkMode ? 'button-darkmode' : 'button-lightmode']" id="login-button" value="Signup"
|
<input type="button" :class="[darkMode ? 'button-darkmode' : 'button-lightmode']" id="signup-button" value="Signup" @click="testFunctionSignup">
|
||||||
@click="testFunctionSignup">
|
</div>
|
||||||
</form>
|
</form>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@ -50,6 +49,7 @@ import { ref } from 'vue';
|
|||||||
import Axios from '../axios.config.js';
|
import Axios from '../axios.config.js';
|
||||||
import clientsideConfig from '../clientsideConfig.js';
|
import clientsideConfig from '../clientsideConfig.js';
|
||||||
|
|
||||||
|
const { signIn } = useAuth()
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
const darkMode = ref(true);
|
const darkMode = ref(true);
|
||||||
const isError = ref(false);
|
const isError = ref(false);
|
||||||
@ -62,19 +62,29 @@ const handleLogin = async () => {
|
|||||||
const username = document.getElementById('username-input').value;
|
const username = document.getElementById('username-input').value;
|
||||||
const password = document.getElementById('password-input').value;
|
const password = document.getElementById('password-input').value;
|
||||||
|
|
||||||
const requestBody = {
|
//const requestBody = {
|
||||||
|
const credentials = {
|
||||||
username: username,
|
username: username,
|
||||||
password: password,
|
password: password,
|
||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
let res = await Axios.post(`https://${clientsideConfig.url}:${clientsideConfig.port}/api/login`, requestBody);
|
/*let res = await Axios.post(`https://${clientsideConfig.url}:${clientsideConfig.port}/api/login`, requestBody);
|
||||||
|
|
||||||
|
const sessionToken = useCookie('token', {maxAge: 604800, sameSite: true});
|
||||||
|
sessionToken.value = res.data.token;
|
||||||
|
Axios.defaults.headers.common['Authorization'] = `${username}`;
|
||||||
|
const userToken = useCookie('user', {maxAge: 604800, sameSite: true});
|
||||||
|
userToken.value = username;
|
||||||
// something to do with the res?
|
// something to do with the res?
|
||||||
console.log(res.data)
|
console.log(sessionToken)
|
||||||
|
console.log(res.data.message)
|
||||||
|
|
||||||
// sucessfully logged in
|
// sucessfully logged in
|
||||||
router.push('/')
|
router.push('/home')*/
|
||||||
|
let res = await signIn( credentials, { callbackUrl: '/home' })
|
||||||
|
// console.log("res", res)
|
||||||
|
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
// handle the error
|
// handle the error
|
||||||
console.log(err.response.statusText)
|
console.log(err.response.statusText)
|
||||||
@ -87,16 +97,16 @@ const testFunctionSignup = async () => {
|
|||||||
isError.value = false;
|
isError.value = false;
|
||||||
errorMsg.value = '';
|
errorMsg.value = '';
|
||||||
|
|
||||||
const username = 'franzzzzzrtg'
|
const username = 'adm_tueit'
|
||||||
const password = '112345678'
|
const password = 'SvF=?bfEx7_hV,cMEu4m'
|
||||||
const password_repeat = '112345678'
|
const password_repeat = 'SvF=?bfEx7_hV,cMEu4m'
|
||||||
const fullName = 'hallo'
|
const fullName = 'administrator'
|
||||||
const email = 'test.sdj@web.de'
|
const email = 'support@tueit.de'
|
||||||
const phonenumber = '015736283729'
|
const phonenumber = ''
|
||||||
const address = 'Strasse'
|
const address = ''
|
||||||
const city = 'tuebingen'
|
const city = ''
|
||||||
const postcode = '72121'
|
const postcode = ''
|
||||||
const adminBool = false
|
const adminBool = true
|
||||||
const technician1Bool = false
|
const technician1Bool = false
|
||||||
const technician2Bool = false
|
const technician2Bool = false
|
||||||
const technicianMonitoringBool = false
|
const technicianMonitoringBool = false
|
||||||
@ -122,10 +132,11 @@ const testFunctionSignup = async () => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
|
||||||
let res = await Axios.post(`https://${clientsideConfig.url}:${clientsideConfig.port}/api/signup`, requestBody);
|
let res = await Axios.post(`https://${clientsideConfig.url}:${clientsideConfig.port}/api/signup`, requestBody);
|
||||||
|
|
||||||
// something to do with the res?
|
// something to do with the res?
|
||||||
console.log(res)
|
// console.log(res)
|
||||||
|
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
// handle the error
|
// handle the error
|
||||||
@ -161,22 +172,22 @@ export default {
|
|||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
width: 31.25rem;
|
width: 31.25rem;
|
||||||
height: 33rem;
|
min-height: 33rem;
|
||||||
|
height: fit-content;
|
||||||
border-radius: 0.625rem;
|
border-radius: 0.625rem;
|
||||||
padding: 2.5rem 1.875rem;
|
padding: 2.5rem 1.875rem;
|
||||||
gap: 1.875rem;
|
gap: 1.875rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
.form-darkmode {
|
.form-darkmode {
|
||||||
border: 0.0625rem solid #000;
|
border: 0.0625rem solid #000;
|
||||||
background-color: #2c2c2c;
|
background-color: #2c2c2c;
|
||||||
}
|
}
|
||||||
|
|
||||||
.form-lightmode {
|
.form-lightmode {
|
||||||
border: 0.0625rem solid #8e8e8e;
|
border: 0.0625rem solid #8e8e8e;
|
||||||
background-color: #fff;
|
background-color: #fff;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
.title-field {
|
.title-field {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
@ -191,7 +202,6 @@ export default {
|
|||||||
width: 3.125rem;
|
width: 3.125rem;
|
||||||
height: 3.125rem;
|
height: 3.125rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
.title-icon>img {
|
.title-icon>img {
|
||||||
width: 3.125rem;
|
width: 3.125rem;
|
||||||
height: 3.125rem;
|
height: 3.125rem;
|
||||||
@ -202,20 +212,14 @@ export default {
|
|||||||
|
|
||||||
.title {
|
.title {
|
||||||
margin: 0;
|
margin: 0;
|
||||||
letter-spacing: 5%;
|
letter-spacing: 0.05rem;
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
font: 400 1.875rem/1.875rem Overpass, sans-serif;
|
font: 400 1.875rem/1.875rem Overpass, sans-serif;
|
||||||
}
|
}
|
||||||
|
.title-darkmode { color: #ffffff; }
|
||||||
|
.title-lightmode { color: #000000; }
|
||||||
|
|
||||||
.pre-darkmode,
|
|
||||||
.title-darkmode {
|
|
||||||
color: #fff;
|
|
||||||
}
|
|
||||||
|
|
||||||
.pre-lightmode,
|
|
||||||
.title-lightmode {
|
|
||||||
color: #000;
|
|
||||||
}
|
|
||||||
|
|
||||||
.login-field {
|
.login-field {
|
||||||
display: flex;
|
display: flex;
|
||||||
@ -226,6 +230,7 @@ export default {
|
|||||||
gap: 1.25rem;
|
gap: 1.25rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
.form-field {
|
.form-field {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
@ -237,16 +242,6 @@ export default {
|
|||||||
gap: 0.625rem;
|
gap: 0.625rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
.form-field-error-msg {
|
|
||||||
display: flex;
|
|
||||||
flex-direction: column;
|
|
||||||
align-items: center;
|
|
||||||
justify-content: space-between;
|
|
||||||
width: 25rem;
|
|
||||||
height: 3rem;
|
|
||||||
gap: 0.4rem;
|
|
||||||
}
|
|
||||||
|
|
||||||
label {
|
label {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: row;
|
flex-direction: row;
|
||||||
@ -264,43 +259,28 @@ label {
|
|||||||
width: 1.875rem;
|
width: 1.875rem;
|
||||||
height: 1.875rem;
|
height: 1.875rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
.icon>img {
|
.icon>img {
|
||||||
object-fit: contain;
|
object-fit: contain;
|
||||||
object-position: center;
|
object-position: center;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
}
|
}
|
||||||
|
|
||||||
.icon-darkmode>img {
|
|
||||||
filter: invert(100%);
|
|
||||||
}
|
|
||||||
|
|
||||||
.icon-lightmode>img {
|
|
||||||
filter: invert(0%);
|
|
||||||
}
|
|
||||||
|
|
||||||
#username-icon>img {
|
#username-icon>img {
|
||||||
width: auto;
|
width: auto;
|
||||||
height: 0.9375rem;
|
height: 0.9375rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
#password-icon>img {
|
#password-icon>img {
|
||||||
width: 0.9375rem;
|
width: 0.9375rem;
|
||||||
height: auto;
|
height: auto;
|
||||||
}
|
}
|
||||||
|
.icon-darkmode>img { filter: invert(100%); }
|
||||||
|
.icon-lightmode>img { filter: invert(0%); }
|
||||||
|
|
||||||
.label {
|
.label {
|
||||||
letter-spacing: 2%;
|
letter-spacing: 0.02rem;
|
||||||
font: 400 0.9375rem/1.875rem Overpass, sans-serif;
|
font: 400 0.9375rem/1.875rem Overpass, sans-serif;
|
||||||
}
|
}
|
||||||
|
.label-darkmode { color: #ffffff; }
|
||||||
.label-darkmode {
|
.label-lightmode { color: #000000; }
|
||||||
color: #fff;
|
|
||||||
}
|
|
||||||
|
|
||||||
.label-lightmode {
|
|
||||||
color: #000;
|
|
||||||
}
|
|
||||||
|
|
||||||
.input-field {
|
.input-field {
|
||||||
display: flex;
|
display: flex;
|
||||||
@ -313,15 +293,9 @@ label {
|
|||||||
border-radius: 0.3125rem;
|
border-radius: 0.3125rem;
|
||||||
padding: 0.1875rem 0.625rem;
|
padding: 0.1875rem 0.625rem;
|
||||||
box-shadow: 0.0625rem 0.0625rem 0.25rem 0rem rgba(0, 0, 0, 0.25) inset;
|
box-shadow: 0.0625rem 0.0625rem 0.25rem 0rem rgba(0, 0, 0, 0.25) inset;
|
||||||
}
|
}
|
||||||
|
.input-darkmode { background-color: #212121; }
|
||||||
.input-darkmode {
|
.input-lightmode { background-color: #EBEBEB; }
|
||||||
background-color: #212121;
|
|
||||||
}
|
|
||||||
|
|
||||||
.input-lightmode {
|
|
||||||
background-color: #EBEBEB;
|
|
||||||
}
|
|
||||||
|
|
||||||
input[type=text] {
|
input[type=text] {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
@ -329,40 +303,63 @@ input[type=text] {
|
|||||||
background-color: #00000000;
|
background-color: #00000000;
|
||||||
border: none;
|
border: none;
|
||||||
color: #8e8e8e;
|
color: #8e8e8e;
|
||||||
letter-spacing: 5%;
|
letter-spacing: 0.01rem;
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
font: 100 0.75rem/1.25rem Overpass, sans-serif;
|
font: 100 0.75rem/1.25rem Overpass, sans-serif;
|
||||||
}
|
}
|
||||||
|
|
||||||
input[type=button] {
|
#show-password-toggle {
|
||||||
width: fit-content;
|
width: fit-content;
|
||||||
|
height: auto;
|
||||||
align-self: flex-end;
|
align-self: flex-end;
|
||||||
|
padding: 0;
|
||||||
|
border-radius: 0;
|
||||||
background-color: #00000000;
|
background-color: #00000000;
|
||||||
|
background: none;
|
||||||
border: none;
|
border: none;
|
||||||
letter-spacing: 5%;
|
letter-spacing: 0.01rem;
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
font: 300 0.75rem/1.25rem Overpass, sans-serif;
|
font: 300 0.75rem/1.25rem Overpass, sans-serif;
|
||||||
}
|
}
|
||||||
|
|
||||||
.button-darkmode {
|
|
||||||
color: #fff;
|
|
||||||
|
.form-field-error-msg {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: space-between;
|
||||||
|
width: 25rem;
|
||||||
|
height: 3rem;
|
||||||
|
gap: 0.4rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
.button-lightmode {
|
|
||||||
color: #000;
|
|
||||||
|
.buttons {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: row;
|
||||||
|
height: fit-content;
|
||||||
|
width: 100%;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
padding: 0.625rem 0.625rem 0;
|
||||||
|
gap: 2.5rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
#login-button {
|
|
||||||
width: 13.75rem;
|
input[type=button] {
|
||||||
height: 4.375rem;
|
width: 9.375rem;
|
||||||
|
height: 3.125rem;
|
||||||
padding: 0.625rem;
|
padding: 0.625rem;
|
||||||
border-radius: 0.625rem;
|
border-radius: 0.625rem;
|
||||||
align-self: center;
|
align-self: center;
|
||||||
border: none;
|
border: none;
|
||||||
color: #000;
|
|
||||||
background: linear-gradient(93deg, #ff0f00 3.67%, #ffe608 100%);
|
background: linear-gradient(93deg, #ff0f00 3.67%, #ffe608 100%);
|
||||||
letter-spacing: 2%;
|
letter-spacing: 0.02rem;
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
font: 600 1.25rem/1.875rem Overpass, sans-serif;
|
font: 600 1.125rem/1.875rem Overpass, sans-serif;
|
||||||
}
|
}
|
||||||
|
.button-darkmode { color: #ffffff; }
|
||||||
|
.button-lightmode { color: #000000; }
|
||||||
</style>
|
</style>
|
||||||
@ -201,7 +201,7 @@
|
|||||||
<section v-if="addBool" :class="['accounting-information', darkMode ? 'section-darkmode' : 'section-lightmode']">
|
<section v-if="addBool" :class="['accounting-information', darkMode ? 'section-darkmode' : 'section-lightmode']">
|
||||||
<div :class="['label', darkMode ? 'label-darkmode' : 'label-lightmode']" id="accounting">Accounting:
|
<div :class="['label', darkMode ? 'label-darkmode' : 'label-lightmode']" id="accounting">Accounting:
|
||||||
<div class="asset-data">
|
<div class="asset-data">
|
||||||
<table class="data-table" id="asset-table-no-client">
|
<table class="data-table" id="asset-table-no-customer">
|
||||||
<tbody>
|
<tbody>
|
||||||
<tr :class="['table-row', darkMode ? 'tr-head-darkmode' : 'tr-head-lightmode']" id="table-head">
|
<tr :class="['table-row', darkMode ? 'tr-head-darkmode' : 'tr-head-lightmode']" id="table-head">
|
||||||
<th
|
<th
|
||||||
|
|||||||
@ -5,8 +5,8 @@
|
|||||||
<input v-if="editable" v-model="item.assetName" @change="updateConfigItem()"
|
<input v-if="editable" v-model="item.assetName" @change="updateConfigItem()"
|
||||||
:class="['data', 'asset-name-input', darkMode ? 'h2-darkmode' : 'h2-lightmode', darkMode ? 'h2-input-darkmode' : 'h2-input-lightmode', 'input']">
|
:class="['data', 'asset-name-input', darkMode ? 'h2-darkmode' : 'h2-lightmode', darkMode ? 'h2-input-darkmode' : 'h2-input-lightmode', 'input']">
|
||||||
<div class="asset-data">
|
<div class="asset-data">
|
||||||
<div class="client-location">
|
<div class="customer-location">
|
||||||
<div class="data-field" id="client">
|
<div class="data-field" id="customer">
|
||||||
<pre :class="['label', darkMode ? 'pre-darkmode' : 'pre-lightmode']">Customer:</pre>
|
<pre :class="['label', darkMode ? 'pre-darkmode' : 'pre-lightmode']">Customer:</pre>
|
||||||
<pre v-if="!editable"
|
<pre v-if="!editable"
|
||||||
:class="['data', darkMode ? 'data-darkmode' : 'data-lightmode']"> {{ item.customer }}</pre>
|
:class="['data', darkMode ? 'data-darkmode' : 'data-lightmode']"> {{ item.customer }}</pre>
|
||||||
@ -81,8 +81,8 @@
|
|||||||
<input v-model="newAssetName" @change="updateAsset()"
|
<input v-model="newAssetName" @change="updateAsset()"
|
||||||
:class="['data', 'asset-name-input', darkMode ? 'h2-darkmode' : 'h2-lightmode', darkMode ? 'h2-input-darkmode' : 'h2-input-lightmode', 'input']">
|
:class="['data', 'asset-name-input', darkMode ? 'h2-darkmode' : 'h2-lightmode', darkMode ? 'h2-input-darkmode' : 'h2-input-lightmode', 'input']">
|
||||||
<div class="asset-data">
|
<div class="asset-data">
|
||||||
<div class="client-location">
|
<div class="customer-location">
|
||||||
<div class="data-field" id="client">
|
<div class="data-field" id="customer">
|
||||||
<pre :class="['label', darkMode ? 'pre-darkmode' : 'pre-lightmode']">Customer:</pre>
|
<pre :class="['label', darkMode ? 'pre-darkmode' : 'pre-lightmode']">Customer:</pre>
|
||||||
<select id="customersDropDownChosenCI" v-model="newCustomer" @change="updateNewCustomerID()"
|
<select id="customersDropDownChosenCI" v-model="newCustomer" @change="updateNewCustomerID()"
|
||||||
:class="[darkMode ? 'select-darkmode' : 'select-lightmode']">
|
:class="[darkMode ? 'select-darkmode' : 'select-lightmode']">
|
||||||
@ -217,7 +217,7 @@ const updateConfigItem = async () => {
|
|||||||
counter += 1;
|
counter += 1;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
if (counter == 1) {
|
if (counter == 2) {
|
||||||
alert("This asset name already exists. Please choose an unique asset name or modify respectively delete the old one!");
|
alert("This asset name already exists. Please choose an unique asset name or modify respectively delete the old one!");
|
||||||
item.value.assetName = '';
|
item.value.assetName = '';
|
||||||
return;
|
return;
|
||||||
@ -475,7 +475,7 @@ export default {
|
|||||||
align-self: stretch;
|
align-self: stretch;
|
||||||
}
|
}
|
||||||
|
|
||||||
.client-location,
|
.customer-location,
|
||||||
.info {
|
.info {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
|
|||||||
@ -1,4 +1,14 @@
|
|||||||
<template>
|
<template>
|
||||||
|
<section v-if="searchable" :class="['solution-search', darkMode ? 'section-darkmode' : 'section-lightmode']">
|
||||||
|
<div :class="['solutionLabel', darkMode ? 'label-darkmode' : 'label-lightmode']">Solution</div>
|
||||||
|
<input v-model="solutionSearchFilter" @change="searchSolution()"
|
||||||
|
:class="['dataInput', 'input', darkMode ? 'data-darkmode' : 'data-lightmode']">
|
||||||
|
</section>
|
||||||
|
<section v-if="filtered" :class="['solution-search', darkMode ? 'section-darkmode' : 'section-lightmode']">
|
||||||
|
<div :class="['solutionLabel', darkMode ? 'label-darkmode' : 'label-lightmode']">Type</div>
|
||||||
|
<input v-model="typeSearchFilter" @change="filterSolutionByType()"
|
||||||
|
:class="['dataInput', 'input', darkMode ? 'data-darkmode' : 'data-lightmode']">
|
||||||
|
</section>
|
||||||
<div :class="['data', darkMode ? 'div-darkmode' : 'div-lightmode']">
|
<div :class="['data', darkMode ? 'div-darkmode' : 'div-lightmode']">
|
||||||
<div :class="['label', darkMode ? 'label-darkmode' : 'label-lightmode']">Solutions:</div>
|
<div :class="['label', darkMode ? 'label-darkmode' : 'label-lightmode']">Solutions:</div>
|
||||||
<table class="data-table" id="solution-checkklist">
|
<table class="data-table" id="solution-checkklist">
|
||||||
@ -9,32 +19,135 @@
|
|||||||
Solution</th>
|
Solution</th>
|
||||||
<th :class="['Type', darkMode ? 'th-darkmode' : 'th-lightmode']">Type</th>
|
<th :class="['Type', darkMode ? 'th-darkmode' : 'th-lightmode']">Type</th>
|
||||||
</tr>
|
</tr>
|
||||||
<tr :class="['table-row', darkMode ? 'tr-darkmode' : 'tr-lightmode']" id="row-1">
|
<tr v-for="sol in solutions" :key="sol.primaryID"
|
||||||
|
:class="['table-row', darkMode ? 'tr-darkmode' : 'tr-lightmode']" id="row-1">
|
||||||
<td
|
<td
|
||||||
:class="['Solution', darkMode ? 'td-darkmode' : 'td-lightmode', darkMode ? 'Solution-darkmode' : 'Solution-lightmode']">
|
:class="['Solution', darkMode ? 'td-darkmode' : 'td-lightmode', darkMode ? 'Solution-darkmode' : 'Solution-lightmode']">
|
||||||
...</td>
|
<nuxt-link to="/solutions" id="nuxt-link" class="button"
|
||||||
<td :class="['Type', darkMode ? 'td-darkmode' : 'td-lightmode']">...</td>
|
:class="[darkMode ? 'button-darkmode' : 'button-lightmode']"
|
||||||
|
@click="goToChosenSolution(sol.primaryID)">
|
||||||
|
{{ sol.solutionName }}
|
||||||
|
</nuxt-link>
|
||||||
|
</td>
|
||||||
|
<td :class="['Type', darkMode ? 'td-darkmode' : 'td-lightmode']">{{ sol.type }}</td>
|
||||||
</tr>
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
|
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|
||||||
<script setup>
|
|
||||||
import { ref } from 'vue';
|
|
||||||
|
|
||||||
|
|
||||||
|
<script setup>
|
||||||
|
import { ref, onMounted, watch } from 'vue';
|
||||||
|
import Axios from '../axios.config.js';
|
||||||
|
import clientsideConfig from '../../clientsideConfig.js';
|
||||||
|
import { useStore } from 'vuex';
|
||||||
|
import { computed } from 'vue';
|
||||||
|
|
||||||
|
const store = useStore();
|
||||||
|
const chosenAssetId = computed(() => store.state.chosenAssetId);
|
||||||
|
const searchable = computed(() => store.state.searchable);
|
||||||
|
const filtered = computed(() => store.state.filtered);
|
||||||
|
const solutionSearchFilter = ref('');
|
||||||
|
const typeSearchFilter = ref('');
|
||||||
|
|
||||||
|
const asset = ref({});
|
||||||
|
const solutions = ref([]);
|
||||||
|
const solutionsBySol = ref([]);
|
||||||
|
const solutionsByType = ref([]);
|
||||||
const darkMode = ref(true)
|
const darkMode = ref(true)
|
||||||
|
|
||||||
|
//get all solutions from the chosen asset
|
||||||
|
const getSolutions = async () => {
|
||||||
|
try {
|
||||||
|
const response = await Axios.get(`https://${clientsideConfig.url}:${clientsideConfig.port}/api/getSelectedSolutionsByAsset/${asset.value.assetName}`);
|
||||||
|
solutions.value = response.data;
|
||||||
|
} catch (err) {
|
||||||
|
console.log(err.response.statusText);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// update search term
|
||||||
|
const updateSearchTerm = async () => {
|
||||||
|
solutionSearchFilter.value = '';
|
||||||
|
await getSolutions();
|
||||||
|
}
|
||||||
|
|
||||||
|
// update filter term
|
||||||
|
const updateFilterTerm = async () => {
|
||||||
|
typeSearchFilter.value = '';
|
||||||
|
await getSolutions();
|
||||||
|
}
|
||||||
|
|
||||||
|
const goToChosenSolution = (id) => {
|
||||||
|
store.commit('setChosenSolution', id);
|
||||||
|
store.commit('changeToSolution');
|
||||||
|
};
|
||||||
|
|
||||||
|
// get config item from id
|
||||||
|
const getItemById = async () => {
|
||||||
|
try {
|
||||||
|
const response = await Axios.get(
|
||||||
|
`https://${clientsideConfig.url}:${clientsideConfig.port}/api/getConfigItem/${chosenAssetId.value}`
|
||||||
|
);
|
||||||
|
asset.value = response.data;
|
||||||
|
await getSolutions();
|
||||||
|
} catch (err) {
|
||||||
|
console.log(err.response.statusText);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//get all solutions based on the searched solution name
|
||||||
|
const searchSolution = async () => {
|
||||||
|
if (solutionSearchFilter.value === '') {
|
||||||
|
await getSolutions();
|
||||||
|
} else {
|
||||||
|
try {
|
||||||
|
const response = await Axios.get(`https://${clientsideConfig.url}:${clientsideConfig.port}/api/getSelectedSolutionsBySolution/${solutionSearchFilter.value}`);
|
||||||
|
solutionsBySol.value = response.data;
|
||||||
|
solutions.value = filterObjectsWithMatchingIds(solutions.value, solutionsBySol.value);
|
||||||
|
} catch (err) {
|
||||||
|
console.log(err.response.statusText);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//get all solutions based on the searched solution name
|
||||||
|
const filterSolutionByType = async () => {
|
||||||
|
if (typeSearchFilter.value === '') {
|
||||||
|
await getSolutions();
|
||||||
|
} else {
|
||||||
|
try {
|
||||||
|
const response = await Axios.get(`https://${clientsideConfig.url}:${clientsideConfig.port}/api/getSelectedSolutionsByType/${typeSearchFilter.value}`);
|
||||||
|
solutionsByType.value = response.data;
|
||||||
|
solutions.value = filterObjectsWithMatchingIds(solutions.value, solutionsByType.value);
|
||||||
|
} catch (err) {
|
||||||
|
console.log(err.response.statusText);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
const filterObjectsWithMatchingIds = (arr1, arr2) => {
|
||||||
|
return arr1.filter(obj1 => {
|
||||||
|
return arr2.some(obj2 => obj2.primaryID === obj1.primaryID);
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
watch(searchable, updateSearchTerm);
|
||||||
|
watch(filtered, updateFilterTerm);
|
||||||
|
|
||||||
|
onMounted(() => {
|
||||||
|
getItemById();
|
||||||
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
export default {
|
export default {
|
||||||
name: "AssetSolutionList",
|
name: "AssetSolutionList",
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
||||||
<style scoped>
|
<style scoped>
|
||||||
.data {
|
.data {
|
||||||
display: flex;
|
display: flex;
|
||||||
@ -57,6 +170,62 @@ export default {
|
|||||||
background-color: #fff;
|
background-color: #fff;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.solutionLabel {
|
||||||
|
width: 5.5625em;
|
||||||
|
height: 1.875em;
|
||||||
|
font-family: "Overpass";
|
||||||
|
font-style: normal;
|
||||||
|
font-weight: 400;
|
||||||
|
font-size: 0.875em;
|
||||||
|
line-height: 1.875;
|
||||||
|
letter-spacing: 0.05em;
|
||||||
|
}
|
||||||
|
|
||||||
|
.data-darkmode {
|
||||||
|
background-color: #212121;
|
||||||
|
color: #fff;
|
||||||
|
}
|
||||||
|
|
||||||
|
.data-lightmode {
|
||||||
|
background-color: #EBEBEB;
|
||||||
|
color: #000;
|
||||||
|
}
|
||||||
|
|
||||||
|
.dataInput {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: row;
|
||||||
|
align-items: flex-start;
|
||||||
|
padding: 0 0.625rem;
|
||||||
|
border-radius: 0.3125rem;
|
||||||
|
box-shadow: 0.0625rem 0.0625rem 0.25rem 0rem rgba(0, 0, 0, 0.25) inset;
|
||||||
|
letter-spacing: 5%;
|
||||||
|
font: 400 0.75rem/250% Overpass, sans-serif;
|
||||||
|
}
|
||||||
|
|
||||||
|
.input {
|
||||||
|
border: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.section-darkmode {
|
||||||
|
background-color: #2c2c2c;
|
||||||
|
}
|
||||||
|
|
||||||
|
.section-lightmode {
|
||||||
|
background-color: #fff;
|
||||||
|
}
|
||||||
|
|
||||||
|
.solution-search {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
padding: 0.625em 1.875em;
|
||||||
|
gap: 1.25em;
|
||||||
|
width: 30.125em;
|
||||||
|
height: 3.125em;
|
||||||
|
box-shadow: 0.25em 0.25em 0.25em rgba(0, 0, 0, 0.25);
|
||||||
|
border-radius: 0.625em;
|
||||||
|
box-sizing: border-box;
|
||||||
|
}
|
||||||
|
|
||||||
.data-table {
|
.data-table {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
padding: 0 0.625rem;
|
padding: 0 0.625rem;
|
||||||
@ -73,6 +242,11 @@ export default {
|
|||||||
gap: 0.625rem;
|
gap: 0.625rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#nuxt-link {
|
||||||
|
text-decoration: none;
|
||||||
|
color: white;
|
||||||
|
}
|
||||||
|
|
||||||
.tr-head-darkmode {
|
.tr-head-darkmode {
|
||||||
border-top: none;
|
border-top: none;
|
||||||
border-bottom: 0.0625rem solid #000000;
|
border-bottom: 0.0625rem solid #000000;
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<section v-if="searchable" :class="['asset-search', darkMode ? 'section-darkmode' : 'section-lightmode']">
|
<section v-if="assetSearchable" :class="['asset-search', darkMode ? 'section-darkmode' : 'section-lightmode']">
|
||||||
<div :class="['clientLabel', darkMode ? 'label-darkmode' : 'label-lightmode']">Config item</div>
|
<div :class="['customerLabel', darkMode ? 'label-darkmode' : 'label-lightmode']">Config item</div>
|
||||||
<input v-model="assetSearchFilter" @change="searchConfigItem()"
|
<input v-model="assetSearchFilter" @change="searchConfigItem()"
|
||||||
:class="['dataInput', 'input', darkMode ? 'data-darkmode' : 'data-lightmode']">
|
:class="['dataInput', 'input', darkMode ? 'data-darkmode' : 'data-lightmode']">
|
||||||
</section>
|
</section>
|
||||||
@ -10,7 +10,7 @@
|
|||||||
<tbody>
|
<tbody>
|
||||||
<tr :class="['table-row', darkMode ? 'tr-head-darkmode' : 'tr-head-lightmode']" id="table-head">
|
<tr :class="['table-row', darkMode ? 'tr-head-darkmode' : 'tr-head-lightmode']" id="table-head">
|
||||||
<th
|
<th
|
||||||
:class="['Client', darkMode ? 'th-darkmode' : 'th-lightmode', darkMode ? 'Client-darkmode' : 'Client-lightmode']">
|
:class="['Customer', darkMode ? 'th-darkmode' : 'th-lightmode', darkMode ? 'Customer-darkmode' : 'Customer-lightmode']">
|
||||||
Customer</th>
|
Customer</th>
|
||||||
<th
|
<th
|
||||||
:class="['Name', darkMode ? 'th-darkmode' : 'th-lightmode', darkMode ? 'Name-darkmode' : 'Name-lightmode']">
|
:class="['Name', darkMode ? 'th-darkmode' : 'th-lightmode', darkMode ? 'Name-darkmode' : 'Name-lightmode']">
|
||||||
@ -26,7 +26,7 @@
|
|||||||
<tr v-for="item in configItemList" :key="item.primaryID"
|
<tr v-for="item in configItemList" :key="item.primaryID"
|
||||||
:class="['table-row', darkMode ? 'tr-darkmode' : 'tr-lightmode']">
|
:class="['table-row', darkMode ? 'tr-darkmode' : 'tr-lightmode']">
|
||||||
<td
|
<td
|
||||||
:class="['Client', darkMode ? 'td-darkmode' : 'td-lightmode', darkMode ? 'Client-darkmode' : 'Client-lightmode']">
|
:class="['Customer', darkMode ? 'td-darkmode' : 'td-lightmode', darkMode ? 'Customer-darkmode' : 'Customer-lightmode']">
|
||||||
{{ item.customer }}
|
{{ item.customer }}
|
||||||
</td>
|
</td>
|
||||||
<td
|
<td
|
||||||
@ -63,8 +63,8 @@ const goToChosenAsset = (id) => {
|
|||||||
store.commit('setChosenAsset', id);
|
store.commit('setChosenAsset', id);
|
||||||
store.commit('changeToAsset');
|
store.commit('changeToAsset');
|
||||||
};
|
};
|
||||||
const clientFilter = computed(() => store.state.filteredByClient);
|
const customerFilter = computed(() => store.state.filteredByCustomer);
|
||||||
const searchable = computed(() => store.state.searchable);
|
const assetSearchable = computed(() => store.state.searchable);
|
||||||
|
|
||||||
const assetSearchFilter = ref('');
|
const assetSearchFilter = ref('');
|
||||||
const darkMode = ref(true)
|
const darkMode = ref(true)
|
||||||
@ -78,8 +78,8 @@ const updateSearchTerm = async () => {
|
|||||||
|
|
||||||
//get all config items
|
//get all config items
|
||||||
const getConfigItems = async () => {
|
const getConfigItems = async () => {
|
||||||
if (!(clientFilter.value === '')) {
|
if (!(customerFilter.value === '')) {
|
||||||
await getFilteredConfigItemsByClient();
|
await getFilteredConfigItemsByCustomer();
|
||||||
} else {
|
} else {
|
||||||
try {
|
try {
|
||||||
const response = await Axios.get(`https://${clientsideConfig.url}:${clientsideConfig.port}/api/getAllConfigItems`);
|
const response = await Axios.get(`https://${clientsideConfig.url}:${clientsideConfig.port}/api/getAllConfigItems`);
|
||||||
@ -90,10 +90,10 @@ const getConfigItems = async () => {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//get all config items based on the searched client
|
//get all config items based on the searched customer
|
||||||
const getFilteredConfigItemsByClient = async () => {
|
const getFilteredConfigItemsByCustomer = async () => {
|
||||||
try {
|
try {
|
||||||
const response = await Axios.get(`https://${clientsideConfig.url}:${clientsideConfig.port}/api/getSelectedConfigItemsByClient/${clientFilter.value}`);
|
const response = await Axios.get(`https://${clientsideConfig.url}:${clientsideConfig.port}/api/getSelectedConfigItemsByCustomer/${customerFilter.value}`);
|
||||||
configItemList.value = response.data;
|
configItemList.value = response.data;
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
console.log(err.response.statusText);
|
console.log(err.response.statusText);
|
||||||
@ -114,8 +114,8 @@ const searchConfigItem = async () => {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
watch(clientFilter, getConfigItems);
|
watch(customerFilter, getConfigItems);
|
||||||
watch(searchable, updateSearchTerm);
|
watch(assetSearchable, updateSearchTerm);
|
||||||
|
|
||||||
onMounted(async () => {
|
onMounted(async () => {
|
||||||
await getConfigItems();
|
await getConfigItems();
|
||||||
@ -252,15 +252,15 @@ th {
|
|||||||
font: 700 0.875rem/1.875rem Overpass, sans-serif;
|
font: 700 0.875rem/1.875rem Overpass, sans-serif;
|
||||||
}
|
}
|
||||||
|
|
||||||
.Client {
|
.Customer {
|
||||||
width: 33.3%;
|
width: 33.3%;
|
||||||
}
|
}
|
||||||
|
|
||||||
.Client-darkmode {
|
.Customer-darkmode {
|
||||||
border-right: 0.0625rem solid #000000;
|
border-right: 0.0625rem solid #000000;
|
||||||
}
|
}
|
||||||
|
|
||||||
.Client-lightmode {
|
.Customer-lightmode {
|
||||||
border-right: 0.0625rem solid #8e8e8e;
|
border-right: 0.0625rem solid #8e8e8e;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -315,7 +315,7 @@ th {
|
|||||||
letter-spacing: 0.05em;
|
letter-spacing: 0.05em;
|
||||||
}
|
}
|
||||||
|
|
||||||
.clientLabel {
|
.customerLabel {
|
||||||
width: 5.5625em;
|
width: 5.5625em;
|
||||||
height: 1.875em;
|
height: 1.875em;
|
||||||
font-family: "Overpass";
|
font-family: "Overpass";
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
<template>
|
<!-- <template>
|
||||||
<div :class="['data', darkMode ? 'div-darkmode' : 'div-lightmode']">
|
<div :class="['data', darkMode ? 'div-darkmode' : 'div-lightmode']">
|
||||||
<div :class="['label', darkMode ? 'label-darkmode' : 'label-lightmode']">Assets:</div>
|
<div :class="['label', darkMode ? 'label-darkmode' : 'label-lightmode']">Assets:</div>
|
||||||
<table class="data-table" id="asset-table-no-client">
|
<table class="data-table" id="asset-table-no-customer">
|
||||||
<tbody>
|
<tbody>
|
||||||
<tr :class="['table-row', darkMode ? 'tr-head-darkmode' : 'tr-head-lightmode']" id="table-head">
|
<tr :class="['table-row', darkMode ? 'tr-head-darkmode' : 'tr-head-lightmode']" id="table-head">
|
||||||
<th
|
<th
|
||||||
@ -40,7 +40,7 @@ const darkMode = ref(true)
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
export default {
|
export default {
|
||||||
name: "AssetTableNoClient",
|
name: "AssetTableNoCustomer",
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
@ -183,4 +183,4 @@ th {
|
|||||||
.label-lightmode {
|
.label-lightmode {
|
||||||
color: #000;
|
color: #000;
|
||||||
}
|
}
|
||||||
</style>
|
</style> -->
|
||||||
@ -1,11 +1,11 @@
|
|||||||
<template>
|
<template>
|
||||||
<section :class="[darkMode ? 'section-darkmode' : 'section-lightmode']">
|
<section :class="[darkMode ? 'section-darkmode' : 'section-lightmode']">
|
||||||
<pre :class="['title', darkMode ? 'title-darkmode' : 'title-lightmode']">Customer name</pre>
|
<pre :class="['title', darkMode ? 'title-darkmode' : 'title-lightmode']">Customer name</pre>
|
||||||
<div class="data-field" id="client-id">
|
<div class="data-field" id="customer-id">
|
||||||
<pre :class="['label', darkMode ? 'pre-darkmode' : 'pre-lightmode']">ID:</pre>
|
<pre :class="['label', darkMode ? 'pre-darkmode' : 'pre-lightmode']">ID:</pre>
|
||||||
<pre :class="['data', darkMode ? 'data-darkmode' : 'data-lightmode']">...</pre>
|
<pre :class="['data', darkMode ? 'data-darkmode' : 'data-lightmode']">...</pre>
|
||||||
</div>
|
</div>
|
||||||
<div class="client-data">
|
<div class="customer-data">
|
||||||
<div class="contact">
|
<div class="contact">
|
||||||
<pre :class="['area-title', darkMode ? 'h3-darkmode' : 'h3-lightmode']">Contact:</pre>
|
<pre :class="['area-title', darkMode ? 'h3-darkmode' : 'h3-lightmode']">Contact:</pre>
|
||||||
<div class="data-field" id="contact-person">
|
<div class="data-field" id="contact-person">
|
||||||
@ -59,7 +59,7 @@ const darkMode = ref(true)
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
export default {
|
export default {
|
||||||
name: "Client",
|
name: "Customer",
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
@ -99,7 +99,7 @@ section {
|
|||||||
justify-content: flex-start;
|
justify-content: flex-start;
|
||||||
gap: 1.25rem;
|
gap: 1.25rem;
|
||||||
}
|
}
|
||||||
.data-field#client-id { padding: 0.625rem 1.875rem; }
|
.data-field#customer-id { padding: 0.625rem 1.875rem; }
|
||||||
.data-field#street-name { flex: 3; }
|
.data-field#street-name { flex: 3; }
|
||||||
|
|
||||||
.label {
|
.label {
|
||||||
@ -135,7 +135,7 @@ pre {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
.client-data {
|
.customer-data {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex: auto;
|
flex: auto;
|
||||||
flex-direction: row;
|
flex-direction: row;
|
||||||
@ -6,7 +6,7 @@
|
|||||||
<pre :class="['label', darkMode ? 'pre-darkmode' : 'pre-lightmode']">ID:</pre>
|
<pre :class="['label', darkMode ? 'pre-darkmode' : 'pre-lightmode']">ID:</pre>
|
||||||
<pre :class="['data', darkMode ? 'data-darkmode' : 'data-lightmode']">...</pre>
|
<pre :class="['data', darkMode ? 'data-darkmode' : 'data-lightmode']">...</pre>
|
||||||
</div>
|
</div>
|
||||||
<div class="data-field" id="client-id">
|
<div class="data-field" id="customer-id">
|
||||||
<pre :class="['label', darkMode ? 'pre-darkmode' : 'pre-lightmode']">Customer ID:</pre>
|
<pre :class="['label', darkMode ? 'pre-darkmode' : 'pre-lightmode']">Customer ID:</pre>
|
||||||
<pre :class="['data', darkMode ? 'data-darkmode' : 'data-lightmode']">...</pre>
|
<pre :class="['data', darkMode ? 'data-darkmode' : 'data-lightmode']">...</pre>
|
||||||
</div>
|
</div>
|
||||||
@ -32,7 +32,7 @@ const darkMode = ref(true)
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
export default {
|
export default {
|
||||||
name: "ClientDepartment",
|
name: "CustomerDepartment",
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
@ -2,7 +2,7 @@
|
|||||||
<template>
|
<template>
|
||||||
<section :class="['data', darkMode ? 'section-darkmode' : 'section-lightmode']">
|
<section :class="['data', darkMode ? 'section-darkmode' : 'section-lightmode']">
|
||||||
<div :class="['label', darkMode ? 'label-darkmode' : 'label-lightmode']">Employees:</div>
|
<div :class="['label', darkMode ? 'label-darkmode' : 'label-lightmode']">Employees:</div>
|
||||||
<table class="data-table" id="client-employee-table">
|
<table class="data-table" id="customer-employee-table">
|
||||||
<tr :class="['table-row', darkMode ? 'tr-head-darkmode' : 'tr-head-lightmode']" id="table-head">
|
<tr :class="['table-row', darkMode ? 'tr-head-darkmode' : 'tr-head-lightmode']" id="table-head">
|
||||||
<th :class="['ID', darkMode ? 'th-darkmode' : 'th-lightmode', darkMode ? 'ID-darkmode' : 'ID-lightmode']">ID</th>
|
<th :class="['ID', darkMode ? 'th-darkmode' : 'th-lightmode', darkMode ? 'ID-darkmode' : 'ID-lightmode']">ID</th>
|
||||||
<th :class="['Name', darkMode ? 'th-darkmode' : 'th-lightmode', darkMode ? 'Name-darkmode' : 'Name-lightmode']">Name</th>
|
<th :class="['Name', darkMode ? 'th-darkmode' : 'th-lightmode', darkMode ? 'Name-darkmode' : 'Name-lightmode']">Name</th>
|
||||||
@ -28,7 +28,7 @@ const darkMode = ref(true)
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
export default {
|
export default {
|
||||||
name: "ClientDepartmentEmployeeList",
|
name: "CustomerDepartmentEmployeeList",
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
@ -1,7 +1,7 @@
|
|||||||
<template>
|
<template>
|
||||||
<section :class="['data', darkMode ? 'section-darkmode' : 'section-lightmode']">
|
<section :class="['data', darkMode ? 'section-darkmode' : 'section-lightmode']">
|
||||||
<div :class="['label', darkMode ? 'label-darkmode' : 'label-lightmode']">Departments:</div>
|
<div :class="['label', darkMode ? 'label-darkmode' : 'label-lightmode']">Departments:</div>
|
||||||
<table class="data-table" id="client-employee-table">
|
<table class="data-table" id="customer-employee-table">
|
||||||
<tr :class="['table-row', darkMode ? 'tr-head-darkmode' : 'tr-head-lightmode']" id="table-head">
|
<tr :class="['table-row', darkMode ? 'tr-head-darkmode' : 'tr-head-lightmode']" id="table-head">
|
||||||
<th :class="['ID', darkMode ? 'th-darkmode' : 'th-lightmode', darkMode ? 'ID-darkmode' : 'ID-lightmode']">ID</th>
|
<th :class="['ID', darkMode ? 'th-darkmode' : 'th-lightmode', darkMode ? 'ID-darkmode' : 'ID-lightmode']">ID</th>
|
||||||
<th :class="['Name', darkMode ? 'th-darkmode' : 'th-lightmode', darkMode ? 'Name-darkmode' : 'Name-lightmode']">Name</th>
|
<th :class="['Name', darkMode ? 'th-darkmode' : 'th-lightmode', darkMode ? 'Name-darkmode' : 'Name-lightmode']">Name</th>
|
||||||
@ -25,7 +25,7 @@ const darkMode = ref(true)
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
export default {
|
export default {
|
||||||
name: "ClientDepartmentList",
|
name: "CustomerDepartmentList",
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
@ -32,7 +32,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="data-group" id="employment-data">
|
<div class="data-group" id="employment-data">
|
||||||
<div class="data-field" id="client-id">
|
<div class="data-field" id="customer-id">
|
||||||
<pre :class="['label', darkMode ? 'pre-darkmode' : 'pre-lightmode']">Customer ID:</pre>
|
<pre :class="['label', darkMode ? 'pre-darkmode' : 'pre-lightmode']">Customer ID:</pre>
|
||||||
<pre :class="['data', darkMode ? 'data-darkmode' : 'data-lightmode']">...</pre>
|
<pre :class="['data', darkMode ? 'data-darkmode' : 'data-lightmode']">...</pre>
|
||||||
</div>
|
</div>
|
||||||
@ -72,7 +72,7 @@ const darkMode = ref(true)
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
export default {
|
export default {
|
||||||
name: "ClientEmployee",
|
name: "CustomerEmployee",
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
@ -1,7 +1,7 @@
|
|||||||
<template>
|
<template>
|
||||||
<section :class="['data', darkMode ? 'section-darkmode' : 'section-lightmode']">
|
<section :class="['data', darkMode ? 'section-darkmode' : 'section-lightmode']">
|
||||||
<div :class="['label', darkMode ? 'label-darkmode' : 'label-lightmode']">Employees:</div>
|
<div :class="['label', darkMode ? 'label-darkmode' : 'label-lightmode']">Employees:</div>
|
||||||
<table class="data-table" id="client-employee-table">
|
<table class="data-table" id="customer-employee-table">
|
||||||
<tr :class="['table-row', darkMode ? 'tr-head-darkmode' : 'tr-head-lightmode']" id="table-head">
|
<tr :class="['table-row', darkMode ? 'tr-head-darkmode' : 'tr-head-lightmode']" id="table-head">
|
||||||
<th :class="['ID', darkMode ? 'th-darkmode' : 'th-lightmode', darkMode ? 'ID-darkmode' : 'ID-lightmode']">ID</th>
|
<th :class="['ID', darkMode ? 'th-darkmode' : 'th-lightmode', darkMode ? 'ID-darkmode' : 'ID-lightmode']">ID</th>
|
||||||
<th :class="['Name', darkMode ? 'th-darkmode' : 'th-lightmode', darkMode ? 'Name-darkmode' : 'Name-lightmode']">Name</th>
|
<th :class="['Name', darkMode ? 'th-darkmode' : 'th-lightmode', darkMode ? 'Name-darkmode' : 'Name-lightmode']">Name</th>
|
||||||
@ -27,7 +27,7 @@ const darkMode = ref(true)
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
export default {
|
export default {
|
||||||
name: "ClientEmployeeList",
|
name: "CustomerEmployeeList",
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
@ -1,6 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<section :class="['data', darkMode ? 'section-darkmode' : 'section-lightmode']">
|
<section :class="['data', darkMode ? 'section-darkmode' : 'section-lightmode']">
|
||||||
<table class="data-table" id="client-table">
|
<table class="data-table" id="customer-table">
|
||||||
<tbody>
|
<tbody>
|
||||||
<tr :class="['table-row', darkMode ? 'tr-head-darkmode' : 'tr-head-lightmode']" id="table-head">
|
<tr :class="['table-row', darkMode ? 'tr-head-darkmode' : 'tr-head-lightmode']" id="table-head">
|
||||||
<th
|
<th
|
||||||
@ -33,7 +33,7 @@ const darkMode = ref(true)
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
export default {
|
export default {
|
||||||
name: "ClientTable",
|
name: "CustomerTable",
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
@ -2,8 +2,8 @@
|
|||||||
<section v-if="!addBool" :class="['information', darkMode ? 'section-darkmode' : 'section-lightmode']">
|
<section v-if="!addBool" :class="['information', darkMode ? 'section-darkmode' : 'section-lightmode']">
|
||||||
<h2 :class="['issueSlip-name', darkMode ? 'h2-darkmode' : 'h2-lightmode']">{{ issueSlip.primaryID }}</h2>
|
<h2 :class="['issueSlip-name', darkMode ? 'h2-darkmode' : 'h2-lightmode']">{{ issueSlip.primaryID }}</h2>
|
||||||
<div class="issueSlip-data">
|
<div class="issueSlip-data">
|
||||||
<div class="client">
|
<div class="customer">
|
||||||
<div class="data-field" id="client">
|
<div class="data-field" id="customer">
|
||||||
<pre :class="['label', darkMode ? 'pre-darkmode' : 'pre-lightmode']">Customer:</pre>
|
<pre :class="['label', darkMode ? 'pre-darkmode' : 'pre-lightmode']">Customer:</pre>
|
||||||
<pre v-if="!editable"
|
<pre v-if="!editable"
|
||||||
:class="['data', darkMode ? 'data-darkmode' : 'data-lightmode']">{{ issueSlip.customer }}</pre>
|
:class="['data', darkMode ? 'data-darkmode' : 'data-lightmode']">{{ issueSlip.customer }}</pre>
|
||||||
@ -400,7 +400,7 @@ export default {
|
|||||||
align-self: stretch;
|
align-self: stretch;
|
||||||
}
|
}
|
||||||
|
|
||||||
.client,
|
.customer,
|
||||||
.info {
|
.info {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
|
|||||||
@ -10,7 +10,7 @@
|
|||||||
<tbody>
|
<tbody>
|
||||||
<tr :class="['table-row', darkMode ? 'tr-head-darkmode' : 'tr-head-lightmode']" id="table-head">
|
<tr :class="['table-row', darkMode ? 'tr-head-darkmode' : 'tr-head-lightmode']" id="table-head">
|
||||||
<th
|
<th
|
||||||
:class="['Client', darkMode ? 'th-darkmode' : 'th-lightmode', darkMode ? 'Client-darkmode' : 'Client-lightmode']">
|
:class="['Customer', darkMode ? 'th-darkmode' : 'th-lightmode', darkMode ? 'Customer-darkmode' : 'Customer-lightmode']">
|
||||||
Customer</th>
|
Customer</th>
|
||||||
<th
|
<th
|
||||||
:class="['ID', darkMode ? 'th-darkmode' : 'th-lightmode', darkMode ? 'ID-darkmode' : 'ID-lightmode']">
|
:class="['ID', darkMode ? 'th-darkmode' : 'th-lightmode', darkMode ? 'ID-darkmode' : 'ID-lightmode']">
|
||||||
@ -27,7 +27,7 @@
|
|||||||
<tr v-for="issueSlip in issueSlips" :key="issueSlip.primaryID"
|
<tr v-for="issueSlip in issueSlips" :key="issueSlip.primaryID"
|
||||||
:class="['table-row', darkMode ? 'tr-darkmode' : 'tr-lightmode']" id="row-1">
|
:class="['table-row', darkMode ? 'tr-darkmode' : 'tr-lightmode']" id="row-1">
|
||||||
<td
|
<td
|
||||||
:class="['Client', darkMode ? 'td-darkmode' : 'td-lightmode', darkMode ? 'Client-darkmode' : 'Client-lightmode']">
|
:class="['Customer', darkMode ? 'td-darkmode' : 'td-lightmode', darkMode ? 'Customer-darkmode' : 'Customer-lightmode']">
|
||||||
{{ issueSlip.customer }}</td>
|
{{ issueSlip.customer }}</td>
|
||||||
<td
|
<td
|
||||||
:class="['ID', darkMode ? 'td-darkmode' : 'td-lightmode', darkMode ? 'ID-darkmode' : 'ID-lightmode']">
|
:class="['ID', darkMode ? 'td-darkmode' : 'td-lightmode', darkMode ? 'ID-darkmode' : 'ID-lightmode']">
|
||||||
@ -65,7 +65,7 @@ const goToChosenIssueSlip = (id) => {
|
|||||||
store.commit('changeToIssueSlip');
|
store.commit('changeToIssueSlip');
|
||||||
};
|
};
|
||||||
|
|
||||||
const clientFilter = computed(() => store.state.filteredByClient);
|
const customerFilter = computed(() => store.state.filteredByCustomer);
|
||||||
const searchable = computed(() => store.state.searchable);
|
const searchable = computed(() => store.state.searchable);
|
||||||
|
|
||||||
const issueSlipSearchFilter = ref('');
|
const issueSlipSearchFilter = ref('');
|
||||||
@ -80,7 +80,7 @@ const updateSearchTerm = async () => {
|
|||||||
|
|
||||||
//get all issueSlips
|
//get all issueSlips
|
||||||
const getIssueSlips = async () => {
|
const getIssueSlips = async () => {
|
||||||
if (!(clientFilter.value === '')) {
|
if (!(customerFilter.value === '')) {
|
||||||
await getFilteredIssueSlipsByClient();
|
await getFilteredIssueSlipsByClient();
|
||||||
} else {
|
} else {
|
||||||
try {
|
try {
|
||||||
@ -95,7 +95,7 @@ const getIssueSlips = async () => {
|
|||||||
//get all issue slips based on the searched client
|
//get all issue slips based on the searched client
|
||||||
const getFilteredIssueSlipsByClient = async () => {
|
const getFilteredIssueSlipsByClient = async () => {
|
||||||
try {
|
try {
|
||||||
const response = await Axios.get(`https://${clientsideConfig.url}:${clientsideConfig.port}/api/getSelectedIssueSlipsByClient/${clientFilter.value}`);
|
const response = await Axios.get(`https://${clientsideConfig.url}:${clientsideConfig.port}/api/getSelectedIssueSlipsByClient/${customerFilter.value}`);
|
||||||
issueSlips.value = response.data;
|
issueSlips.value = response.data;
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
console.log(err.response.statusText);
|
console.log(err.response.statusText);
|
||||||
@ -116,7 +116,7 @@ const searchIssueSlip = async () => {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
watch(clientFilter, getIssueSlips);
|
watch(customerFilter, getIssueSlips);
|
||||||
watch(searchable, updateSearchTerm);
|
watch(searchable, updateSearchTerm);
|
||||||
|
|
||||||
|
|
||||||
@ -270,15 +270,15 @@ th {
|
|||||||
font: 700 0.875rem/1.875rem Overpass, sans-serif;
|
font: 700 0.875rem/1.875rem Overpass, sans-serif;
|
||||||
}
|
}
|
||||||
|
|
||||||
.Client {
|
.Customer {
|
||||||
width: 31.6%;
|
width: 31.6%;
|
||||||
}
|
}
|
||||||
|
|
||||||
.Client-darkmode {
|
.Customer-darkmode {
|
||||||
border-right: 0.0625rem solid #000000;
|
border-right: 0.0625rem solid #000000;
|
||||||
}
|
}
|
||||||
|
|
||||||
.Client-lightmode {
|
.Customer-lightmode {
|
||||||
border-right: 0.0625rem solid #8e8e8e;
|
border-right: 0.0625rem solid #8e8e8e;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
<template>
|
<!-- <template>
|
||||||
<div :class="['data', darkMode ? 'div-darkmode' : 'div-lightmode']">
|
<div :class="['data', darkMode ? 'div-darkmode' : 'div-lightmode']">
|
||||||
<div :class="['label', darkMode ? 'label-darkmode' : 'label-lightmode']">Issue slip:</div>
|
<div :class="['label', darkMode ? 'label-darkmode' : 'label-lightmode']">Issue slip:</div>
|
||||||
<table class="data-table" id="asset-table">
|
<table class="data-table" id="asset-table">
|
||||||
@ -42,7 +42,7 @@ const darkMode = ref(true)
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
export default {
|
export default {
|
||||||
name: "IssueSlipTableNoClient",
|
name: "IssueSlipTableNoCustomer",
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
@ -184,4 +184,4 @@ th {
|
|||||||
|
|
||||||
.label-lightmode {
|
.label-lightmode {
|
||||||
color: #000;
|
color: #000;
|
||||||
}</style>
|
}</style> -->
|
||||||
@ -24,7 +24,7 @@
|
|||||||
:class="['table-row', darkMode ? 'tr-darkmode' : 'tr-lightmode']" id="row-1">
|
:class="['table-row', darkMode ? 'tr-darkmode' : 'tr-lightmode']" id="row-1">
|
||||||
<td
|
<td
|
||||||
:class="['Name', darkMode ? 'td-darkmode' : 'td-lightmode', darkMode ? 'Name-darkmode' : 'Name-lightmode']">
|
:class="['Name', darkMode ? 'td-darkmode' : 'td-lightmode', darkMode ? 'Name-darkmode' : 'Name-lightmode']">
|
||||||
<nuxt-link to="/issues" id="nuxt-link" class="button"
|
<nuxt-link to="/issueItems" id="nuxt-link" class="button"
|
||||||
:class="[darkMode ? 'button-darkmode' : 'button-lightmode']"
|
:class="[darkMode ? 'button-darkmode' : 'button-lightmode']"
|
||||||
@click="goToChosenIssue(issue.primaryID)">
|
@click="goToChosenIssue(issue.primaryID)">
|
||||||
{{ issue.name }}
|
{{ issue.name }}
|
||||||
@ -58,7 +58,7 @@ const goToChosenIssue = (id) => {
|
|||||||
store.commit('changeToIssueItem');
|
store.commit('changeToIssueItem');
|
||||||
};
|
};
|
||||||
|
|
||||||
const stateFilter = computed(() => store.state.filteredByClient);
|
const stateFilter = computed(() => store.state.filteredByCustomer);
|
||||||
const searchable = computed(() => store.state.searchable);
|
const searchable = computed(() => store.state.searchable);
|
||||||
|
|
||||||
const issueSearchFilter = ref('');
|
const issueSearchFilter = ref('');
|
||||||
|
|||||||
@ -9,7 +9,7 @@
|
|||||||
<div class="data-field" id="variantOf">
|
<div class="data-field" id="variantOf">
|
||||||
<pre :class="['label', darkMode ? 'pre-darkmode' : 'pre-lightmode']">Variant of:</pre>
|
<pre :class="['label', darkMode ? 'pre-darkmode' : 'pre-lightmode']">Variant of:</pre>
|
||||||
<pre
|
<pre
|
||||||
:class="['data', darkMode ? 'data-darkmode' : 'data-lightmode']"><nuxt-link to="/issues" id="nuxt-link" class="button" @click="goToChosenIssue(issue.primaryID)">{{ nameOfVariant }}</nuxt-link></pre>
|
:class="['data', darkMode ? 'data-darkmode' : 'data-lightmode']"><nuxt-link to="/issueItems" id="nuxt-link" class="button" @click="goToChosenIssue(issue.primaryID)">{{ nameOfVariant }}</nuxt-link></pre>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="info">
|
<div class="info">
|
||||||
|
|||||||
@ -23,7 +23,7 @@
|
|||||||
:class="['table-row', darkMode ? 'tr-darkmode' : 'tr-lightmode']" id="row-1">
|
:class="['table-row', darkMode ? 'tr-darkmode' : 'tr-lightmode']" id="row-1">
|
||||||
<td v-if="!editable"
|
<td v-if="!editable"
|
||||||
:class="['Name', darkMode ? 'td-darkmode' : 'td-lightmode', darkMode ? 'Name-darkmode' : 'Name-lightmode']">
|
:class="['Name', darkMode ? 'td-darkmode' : 'td-lightmode', darkMode ? 'Name-darkmode' : 'Name-lightmode']">
|
||||||
<nuxt-link to="/issues" id="nuxt-link" class="button"
|
<nuxt-link to="/issueItems" id="nuxt-link" class="button"
|
||||||
:class="[darkMode ? 'button-darkmode' : 'button-lightmode']"
|
:class="[darkMode ? 'button-darkmode' : 'button-lightmode']"
|
||||||
@click="goToChosenIssueVariant(issueVar.primaryID)">
|
@click="goToChosenIssueVariant(issueVar.primaryID)">
|
||||||
{{ issueVar.name }}
|
{{ issueVar.name }}
|
||||||
@ -490,7 +490,7 @@ export default {
|
|||||||
font: 400 0.875rem/1.875rem Overpass, sans-serif;
|
font: 400 0.875rem/1.875rem Overpass, sans-serif;
|
||||||
border: none;
|
border: none;
|
||||||
border-radius: 0.625rem;
|
border-radius: 0.625rem;
|
||||||
margin-left: 8rem;
|
margin-left: 1rem;
|
||||||
padding-left: 0.9rem;
|
padding-left: 0.9rem;
|
||||||
padding-right: 0.9rem;
|
padding-right: 0.9rem;
|
||||||
}
|
}
|
||||||
@ -501,7 +501,7 @@ export default {
|
|||||||
font: 400 0.875rem/1.875rem Overpass, sans-serif;
|
font: 400 0.875rem/1.875rem Overpass, sans-serif;
|
||||||
border: none;
|
border: none;
|
||||||
border-radius: 0.625rem;
|
border-radius: 0.625rem;
|
||||||
margin-left: 8rem;
|
margin-left: 1rem;
|
||||||
padding-left: 0.9rem;
|
padding-left: 0.9rem;
|
||||||
padding-right: 0.9rem;
|
padding-right: 0.9rem;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -4,15 +4,15 @@
|
|||||||
<div class="maintenance-visits-instance-data">
|
<div class="maintenance-visits-instance-data">
|
||||||
<div class="instanceInfo">
|
<div class="instanceInfo">
|
||||||
<div class="data-field" id="info">
|
<div class="data-field" id="info">
|
||||||
<div class="templateId-client-type" id="templateID">
|
<div class="templateId-customer-type" id="templateID">
|
||||||
<pre :class="['label', darkMode ? 'pre-darkmode' : 'pre-lightmode']">Template ID:</pre>
|
<pre :class="['label', darkMode ? 'pre-darkmode' : 'pre-lightmode']">Template ID:</pre>
|
||||||
<pre :class="['data', darkMode ? 'data-darkmode' : 'data-lightmode']">...</pre>
|
<pre :class="['data', darkMode ? 'data-darkmode' : 'data-lightmode']">...</pre>
|
||||||
</div>
|
</div>
|
||||||
<div class="templateId-client-type" id="client">
|
<div class="templateId-customer-type" id="customer">
|
||||||
<pre :class="['label', darkMode ? 'pre-darkmode' : 'pre-lightmode']">Customer:</pre>
|
<pre :class="['label', darkMode ? 'pre-darkmode' : 'pre-lightmode']">Customer:</pre>
|
||||||
<pre :class="['data', darkMode ? 'data-darkmode' : 'data-lightmode']">...</pre>
|
<pre :class="['data', darkMode ? 'data-darkmode' : 'data-lightmode']">...</pre>
|
||||||
</div>
|
</div>
|
||||||
<div class="templateId-client-type" id="type">
|
<div class="templateId-customer-type" id="type">
|
||||||
<pre :class="['label', darkMode ? 'pre-darkmode' : 'pre-lightmode']">Type:</pre>
|
<pre :class="['label', darkMode ? 'pre-darkmode' : 'pre-lightmode']">Type:</pre>
|
||||||
<pre :class="['data', darkMode ? 'data-darkmode' : 'data-lightmode']">...</pre>
|
<pre :class="['data', darkMode ? 'data-darkmode' : 'data-lightmode']">...</pre>
|
||||||
</div>
|
</div>
|
||||||
@ -136,7 +136,7 @@ export default {
|
|||||||
|
|
||||||
.maintenanceType-state-user,
|
.maintenanceType-state-user,
|
||||||
.creationDate-completionDate-timeSpent,
|
.creationDate-completionDate-timeSpent,
|
||||||
.templateId-client-type {
|
.templateId-customer-type {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: row;
|
flex-direction: row;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
|||||||
@ -1,12 +1,12 @@
|
|||||||
<template>
|
<template>
|
||||||
<section v-if="!addBool" :class="['information', darkMode ? 'section-darkmode' : 'section-lightmode']">
|
<section v-if="!addBool" :class="['information', darkMode ? 'section-darkmode' : 'section-lightmode']">
|
||||||
<h2 v-if="!editable" :class="['maintenance-visits-template-name', darkMode ? 'h2-darkmode' : 'h2-lightmode']">{{
|
<h2 v-if="!editable" :class="['maintenance-visits-template-name', darkMode ? 'h2-darkmode' : 'h2-lightmode']">{{
|
||||||
mvt.name }}</h2>
|
mvt.name }}</h2>
|
||||||
<input v-if="editable" v-model="mvt.name" @change="updateMVT()"
|
<input v-if="editable" v-model="mvt.name" @change="updateMVT()"
|
||||||
:class="['data', 'mvt-name-input', darkMode ? 'h2-darkmode' : 'h2-lightmode', darkMode ? 'h2-input-darkmode' : 'h2-input-lightmode', 'input']">
|
:class="['data', 'mvt-name-input', darkMode ? 'h2-darkmode' : 'h2-lightmode', darkMode ? 'h2-input-darkmode' : 'h2-input-lightmode', 'input']">
|
||||||
<div class="maintenance-visits-template-data">
|
<div class="maintenance-visits-template-data">
|
||||||
<div class="client-ID-type-user">
|
<div class="customer-ID-type-user">
|
||||||
<div class="data-field" id="client">
|
<div class="data-field" id="customer">
|
||||||
<pre :class="['label', darkMode ? 'pre-darkmode' : 'pre-lightmode']">Customer:</pre>
|
<pre :class="['label', darkMode ? 'pre-darkmode' : 'pre-lightmode']">Customer:</pre>
|
||||||
<pre v-if="!editable"
|
<pre v-if="!editable"
|
||||||
:class="['data', darkMode ? 'data-darkmode' : 'data-lightmode']">{{ mvt.customer }}</pre>
|
:class="['data', darkMode ? 'data-darkmode' : 'data-lightmode']">{{ mvt.customer }}</pre>
|
||||||
@ -20,7 +20,8 @@
|
|||||||
<div class="data-field" id="info">
|
<div class="data-field" id="info">
|
||||||
<div class="id-type-user" id="ID">
|
<div class="id-type-user" id="ID">
|
||||||
<pre :class="['label', darkMode ? 'pre-darkmode' : 'pre-lightmode']">ID:</pre>
|
<pre :class="['label', darkMode ? 'pre-darkmode' : 'pre-lightmode']">ID:</pre>
|
||||||
<pre :class="['data', darkMode ? 'data-darkmode' : 'data-lightmode']">{{ mvt.checklistID }}</pre>
|
<pre
|
||||||
|
:class="['data', darkMode ? 'data-darkmode' : 'data-lightmode']">{{ mvt.checklistID }}</pre>
|
||||||
</div>
|
</div>
|
||||||
<div class="id-type-user" id="type">
|
<div class="id-type-user" id="type">
|
||||||
<pre :class="['label', darkMode ? 'pre-darkmode' : 'pre-lightmode']">Type:</pre>
|
<pre :class="['label', darkMode ? 'pre-darkmode' : 'pre-lightmode']">Type:</pre>
|
||||||
@ -53,8 +54,8 @@
|
|||||||
<input v-model="newName" @change="updateMaintenanceVisit()"
|
<input v-model="newName" @change="updateMaintenanceVisit()"
|
||||||
:class="['data', 'maintenance-visits-template-name-input', darkMode ? 'h2-darkmode' : 'h2-lightmode', darkMode ? 'h2-input-darkmode' : 'h2-input-lightmode', 'input']">
|
:class="['data', 'maintenance-visits-template-name-input', darkMode ? 'h2-darkmode' : 'h2-lightmode', darkMode ? 'h2-input-darkmode' : 'h2-input-lightmode', 'input']">
|
||||||
<div class="maintenance-visits-template-data">
|
<div class="maintenance-visits-template-data">
|
||||||
<div class="client-ID-type-user">
|
<div class="customer-ID-type-user">
|
||||||
<div class="data-field" id="client">
|
<div class="data-field" id="customer">
|
||||||
<pre :class="['label', darkMode ? 'pre-darkmode' : 'pre-lightmode']">Customer:</pre>
|
<pre :class="['label', darkMode ? 'pre-darkmode' : 'pre-lightmode']">Customer:</pre>
|
||||||
<select id="customersDropDownChosenCI" v-model="newCustomer" @change="updateNewCustomerID()"
|
<select id="customersDropDownChosenCI" v-model="newCustomer" @change="updateNewCustomerID()"
|
||||||
:class="[darkMode ? 'select-darkmode' : 'select-lightmode']">
|
:class="[darkMode ? 'select-darkmode' : 'select-lightmode']">
|
||||||
@ -92,8 +93,8 @@
|
|||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
import { ref, onMounted, watch } from 'vue';
|
import { ref, onMounted, watch } from 'vue';
|
||||||
import Axios from '../axios.config.js';
|
import Axios from '../axios.config.js';
|
||||||
@ -137,9 +138,6 @@ const confirmDeleteMVT = async () => {
|
|||||||
if (confirm("Do you really want to delete this maintenance visit template? It cannot be undone!")) {
|
if (confirm("Do you really want to delete this maintenance visit template? It cannot be undone!")) {
|
||||||
try {
|
try {
|
||||||
await Axios.delete(`https://${clientsideConfig.url}:${clientsideConfig.port}/api/deleteMaintenanceVisitTemplate/${chosenMVTId.value}`);
|
await Axios.delete(`https://${clientsideConfig.url}:${clientsideConfig.port}/api/deleteMaintenanceVisitTemplate/${chosenMVTId.value}`);
|
||||||
store.commit('undoDelete');
|
|
||||||
store.commit('resetStore');
|
|
||||||
store.commit('changeToTemplatelist');
|
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
console.log(err.response.statusText);
|
console.log(err.response.statusText);
|
||||||
}
|
}
|
||||||
@ -148,6 +146,9 @@ const confirmDeleteMVT = async () => {
|
|||||||
} catch (err) {
|
} catch (err) {
|
||||||
console.log(err.response.statusText);
|
console.log(err.response.statusText);
|
||||||
}
|
}
|
||||||
|
store.commit('undoDelete');
|
||||||
|
store.commit('resetStore');
|
||||||
|
store.commit('changeToTemplatelist');
|
||||||
} else {
|
} else {
|
||||||
store.commit('undoDelete');
|
store.commit('undoDelete');
|
||||||
}
|
}
|
||||||
@ -209,8 +210,8 @@ const updateCustomerID = async () => {
|
|||||||
const response = await Axios.get(`https://${clientsideConfig.url}:${clientsideConfig.port}/api/getCustomerByName/${mvt.value.customer}`);
|
const response = await Axios.get(`https://${clientsideConfig.url}:${clientsideConfig.port}/api/getCustomerByName/${mvt.value.customer}`);
|
||||||
customer.value = response.data;
|
customer.value = response.data;
|
||||||
mvt.value.customerID = customer.value.customerID;
|
mvt.value.customerID = customer.value.customerID;
|
||||||
store.commit('toggleClientChanged');
|
store.commit('toggleCustomerChanged');
|
||||||
store.commit('toggleClientId', mvt.value.customerID);
|
store.commit('toggleCustomerId', mvt.value.customerID);
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
console.log(err.response.statusText);
|
console.log(err.response.statusText);
|
||||||
}
|
}
|
||||||
@ -236,8 +237,8 @@ const updateNewCustomerID = async () => {
|
|||||||
try {
|
try {
|
||||||
const response = await Axios.get(`https://${clientsideConfig.url}:${clientsideConfig.port}/api/getCustomerByName/${newCustomer.value}`);
|
const response = await Axios.get(`https://${clientsideConfig.url}:${clientsideConfig.port}/api/getCustomerByName/${newCustomer.value}`);
|
||||||
newCustomerID.value = response.data.customerID;
|
newCustomerID.value = response.data.customerID;
|
||||||
store.commit('toggleClientChanged');
|
store.commit('toggleCustomerChanged');
|
||||||
store.commit('toggleClientId', newCustomerID.value)
|
store.commit('toggleCustomerId', newCustomerID.value)
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
console.log(err.response.statusText);
|
console.log(err.response.statusText);
|
||||||
}
|
}
|
||||||
@ -278,10 +279,10 @@ onMounted(() => {
|
|||||||
export default {
|
export default {
|
||||||
name: "MaintenanceVisitsTemplate",
|
name: "MaintenanceVisitsTemplate",
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<style scoped>
|
<style scoped>
|
||||||
.information {
|
.information {
|
||||||
display: flex;
|
display: flex;
|
||||||
@ -431,7 +432,7 @@ export default {
|
|||||||
align-self: stretch;
|
align-self: stretch;
|
||||||
}
|
}
|
||||||
|
|
||||||
.client-ID-type-user,
|
.customer-ID-type-user,
|
||||||
.info {
|
.info {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<section v-if="searchable" :class="['mvt-search', darkMode ? 'section-darkmode' : 'section-lightmode']">
|
<section v-if="searchable" :class="['mvt-search', darkMode ? 'section-darkmode' : 'section-lightmode']">
|
||||||
<div :class="['clientLabel', darkMode ? 'label-darkmode' : 'label-lightmode']">Template:</div>
|
<div :class="['customerLabel', darkMode ? 'label-darkmode' : 'label-lightmode']">Template:</div>
|
||||||
<input v-model="mvtSearchFilter" @change="searchMVT()"
|
<input v-model="mvtSearchFilter" @change="searchMVT()"
|
||||||
:class="['dataInput', 'input', darkMode ? 'data-darkmode' : 'data-lightmode']">
|
:class="['dataInput', 'input', darkMode ? 'data-darkmode' : 'data-lightmode']">
|
||||||
</section>
|
</section>
|
||||||
@ -10,7 +10,7 @@
|
|||||||
<tbody>
|
<tbody>
|
||||||
<tr :class="['table-row', darkMode ? 'tr-head-darkmode' : 'tr-head-lightmode']" id="table-head">
|
<tr :class="['table-row', darkMode ? 'tr-head-darkmode' : 'tr-head-lightmode']" id="table-head">
|
||||||
<th
|
<th
|
||||||
:class="['Client', darkMode ? 'th-darkmode' : 'th-lightmode', darkMode ? 'Client-darkmode' : 'Client-lightmode']">
|
:class="['Customer', darkMode ? 'th-darkmode' : 'th-lightmode', darkMode ? 'Customer-darkmode' : 'Customer-lightmode']">
|
||||||
Customer</th>
|
Customer</th>
|
||||||
<th
|
<th
|
||||||
:class="['Name', darkMode ? 'th-darkmode' : 'th-lightmode', darkMode ? 'Name-darkmode' : 'Name-lightmode']">
|
:class="['Name', darkMode ? 'th-darkmode' : 'th-lightmode', darkMode ? 'Name-darkmode' : 'Name-lightmode']">
|
||||||
@ -27,7 +27,7 @@
|
|||||||
<tr v-for="template in maintenanceVisitTemplates" :key="template.checklistID"
|
<tr v-for="template in maintenanceVisitTemplates" :key="template.checklistID"
|
||||||
:class="['table-row', darkMode ? 'tr-darkmode' : 'tr-lightmode']" id="row-1">
|
:class="['table-row', darkMode ? 'tr-darkmode' : 'tr-lightmode']" id="row-1">
|
||||||
<td
|
<td
|
||||||
:class="['Client', darkMode ? 'td-darkmode' : 'td-lightmode', darkMode ? 'Client-darkmode' : 'Client-lightmode']">
|
:class="['Customer', darkMode ? 'td-darkmode' : 'td-lightmode', darkMode ? 'Customer-darkmode' : 'Customer-lightmode']">
|
||||||
{{ template.customer }}</td>
|
{{ template.customer }}</td>
|
||||||
<td
|
<td
|
||||||
:class="['Name', darkMode ? 'td-darkmode' : 'td-lightmode', darkMode ? 'Name-darkmode' : 'Name-lightmode']">
|
:class="['Name', darkMode ? 'td-darkmode' : 'td-lightmode', darkMode ? 'Name-darkmode' : 'Name-lightmode']">
|
||||||
@ -64,7 +64,7 @@ const goToChosenMVT = (id) => {
|
|||||||
store.commit('changeToTemplate');
|
store.commit('changeToTemplate');
|
||||||
};
|
};
|
||||||
|
|
||||||
const clientFilter = computed(() => store.state.filteredByClient);
|
const customerFilter = computed(() => store.state.filteredByCustomer);
|
||||||
const searchable = computed(() => store.state.searchable);
|
const searchable = computed(() => store.state.searchable);
|
||||||
const mvtSearchFilter = ref('');
|
const mvtSearchFilter = ref('');
|
||||||
|
|
||||||
@ -73,8 +73,8 @@ const maintenanceVisitTemplates = ref([]);
|
|||||||
|
|
||||||
//get all maintenance visit templates
|
//get all maintenance visit templates
|
||||||
const getMaintenanceVisitTemplates = async () => {
|
const getMaintenanceVisitTemplates = async () => {
|
||||||
if (!(clientFilter.value === '')) {
|
if (!(customerFilter.value === '')) {
|
||||||
await getFilteredMVTByClient();
|
await getFilteredMVTByCustomer();
|
||||||
} else {
|
} else {
|
||||||
try {
|
try {
|
||||||
const response = await Axios.get(`https://${clientsideConfig.url}:${clientsideConfig.port}/api/getAllMaintenanceVisitTemplates`);
|
const response = await Axios.get(`https://${clientsideConfig.url}:${clientsideConfig.port}/api/getAllMaintenanceVisitTemplates`);
|
||||||
@ -105,10 +105,10 @@ const updateSearchTerm = async () => {
|
|||||||
await getMaintenanceVisitTemplates();
|
await getMaintenanceVisitTemplates();
|
||||||
}
|
}
|
||||||
|
|
||||||
//get all maintenance visit templates based on the searched client
|
//get all maintenance visit templates based on the searched customer
|
||||||
const getFilteredMVTByClient = async () => {
|
const getFilteredMVTByCustomer = async () => {
|
||||||
try {
|
try {
|
||||||
const response = await Axios.get(`https://${clientsideConfig.url}:${clientsideConfig.port}/api/getSelectedMVTsByClient/${clientFilter.value}`);
|
const response = await Axios.get(`https://${clientsideConfig.url}:${clientsideConfig.port}/api/getSelectedMVTsByCustomer/${customerFilter.value}`);
|
||||||
maintenanceVisitTemplates.value = response.data;
|
maintenanceVisitTemplates.value = response.data;
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
console.log(err.response.statusText);
|
console.log(err.response.statusText);
|
||||||
@ -116,7 +116,7 @@ const getFilteredMVTByClient = async () => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
watch(searchable, updateSearchTerm);
|
watch(searchable, updateSearchTerm);
|
||||||
watch(clientFilter, getMaintenanceVisitTemplates);
|
watch(customerFilter, getMaintenanceVisitTemplates);
|
||||||
|
|
||||||
onMounted(async () => {
|
onMounted(async () => {
|
||||||
await getMaintenanceVisitTemplates();
|
await getMaintenanceVisitTemplates();
|
||||||
@ -190,7 +190,7 @@ export default {
|
|||||||
font: 400 0.75rem/250% Overpass, sans-serif;
|
font: 400 0.75rem/250% Overpass, sans-serif;
|
||||||
}
|
}
|
||||||
|
|
||||||
.clientLabel {
|
.customerLabel {
|
||||||
width: 5.5625em;
|
width: 5.5625em;
|
||||||
height: 1.875em;
|
height: 1.875em;
|
||||||
font-family: "Overpass";
|
font-family: "Overpass";
|
||||||
@ -270,15 +270,15 @@ th {
|
|||||||
font: 700 0.875rem/1.875rem Overpass, sans-serif;
|
font: 700 0.875rem/1.875rem Overpass, sans-serif;
|
||||||
}
|
}
|
||||||
|
|
||||||
.Client {
|
.Customer {
|
||||||
width: 33.3%;
|
width: 33.3%;
|
||||||
}
|
}
|
||||||
|
|
||||||
.Client-darkmode {
|
.Customer-darkmode {
|
||||||
border-right: 0.0625rem solid #000000;
|
border-right: 0.0625rem solid #000000;
|
||||||
}
|
}
|
||||||
|
|
||||||
.Client-lightmode {
|
.Customer-lightmode {
|
||||||
border-right: 0.0625rem solid #8e8e8e;
|
border-right: 0.0625rem solid #8e8e8e;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
<template>
|
<!-- <template>
|
||||||
<div :class="['data', darkMode ? 'div-darkmode' : 'div-lightmode']">
|
<div :class="['data', darkMode ? 'div-darkmode' : 'div-lightmode']">
|
||||||
<div :class="['label', darkMode ? 'label-darkmode' : 'label-lightmode']">Templates:</div>
|
<div :class="['label', darkMode ? 'label-darkmode' : 'label-lightmode']">Templates:</div>
|
||||||
<table class="data-table" id="maintenance-visits-templat-table-no-client">
|
<table class="data-table" id="maintenance-visits-templat-table-no-customer">
|
||||||
<tbody>
|
<tbody>
|
||||||
<tr :class="['table-row', darkMode ? 'tr-head-darkmode' : 'tr-head-lightmode']" id="table-head">
|
<tr :class="['table-row', darkMode ? 'tr-head-darkmode' : 'tr-head-lightmode']" id="table-head">
|
||||||
<th
|
<th
|
||||||
@ -42,7 +42,7 @@ const darkMode = ref(true)
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
export default {
|
export default {
|
||||||
name: "MaintenanceVisitsTemplateTableNoClient",
|
name: "MaintenanceVisitsTemplateTableNoCustomer",
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
@ -184,4 +184,4 @@ th {
|
|||||||
|
|
||||||
.label-lightmode {
|
.label-lightmode {
|
||||||
color: #000;
|
color: #000;
|
||||||
}</style>
|
}</style> -->
|
||||||
@ -2,7 +2,7 @@
|
|||||||
<section v-if="!addBool" :class="['ordering-information', darkMode ? 'section-darkmode' : 'section-lightmode']">
|
<section v-if="!addBool" :class="['ordering-information', darkMode ? 'section-darkmode' : 'section-lightmode']">
|
||||||
<div :class="['label', darkMode ? 'label-darkmode' : 'label-lightmode']" id="ordering">Ordering information:
|
<div :class="['label', darkMode ? 'label-darkmode' : 'label-lightmode']" id="ordering">Ordering information:
|
||||||
<div class="asset-data">
|
<div class="asset-data">
|
||||||
<table class="data-table" id="asset-table-no-client">
|
<table class="data-table" id="asset-table-no-customer">
|
||||||
<tbody>
|
<tbody>
|
||||||
<tr :class="['table-row', darkMode ? 'tr-head-darkmode' : 'tr-head-lightmode']" id="table-head">
|
<tr :class="['table-row', darkMode ? 'tr-head-darkmode' : 'tr-head-lightmode']" id="table-head">
|
||||||
<th
|
<th
|
||||||
|
|||||||
@ -4,11 +4,11 @@
|
|||||||
<div class="production-orders-instance-data">
|
<div class="production-orders-instance-data">
|
||||||
<div class="instanceInfo">
|
<div class="instanceInfo">
|
||||||
<div class="data-field" id="info">
|
<div class="data-field" id="info">
|
||||||
<div class="templateId-client" id="templateID">
|
<div class="templateId-customer" id="templateID">
|
||||||
<pre :class="['label', darkMode ? 'pre-darkmode' : 'pre-lightmode']">Template ID:</pre>
|
<pre :class="['label', darkMode ? 'pre-darkmode' : 'pre-lightmode']">Template ID:</pre>
|
||||||
<pre :class="['data', darkMode ? 'data-darkmode' : 'data-lightmode']">...</pre>
|
<pre :class="['data', darkMode ? 'data-darkmode' : 'data-lightmode']">...</pre>
|
||||||
</div>
|
</div>
|
||||||
<div class="templateId-client" id="client">
|
<div class="templateId-customer" id="customer">
|
||||||
<pre :class="['label', darkMode ? 'pre-darkmode' : 'pre-lightmode']">Customer:</pre>
|
<pre :class="['label', darkMode ? 'pre-darkmode' : 'pre-lightmode']">Customer:</pre>
|
||||||
<pre :class="['data', darkMode ? 'data-darkmode' : 'data-lightmode']">...</pre>
|
<pre :class="['data', darkMode ? 'data-darkmode' : 'data-lightmode']">...</pre>
|
||||||
</div>
|
</div>
|
||||||
@ -163,7 +163,7 @@ export default {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.creationDate-completionDate-timeSpent,
|
.creationDate-completionDate-timeSpent,
|
||||||
.templateId-client {
|
.templateId-customer {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: row;
|
flex-direction: row;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
@ -250,7 +250,7 @@ export default {
|
|||||||
border-radius: 0.3125rem;
|
border-radius: 0.3125rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
div#client {
|
div#customer {
|
||||||
padding-left: 2.9em;
|
padding-left: 2.9em;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -1,12 +1,12 @@
|
|||||||
<template>
|
<template>
|
||||||
<section v-if="!addBool" :class="['information', darkMode ? 'section-darkmode' : 'section-lightmode']">
|
<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']">{{
|
<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()"
|
<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']">
|
:class="['data', 'pot-name-input', darkMode ? 'h2-darkmode' : 'h2-lightmode', darkMode ? 'h2-input-darkmode' : 'h2-input-lightmode', 'input']">
|
||||||
<div class="production-orders-template-data">
|
<div class="production-orders-template-data">
|
||||||
<div class="client-ID">
|
<div class="customer-ID">
|
||||||
<div class="data-field" id="client">
|
<div class="data-field" id="customer">
|
||||||
<pre :class="['label', darkMode ? 'div-darkmode' : 'div-lightmode']">Customer:</pre>
|
<pre :class="['label', darkMode ? 'div-darkmode' : 'div-lightmode']">Customer:</pre>
|
||||||
<pre v-if="!editable"
|
<pre v-if="!editable"
|
||||||
:class="['data', darkMode ? 'data-darkmode' : 'data-lightmode']"> {{ pot.customer }}</pre>
|
:class="['data', darkMode ? 'data-darkmode' : 'data-lightmode']"> {{ pot.customer }}</pre>
|
||||||
@ -56,8 +56,8 @@
|
|||||||
<input v-model="newName" @change="updateProductionOrder()"
|
<input v-model="newName" @change="updateProductionOrder()"
|
||||||
:class="['data', 'production-orders-template-name-input', darkMode ? 'h2-darkmode' : 'h2-lightmode', darkMode ? 'h2-input-darkmode' : 'h2-input-lightmode', 'input']">
|
:class="['data', 'production-orders-template-name-input', darkMode ? 'h2-darkmode' : 'h2-lightmode', darkMode ? 'h2-input-darkmode' : 'h2-input-lightmode', 'input']">
|
||||||
<div class="production-orders-template-data">
|
<div class="production-orders-template-data">
|
||||||
<div class="client-ID">
|
<div class="customer-ID">
|
||||||
<div class="data-field" id="client">
|
<div class="data-field" id="customer">
|
||||||
<pre :class="['label', darkMode ? 'pre-darkmode' : 'pre-lightmode']">Customer:</pre>
|
<pre :class="['label', darkMode ? 'pre-darkmode' : 'pre-lightmode']">Customer:</pre>
|
||||||
<select id="customersDropDownChosenCI" v-model="newCustomer" @change="updateNewCustomerID()"
|
<select id="customersDropDownChosenCI" v-model="newCustomer" @change="updateNewCustomerID()"
|
||||||
:class="[darkMode ? 'select-darkmode' : 'select-lightmode']">
|
:class="[darkMode ? 'select-darkmode' : 'select-lightmode']">
|
||||||
@ -100,7 +100,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
import { ref, onMounted, watch } from 'vue';
|
import { ref, onMounted, watch } from 'vue';
|
||||||
import Axios from '../axios.config.js';
|
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!")) {
|
if (confirm("Do you really want to delete this production order template? It cannot be undone!")) {
|
||||||
try {
|
try {
|
||||||
await Axios.delete(`https://${clientsideConfig.url}:${clientsideConfig.port}/api/deleteProductionOrderTemplate/${chosenPOTId.value}`);
|
await Axios.delete(`https://${clientsideConfig.url}:${clientsideConfig.port}/api/deleteProductionOrderTemplate/${chosenPOTId.value}`);
|
||||||
store.commit('undoDelete');
|
|
||||||
store.commit('resetStore');
|
|
||||||
store.commit('changeToTemplatelist');
|
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
console.log(err.response.statusText);
|
console.log(err.response.statusText);
|
||||||
}
|
}
|
||||||
@ -154,6 +151,9 @@ const confirmDeletePOT = async () => {
|
|||||||
} catch (err) {
|
} catch (err) {
|
||||||
console.log(err.response.statusText);
|
console.log(err.response.statusText);
|
||||||
}
|
}
|
||||||
|
store.commit('undoDelete');
|
||||||
|
store.commit('resetStore');
|
||||||
|
store.commit('changeToTemplatelist');
|
||||||
} else {
|
} else {
|
||||||
store.commit('undoDelete');
|
store.commit('undoDelete');
|
||||||
}
|
}
|
||||||
@ -215,8 +215,8 @@ const updateCustomerID = async () => {
|
|||||||
const response = await Axios.get(`https://${clientsideConfig.url}:${clientsideConfig.port}/api/getCustomerByName/${pot.value.customer}`);
|
const response = await Axios.get(`https://${clientsideConfig.url}:${clientsideConfig.port}/api/getCustomerByName/${pot.value.customer}`);
|
||||||
customer.value = response.data;
|
customer.value = response.data;
|
||||||
pot.value.customerID = customer.value.customerID;
|
pot.value.customerID = customer.value.customerID;
|
||||||
store.commit('toggleClientChanged');
|
store.commit('toggleCustomerChanged');
|
||||||
store.commit('toggleClientId', pot.value.customerID);
|
store.commit('toggleCustomerId', pot.value.customerID);
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
console.log(err.response.statusText);
|
console.log(err.response.statusText);
|
||||||
}
|
}
|
||||||
@ -242,8 +242,8 @@ const updateNewCustomerID = async () => {
|
|||||||
try {
|
try {
|
||||||
const response = await Axios.get(`https://${clientsideConfig.url}:${clientsideConfig.port}/api/getCustomerByName/${newCustomer.value}`);
|
const response = await Axios.get(`https://${clientsideConfig.url}:${clientsideConfig.port}/api/getCustomerByName/${newCustomer.value}`);
|
||||||
newCustomerID.value = response.data.customerID;
|
newCustomerID.value = response.data.customerID;
|
||||||
store.commit('toggleClientChanged');
|
store.commit('toggleCustomerChanged');
|
||||||
store.commit('toggleClientId', newCustomerID.value)
|
store.commit('toggleCustomerId', newCustomerID.value)
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
console.log(err.response.statusText);
|
console.log(err.response.statusText);
|
||||||
}
|
}
|
||||||
@ -283,9 +283,9 @@ onMounted(() => {
|
|||||||
export default {
|
export default {
|
||||||
name: "ProductionOrdersTemplate",
|
name: "ProductionOrdersTemplate",
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
||||||
<style scoped>
|
<style scoped>
|
||||||
.information {
|
.information {
|
||||||
display: flex;
|
display: flex;
|
||||||
@ -424,7 +424,23 @@ export default {
|
|||||||
border-radius: 0.3125rem;
|
border-radius: 0.3125rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
.client-ID,
|
.select-darkmode {
|
||||||
|
border: none;
|
||||||
|
color: white;
|
||||||
|
background: #212121;
|
||||||
|
padding: 0.4rem;
|
||||||
|
border-radius: 0.3125rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.select-lightmode {
|
||||||
|
border: none;
|
||||||
|
color: black;
|
||||||
|
background: #EBEBEB;
|
||||||
|
padding: 0.4rem;
|
||||||
|
border-radius: 0.3125rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.customer-ID,
|
||||||
.user {
|
.user {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<section v-if="searchable" :class="['pot-search', darkMode ? 'section-darkmode' : 'section-lightmode']">
|
<section v-if="searchable" :class="['pot-search', darkMode ? 'section-darkmode' : 'section-lightmode']">
|
||||||
<div :class="['clientLabel', darkMode ? 'label-darkmode' : 'label-lightmode']">Template:</div>
|
<div :class="['customerLabel', darkMode ? 'label-darkmode' : 'label-lightmode']">Template:</div>
|
||||||
<input v-model="potSearchFilter" @change="searchPOT()"
|
<input v-model="potSearchFilter" @change="searchPOT()"
|
||||||
:class="['dataInput', 'input', darkMode ? 'data-darkmode' : 'data-lightmode']">
|
:class="['dataInput', 'input', darkMode ? 'data-darkmode' : 'data-lightmode']">
|
||||||
</section>
|
</section>
|
||||||
@ -10,7 +10,7 @@
|
|||||||
<tbody>
|
<tbody>
|
||||||
<tr :class="['table-row', darkMode ? 'tr-head-darkmode' : 'tr-head-lightmode']" id="table-head">
|
<tr :class="['table-row', darkMode ? 'tr-head-darkmode' : 'tr-head-lightmode']" id="table-head">
|
||||||
<th
|
<th
|
||||||
:class="['Client', darkMode ? 'th-darkmode' : 'th-lightmode', darkMode ? 'Client-darkmode' : 'Client-lightmode']">
|
:class="['Customer', darkMode ? 'th-darkmode' : 'th-lightmode', darkMode ? 'Customer-darkmode' : 'Customer-lightmode']">
|
||||||
Customer</th>
|
Customer</th>
|
||||||
<th
|
<th
|
||||||
:class="['Name', darkMode ? 'th-darkmode' : 'th-lightmode', darkMode ? 'Name-darkmode' : 'Name-lightmode']">
|
:class="['Name', darkMode ? 'th-darkmode' : 'th-lightmode', darkMode ? 'Name-darkmode' : 'Name-lightmode']">
|
||||||
@ -24,7 +24,7 @@
|
|||||||
<tr v-for="template in productionOrderTemplates" :key="template.templateID"
|
<tr v-for="template in productionOrderTemplates" :key="template.templateID"
|
||||||
:class="['table-row', darkMode ? 'tr-darkmode' : 'tr-lightmode']" id="row-1">
|
:class="['table-row', darkMode ? 'tr-darkmode' : 'tr-lightmode']" id="row-1">
|
||||||
<td
|
<td
|
||||||
:class="['Client', darkMode ? 'td-darkmode' : 'td-lightmode', darkMode ? 'Client-darkmode' : 'Client-lightmode']">
|
:class="['Customer', darkMode ? 'td-darkmode' : 'td-lightmode', darkMode ? 'Customer-darkmode' : 'Customer-lightmode']">
|
||||||
{{ template.customer }}</td>
|
{{ template.customer }}</td>
|
||||||
<td
|
<td
|
||||||
:class="['Name', darkMode ? 'td-darkmode' : 'td-lightmode', darkMode ? 'Name-darkmode' : 'Name-lightmode']">
|
:class="['Name', darkMode ? 'td-darkmode' : 'td-lightmode', darkMode ? 'Name-darkmode' : 'Name-lightmode']">
|
||||||
@ -59,7 +59,7 @@ const goToChosenPOT = (id) => {
|
|||||||
store.commit('changeToTemplate');
|
store.commit('changeToTemplate');
|
||||||
};
|
};
|
||||||
|
|
||||||
const clientFilter = computed(() => store.state.filteredByClient);
|
const customerFilter = computed(() => store.state.filteredByCustomer);
|
||||||
const searchable = computed(() => store.state.searchable);
|
const searchable = computed(() => store.state.searchable);
|
||||||
|
|
||||||
const potSearchFilter = ref('');
|
const potSearchFilter = ref('');
|
||||||
@ -68,8 +68,8 @@ const productionOrderTemplates = ref([]);
|
|||||||
|
|
||||||
//get all productionOrder templates
|
//get all productionOrder templates
|
||||||
const getProductionOrderTemplates = async () => {
|
const getProductionOrderTemplates = async () => {
|
||||||
if (!(clientFilter.value === '')) {
|
if (!(customerFilter.value === '')) {
|
||||||
await getFilteredPOTByClient();
|
await getFilteredPOTByCustomer();
|
||||||
} else {
|
} else {
|
||||||
try {
|
try {
|
||||||
const response = await Axios.get(`https://${clientsideConfig.url}:${clientsideConfig.port}/api/getAllProductionOrderTemplates`);
|
const response = await Axios.get(`https://${clientsideConfig.url}:${clientsideConfig.port}/api/getAllProductionOrderTemplates`);
|
||||||
@ -100,17 +100,17 @@ const updateSearchTerm = async () => {
|
|||||||
await getProductionOrderTemplates();
|
await getProductionOrderTemplates();
|
||||||
}
|
}
|
||||||
|
|
||||||
//get all productionOrder templates based on the searched client
|
//get all productionOrder templates based on the searched customer
|
||||||
const getFilteredPOTByClient = async () => {
|
const getFilteredPOTByCustomer = async () => {
|
||||||
try {
|
try {
|
||||||
const response = await Axios.get(`https://${clientsideConfig.url}:${clientsideConfig.port}/api/getSelectedPOTsByClient/${clientFilter.value}`);
|
const response = await Axios.get(`https://${clientsideConfig.url}:${clientsideConfig.port}/api/getSelectedPOTsByCustomer/${customerFilter.value}`);
|
||||||
productionOrderTemplates.value = response.data;
|
productionOrderTemplates.value = response.data;
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
console.log(err.response.statusText);
|
console.log(err.response.statusText);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
watch(clientFilter, getProductionOrderTemplates);
|
watch(customerFilter, getProductionOrderTemplates);
|
||||||
watch(searchable, updateSearchTerm);
|
watch(searchable, updateSearchTerm);
|
||||||
|
|
||||||
onMounted(async () => {
|
onMounted(async () => {
|
||||||
@ -255,15 +255,15 @@ th {
|
|||||||
font: 700 0.875rem/1.875rem Overpass, sans-serif;
|
font: 700 0.875rem/1.875rem Overpass, sans-serif;
|
||||||
}
|
}
|
||||||
|
|
||||||
.Client {
|
.Customer {
|
||||||
width: 33.3%;
|
width: 33.3%;
|
||||||
}
|
}
|
||||||
|
|
||||||
.Client-darkmode {
|
.Customer-darkmode {
|
||||||
border-right: 0.0625rem solid #000000;
|
border-right: 0.0625rem solid #000000;
|
||||||
}
|
}
|
||||||
|
|
||||||
.Client-lightmode {
|
.Customer-lightmode {
|
||||||
border-right: 0.0625rem solid #8e8e8e;
|
border-right: 0.0625rem solid #8e8e8e;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -314,7 +314,7 @@ th {
|
|||||||
color: #000;
|
color: #000;
|
||||||
}
|
}
|
||||||
|
|
||||||
.clientLabel {
|
.customerLabel {
|
||||||
width: 5.5625em;
|
width: 5.5625em;
|
||||||
height: 1.875em;
|
height: 1.875em;
|
||||||
font-family: "Overpass";
|
font-family: "Overpass";
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
<template>
|
<!-- <template>
|
||||||
<div :class="['data', darkMode ? 'div-darkmode' : 'div-lightmode']">
|
<div :class="['data', darkMode ? 'div-darkmode' : 'div-lightmode']">
|
||||||
<div :class="['label', darkMode ? 'label-darkmode' : 'label-lightmode']">Templates:</div>
|
<div :class="['label', darkMode ? 'label-darkmode' : 'label-lightmode']">Templates:</div>
|
||||||
<table class="data-table" id="production-orders-template-table-no-client">
|
<table class="data-table" id="production-orders-template-table-no-customer">
|
||||||
<tbody>
|
<tbody>
|
||||||
<tr :class="['table-row', darkMode ? 'tr-head-darkmode' : 'tr-head-lightmode']" id="table-head">
|
<tr :class="['table-row', darkMode ? 'tr-head-darkmode' : 'tr-head-lightmode']" id="table-head">
|
||||||
<th
|
<th
|
||||||
@ -36,7 +36,7 @@ const darkMode = ref(true)
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
export default {
|
export default {
|
||||||
name: "ProductionOrdersTemplateTableNoClient",
|
name: "ProductionOrdersTemplateTableNoCustomer",
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
@ -165,4 +165,4 @@ th {
|
|||||||
|
|
||||||
.label-lightmode {
|
.label-lightmode {
|
||||||
color: #000;
|
color: #000;
|
||||||
}</style>
|
}</style> -->
|
||||||
@ -3,7 +3,7 @@
|
|||||||
:class="['software-information', darkMode ? 'section-darkmode' : 'section-lightmode']">
|
:class="['software-information', darkMode ? 'section-darkmode' : 'section-lightmode']">
|
||||||
<div :class="['label', darkMode ? 'label-darkmode' : 'label-lightmode']" id="software">Software specifications:
|
<div :class="['label', darkMode ? 'label-darkmode' : 'label-lightmode']" id="software">Software specifications:
|
||||||
<div class="asset-data">
|
<div class="asset-data">
|
||||||
<table class="data-table" id="asset-table-no-client">
|
<table class="data-table" id="asset-table-no-customer">
|
||||||
<tbody>
|
<tbody>
|
||||||
<tr :class="['table-row', darkMode ? 'tr-head-darkmode' : 'tr-head-lightmode']" id="table-head">
|
<tr :class="['table-row', darkMode ? 'tr-head-darkmode' : 'tr-head-lightmode']" id="table-head">
|
||||||
<th
|
<th
|
||||||
@ -47,7 +47,7 @@
|
|||||||
<section v-if="addBool" :class="['software-information', darkMode ? 'section-darkmode' : 'section-lightmode']">
|
<section v-if="addBool" :class="['software-information', darkMode ? 'section-darkmode' : 'section-lightmode']">
|
||||||
<div :class="['label', darkMode ? 'label-darkmode' : 'label-lightmode']" id="software">Software specifications:
|
<div :class="['label', darkMode ? 'label-darkmode' : 'label-lightmode']" id="software">Software specifications:
|
||||||
<div class="asset-data">
|
<div class="asset-data">
|
||||||
<table class="data-table" id="asset-table-no-client">
|
<table class="data-table" id="asset-table-no-customer">
|
||||||
<tbody>
|
<tbody>
|
||||||
<tr :class="['table-row', darkMode ? 'tr-head-darkmode' : 'tr-head-lightmode']" id="table-head">
|
<tr :class="['table-row', darkMode ? 'tr-head-darkmode' : 'tr-head-lightmode']" id="table-head">
|
||||||
<th
|
<th
|
||||||
|
|||||||
@ -5,8 +5,8 @@
|
|||||||
<input v-if="editable" v-model="sol.solutionName" @change="updateSolution()"
|
<input v-if="editable" v-model="sol.solutionName" @change="updateSolution()"
|
||||||
:class="['data', 'solution-name-input', darkMode ? 'h2-darkmode' : 'h2-lightmode', darkMode ? 'h2-input-darkmode' : 'h2-input-lightmode', 'input']">
|
:class="['data', 'solution-name-input', darkMode ? 'h2-darkmode' : 'h2-lightmode', darkMode ? 'h2-input-darkmode' : 'h2-input-lightmode', 'input']">
|
||||||
<div class="solution-data">
|
<div class="solution-data">
|
||||||
<div class="client-asset">
|
<div class="customer-asset">
|
||||||
<div class="data-field" id="client">
|
<div class="data-field" id="customer">
|
||||||
<pre :class="['label', darkMode ? 'pre-darkmode' : 'pre-lightmode']">Customer:</pre>
|
<pre :class="['label', darkMode ? 'pre-darkmode' : 'pre-lightmode']">Customer:</pre>
|
||||||
<pre v-if="!editable"
|
<pre v-if="!editable"
|
||||||
:class="['data', darkMode ? 'data-darkmode' : 'data-lightmode']">{{ sol.customer }}</pre>
|
:class="['data', darkMode ? 'data-darkmode' : 'data-lightmode']">{{ sol.customer }}</pre>
|
||||||
@ -73,8 +73,8 @@
|
|||||||
<input v-model="newSolutionName" @change="updateSol()"
|
<input v-model="newSolutionName" @change="updateSol()"
|
||||||
:class="['data', 'solution-name-input', darkMode ? 'h2-darkmode' : 'h2-lightmode', darkMode ? 'h2-input-darkmode' : 'h2-input-lightmode', 'input']">
|
:class="['data', 'solution-name-input', darkMode ? 'h2-darkmode' : 'h2-lightmode', darkMode ? 'h2-input-darkmode' : 'h2-input-lightmode', 'input']">
|
||||||
<div class="solution-data">
|
<div class="solution-data">
|
||||||
<div class="client-asset">
|
<div class="customer-asset">
|
||||||
<div class="data-field" id="client">
|
<div class="data-field" id="customer">
|
||||||
<pre :class="['label', darkMode ? 'pre-darkmode' : 'pre-lightmode']">Customer:</pre>
|
<pre :class="['label', darkMode ? 'pre-darkmode' : 'pre-lightmode']">Customer:</pre>
|
||||||
<select id="customersDropDownChosenCI" v-model="newCustomer" @change="updateNewCustomerID()"
|
<select id="customersDropDownChosenCI" v-model="newCustomer" @change="updateNewCustomerID()"
|
||||||
:class="[darkMode ? 'select-darkmode' : 'select-lightmode']">
|
:class="[darkMode ? 'select-darkmode' : 'select-lightmode']">
|
||||||
@ -163,8 +163,8 @@ const newDescription = ref('');
|
|||||||
const newNotes = ref('');
|
const newNotes = ref('');
|
||||||
const newLastView = ref('');
|
const newLastView = ref('');
|
||||||
const newUser = ref('');
|
const newUser = ref('');
|
||||||
const changedClientId = computed(() => store.state.changedClientId);
|
const changedCustomerId = computed(() => store.state.changedCustomerId);
|
||||||
const clientChanged = computed(() => store.state.clientChanged);
|
const customerChanged = computed(() => store.state.customerChanged);
|
||||||
|
|
||||||
// get solution from id
|
// get solution from id
|
||||||
const getSolutionById = async () => {
|
const getSolutionById = async () => {
|
||||||
@ -178,28 +178,28 @@ const getSolutionById = async () => {
|
|||||||
console.log(err.response.statusText);
|
console.log(err.response.statusText);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
await getConfigItemsFromClient();
|
await getConfigItemsFromCustomer();
|
||||||
}
|
}
|
||||||
|
|
||||||
//get all config items from the selected client
|
//get all config items from the selected customer
|
||||||
const getConfigItemsFromClient = async () => {
|
const getConfigItemsFromCustomer = async () => {
|
||||||
if (!addBool.value) {
|
if (!addBool.value) {
|
||||||
try {
|
try {
|
||||||
const response = await Axios.get(`https://${clientsideConfig.url}:${clientsideConfig.port}/api/getCIFromClient/${sol.value.customerID}`);
|
const response = await Axios.get(`https://${clientsideConfig.url}:${clientsideConfig.port}/api/getCIFromCustomer/${sol.value.customerID}`);
|
||||||
configItems.value = response.data;
|
configItems.value = response.data;
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
console.log(err.response.statusText);
|
console.log(err.response.statusText);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
try {
|
try {
|
||||||
const response = await Axios.get(`https://${clientsideConfig.url}:${clientsideConfig.port}/api/getCIFromClient/${changedClientId.value}`);
|
const response = await Axios.get(`https://${clientsideConfig.url}:${clientsideConfig.port}/api/getCIFromCustomer/${changedCustomerId.value}`);
|
||||||
configItems.value = response.data;
|
configItems.value = response.data;
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
console.log(err.response.statusText);
|
console.log(err.response.statusText);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (clientChanged.value) {
|
if (customerChanged.value) {
|
||||||
store.commit('toggleClientChanged');
|
store.commit('toggleCustomerChanged');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -232,7 +232,7 @@ const updateSolution = async () => {
|
|||||||
counter += 1;
|
counter += 1;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
if (counter == 1) {
|
if (counter == 2) {
|
||||||
alert("This solution name already exists. Please choose an unique solution name or modify respectively delete the old one!");
|
alert("This solution name already exists. Please choose an unique solution name or modify respectively delete the old one!");
|
||||||
sol.value.solutionName = '';
|
sol.value.solutionName = '';
|
||||||
return;
|
return;
|
||||||
@ -276,9 +276,6 @@ const confirmDeleteSolution = async () => {
|
|||||||
if (confirm("Do you really want to delete this solution? It cannot be undone!")) {
|
if (confirm("Do you really want to delete this solution? It cannot be undone!")) {
|
||||||
try {
|
try {
|
||||||
await Axios.delete(`https://${clientsideConfig.url}:${clientsideConfig.port}/api/deleteSolution/${chosenSolutionId.value}`);
|
await Axios.delete(`https://${clientsideConfig.url}:${clientsideConfig.port}/api/deleteSolution/${chosenSolutionId.value}`);
|
||||||
store.commit('undoDelete');
|
|
||||||
store.commit('resetStore');
|
|
||||||
store.commit('changeToSolutionlist');
|
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
console.log(err.response.statusText);
|
console.log(err.response.statusText);
|
||||||
}
|
}
|
||||||
@ -287,6 +284,9 @@ const confirmDeleteSolution = async () => {
|
|||||||
} catch (err) {
|
} catch (err) {
|
||||||
console.log(err.response.statusText);
|
console.log(err.response.statusText);
|
||||||
}
|
}
|
||||||
|
store.commit('undoDelete');
|
||||||
|
store.commit('resetStore');
|
||||||
|
store.commit('changeToSolutionlist');
|
||||||
} else {
|
} else {
|
||||||
store.commit('undoDelete');
|
store.commit('undoDelete');
|
||||||
}
|
}
|
||||||
@ -309,8 +309,8 @@ const updateCustomerID = async () => {
|
|||||||
const response = await Axios.get(`https://${clientsideConfig.url}:${clientsideConfig.port}/api/getCustomerByName/${sol.value.customer}`);
|
const response = await Axios.get(`https://${clientsideConfig.url}:${clientsideConfig.port}/api/getCustomerByName/${sol.value.customer}`);
|
||||||
customer.value = response.data;
|
customer.value = response.data;
|
||||||
sol.value.customerID = customer.value.customerID;
|
sol.value.customerID = customer.value.customerID;
|
||||||
store.commit('toggleClientChanged');
|
store.commit('toggleCustomerChanged');
|
||||||
store.commit('toggleClientId', sol.value.customerID);
|
store.commit('toggleCustomerId', sol.value.customerID);
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
console.log(err.response.statusText);
|
console.log(err.response.statusText);
|
||||||
}
|
}
|
||||||
@ -322,13 +322,13 @@ const updateNewCustomerID = async () => {
|
|||||||
try {
|
try {
|
||||||
const response = await Axios.get(`https://${clientsideConfig.url}:${clientsideConfig.port}/api/getCustomerByName/${newCustomer.value}`);
|
const response = await Axios.get(`https://${clientsideConfig.url}:${clientsideConfig.port}/api/getCustomerByName/${newCustomer.value}`);
|
||||||
newCustomerID.value = response.data.customerID;
|
newCustomerID.value = response.data.customerID;
|
||||||
store.commit('toggleClientChanged');
|
store.commit('toggleCustomerChanged');
|
||||||
store.commit('toggleClientId', newCustomerID.value);
|
store.commit('toggleCustomerId', newCustomerID.value);
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
console.log(err.response.statusText);
|
console.log(err.response.statusText);
|
||||||
}
|
}
|
||||||
updateSol();
|
updateSol();
|
||||||
await getConfigItemsFromClient();
|
await getConfigItemsFromCustomer();
|
||||||
}
|
}
|
||||||
|
|
||||||
// include delay to avoid 503 error
|
// include delay to avoid 503 error
|
||||||
@ -339,7 +339,7 @@ const triggerBackendCallsWithDelay = async (fetchDataFunc) => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
watch(deleteBool, confirmDeleteSolution);
|
watch(deleteBool, confirmDeleteSolution);
|
||||||
watch(clientChanged, getSolutionById);
|
watch(customerChanged, getSolutionById);
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
getSolutionById();
|
getSolutionById();
|
||||||
@ -487,7 +487,7 @@ export default {
|
|||||||
align-self: stretch;
|
align-self: stretch;
|
||||||
}
|
}
|
||||||
|
|
||||||
.client-asset,
|
.customer-asset,
|
||||||
.info {
|
.info {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
|
|||||||
@ -165,8 +165,8 @@ const newDescriptionSol = computed(() => store.state.newDescriptionSol);
|
|||||||
|
|
||||||
const newStepTodo = computed(() => solTodos.value.length);
|
const newStepTodo = computed(() => solTodos.value.length);
|
||||||
const chosenSolId = computed(() => store.state.chosenSolutionId);
|
const chosenSolId = computed(() => store.state.chosenSolutionId);
|
||||||
const clientChanged = computed(() => store.state.clientChanged);
|
const customerChanged = computed(() => store.state.customerChanged);
|
||||||
const changedClientId = computed(() => store.state.changedClientId);
|
const changedCustomerId = computed(() => store.state.changedCustomerId);
|
||||||
|
|
||||||
const darkMode = ref(true)
|
const darkMode = ref(true)
|
||||||
const addRow = ref(false);
|
const addRow = ref(false);
|
||||||
@ -217,7 +217,7 @@ const addSol = async () => {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (newCustomerSol.value.length === 0) {
|
if (newCustomerSol.value.length === 0) {
|
||||||
alert("Please choose a client!");
|
alert("Please choose a customer!");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
let allFine = true;
|
let allFine = true;
|
||||||
@ -267,10 +267,10 @@ const addSol = async () => {
|
|||||||
// add new row of todo for the new solution
|
// add new row of todo for the new solution
|
||||||
const addRowForNewSol = async () => {
|
const addRowForNewSol = async () => {
|
||||||
if (newCustomerSol.value.length === 0) {
|
if (newCustomerSol.value.length === 0) {
|
||||||
alert("Please choose a client first!");
|
alert("Please choose a customer first!");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
await getConfigItemsFromClient();
|
await getConfigItemsFromCustomer();
|
||||||
newTodos.push({
|
newTodos.push({
|
||||||
solutionID: chosenSolId.value,
|
solutionID: chosenSolId.value,
|
||||||
step: newRowId.value,
|
step: newRowId.value,
|
||||||
@ -332,7 +332,7 @@ const addSolTodo = async () => {
|
|||||||
|
|
||||||
// add new row for the template
|
// add new row for the template
|
||||||
const addChecklistRow = async () => {
|
const addChecklistRow = async () => {
|
||||||
await getConfigItemsFromClient();
|
await getConfigItemsFromCustomer();
|
||||||
if (addRow.value) {
|
if (addRow.value) {
|
||||||
alert('Please confirm the last added row first.')
|
alert('Please confirm the last added row first.')
|
||||||
return
|
return
|
||||||
@ -371,25 +371,25 @@ const getSolutionTodosById = async () => {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//get all config items from the selected client
|
//get all config items from the selected customer
|
||||||
const getConfigItemsFromClient = async () => {
|
const getConfigItemsFromCustomer = async () => {
|
||||||
if (!addBool.value) {
|
if (!addBool.value) {
|
||||||
try {
|
try {
|
||||||
const response = await Axios.get(`https://${clientsideConfig.url}:${clientsideConfig.port}/api/getCIFromClient/${sol.value.customerID}`);
|
const response = await Axios.get(`https://${clientsideConfig.url}:${clientsideConfig.port}/api/getCIFromCustomer/${sol.value.customerID}`);
|
||||||
configItemList.value = response.data;
|
configItemList.value = response.data;
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
console.log(err.response.statusText);
|
console.log(err.response.statusText);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
try {
|
try {
|
||||||
const response = await Axios.get(`https://${clientsideConfig.url}:${clientsideConfig.port}/api/getCIFromClient/${changedClientId.value}`);
|
const response = await Axios.get(`https://${clientsideConfig.url}:${clientsideConfig.port}/api/getCIFromCustomer/${changedCustomerId.value}`);
|
||||||
configItemList.value = response.data;
|
configItemList.value = response.data;
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
console.log(err.response.statusText);
|
console.log(err.response.statusText);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (clientChanged.value) {
|
if (customerChanged.value) {
|
||||||
store.commit('toggleClientChanged');
|
store.commit('toggleCustomerChanged');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -405,7 +405,7 @@ const getSolutionById = async () => {
|
|||||||
console.log(err.response.statusText);
|
console.log(err.response.statusText);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
await getConfigItemsFromClient();
|
await getConfigItemsFromCustomer();
|
||||||
}
|
}
|
||||||
|
|
||||||
const deleteSolTodo = async (id) => {
|
const deleteSolTodo = async (id) => {
|
||||||
@ -419,7 +419,7 @@ const deleteSolTodo = async (id) => {
|
|||||||
await getSolutionTodosById();
|
await getSolutionTodosById();
|
||||||
}
|
}
|
||||||
|
|
||||||
watch(clientChanged, getSolutionById);
|
watch(customerChanged, getSolutionById);
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
getSolutionTodosById();
|
getSolutionTodosById();
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<section v-if="searchable" :class="['solution-search', darkMode ? 'section-darkmode' : 'section-lightmode']">
|
<section v-if="searchable" :class="['solution-search', darkMode ? 'section-darkmode' : 'section-lightmode']">
|
||||||
<div :class="['clientLabel', darkMode ? 'label-darkmode' : 'label-lightmode']">Solution</div>
|
<div :class="['customerLabel', darkMode ? 'label-darkmode' : 'label-lightmode']">Solution</div>
|
||||||
<input v-model="solutionSearchFilter" @change="searchSolution()"
|
<input v-model="solutionSearchFilter" @change="searchSolution()"
|
||||||
:class="['dataInput', 'input', darkMode ? 'data-darkmode' : 'data-lightmode']">
|
:class="['dataInput', 'input', darkMode ? 'data-darkmode' : 'data-lightmode']">
|
||||||
</section>
|
</section>
|
||||||
@ -10,7 +10,7 @@
|
|||||||
<tbody>
|
<tbody>
|
||||||
<tr :class="['table-row', darkMode ? 'tr-head-darkmode' : 'tr-head-lightmode']" id="table-head">
|
<tr :class="['table-row', darkMode ? 'tr-head-darkmode' : 'tr-head-lightmode']" id="table-head">
|
||||||
<th
|
<th
|
||||||
:class="['Client', darkMode ? 'th-darkmode' : 'th-lightmode', darkMode ? 'Client-darkmode' : 'Client-lightmode']">
|
:class="['Customer', darkMode ? 'th-darkmode' : 'th-lightmode', darkMode ? 'Customer-darkmode' : 'Customer-lightmode']">
|
||||||
Customer</th>
|
Customer</th>
|
||||||
<th
|
<th
|
||||||
:class="['Name', darkMode ? 'th-darkmode' : 'th-lightmode', darkMode ? 'Name-darkmode' : 'Name-lightmode']">
|
:class="['Name', darkMode ? 'th-darkmode' : 'th-lightmode', darkMode ? 'Name-darkmode' : 'Name-lightmode']">
|
||||||
@ -26,7 +26,7 @@
|
|||||||
<tr v-for="sol in solutions" :key="sol.primaryID"
|
<tr v-for="sol in solutions" :key="sol.primaryID"
|
||||||
:class="['table-row', darkMode ? 'tr-darkmode' : 'tr-lightmode']" id="row-1">
|
:class="['table-row', darkMode ? 'tr-darkmode' : 'tr-lightmode']" id="row-1">
|
||||||
<td
|
<td
|
||||||
:class="['Client', darkMode ? 'td-darkmode' : 'td-lightmode', darkMode ? 'Client-darkmode' : 'Client-lightmode']">
|
:class="['Customer', darkMode ? 'td-darkmode' : 'td-lightmode', darkMode ? 'Customer-darkmode' : 'Customer-lightmode']">
|
||||||
{{ sol.customer }}</td>
|
{{ sol.customer }}</td>
|
||||||
<td
|
<td
|
||||||
:class="['Name', darkMode ? 'td-darkmode' : 'td-lightmode', darkMode ? 'Name-darkmode' : 'Name-lightmode']">
|
:class="['Name', darkMode ? 'td-darkmode' : 'td-lightmode', darkMode ? 'Name-darkmode' : 'Name-lightmode']">
|
||||||
@ -64,7 +64,7 @@ const goToChosenSolution = (id) => {
|
|||||||
store.commit('changeToSolution');
|
store.commit('changeToSolution');
|
||||||
};
|
};
|
||||||
|
|
||||||
const clientFilter = computed(() => store.state.filteredByClient);
|
const customerFilter = computed(() => store.state.filteredByCustomer);
|
||||||
const searchable = computed(() => store.state.searchable);
|
const searchable = computed(() => store.state.searchable);
|
||||||
|
|
||||||
const solutionSearchFilter = ref('');
|
const solutionSearchFilter = ref('');
|
||||||
@ -79,8 +79,8 @@ const updateSearchTerm = async () => {
|
|||||||
|
|
||||||
//get all solutions
|
//get all solutions
|
||||||
const getSolutions = async () => {
|
const getSolutions = async () => {
|
||||||
if (!(clientFilter.value === '')) {
|
if (!(customerFilter.value === '')) {
|
||||||
await getFilteredSolutionsByClient();
|
await getFilteredSolutionsByCustomer();
|
||||||
} else {
|
} else {
|
||||||
try {
|
try {
|
||||||
const response = await Axios.get(`https://${clientsideConfig.url}:${clientsideConfig.port}/api/getAllSolutions`);
|
const response = await Axios.get(`https://${clientsideConfig.url}:${clientsideConfig.port}/api/getAllSolutions`);
|
||||||
@ -91,10 +91,10 @@ const getSolutions = async () => {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//get all solutions based on the searched client
|
//get all solutions based on the searched customer
|
||||||
const getFilteredSolutionsByClient = async () => {
|
const getFilteredSolutionsByCustomer = async () => {
|
||||||
try {
|
try {
|
||||||
const response = await Axios.get(`https://${clientsideConfig.url}:${clientsideConfig.port}/api/getSelectedSolutionsByClient/${clientFilter.value}`);
|
const response = await Axios.get(`https://${clientsideConfig.url}:${clientsideConfig.port}/api/getSelectedSolutionsByCustomer/${customerFilter.value}`);
|
||||||
solutions.value = response.data;
|
solutions.value = response.data;
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
console.log(err.response.statusText);
|
console.log(err.response.statusText);
|
||||||
@ -115,7 +115,7 @@ const searchSolution = async () => {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
watch(clientFilter, getSolutions);
|
watch(customerFilter, getSolutions);
|
||||||
watch(searchable, updateSearchTerm);
|
watch(searchable, updateSearchTerm);
|
||||||
|
|
||||||
|
|
||||||
@ -259,7 +259,7 @@ th {
|
|||||||
color: white;
|
color: white;
|
||||||
}
|
}
|
||||||
|
|
||||||
.clientLabel {
|
.customerLabel {
|
||||||
width: 5.5625em;
|
width: 5.5625em;
|
||||||
height: 1.875em;
|
height: 1.875em;
|
||||||
font-family: "Overpass";
|
font-family: "Overpass";
|
||||||
@ -270,15 +270,15 @@ th {
|
|||||||
letter-spacing: 0.05em;
|
letter-spacing: 0.05em;
|
||||||
}
|
}
|
||||||
|
|
||||||
.Client {
|
.Customer {
|
||||||
width: 33.3%;
|
width: 33.3%;
|
||||||
}
|
}
|
||||||
|
|
||||||
.Client-darkmode {
|
.Customer-darkmode {
|
||||||
border-right: 0.0625rem solid #000000;
|
border-right: 0.0625rem solid #000000;
|
||||||
}
|
}
|
||||||
|
|
||||||
.Client-lightmode {
|
.Customer-lightmode {
|
||||||
border-right: 0.0625rem solid #8e8e8e;
|
border-right: 0.0625rem solid #8e8e8e;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
<template>
|
<!-- <template>
|
||||||
<div :class="['data', darkMode ? 'div-darkmode' : 'div-lightmode']">
|
<div :class="['data', darkMode ? 'div-darkmode' : 'div-lightmode']">
|
||||||
<div :class="['label', darkMode ? 'label-darkmode' : 'label-lightmode']">Solutions:</div>
|
<div :class="['label', darkMode ? 'label-darkmode' : 'label-lightmode']">Solutions:</div>
|
||||||
<table class="data-table" id="solution-table">
|
<table class="data-table" id="solution-table">
|
||||||
@ -41,7 +41,7 @@ const darkMode = ref(true)
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
export default {
|
export default {
|
||||||
name: "SolutionTableNoClient",
|
name: "SolutionTableNoCustomer",
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
@ -183,4 +183,4 @@ th {
|
|||||||
.label-lightmode {
|
.label-lightmode {
|
||||||
color: #000;
|
color: #000;
|
||||||
}
|
}
|
||||||
</style>
|
</style> -->
|
||||||
@ -163,8 +163,8 @@ const newDescriptionPOT = computed(() => store.state.newDescriptionPOT);
|
|||||||
const newNotesPOT = computed(() => store.state.newNotesPOT);
|
const newNotesPOT = computed(() => store.state.newNotesPOT);
|
||||||
const newStepTodo = computed(() => potTodos.value.length);
|
const newStepTodo = computed(() => potTodos.value.length);
|
||||||
const chosenPOTId = computed(() => store.state.chosenPOTId);
|
const chosenPOTId = computed(() => store.state.chosenPOTId);
|
||||||
const clientChanged = computed(() => store.state.clientChanged);
|
const customerChanged = computed(() => store.state.customerChanged);
|
||||||
const changedClientId = computed(() => store.state.changedClientId);
|
const changedCustomerId = computed(() => store.state.changedCustomerId);
|
||||||
|
|
||||||
const darkMode = ref(true)
|
const darkMode = ref(true)
|
||||||
const addRow = ref(false);
|
const addRow = ref(false);
|
||||||
@ -215,7 +215,7 @@ const addPOT = async () => {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (newCustomerPOT.value.length === 0) {
|
if (newCustomerPOT.value.length === 0) {
|
||||||
alert("Please choose a client!");
|
alert("Please choose a customer!");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
let allFine = true;
|
let allFine = true;
|
||||||
@ -263,10 +263,10 @@ const addPOT = async () => {
|
|||||||
// add new row of todo for the new pot
|
// add new row of todo for the new pot
|
||||||
const addRowForNewPOT = async () => {
|
const addRowForNewPOT = async () => {
|
||||||
if (newCustomerPOT.value.length === 0) {
|
if (newCustomerPOT.value.length === 0) {
|
||||||
alert("Please choose a client first!");
|
alert("Please choose a customer first!");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
await getConfigItemsFromClient();
|
await getConfigItemsFromCustomer();
|
||||||
newTodos.push({
|
newTodos.push({
|
||||||
templateID: chosenPOTId.value,
|
templateID: chosenPOTId.value,
|
||||||
rowID: newRowId.value,
|
rowID: newRowId.value,
|
||||||
@ -328,7 +328,7 @@ const addPOTTodo = async () => {
|
|||||||
|
|
||||||
// add new row for the template checklist
|
// add new row for the template checklist
|
||||||
const addChecklistRow = async () => {
|
const addChecklistRow = async () => {
|
||||||
await getConfigItemsFromClient();
|
await getConfigItemsFromCustomer();
|
||||||
if (addRow.value) {
|
if (addRow.value) {
|
||||||
alert('Please confirm the last added row first.')
|
alert('Please confirm the last added row first.')
|
||||||
return
|
return
|
||||||
@ -367,25 +367,25 @@ const getPOTTodosById = async () => {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//get all config items from the selected client
|
//get all config items from the selected customer
|
||||||
const getConfigItemsFromClient = async () => {
|
const getConfigItemsFromCustomer = async () => {
|
||||||
if (!addBool.value) {
|
if (!addBool.value) {
|
||||||
try {
|
try {
|
||||||
const response = await Axios.get(`https://${clientsideConfig.url}:${clientsideConfig.port}/api/getCIFromClient/${pot.value.customerID}`);
|
const response = await Axios.get(`https://${clientsideConfig.url}:${clientsideConfig.port}/api/getCIFromCustomer/${pot.value.customerID}`);
|
||||||
configItemList.value = response.data;
|
configItemList.value = response.data;
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
console.log(err.response.statusText);
|
console.log(err.response.statusText);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
try {
|
try {
|
||||||
const response = await Axios.get(`https://${clientsideConfig.url}:${clientsideConfig.port}/api/getCIFromClient/${changedClientId.value}`);
|
const response = await Axios.get(`https://${clientsideConfig.url}:${clientsideConfig.port}/api/getCIFromCustomer/${changedCustomerId.value}`);
|
||||||
configItemList.value = response.data;
|
configItemList.value = response.data;
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
console.log(err.response.statusText);
|
console.log(err.response.statusText);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (clientChanged.value) {
|
if (customerChanged.value) {
|
||||||
store.commit('toggleClientChanged');
|
store.commit('toggleCustomerChanged');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -401,7 +401,7 @@ const getPOTById = async () => {
|
|||||||
console.log(err.response.statusText);
|
console.log(err.response.statusText);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
await getConfigItemsFromClient();
|
await getConfigItemsFromCustomer();
|
||||||
}
|
}
|
||||||
|
|
||||||
const deletePOTTodo = async (id) => {
|
const deletePOTTodo = async (id) => {
|
||||||
@ -415,7 +415,7 @@ const deletePOTTodo = async (id) => {
|
|||||||
await getPOTTodosById();
|
await getPOTTodosById();
|
||||||
}
|
}
|
||||||
|
|
||||||
watch(clientChanged, getPOTById);
|
watch(customerChanged, getPOTById);
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
getPOTTodosById();
|
getPOTTodosById();
|
||||||
@ -658,7 +658,7 @@ th {
|
|||||||
font: 400 0.875rem/1.875rem Overpass, sans-serif;
|
font: 400 0.875rem/1.875rem Overpass, sans-serif;
|
||||||
border: none;
|
border: none;
|
||||||
border-radius: 0.625rem;
|
border-radius: 0.625rem;
|
||||||
margin-left: 2rem;
|
margin-left: 15.8rem;
|
||||||
padding-left: 0.9rem;
|
padding-left: 0.9rem;
|
||||||
padding-right: 0.9rem;
|
padding-right: 0.9rem;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -163,8 +163,8 @@ const newTypeMVT = computed(() => store.state.newTypeMVT);
|
|||||||
const newNotesMVT = computed(() => store.state.newNotesMVT);
|
const newNotesMVT = computed(() => store.state.newNotesMVT);
|
||||||
const newStepTodo = computed(() => mvtTodos.value.length);
|
const newStepTodo = computed(() => mvtTodos.value.length);
|
||||||
const chosenMVTId = computed(() => store.state.chosenMVTId);
|
const chosenMVTId = computed(() => store.state.chosenMVTId);
|
||||||
const clientChanged = computed(() => store.state.clientChanged);
|
const customerChanged = computed(() => store.state.customerChanged);
|
||||||
const changedClientId = computed(() => store.state.changedClientId);
|
const changedCustomerId = computed(() => store.state.changedCustomerId);
|
||||||
|
|
||||||
const darkMode = ref(true)
|
const darkMode = ref(true)
|
||||||
const addRow = ref(false);
|
const addRow = ref(false);
|
||||||
@ -215,7 +215,7 @@ const addMVT = async () => {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (newCustomerMVT.value.length === 0) {
|
if (newCustomerMVT.value.length === 0) {
|
||||||
alert("Please choose a client!");
|
alert("Please choose a customer!");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
let allFine = true;
|
let allFine = true;
|
||||||
@ -263,10 +263,10 @@ const addMVT = async () => {
|
|||||||
// add new row of todo for the new MVT
|
// add new row of todo for the new MVT
|
||||||
const addRowForNewMVT = async () => {
|
const addRowForNewMVT = async () => {
|
||||||
if (newCustomerMVT.value.length === 0) {
|
if (newCustomerMVT.value.length === 0) {
|
||||||
alert("Please choose a client first!");
|
alert("Please choose a customer first!");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
await getConfigItemsFromClient();
|
await getConfigItemsFromCustomer();
|
||||||
newTodos.push({
|
newTodos.push({
|
||||||
templateID: chosenMVTId.value,
|
templateID: chosenMVTId.value,
|
||||||
rowID: newRowId.value,
|
rowID: newRowId.value,
|
||||||
@ -328,7 +328,7 @@ const addMVTTodo = async () => {
|
|||||||
|
|
||||||
// add new row for the template checklist
|
// add new row for the template checklist
|
||||||
const addChecklistRow = async () => {
|
const addChecklistRow = async () => {
|
||||||
await getConfigItemsFromClient();
|
await getConfigItemsFromCustomer();
|
||||||
if (addRow.value) {
|
if (addRow.value) {
|
||||||
alert('Please confirm the last added row first.')
|
alert('Please confirm the last added row first.')
|
||||||
return
|
return
|
||||||
@ -367,25 +367,25 @@ const getMvtTodosById = async () => {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//get all config items from the selected client
|
//get all config items from the selected customer
|
||||||
const getConfigItemsFromClient = async () => {
|
const getConfigItemsFromCustomer = async () => {
|
||||||
if (!addBool.value) {
|
if (!addBool.value) {
|
||||||
try {
|
try {
|
||||||
const response = await Axios.get(`https://${clientsideConfig.url}:${clientsideConfig.port}/api/getCIFromClient/${MVT.value.customerID}`);
|
const response = await Axios.get(`https://${clientsideConfig.url}:${clientsideConfig.port}/api/getCIFromCustomer/${MVT.value.customerID}`);
|
||||||
configItemList.value = response.data;
|
configItemList.value = response.data;
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
console.log(err.response.statusText);
|
console.log(err.response.statusText);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
try {
|
try {
|
||||||
const response = await Axios.get(`https://${clientsideConfig.url}:${clientsideConfig.port}/api/getCIFromClient/${changedClientId.value}`);
|
const response = await Axios.get(`https://${clientsideConfig.url}:${clientsideConfig.port}/api/getCIFromCustomer/${changedCustomerId.value}`);
|
||||||
configItemList.value = response.data;
|
configItemList.value = response.data;
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
console.log(err.response.statusText);
|
console.log(err.response.statusText);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (clientChanged.value) {
|
if (customerChanged.value) {
|
||||||
store.commit('toggleClientChanged');
|
store.commit('toggleCustomerChanged');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -401,7 +401,7 @@ const getMVTById = async () => {
|
|||||||
console.log(err.response.statusText);
|
console.log(err.response.statusText);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
await getConfigItemsFromClient();
|
await getConfigItemsFromCustomer();
|
||||||
}
|
}
|
||||||
|
|
||||||
const deleteMVTTodo = async (id) => {
|
const deleteMVTTodo = async (id) => {
|
||||||
@ -415,7 +415,7 @@ const deleteMVTTodo = async (id) => {
|
|||||||
await getMvtTodosById();
|
await getMvtTodosById();
|
||||||
}
|
}
|
||||||
|
|
||||||
watch(clientChanged, getMVTById);
|
watch(customerChanged, getMVTById);
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
getMvtTodosById();
|
getMvtTodosById();
|
||||||
|
|||||||
39
composables/UserObject.ts
Normal file
39
composables/UserObject.ts
Normal file
@ -0,0 +1,39 @@
|
|||||||
|
export var UserObjectDefinition: {
|
||||||
|
id: string;
|
||||||
|
username: string;
|
||||||
|
password: string;
|
||||||
|
registered: string;
|
||||||
|
lastLogin: string;
|
||||||
|
fullName: string;
|
||||||
|
email: string;
|
||||||
|
phonenumber: string;
|
||||||
|
address: string;
|
||||||
|
city: string;
|
||||||
|
postcode: string;
|
||||||
|
adminBool: boolean;
|
||||||
|
technician1Bool: boolean;
|
||||||
|
technician2Bool: boolean;
|
||||||
|
technicianMonitoringBool: boolean;
|
||||||
|
merchantBool: boolean;
|
||||||
|
internBool: boolean;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface UserObject {
|
||||||
|
id: string;
|
||||||
|
username: string;
|
||||||
|
password: string;
|
||||||
|
registered: string;
|
||||||
|
lastLogin: string;
|
||||||
|
fullName: string;
|
||||||
|
email: string;
|
||||||
|
phonenumber: string;
|
||||||
|
address: string;
|
||||||
|
city: string;
|
||||||
|
postcode: string;
|
||||||
|
adminBool: boolean;
|
||||||
|
technician1Bool: boolean;
|
||||||
|
technician2Bool: boolean;
|
||||||
|
technicianMonitoringBool: boolean;
|
||||||
|
merchantBool: boolean;
|
||||||
|
internBool: boolean;
|
||||||
|
}
|
||||||
@ -427,10 +427,10 @@
|
|||||||
<mxCell id="WukdXvazNq34soQIU5Al-32" value="supplierOffer" style="text;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;spacingLeft=4;spacingRight=4;overflow=hidden;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;rotatable=0;whiteSpace=wrap;html=1;" parent="WukdXvazNq34soQIU5Al-15" vertex="1">
|
<mxCell id="WukdXvazNq34soQIU5Al-32" value="supplierOffer" style="text;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;spacingLeft=4;spacingRight=4;overflow=hidden;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;rotatable=0;whiteSpace=wrap;html=1;" parent="WukdXvazNq34soQIU5Al-15" vertex="1">
|
||||||
<mxGeometry y="300" width="140" height="30" as="geometry" />
|
<mxGeometry y="300" width="140" height="30" as="geometry" />
|
||||||
</mxCell>
|
</mxCell>
|
||||||
<mxCell id="WukdXvazNq34soQIU5Al-33" value="clientOffer" style="text;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;spacingLeft=4;spacingRight=4;overflow=hidden;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;rotatable=0;whiteSpace=wrap;html=1;" parent="WukdXvazNq34soQIU5Al-15" vertex="1">
|
<mxCell id="WukdXvazNq34soQIU5Al-33" value="customerOffer" style="text;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;spacingLeft=4;spacingRight=4;overflow=hidden;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;rotatable=0;whiteSpace=wrap;html=1;" parent="WukdXvazNq34soQIU5Al-15" vertex="1">
|
||||||
<mxGeometry y="330" width="140" height="30" as="geometry" />
|
<mxGeometry y="330" width="140" height="30" as="geometry" />
|
||||||
</mxCell>
|
</mxCell>
|
||||||
<mxCell id="WukdXvazNq34soQIU5Al-34" value="clientOrder" style="text;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;spacingLeft=4;spacingRight=4;overflow=hidden;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;rotatable=0;whiteSpace=wrap;html=1;" parent="WukdXvazNq34soQIU5Al-15" vertex="1">
|
<mxCell id="WukdXvazNq34soQIU5Al-34" value="customerOrder" style="text;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;spacingLeft=4;spacingRight=4;overflow=hidden;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;rotatable=0;whiteSpace=wrap;html=1;" parent="WukdXvazNq34soQIU5Al-15" vertex="1">
|
||||||
<mxGeometry y="360" width="140" height="30" as="geometry" />
|
<mxGeometry y="360" width="140" height="30" as="geometry" />
|
||||||
</mxCell>
|
</mxCell>
|
||||||
<mxCell id="WukdXvazNq34soQIU5Al-35" value="supplierOrder" style="text;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;spacingLeft=4;spacingRight=4;overflow=hidden;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;rotatable=0;whiteSpace=wrap;html=1;" parent="WukdXvazNq34soQIU5Al-15" vertex="1">
|
<mxCell id="WukdXvazNq34soQIU5Al-35" value="supplierOrder" style="text;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;spacingLeft=4;spacingRight=4;overflow=hidden;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;rotatable=0;whiteSpace=wrap;html=1;" parent="WukdXvazNq34soQIU5Al-15" vertex="1">
|
||||||
|
|||||||
@ -4,85 +4,120 @@
|
|||||||
<div :class="['icon', darkMode ? 'indicator-darkmode' : 'indicator-lightmode']" id="indicator-icon"
|
<div :class="['icon', darkMode ? 'indicator-darkmode' : 'indicator-lightmode']" id="indicator-icon"
|
||||||
@click="toggleActionbar">
|
@click="toggleActionbar">
|
||||||
<img :class="[darkMode ? 'img-darkmode' : 'img-lightmode']" loading="lazy"
|
<img :class="[darkMode ? 'img-darkmode' : 'img-lightmode']" loading="lazy"
|
||||||
src="../icons/actionbar-icons/Indicator-Icon-Opened.svg" />
|
src="/icons/actionbar-icons/Indicator-Icon-Opened.svg" />
|
||||||
</div>
|
</div>
|
||||||
<nav class="actions">
|
<nav class="actions">
|
||||||
<button :class="[darkMode ? 'button-darkmode' : 'button-lightmode']" id="search" @click="toggleSearched">
|
<button v-if="searchIcon" :class="[darkMode ? 'button-darkmode' : 'button-lightmode']" id="search"
|
||||||
|
@click="toggleSearched">
|
||||||
<div class="icon" id="search-icon">
|
<div class="icon" id="search-icon">
|
||||||
<img :class="[darkMode ? 'img-darkmode' : 'img-lightmode']" loading="lazy"
|
<img :class="[darkMode ? 'img-darkmode' : 'img-lightmode']" loading="lazy"
|
||||||
src="../icons/actionbar-icons/Search-Icon.svg" />
|
src="/icons/actionbar-icons/Search-Icon.svg" />
|
||||||
</div>
|
</div>
|
||||||
<Transition name="fade">
|
<Transition name="fade">
|
||||||
<pre v-if="isExpanded" :class="['label', darkMode ? 'label-darkmode' : 'label-lightmode']">Search</pre>
|
<pre v-if="isExpanded" :class="['label', darkMode ? 'label-darkmode' : 'label-lightmode']">Search</pre>
|
||||||
</Transition>
|
</Transition>
|
||||||
</button>
|
</button>
|
||||||
<button :class="[darkMode ? 'button-darkmode' : 'button-lightmode']" id="filter" @click="toggleFiltered">
|
<button v-if="filterIcon" :class="[darkMode ? 'button-darkmode' : 'button-lightmode']" id="filter"
|
||||||
|
@click="toggleFiltered">
|
||||||
<div class="icon" id="filter-icon">
|
<div class="icon" id="filter-icon">
|
||||||
<img :class="[darkMode ? 'img-darkmode' : 'img-lightmode']" loading="lazy"
|
<img :class="[darkMode ? 'img-darkmode' : 'img-lightmode']" loading="lazy"
|
||||||
src="../icons/actionbar-icons/Filter-Icon.svg" />
|
src="/icons/actionbar-icons/Filter-Icon.svg" />
|
||||||
</div>
|
</div>
|
||||||
<Transition name="fade">
|
<Transition name="fade">
|
||||||
<pre v-if="isExpanded" :class="['label', darkMode ? 'label-darkmode' : 'label-lightmode']">Filter</pre>
|
<pre v-if="isExpanded" :class="['label', darkMode ? 'label-darkmode' : 'label-lightmode']">Filter</pre>
|
||||||
</Transition>
|
</Transition>
|
||||||
</button>
|
</button>
|
||||||
<button :class="[darkMode ? 'button-darkmode' : 'button-lightmode']" id="instances">
|
<button v-if="instancesIcon" :class="[darkMode ? 'button-darkmode' : 'button-lightmode']" id="instances">
|
||||||
<div class="icon" id="instances-icon">
|
<div class="icon" id="instances-icon">
|
||||||
<img :class="[darkMode ? 'img-darkmode' : 'img-lightmode']" loading="lazy"
|
<img :class="[darkMode ? 'img-darkmode' : 'img-lightmode']" loading="lazy"
|
||||||
src="../icons/actionbar-icons/Instances-Icon.svg" />
|
src="/icons/actionbar-icons/Instances-Icon.svg" />
|
||||||
</div>
|
</div>
|
||||||
<Transition name="fade">
|
<Transition name="fade">
|
||||||
<pre v-if="isExpanded" :class="['label', darkMode ? 'label-darkmode' : 'label-lightmode']">Instances</pre>
|
<pre v-if="isExpanded" :class="['label', darkMode ? 'label-darkmode' : 'label-lightmode']">Instances</pre>
|
||||||
</Transition>
|
</Transition>
|
||||||
</button>
|
</button>
|
||||||
<button :class="[darkMode ? 'button-darkmode' : 'button-lightmode']" id="attachments">
|
<button v-if="solutionIcon" :class="[darkMode ? 'button-darkmode' : 'button-lightmode']" id="solutions"
|
||||||
|
@click="changeToSolutions">
|
||||||
|
<div class="icon" id="instances-icon">
|
||||||
|
<img :class="[darkMode ? 'img-darkmode' : 'img-lightmode']" loading="lazy"
|
||||||
|
src="/icons/actionbar-icons/Instances-Icon.svg" />
|
||||||
|
</div>
|
||||||
|
<Transition name="fade">
|
||||||
|
<pre v-if="isExpanded" :class="['label', darkMode ? 'label-darkmode' : 'label-lightmode']">Solutions</pre>
|
||||||
|
</Transition>
|
||||||
|
</button>
|
||||||
|
<button v-if="attachmentsIcon" :class="[darkMode ? 'button-darkmode' : 'button-lightmode']" id="attachments">
|
||||||
<div class="icon" id="attachments-icon">
|
<div class="icon" id="attachments-icon">
|
||||||
<img :class="[darkMode ? 'img-darkmode' : 'img-lightmode']" loading="lazy"
|
<img :class="[darkMode ? 'img-darkmode' : 'img-lightmode']" loading="lazy"
|
||||||
src="../icons/actionbar-icons/Attachments-Icon.svg" />
|
src="/icons/actionbar-icons/Attachments-Icon.svg" />
|
||||||
</div>
|
</div>
|
||||||
<Transition name="fade">
|
<Transition name="fade">
|
||||||
<pre v-if="isExpanded" :class="['label', darkMode ? 'label-darkmode' : 'label-lightmode']">Attachments</pre>
|
<pre v-if="isExpanded" :class="['label', darkMode ? 'label-darkmode' : 'label-lightmode']">Attachments</pre>
|
||||||
</Transition>
|
</Transition>
|
||||||
</button>
|
</button>
|
||||||
<button :class="[darkMode ? 'button-darkmode' : 'button-lightmode']" id="sell">
|
<button v-if="sellIcon" :class="[darkMode ? 'button-darkmode' : 'button-lightmode']" id="sell">
|
||||||
<div class="icon" id="sell-icon">
|
<div class="icon" id="sell-icon">
|
||||||
<img :class="[darkMode ? 'img-darkmode' : 'img-lightmode']" loading="lazy"
|
<img :class="[darkMode ? 'img-darkmode' : 'img-lightmode']" loading="lazy"
|
||||||
src="../icons/actionbar-icons/Sell-Icon.svg" />
|
src="/icons/actionbar-icons/Sell-Icon.svg" />
|
||||||
</div>
|
</div>
|
||||||
<Transition name="fade">
|
<Transition name="fade">
|
||||||
<pre v-if="isExpanded" :class="['label', darkMode ? 'label-darkmode' : 'label-lightmode']">Sell</pre>
|
<pre v-if="isExpanded" :class="['label', darkMode ? 'label-darkmode' : 'label-lightmode']">Sell</pre>
|
||||||
</Transition>
|
</Transition>
|
||||||
</button>
|
</button>
|
||||||
<button :class="[darkMode ? 'button-darkmode' : 'button-lightmode']" id="archive">
|
<button v-if="archiveIcon" :class="[darkMode ? 'button-darkmode' : 'button-lightmode']" id="archive">
|
||||||
<div class="icon" id="archive-icon">
|
<div class="icon" id="archive-icon">
|
||||||
<img :class="[darkMode ? 'img-darkmode' : 'img-lightmode']" loading="lazy"
|
<img :class="[darkMode ? 'img-darkmode' : 'img-lightmode']" loading="lazy"
|
||||||
src="../icons/actionbar-icons/Archive-Icon.svg" />
|
src="/icons/actionbar-icons/Archive-Icon.svg" />
|
||||||
</div>
|
</div>
|
||||||
<Transition name="fade">
|
<Transition name="fade">
|
||||||
<pre v-if="isExpanded" :class="['label', darkMode ? 'label-darkmode' : 'label-lightmode']">Archive</pre>
|
<pre v-if="isExpanded" :class="['label', darkMode ? 'label-darkmode' : 'label-lightmode']">Archive</pre>
|
||||||
</Transition>
|
</Transition>
|
||||||
</button>
|
</button>
|
||||||
<button :class="[darkMode ? 'button-darkmode' : 'button-lightmode']" id="new" @click="add">
|
<button v-if="addIcon" :class="[darkMode ? 'button-darkmode' : 'button-lightmode']" id="new" @click="add">
|
||||||
<div class="icon" id="new-icon">
|
<div class="icon" id="new-icon">
|
||||||
<img :class="[darkMode ? 'img-darkmode' : 'img-lightmode']" loading="lazy"
|
<img :class="[darkMode ? 'img-darkmode' : 'img-lightmode']" loading="lazy"
|
||||||
src="../icons/actionbar-icons/Add-New-Icon.svg" />
|
src="/icons/actionbar-icons/Add-New-Icon.svg" />
|
||||||
</div>
|
</div>
|
||||||
<Transition name="fade">
|
<Transition name="fade">
|
||||||
<pre v-if="isExpanded" :class="['label', darkMode ? 'label-darkmode' : 'label-lightmode']">New</pre>
|
<pre v-if="isExpanded" :class="['label', darkMode ? 'label-darkmode' : 'label-lightmode']">New</pre>
|
||||||
</Transition>
|
</Transition>
|
||||||
</button>
|
</button>
|
||||||
<button :class="[darkMode ? 'button-darkmode' : 'button-lightmode']" id="edit" @click="toggleEditable">
|
<button v-if="addInstanceIcon" :class="[darkMode ? 'button-darkmode' : 'button-lightmode']" id="new-instance">
|
||||||
|
<div class="icon" id="new-icon">
|
||||||
|
<img :class="[darkMode ? 'img-darkmode' : 'img-lightmode']" loading="lazy"
|
||||||
|
src="/icons/actionbar-icons/Add-New-Icon.svg" />
|
||||||
|
</div>
|
||||||
|
<Transition name="fade">
|
||||||
|
<pre v-if="isExpanded" :class="['label', darkMode ? 'label-darkmode' : 'label-lightmode']">Instance</pre>
|
||||||
|
</Transition>
|
||||||
|
</button>
|
||||||
|
<router-link v-if="addSolutionIcon" to="/solutions" class="button" :class="[darkMode ? 'button-darkmode' : 'button-lightmode']" id="solutions-button">
|
||||||
|
<button :class="[darkMode ? 'button-darkmode' : 'button-lightmode']" id="new-solution"
|
||||||
|
@click="addSolution">
|
||||||
|
<div class="icon" id="new-icon">
|
||||||
|
<img :class="[darkMode ? 'img-darkmode' : 'img-lightmode']" loading="lazy"
|
||||||
|
src="/icons/actionbar-icons/Add-New-Icon.svg" />
|
||||||
|
</div>
|
||||||
|
<Transition name="fade">
|
||||||
|
<pre v-if="isExpanded" :class="['label', darkMode ? 'label-darkmode' : 'label-lightmode']">Solution</pre>
|
||||||
|
</Transition>
|
||||||
|
</button>
|
||||||
|
</router-link>
|
||||||
|
<button v-if="editIcon" :class="[darkMode ? 'button-darkmode' : 'button-lightmode']" id="edit"
|
||||||
|
@click="toggleEditable">
|
||||||
<div class="icon" id="edit-icon">
|
<div class="icon" id="edit-icon">
|
||||||
<img :class="[darkMode ? 'img-darkmode' : 'img-lightmode']" loading="lazy"
|
<img :class="[darkMode ? 'img-darkmode' : 'img-lightmode']" loading="lazy"
|
||||||
src="../icons/actionbar-icons/Edit-Icon.svg" />
|
src="/icons/actionbar-icons/Edit-Icon.svg" />
|
||||||
</div>
|
</div>
|
||||||
<Transition name="fade">
|
<Transition name="fade">
|
||||||
<pre v-if="isExpanded" :class="['label', darkMode ? 'label-darkmode' : 'label-lightmode']">Edit</pre>
|
<pre v-if="isExpanded" :class="['label', darkMode ? 'label-darkmode' : 'label-lightmode']">Edit</pre>
|
||||||
</Transition>
|
</Transition>
|
||||||
</button>
|
</button>
|
||||||
<button :class="[darkMode ? 'button-darkmode' : 'button-lightmode']" id="delete" @click="deleteFunc">
|
<button v-if="deleteIcon" :class="[darkMode ? 'button-darkmode' : 'button-lightmode']" id="delete"
|
||||||
|
@click="deleteFunc">
|
||||||
<div class="icon" id="delete-icon">
|
<div class="icon" id="delete-icon">
|
||||||
<img :class="[darkMode ? 'img-darkmode' : 'img-lightmode']" loading="lazy"
|
<img :class="[darkMode ? 'img-darkmode' : 'img-lightmode']" loading="lazy"
|
||||||
src="../icons/actionbar-icons/Delete-Icon.svg" />
|
src="/icons/actionbar-icons/Delete-Icon.svg" />
|
||||||
</div>
|
</div>
|
||||||
<Transition name="fade">
|
<Transition name="fade">
|
||||||
<pre v-if="isExpanded" :class="['label', darkMode ? 'label-darkmode' : 'label-lightmode']">Delete</pre>
|
<pre v-if="isExpanded" :class="['label', darkMode ? 'label-darkmode' : 'label-lightmode']">Delete</pre>
|
||||||
@ -93,8 +128,22 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
import { ref } from 'vue';
|
import { ref, onMounted } from 'vue';
|
||||||
import { useStore } from 'vuex';
|
import { useStore } from 'vuex';
|
||||||
|
import { computed } from 'vue';
|
||||||
|
|
||||||
|
const addIcon = computed(() => store.state.addIcon);
|
||||||
|
const addInstanceIcon = computed(() => store.state.addInstanceIcon);
|
||||||
|
const addSolutionIcon = computed(() => store.state.addSolutionIcon);
|
||||||
|
const solutionIcon = computed(() => store.state.solutionIcon);
|
||||||
|
const filterIcon = computed(() => store.state.filterIcon);
|
||||||
|
const searchIcon = computed(() => store.state.searchIcon);
|
||||||
|
const instancesIcon = computed(() => store.state.instancesIcon);
|
||||||
|
const attachmentsIcon = computed(() => store.state.attachmentsIcon);
|
||||||
|
const sellIcon = computed(() => store.state.sellIcon);
|
||||||
|
const archiveIcon = computed(() => store.state.archiveIcon);
|
||||||
|
const editIcon = computed(() => store.state.editIcon);
|
||||||
|
const deleteIcon = computed(() => store.state.deleteIcon);
|
||||||
|
|
||||||
const darkMode = ref(true)
|
const darkMode = ref(true)
|
||||||
const isExpanded = ref(true)
|
const isExpanded = ref(true)
|
||||||
@ -120,6 +169,18 @@ const toggleSearched = () => {
|
|||||||
const add = () => {
|
const add = () => {
|
||||||
store.commit('add');
|
store.commit('add');
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const addSolution = () => {
|
||||||
|
store.commit('add');
|
||||||
|
};
|
||||||
|
|
||||||
|
const changeToSolutions = () => {
|
||||||
|
store.commit('changeToSolutionlistAsset');
|
||||||
|
}
|
||||||
|
|
||||||
|
onMounted(() => {
|
||||||
|
store.commit('changeToAssetlist')
|
||||||
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
||||||
@ -141,7 +202,7 @@ aside.actionbar {
|
|||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
position: sticky;
|
position: sticky;
|
||||||
top: 5rem;
|
top: 3.75rem;
|
||||||
height: fit-content;
|
height: fit-content;
|
||||||
width: fit-content;
|
width: fit-content;
|
||||||
inline-size: fit-content;
|
inline-size: fit-content;
|
||||||
@ -357,4 +418,5 @@ img {
|
|||||||
max-width: 0;
|
max-width: 0;
|
||||||
max-inline-size: 0;
|
max-inline-size: 0;
|
||||||
}
|
}
|
||||||
}</style>
|
}
|
||||||
|
</style>
|
||||||
@ -2,17 +2,17 @@
|
|||||||
<aside :class="['navbar', darkMode ? 'navbar-darkmode' : 'navbar-lightmode', isExpanded ? 'is-expanded' : 'is-not-expanded']">
|
<aside :class="['navbar', darkMode ? 'navbar-darkmode' : 'navbar-lightmode', isExpanded ? 'is-expanded' : 'is-not-expanded']">
|
||||||
<div class="toggleNavbar">
|
<div class="toggleNavbar">
|
||||||
<div v-if="isExpanded" :class="['icon', darkMode ? 'back-darkmode' : 'back-lightmode']" id="back-icon">
|
<div v-if="isExpanded" :class="['icon', darkMode ? 'back-darkmode' : 'back-lightmode']" id="back-icon">
|
||||||
<img :class="[darkMode ? 'img-darkmode' : 'img-lightmode']" loading="lazy" src="../icons/Back-Icon.svg" />
|
<img :class="[darkMode ? 'img-darkmode' : 'img-lightmode']" loading="lazy" src="/icons/Back-Icon.svg" />
|
||||||
</div>
|
</div>
|
||||||
<div :class="['icon', darkMode ? 'indicator-darkmode' : 'indicator-lightmode']" id="indicator-icon" @click="ToggleSidebar">
|
<div :class="['icon', darkMode ? 'indicator-darkmode' : 'indicator-lightmode']" id="indicator-icon" @click="ToggleSidebar">
|
||||||
<img :class="[darkMode ? 'img-darkmode' : 'img-lightmode']" loading="lazy" src="../icons/navbar-icons/Nav-Indicator-Icon-Opened.svg" />
|
<img :class="[darkMode ? 'img-darkmode' : 'img-lightmode']" loading="lazy" src="/icons/navbar-icons/Nav-Indicator-Icon-Opened.svg" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="menus">
|
<div class="menus">
|
||||||
<nav id="home-menu" :class="[darkMode ? 'menu-darkmode' : 'menu-lightmode']">
|
<nav id="home-menu" :class="[darkMode ? 'menu-darkmode' : 'menu-lightmode']">
|
||||||
<router-link to="/home" class="button" :class="[darkMode ? 'button-darkmode' : 'button-lightmode']" id="home-button">
|
<router-link to="/home" class="button" :class="[darkMode ? 'button-darkmode' : 'button-lightmode']" id="home-button">
|
||||||
<div class="icon" id="home-icon">
|
<div class="icon" id="home-icon">
|
||||||
<img :class="[darkMode ? 'img-darkmode' : 'img-lightmode']" loading="lazy" src="../icons/navbar-icons/Home-Icon.svg" />
|
<img :class="[darkMode ? 'img-darkmode' : 'img-lightmode']" loading="lazy" src="/icons/navbar-icons/Home-Icon.svg" />
|
||||||
</div>
|
</div>
|
||||||
<Transition name="fade">
|
<Transition name="fade">
|
||||||
<pre v-if="isExpanded" :class="['label', darkMode ? 'label-darkmode' : 'label-lightmode']">Home</pre>
|
<pre v-if="isExpanded" :class="['label', darkMode ? 'label-darkmode' : 'label-lightmode']">Home</pre>
|
||||||
@ -22,7 +22,7 @@
|
|||||||
<nav id="site-menu">
|
<nav id="site-menu">
|
||||||
<router-link to="/maintenanceVisits" class="button" :class="[darkMode ? 'button-darkmode' : 'button-lightmode']" @click="defaultMasterChecklistPage()" id="checklists-button">
|
<router-link to="/maintenanceVisits" class="button" :class="[darkMode ? 'button-darkmode' : 'button-lightmode']" @click="defaultMasterChecklistPage()" id="checklists-button">
|
||||||
<div class="icon" id="checklists-icon">
|
<div class="icon" id="checklists-icon">
|
||||||
<img :class="[darkMode ? 'img-darkmode' : 'img-lightmode']" loading="lazy" src="../icons/navbar-icons/Checklists-Icon.svg" />
|
<img :class="[darkMode ? 'img-darkmode' : 'img-lightmode']" loading="lazy" src="/icons/navbar-icons/Checklists-Icon.svg" />
|
||||||
</div>
|
</div>
|
||||||
<Transition name="fade">
|
<Transition name="fade">
|
||||||
<pre v-if="isExpanded" :class="['label', darkMode ? 'label-darkmode' : 'label-lightmode']">Checklists</pre>
|
<pre v-if="isExpanded" :class="['label', darkMode ? 'label-darkmode' : 'label-lightmode']">Checklists</pre>
|
||||||
@ -30,7 +30,7 @@
|
|||||||
</router-link>
|
</router-link>
|
||||||
<nuxt-link to="/assets" class="button" :class="[darkMode ? 'button-darkmode' : 'button-lightmode']" @click="defaultAssetPage()" id="assets-button">
|
<nuxt-link to="/assets" class="button" :class="[darkMode ? 'button-darkmode' : 'button-lightmode']" @click="defaultAssetPage()" id="assets-button">
|
||||||
<div class="icon" id="assets-icon">
|
<div class="icon" id="assets-icon">
|
||||||
<img :class="[darkMode ? 'img-darkmode' : 'img-lightmode']" loading="lazy" src="../icons/navbar-icons/Assets-Icon.svg" />
|
<img :class="[darkMode ? 'img-darkmode' : 'img-lightmode']" loading="lazy" src="/icons/navbar-icons/Assets-Icon.svg" />
|
||||||
</div>
|
</div>
|
||||||
<Transition name="fade">
|
<Transition name="fade">
|
||||||
<pre v-if="isExpanded" :class="['label', darkMode ? 'label-darkmode' : 'label-lightmode']">Assets</pre>
|
<pre v-if="isExpanded" :class="['label', darkMode ? 'label-darkmode' : 'label-lightmode']">Assets</pre>
|
||||||
@ -38,23 +38,23 @@
|
|||||||
</nuxt-link>
|
</nuxt-link>
|
||||||
<router-link to="/solutions" class="button" :class="[darkMode ? 'button-darkmode' : 'button-lightmode']" @click="defaultSolutionPage()" id="solutions-button">
|
<router-link to="/solutions" class="button" :class="[darkMode ? 'button-darkmode' : 'button-lightmode']" @click="defaultSolutionPage()" id="solutions-button">
|
||||||
<div class="icon" id="solutions-icon">
|
<div class="icon" id="solutions-icon">
|
||||||
<img :class="[darkMode ? 'img-darkmode' : 'img-lightmode']" loading="lazy" src="../icons/navbar-icons/Solutions-Icon.svg" />
|
<img :class="[darkMode ? 'img-darkmode' : 'img-lightmode']" loading="lazy" src="/icons/navbar-icons/Solutions-Icon.svg" />
|
||||||
</div>
|
</div>
|
||||||
<Transition name="fade">
|
<Transition name="fade">
|
||||||
<pre v-if="isExpanded" :class="['label', darkMode ? 'label-darkmode' : 'label-lightmode']">Solutions</pre>
|
<pre v-if="isExpanded" :class="['label', darkMode ? 'label-darkmode' : 'label-lightmode']">Solutions</pre>
|
||||||
</Transition>
|
</Transition>
|
||||||
</router-link>
|
</router-link>
|
||||||
<router-link to="/issueSlips" class="button" :class="[darkMode ? 'button-darkmode' : 'button-lightmode']" id="accounting-button">
|
<router-link to="/issueSlips" class="button" :class="[darkMode ? 'button-darkmode' : 'button-lightmode']" @click="defaultIssueSlipPage()" id="accounting-button">
|
||||||
<div class="icon" id="accounting-icon">
|
<div class="icon" id="accounting-icon">
|
||||||
<img :class="[darkMode ? 'img-darkmode' : 'img-lightmode']" loading="lazy" src="../icons/navbar-icons/Accounting-Icon.svg" />
|
<img :class="[darkMode ? 'img-darkmode' : 'img-lightmode']" loading="lazy" src="/icons/navbar-icons/Accounting-Icon.svg" />
|
||||||
</div>
|
</div>
|
||||||
<Transition name="fade">
|
<Transition name="fade">
|
||||||
<pre v-if="isExpanded" :class="['label', darkMode ? 'label-darkmode' : 'label-lightmode']">Accounting</pre>
|
<pre v-if="isExpanded" :class="['label', darkMode ? 'label-darkmode' : 'label-lightmode']">Accounting</pre>
|
||||||
</Transition>
|
</Transition>
|
||||||
</router-link>
|
</router-link>
|
||||||
<router-link to="/clients" class="button" :class="[darkMode ? 'button-darkmode' : 'button-lightmode']" id="clients-button">
|
<router-link to="/customers" class="button" :class="[darkMode ? 'button-darkmode' : 'button-lightmode']" id="customers-button">
|
||||||
<div class="icon" id="clients-icon">
|
<div class="icon" id="customers-icon">
|
||||||
<img :class="[darkMode ? 'img-darkmode' : 'img-lightmode']" loading="lazy" src="../icons/navbar-icons/Clients-Icon.svg" />
|
<img :class="[darkMode ? 'img-darkmode' : 'img-lightmode']" loading="lazy" src="/icons/navbar-icons/Customers-Icon.svg" />
|
||||||
</div>
|
</div>
|
||||||
<Transition name="fade">
|
<Transition name="fade">
|
||||||
<pre v-if="isExpanded" :class="['label', darkMode ? 'label-darkmode' : 'label-lightmode']">Customers</pre>
|
<pre v-if="isExpanded" :class="['label', darkMode ? 'label-darkmode' : 'label-lightmode']">Customers</pre>
|
||||||
@ -91,6 +91,11 @@ const defaultSolutionPage = () => {
|
|||||||
store.commit('changeToSolutionlist')
|
store.commit('changeToSolutionlist')
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const defaultIssueSlipPage = () => {
|
||||||
|
store.commit('resetStore');
|
||||||
|
store.commit('changeToIssueSliplist')
|
||||||
|
}
|
||||||
|
|
||||||
const ToggleSidebar = () => {
|
const ToggleSidebar = () => {
|
||||||
isExpanded.value = !isExpanded.value;
|
isExpanded.value = !isExpanded.value;
|
||||||
};
|
};
|
||||||
@ -113,7 +118,7 @@ aside.navbar {
|
|||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
position: sticky;
|
position: sticky;
|
||||||
top: 5rem;
|
top: 3.75rem;
|
||||||
height: fit-content;
|
height: fit-content;
|
||||||
width: fit-content;
|
width: fit-content;
|
||||||
inline-size: fit-content;
|
inline-size: fit-content;
|
||||||
|
|||||||
@ -1,8 +1,8 @@
|
|||||||
<template>
|
<template>
|
||||||
<header :class="[darkMode ? 'header-darkmode' : 'header-lightmode']">
|
<header :class="[darkMode ? 'header-darkmode' : 'header-lightmode']">
|
||||||
<img id="header-logo" loading="lazy" src="../tüit-logo.svg.png" />
|
<img id="header-logo" loading="lazy" src="/tüit-logo.svg.png" />
|
||||||
<div class="profile">
|
<div class="profile">
|
||||||
<div :class="['username', darkMode ? 'username-darkmode' : 'username-lightmode']">username</div>
|
<pre :class="['username', darkMode ? 'username-darkmode' : 'username-lightmode']" id='uname'>username</pre>
|
||||||
<div :class="['picture', darkMode ? 'picture-darkmode' : 'picture-lightmode']">
|
<div :class="['picture', darkMode ? 'picture-darkmode' : 'picture-lightmode']">
|
||||||
<img id="picture" loading="lazy" src="" />
|
<img id="picture" loading="lazy" src="" />
|
||||||
</div>
|
</div>
|
||||||
@ -15,16 +15,20 @@
|
|||||||
import { ref } from 'vue';
|
import { ref } from 'vue';
|
||||||
|
|
||||||
const darkMode = ref(true)
|
const darkMode = ref(true)
|
||||||
|
const username = ref('username');
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "PageHeader",
|
name: "PageHeader",
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<style scoped>
|
<style scoped>
|
||||||
* {
|
* {
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
@ -36,28 +40,28 @@ header {
|
|||||||
position: sticky;
|
position: sticky;
|
||||||
top: 0;
|
top: 0;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 4.375rem;
|
height: 3.125rem;
|
||||||
align-self: stretch;
|
align-self: stretch;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
padding: 0.625rem 1.25rem;
|
padding: 0.375rem 1.875rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
.header-darkmode {
|
.header-darkmode {
|
||||||
background-color: #212121;
|
background-color: #212121;
|
||||||
border-bottom: 0.125em solid #000;
|
border-bottom: 0.125em solid #000000;
|
||||||
}
|
}
|
||||||
|
|
||||||
.header-lightmode {
|
.header-lightmode {
|
||||||
background-color: #EBEBEB;
|
background-color: #ebebeb;
|
||||||
border-bottom: 0.125em solid #8e8e8e61;
|
border-bottom: 0.125em solid #8e8e8e;
|
||||||
}
|
}
|
||||||
|
|
||||||
#header-logo {
|
#header-logo {
|
||||||
object-fit: contain;
|
object-fit: contain;
|
||||||
object-position: center;
|
object-position: center;
|
||||||
width: 5rem;
|
width: 4rem;
|
||||||
height: 2.5rem;
|
height: 2rem;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
@ -68,37 +72,36 @@ header {
|
|||||||
flex-direction: row;
|
flex-direction: row;
|
||||||
align-items: flex-end;
|
align-items: flex-end;
|
||||||
gap: 0.625rem;
|
gap: 0.625rem;
|
||||||
padding: 0 0.625rem;
|
padding: 0 0.375rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
.username {
|
.username {
|
||||||
align-self: center;
|
align-self: center;
|
||||||
margin: auto 0;
|
|
||||||
text-align: right;
|
text-align: right;
|
||||||
font: 200 0.875rem Overpass, sans-serif;
|
font: 200 0.75rem/1.25rem Overpass, sans-serif;
|
||||||
letter-spacing: 5%;
|
letter-spacing: 0.01rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
.username-darkmode {
|
.username-darkmode {
|
||||||
color: #fff;
|
color: #ffffff;
|
||||||
}
|
}
|
||||||
|
|
||||||
.username-lightmode {
|
.username-lightmode {
|
||||||
color: #000;
|
color: #000000;
|
||||||
}
|
}
|
||||||
|
|
||||||
.picture {
|
.picture {
|
||||||
display: flex;
|
display: flex;
|
||||||
width: 2.5rem;
|
width: 1.875rem;
|
||||||
height: 2.5rem;
|
height: 1.875rem;
|
||||||
border-radius: 50%;
|
border-radius: 50%;
|
||||||
}
|
}
|
||||||
|
|
||||||
.picture-darkmode {
|
.picture-darkmode {
|
||||||
background-color: #fff;
|
background-color: #ffffff;
|
||||||
}
|
}
|
||||||
|
|
||||||
.picture-lightmode {
|
.picture-lightmode {
|
||||||
background-color: #000;
|
background-color: #000000;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
24
nuxt-app/.gitignore
vendored
Normal file
24
nuxt-app/.gitignore
vendored
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
# Nuxt dev/build outputs
|
||||||
|
.output
|
||||||
|
.data
|
||||||
|
.nuxt
|
||||||
|
.nitro
|
||||||
|
.cache
|
||||||
|
dist
|
||||||
|
|
||||||
|
# Node dependencies
|
||||||
|
node_modules
|
||||||
|
|
||||||
|
# Logs
|
||||||
|
logs
|
||||||
|
*.log
|
||||||
|
|
||||||
|
# Misc
|
||||||
|
.DS_Store
|
||||||
|
.fleet
|
||||||
|
.idea
|
||||||
|
|
||||||
|
# Local env files
|
||||||
|
.env
|
||||||
|
.env.*
|
||||||
|
!.env.example
|
||||||
75
nuxt-app/README.md
Normal file
75
nuxt-app/README.md
Normal file
@ -0,0 +1,75 @@
|
|||||||
|
# Nuxt 3 Minimal Starter
|
||||||
|
|
||||||
|
Look at the [Nuxt 3 documentation](https://nuxt.com/docs/getting-started/introduction) to learn more.
|
||||||
|
|
||||||
|
## Setup
|
||||||
|
|
||||||
|
Make sure to install the dependencies:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# npm
|
||||||
|
npm install
|
||||||
|
|
||||||
|
# pnpm
|
||||||
|
pnpm install
|
||||||
|
|
||||||
|
# yarn
|
||||||
|
yarn install
|
||||||
|
|
||||||
|
# bun
|
||||||
|
bun install
|
||||||
|
```
|
||||||
|
|
||||||
|
## Development Server
|
||||||
|
|
||||||
|
Start the development server on `http://localhost:3000`:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# npm
|
||||||
|
npm run dev
|
||||||
|
|
||||||
|
# pnpm
|
||||||
|
pnpm run dev
|
||||||
|
|
||||||
|
# yarn
|
||||||
|
yarn dev
|
||||||
|
|
||||||
|
# bun
|
||||||
|
bun run dev
|
||||||
|
```
|
||||||
|
|
||||||
|
## Production
|
||||||
|
|
||||||
|
Build the application for production:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# npm
|
||||||
|
npm run build
|
||||||
|
|
||||||
|
# pnpm
|
||||||
|
pnpm run build
|
||||||
|
|
||||||
|
# yarn
|
||||||
|
yarn build
|
||||||
|
|
||||||
|
# bun
|
||||||
|
bun run build
|
||||||
|
```
|
||||||
|
|
||||||
|
Locally preview production build:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# npm
|
||||||
|
npm run preview
|
||||||
|
|
||||||
|
# pnpm
|
||||||
|
pnpm run preview
|
||||||
|
|
||||||
|
# yarn
|
||||||
|
yarn preview
|
||||||
|
|
||||||
|
# bun
|
||||||
|
bun run preview
|
||||||
|
```
|
||||||
|
|
||||||
|
Check out the [deployment documentation](https://nuxt.com/docs/getting-started/deployment) for more information.
|
||||||
5
nuxt-app/app.vue
Normal file
5
nuxt-app/app.vue
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
<template>
|
||||||
|
<div>
|
||||||
|
<NuxtWelcome />
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
4
nuxt-app/nuxt.config.ts
Normal file
4
nuxt-app/nuxt.config.ts
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
// https://nuxt.com/docs/api/configuration/nuxt-config
|
||||||
|
export default defineNuxtConfig({
|
||||||
|
devtools: { enabled: true }
|
||||||
|
})
|
||||||
9593
nuxt-app/package-lock.json
generated
Normal file
9593
nuxt-app/package-lock.json
generated
Normal file
File diff suppressed because it is too large
Load Diff
17
nuxt-app/package.json
Normal file
17
nuxt-app/package.json
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
{
|
||||||
|
"name": "nuxt-app",
|
||||||
|
"private": true,
|
||||||
|
"type": "module",
|
||||||
|
"scripts": {
|
||||||
|
"build": "nuxt build",
|
||||||
|
"dev": "nuxt dev",
|
||||||
|
"generate": "nuxt generate",
|
||||||
|
"preview": "nuxt preview",
|
||||||
|
"postinstall": "nuxt prepare"
|
||||||
|
},
|
||||||
|
"dependencies": {
|
||||||
|
"nuxt": "^3.10.3",
|
||||||
|
"vue": "^3.4.19",
|
||||||
|
"vue-router": "^4.3.0"
|
||||||
|
}
|
||||||
|
}
|
||||||
BIN
nuxt-app/public/favicon.ico
Normal file
BIN
nuxt-app/public/favicon.ico
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 4.2 KiB |
3
nuxt-app/server/tsconfig.json
Normal file
3
nuxt-app/server/tsconfig.json
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
{
|
||||||
|
"extends": "../.nuxt/tsconfig.server.json"
|
||||||
|
}
|
||||||
4
nuxt-app/tsconfig.json
Normal file
4
nuxt-app/tsconfig.json
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
{
|
||||||
|
// https://nuxt.com/docs/guide/concepts/typescript
|
||||||
|
"extends": "./.nuxt/tsconfig.json"
|
||||||
|
}
|
||||||
@ -1,10 +1,54 @@
|
|||||||
// https://nuxt.com/docs/api/configuration/nuxt-config
|
// https://nuxt.com/docs/api/configuration/nuxt-config
|
||||||
import type {
|
import type { NuxtPage } from 'nuxt/schema'
|
||||||
NuxtPage
|
import clientsideConfig from './clientsideConfig'
|
||||||
} from 'nuxt/schema'
|
import { UserObjectDefinition } from './composables/UserObject'
|
||||||
|
|
||||||
export default defineNuxtConfig({
|
export default defineNuxtConfig({
|
||||||
devtools: { enabled: true },
|
devtools: { enabled: true },
|
||||||
|
modules: [
|
||||||
|
'@pinia/nuxt',
|
||||||
|
'@sidebase/nuxt-auth',
|
||||||
|
],
|
||||||
|
auth: {
|
||||||
|
//baseURL: `https://${clientsideConfig.url}:${clientsideConfig.port}/.output/server/chunks/routes/api/auth`,
|
||||||
|
computed: {
|
||||||
|
origin: `https://${clientsideConfig.url}:${clientsideConfig.port}/`,
|
||||||
|
//pathname: '/server/chunks/routes/api/auth/',
|
||||||
|
//fullBaseUrl: `https://${clientsideConfig.url}:${clientsideConfig.port}/server/chunks/routes/api/auth/`,
|
||||||
|
},
|
||||||
|
//baseUrl: `https://${clientsideConfig.url}:${clientsideConfig.port}/server/chunks/routes/api/auth/`,
|
||||||
|
provider: {
|
||||||
|
type: 'refresh',
|
||||||
|
endpoints: {
|
||||||
|
signIn: { path: '/login', method: 'post' },
|
||||||
|
signout: false,
|
||||||
|
signUp: { path: '/signup', method: 'post' },
|
||||||
|
getSession: { path: '/session', method: 'get' },
|
||||||
|
refresh: { path: '/refresh', method: 'post' }
|
||||||
|
},
|
||||||
|
token: {
|
||||||
|
signInResponseTokenPointer: '/token/authToken',
|
||||||
|
maxAgeInSeconds: 300, // 5 min
|
||||||
|
sameSiteAttribute: 'lax'
|
||||||
|
},
|
||||||
|
refreshToken: {
|
||||||
|
signInResponseRefreshTokenPointer: '/token/refreshToken',
|
||||||
|
maxAgeInSeconds: 604800, // 7 days
|
||||||
|
sameSiteAttribute: 'lax'
|
||||||
|
},
|
||||||
|
// TODO: define UserObject
|
||||||
|
//sessionDataType: UserObjectDefinition,
|
||||||
|
},
|
||||||
|
session: {
|
||||||
|
enableRefreshPeriodically: false,
|
||||||
|
enableRefreshOnWindowFocus: true,
|
||||||
|
},
|
||||||
|
globalAppMiddleware: true,
|
||||||
|
},
|
||||||
|
/*buildModules: [
|
||||||
|
//'@nuxtjs/composition-api/module',
|
||||||
|
['@pinia/nuxt', { disableVuex: false }],
|
||||||
|
],*/
|
||||||
devServer: {
|
devServer: {
|
||||||
https: {
|
https: {
|
||||||
key: './certs/privkey.pem',
|
key: './certs/privkey.pem',
|
||||||
@ -15,10 +59,24 @@ export default defineNuxtConfig({
|
|||||||
server: {
|
server: {
|
||||||
cors: {
|
cors: {
|
||||||
origin: true,
|
origin: true,
|
||||||
|
credentials: true,
|
||||||
optionsSuccessStatus: 204,
|
optionsSuccessStatus: 204,
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
runtimeConfig: {
|
||||||
|
public: {
|
||||||
|
apiBase: `https://${clientsideConfig.url}:${clientsideConfig.port}/server/chunks/routes/api`,
|
||||||
|
axios: {
|
||||||
|
browserBaseURL: `https://${clientsideConfig.url}:${clientsideConfig.port}/`,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
private: {
|
||||||
|
axios: {
|
||||||
|
baseURL: `https://${clientsideConfig.url}:${clientsideConfig.port}/`,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
// hooks: {
|
// hooks: {
|
||||||
// 'pages:extend'(pages) {
|
// 'pages:extend'(pages) {
|
||||||
// function setMiddleware(pages: NuxtPage[]) {
|
// function setMiddleware(pages: NuxtPage[]) {
|
||||||
|
|||||||
4665
package-lock.json
generated
4665
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
16
package.json
16
package.json
@ -7,25 +7,37 @@
|
|||||||
"dev": "nuxt dev",
|
"dev": "nuxt dev",
|
||||||
"generate": "nuxt generate",
|
"generate": "nuxt generate",
|
||||||
"preview": "nuxt preview",
|
"preview": "nuxt preview",
|
||||||
"postinstall": "nuxt prepare"
|
"prepare": "nuxt prepare",
|
||||||
|
"cleanup": "nuxt cleanup"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@nuxt/devtools": "latest",
|
"@nuxt/devtools": "latest",
|
||||||
"nuxt": "^3.8.0",
|
"@pinia/nuxt": "^0.5.1",
|
||||||
|
"@sidebase/nuxt-auth": "^0.6.7",
|
||||||
|
"nuxt": "^3.10.3",
|
||||||
|
"pinia": "^2.1.7",
|
||||||
"vue": "^3.3.7",
|
"vue": "^3.3.7",
|
||||||
"vue-router": "^4.2.5"
|
"vue-router": "^4.2.5"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
"@nuxt/module-builder": "^0.5.5",
|
||||||
|
"@types/jsonwebtoken": "^9.0.6",
|
||||||
|
"@types/node": "^20.11.24",
|
||||||
"@vueform/toggle": "^2.1.4",
|
"@vueform/toggle": "^2.1.4",
|
||||||
"axios": "^1.6.7",
|
"axios": "^1.6.7",
|
||||||
"bcryptjs": "^2.4.3",
|
"bcryptjs": "^2.4.3",
|
||||||
"cors": "^2.8.5",
|
"cors": "^2.8.5",
|
||||||
"express": "^4.18.2",
|
"express": "^4.18.2",
|
||||||
|
"h3": "^1.11.1",
|
||||||
"jsonwebtoken": "^9.0.2",
|
"jsonwebtoken": "^9.0.2",
|
||||||
"leading-trim": "^1.0.2",
|
"leading-trim": "^1.0.2",
|
||||||
"mariadb": "^3.2.3",
|
"mariadb": "^3.2.3",
|
||||||
|
"nuxi": "^3.10.1",
|
||||||
|
"pinia-plugin-persistedstate": "^3.2.1",
|
||||||
|
"typescript": "^5.3.3",
|
||||||
"uuid": "^9.0.1",
|
"uuid": "^9.0.1",
|
||||||
"vite": "^5.1.0",
|
"vite": "^5.1.0",
|
||||||
|
"vue-tsc": "^2.0.5",
|
||||||
"vuex": "^4.1.0"
|
"vuex": "^4.1.0"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -6,9 +6,9 @@
|
|||||||
</router-link>
|
</router-link>
|
||||||
</div>
|
</div>
|
||||||
<div id="content-body">
|
<div id="content-body">
|
||||||
<ClientSearch v-if="onAssetlist || onCustomerAssetlist" />
|
<CustomerSearch v-if="onAssetlist" />
|
||||||
<AssetTable v-if="onAssetlist" />
|
<AssetTable v-if="onAssetlist" />
|
||||||
<AssetTableNoClient v-if="onCustomerAssetlist" />
|
<!-- <AssetTableNoCustomer v-if="onCustomerAssetlist" /> -->
|
||||||
<Asset v-if="onAsset" />
|
<Asset v-if="onAsset" />
|
||||||
<HardwareSpecifications v-if="onAsset" />
|
<HardwareSpecifications v-if="onAsset" />
|
||||||
<SoftwareSpecifications v-if="onAsset" />
|
<SoftwareSpecifications v-if="onAsset" />
|
||||||
@ -23,9 +23,9 @@
|
|||||||
<script setup>
|
<script setup>
|
||||||
import { ref } from 'vue';
|
import { ref } from 'vue';
|
||||||
|
|
||||||
import ClientSearch from "../components/ClientSearch.vue";
|
import CustomerSearch from "../components/CustomerSearch.vue";
|
||||||
import AssetTable from "../components/server/AssetTable.vue";
|
import AssetTable from "../components/server/AssetTable.vue";
|
||||||
import AssetTableNoClient from "../components/server/AssetTableNoClient.vue";
|
// import AssetTableNoCustomer from "../components/server/AssetTableNoCustomer.vue";
|
||||||
import Asset from "../components/server/Asset.vue";
|
import Asset from "../components/server/Asset.vue";
|
||||||
import HardwareSpecifications from "../components/server/HardwareSpecifications.vue";
|
import HardwareSpecifications from "../components/server/HardwareSpecifications.vue";
|
||||||
import SoftwareSpecifications from "../components/server/SoftwareSpecifications.vue";
|
import SoftwareSpecifications from "../components/server/SoftwareSpecifications.vue";
|
||||||
@ -37,12 +37,13 @@ import { computed } from 'vue';
|
|||||||
|
|
||||||
const store = useStore();
|
const store = useStore();
|
||||||
const onAssetlist = computed(() => store.state.onAssetlist);
|
const onAssetlist = computed(() => store.state.onAssetlist);
|
||||||
const onCustomerAssetlist = computed(() => store.state.onCustomerAssetlist);
|
// const onCustomerAssetlist = computed(() => store.state.onCustomerAssetlist);
|
||||||
const onAsset = computed(() => store.state.onAsset);
|
const onAsset = computed(() => store.state.onAsset);
|
||||||
const onSolutionlistAsset = computed(() => store.state.onSolutionlistAsset);
|
const onSolutionlistAsset = computed(() => store.state.onSolutionlistAsset);
|
||||||
|
|
||||||
definePageMeta({
|
definePageMeta({
|
||||||
layout: 'default'
|
layout: 'default',
|
||||||
|
title: 'Assets'
|
||||||
})
|
})
|
||||||
|
|
||||||
const defaultAssetPage = () => {
|
const defaultAssetPage = () => {
|
||||||
|
|||||||
@ -1,17 +1,17 @@
|
|||||||
<template>
|
<template>
|
||||||
<section id="content">
|
<section id="content">
|
||||||
<div id="content-header">
|
<div id="content-header">
|
||||||
<h1 :class="[darkMode ? 'h1-darkmode' : 'h1-lightmode']" id="page-name">Clients</h1>
|
<h1 :class="[darkMode ? 'h1-darkmode' : 'h1-lightmode']" id="page-name">Customers</h1>
|
||||||
</div>
|
</div>
|
||||||
<div id="content-body">
|
<div id="content-body">
|
||||||
<ClientTable v-if="onCustomerlist"/>
|
<CustomerTable v-if="onCustomerlist"/>
|
||||||
<Client v-if="onCustomer"/>
|
<Customer v-if="onCustomer"/>
|
||||||
<ClientQuickAccess v-if="onCustomer"/>
|
<CustomerQuickAccess v-if="onCustomer"/>
|
||||||
<ClientEmployeeList v-if="onEmployeelist"/>
|
<CustomerEmployeeList v-if="onEmployeelist"/>
|
||||||
<ClientEmployee v-if="onEmployee"/>
|
<CustomerEmployee v-if="onEmployee"/>
|
||||||
<ClientDepartmentList v-if="onDepartmentlist"/>
|
<CustomerDepartmentList v-if="onDepartmentlist"/>
|
||||||
<ClientDepartment v-if="onDepartment"/>
|
<CustomerDepartment v-if="onDepartment"/>
|
||||||
<ClientDepartmentEmployeeList v-if="onDepartment"/>
|
<CustomerDepartmentEmployeeList v-if="onDepartment"/>
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
</template>
|
</template>
|
||||||
@ -19,17 +19,18 @@
|
|||||||
<script setup>
|
<script setup>
|
||||||
import { ref } from 'vue';
|
import { ref } from 'vue';
|
||||||
|
|
||||||
import ClientTable from "../components/server/ClientTable.vue";
|
import CustomerTable from "../components/server/CustomerTable.vue";
|
||||||
import Client from "../components/server/Client.vue";
|
import Customer from "../components/server/Customer.vue";
|
||||||
import ClientQuickAccess from "../components/server/ClientQuickAccess.vue";
|
import CustomerQuickAccess from "../components/server/CustomerQuickAccess.vue";
|
||||||
import ClientEmployeeList from "../components/server/ClientEmployeeList.vue";
|
import CustomerEmployeeList from "../components/server/CustomerEmployeeList.vue";
|
||||||
import ClientEmployee from "../components/server/ClientEmployee.vue";
|
import CustomerEmployee from "../components/server/CustomerEmployee.vue";
|
||||||
import ClientDepartmentList from '~/components/server/ClientDepartmentList.vue';
|
import CustomerDepartmentList from '~/components/server/CustomerDepartmentList.vue';
|
||||||
import ClientDepartment from '~/components/server/ClientDepartment.vue';
|
import CustomerDepartment from '~/components/server/CustomerDepartment.vue';
|
||||||
import ClientDepartmentEmployeeList from '~/components/server/ClientDepartmentEmployeeList.vue';
|
import CustomerDepartmentEmployeeList from '~/components/server/CustomerDepartmentEmployeeList.vue';
|
||||||
|
|
||||||
definePageMeta({
|
definePageMeta({
|
||||||
layout: 'default'
|
layout: 'default',
|
||||||
|
title: 'Customers'
|
||||||
})
|
})
|
||||||
|
|
||||||
const darkMode = ref(true)
|
const darkMode = ref(true)
|
||||||
@ -45,7 +46,7 @@ const onDepartment = ref(true)
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
export default {
|
export default {
|
||||||
name: "ClientsPage",
|
name: "CustomersPage",
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
@ -20,7 +20,8 @@ import Dashboard from "../components/Dashboard.vue";
|
|||||||
import QuickAccess from "../components/QuickAccess.vue";
|
import QuickAccess from "../components/QuickAccess.vue";
|
||||||
|
|
||||||
definePageMeta({
|
definePageMeta({
|
||||||
layout: 'empty'
|
layout: 'empty',
|
||||||
|
title: 'Home'
|
||||||
})
|
})
|
||||||
|
|
||||||
const darkMode = ref(true)
|
const darkMode = ref(true)
|
||||||
|
|||||||
@ -14,7 +14,8 @@
|
|||||||
import { ref } from 'vue';
|
import { ref } from 'vue';
|
||||||
|
|
||||||
definePageMeta({
|
definePageMeta({
|
||||||
layout: 'default'
|
layout: 'default',
|
||||||
|
title: 'Test'
|
||||||
})
|
})
|
||||||
|
|
||||||
const darkMode = ref(true)
|
const darkMode = ref(true)
|
||||||
|
|||||||
@ -20,7 +20,7 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
<router-link to="/issues" class="button" id="issues-button" @click="defaultIssuePage()">
|
<router-link to="/issueItems" class="button" id="issues-button" @click="defaultIssuePage()">
|
||||||
<h1 :class="[darkMode ? 'h1-darkmode' : 'h1-lightmode']" id="active-page-name">Issues</h1>
|
<h1 :class="[darkMode ? 'h1-darkmode' : 'h1-lightmode']" id="active-page-name">Issues</h1>
|
||||||
</router-link>
|
</router-link>
|
||||||
</div>
|
</div>
|
||||||
@ -52,7 +52,8 @@ const onIssueItem = computed(() => store.state.onIssueItem);
|
|||||||
const onIssueItemVariant = computed(() => store.state.onIssueItemVariant);
|
const onIssueItemVariant = computed(() => store.state.onIssueItemVariant);
|
||||||
|
|
||||||
definePageMeta({
|
definePageMeta({
|
||||||
layout: 'default'
|
layout: 'default',
|
||||||
|
title: 'Issue Items'
|
||||||
})
|
})
|
||||||
|
|
||||||
const darkMode = ref(true)
|
const darkMode = ref(true)
|
||||||
@ -70,7 +71,7 @@ const defaultIssuePage = () => {
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
export default {
|
export default {
|
||||||
name: "IssuePage",
|
name: "IssueItemsPage",
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
@ -20,14 +20,14 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
<router-link to="/issues" class="button" id="issues-button" @click="defaultIssuePage()">
|
<router-link to="/issueItems" class="button" id="issues-button" @click="defaultIssuePage()">
|
||||||
<h1 :class="[darkMode ? 'h1-darkmode' : 'h1-lightmode']" id="page-name">Issues</h1>
|
<h1 :class="[darkMode ? 'h1-darkmode' : 'h1-lightmode']" id="page-name">Issues</h1>
|
||||||
</router-link>
|
</router-link>
|
||||||
</div>
|
</div>
|
||||||
<div id="content-body">
|
<div id="content-body">
|
||||||
<ClientSearch v-if="onIssueSliplist || onCustomerIssueSliplist" />
|
<CustomerSearch v-if="onIssueSliplist" />
|
||||||
<IssueSlipTable v-if="onIssueSliplist" />
|
<IssueSlipTable v-if="onIssueSliplist" />
|
||||||
<IssueSlipTableNoClient v-if="onCustomerIssueSliplist" />
|
<!-- <IssueSlipTableNoCustomer v-if="onCustomerIssueSliplist" /> -->
|
||||||
<IssueSlip v-if="onIssueSlip" />
|
<IssueSlip v-if="onIssueSlip" />
|
||||||
<OrderingInformation v-if="onIssueSlip" />
|
<OrderingInformation v-if="onIssueSlip" />
|
||||||
<Accounting v-if="onIssueSlip" />
|
<Accounting v-if="onIssueSlip" />
|
||||||
@ -39,9 +39,9 @@
|
|||||||
<script setup>
|
<script setup>
|
||||||
import { ref } from 'vue';
|
import { ref } from 'vue';
|
||||||
|
|
||||||
import ClientSearch from "../components/ClientSearch.vue";
|
import CustomerSearch from "../components/CustomerSearch.vue";
|
||||||
import IssueSlipTable from "../components/server/IssueSlipTable.vue";
|
import IssueSlipTable from "../components/server/IssueSlipTable.vue";
|
||||||
import IssueSlipTableNoClient from "../components/server/IssueSlipTableNoClient.vue";
|
// import IssueSlipTableNoCustomer from "../components/server/IssueSlipTableNoCustomer.vue";
|
||||||
import IssueSlip from "../components/server/IssueSlip.vue";
|
import IssueSlip from "../components/server/IssueSlip.vue";
|
||||||
import OrderingInformation from "../components/server/OrderingInformation.vue";
|
import OrderingInformation from "../components/server/OrderingInformation.vue";
|
||||||
import Accounting from "../components/server/Accounting.vue";
|
import Accounting from "../components/server/Accounting.vue";
|
||||||
@ -50,11 +50,12 @@ import { computed } from 'vue';
|
|||||||
|
|
||||||
const store = useStore();
|
const store = useStore();
|
||||||
const onIssueSliplist = computed(() => store.state.onIssueSliplist);
|
const onIssueSliplist = computed(() => store.state.onIssueSliplist);
|
||||||
const onCustomerIssueSliplist = computed(() => store.state.onCustomerIssueSliplist);
|
// const onCustomerIssueSliplist = computed(() => store.state.onCustomerIssueSliplist);
|
||||||
const onIssueSlip = computed(() => store.state.onIssueSlip);
|
const onIssueSlip = computed(() => store.state.onIssueSlip);
|
||||||
|
|
||||||
definePageMeta({
|
definePageMeta({
|
||||||
layout: 'default'
|
layout: 'default',
|
||||||
|
title: 'Issue Slips'
|
||||||
})
|
})
|
||||||
|
|
||||||
const darkMode = ref(true)
|
const darkMode = ref(true)
|
||||||
|
|||||||
@ -16,7 +16,9 @@ import { ref } from 'vue';
|
|||||||
import LoginForm from "../components/LoginForm.vue";
|
import LoginForm from "../components/LoginForm.vue";
|
||||||
|
|
||||||
definePageMeta({
|
definePageMeta({
|
||||||
layout: 'empty'
|
layout: 'empty',
|
||||||
|
title: 'Login',
|
||||||
|
auth: false,
|
||||||
})
|
})
|
||||||
|
|
||||||
const darkMode = ref(true)
|
const darkMode = ref(true)
|
||||||
|
|||||||
@ -27,9 +27,9 @@
|
|||||||
</router-link>
|
</router-link>
|
||||||
</div>
|
</div>
|
||||||
<div id="content-body">
|
<div id="content-body">
|
||||||
<ClientSearch v-if="onTemplatelist || onCustomerTemplatelist" />
|
<CustomerSearch v-if="onTemplatelist" />
|
||||||
<MaintenanceVisitsTemplateTable v-if="onTemplatelist" />
|
<MaintenanceVisitsTemplateTable v-if="onTemplatelist" />
|
||||||
<MaintenanceVisitsTemplateTableNoClient v-if="onCustomerTemplatelist" />
|
<!-- <MaintenanceVisitsTemplateTableNoCustomer v-if="onCustomerTemplatelist" /> -->
|
||||||
<MaintenanceVisitsTemplate v-if="onTemplate" />
|
<MaintenanceVisitsTemplate v-if="onTemplate" />
|
||||||
<TemplateChecklistMVT v-if="onTemplate" />
|
<TemplateChecklistMVT v-if="onTemplate" />
|
||||||
<TemplateSearch v-if="onInstancelist" />
|
<TemplateSearch v-if="onInstancelist" />
|
||||||
@ -44,9 +44,9 @@
|
|||||||
<script setup>
|
<script setup>
|
||||||
import { ref } from 'vue';
|
import { ref } from 'vue';
|
||||||
|
|
||||||
import ClientSearch from "../components/ClientSearch.vue";
|
import CustomerSearch from "../components/CustomerSearch.vue";
|
||||||
import MaintenanceVisitsTemplateTable from "../components/server/MaintenanceVisitsTemplateTable.vue";
|
import MaintenanceVisitsTemplateTable from "../components/server/MaintenanceVisitsTemplateTable.vue";
|
||||||
import MaintenanceVisitsTemplateTableNoClient from "../components/server/MaintenanceVisitsTemplateTableNoClient.vue";
|
// import MaintenanceVisitsTemplateTableNoCustomer from "../components/server/MaintenanceVisitsTemplateTableNoCustomer.vue";
|
||||||
import MaintenanceVisitsTemplate from "../components/server/MaintenanceVisitsTemplate.vue";
|
import MaintenanceVisitsTemplate from "../components/server/MaintenanceVisitsTemplate.vue";
|
||||||
import TemplateChecklistMVT from "../components/server/TemplateChecklistMVT.vue";
|
import TemplateChecklistMVT from "../components/server/TemplateChecklistMVT.vue";
|
||||||
import TemplateSearch from "../components/TemplateSearch.vue";
|
import TemplateSearch from "../components/TemplateSearch.vue";
|
||||||
@ -58,13 +58,14 @@ import { computed } from 'vue';
|
|||||||
|
|
||||||
const store = useStore();
|
const store = useStore();
|
||||||
const onTemplatelist = computed(() => store.state.onTemplatelist);
|
const onTemplatelist = computed(() => store.state.onTemplatelist);
|
||||||
const onCustomerTemplatelist = computed(() => store.state.onCustomerTemplatelist);
|
// const onCustomerTemplatelist = computed(() => store.state.onCustomerTemplatelist);
|
||||||
const onTemplate = computed(() => store.state.onTemplate);
|
const onTemplate = computed(() => store.state.onTemplate);
|
||||||
const onInstancelist = computed(() => store.state.onInstancelist);
|
const onInstancelist = computed(() => store.state.onInstancelist);
|
||||||
const onInstance = computed(() => store.state.onInstance);
|
const onInstance = computed(() => store.state.onInstance);
|
||||||
|
|
||||||
definePageMeta({
|
definePageMeta({
|
||||||
layout: 'default'
|
layout: 'default',
|
||||||
|
title: 'Maintenance Visits'
|
||||||
})
|
})
|
||||||
|
|
||||||
const darkMode = ref(true)
|
const darkMode = ref(true)
|
||||||
|
|||||||
@ -27,15 +27,15 @@
|
|||||||
</router-link>
|
</router-link>
|
||||||
</div>
|
</div>
|
||||||
<div id="content-body">
|
<div id="content-body">
|
||||||
<ClientSearch v-if="onTemplatelist || onCustomerTemplatelist" />
|
<CustomerSearch v-if="onTemplatelist"/>
|
||||||
<ProductionOrdersTemplateTable v-if="onTemplatelist" />
|
<ProductionOrdersTemplateTable v-if="onTemplatelist"/>
|
||||||
<ProductionOrdersTemplateTableNoClient v-if="onCustomerTemplatelist" />
|
<!-- <ProductionOrdersTemplateTableNoCustomer v-if="onCustomerTemplatelist"/> -->
|
||||||
<ProductionOrdersTemplate v-if="onTemplate" />
|
<ProductionOrdersTemplate v-if="onTemplate"/>
|
||||||
<TemplateChecklist v-if="onTemplate" />
|
<TemplateChecklist v-if="onTemplate"/>
|
||||||
<TemplateSearch v-if="onInstancelist" />
|
<TemplateSearch v-if="onInstancelist"/>
|
||||||
<ProductionOrdersInstanceTable v-if="onInstancelist" />
|
<ProductionOrdersInstanceTable v-if="onInstancelist"/>
|
||||||
<ProductionOrdersInstance v-if="onInstance" />
|
<ProductionOrdersInstance v-if="onInstance"/>
|
||||||
<InstanceChecklist v-if="onInstance" />
|
<InstanceChecklist v-if="onInstance"/>
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
</template>
|
</template>
|
||||||
@ -44,9 +44,9 @@
|
|||||||
<script setup>
|
<script setup>
|
||||||
import { ref } from 'vue';
|
import { ref } from 'vue';
|
||||||
|
|
||||||
import ClientSearch from "../components/ClientSearch.vue";
|
import CustomerSearch from "../components/CustomerSearch.vue";
|
||||||
import ProductionOrdersTemplateTable from "../components/server/ProductionOrdersTemplateTable.vue";
|
import ProductionOrdersTemplateTable from "../components/server/ProductionOrdersTemplateTable.vue";
|
||||||
import ProductionOrdersTemplateTableNoClient from "../components/server/ProductionOrdersTemplateTableNoClient.vue";
|
// import ProductionOrdersTemplateTableNoCustomer from "../components/server/ProductionOrdersTemplateTableNoCustomer.vue";
|
||||||
import ProductionOrdersTemplate from "../components/server/ProductionOrdersTemplate.vue";
|
import ProductionOrdersTemplate from "../components/server/ProductionOrdersTemplate.vue";
|
||||||
import TemplateChecklist from "../components/server/TemplateChecklist.vue";
|
import TemplateChecklist from "../components/server/TemplateChecklist.vue";
|
||||||
import TemplateSearch from "../components/TemplateSearch.vue";
|
import TemplateSearch from "../components/TemplateSearch.vue";
|
||||||
@ -58,13 +58,14 @@ import { computed } from 'vue';
|
|||||||
|
|
||||||
const store = useStore();
|
const store = useStore();
|
||||||
const onTemplatelist = computed(() => store.state.onTemplatelist);
|
const onTemplatelist = computed(() => store.state.onTemplatelist);
|
||||||
const onCustomerTemplatelist = computed(() => store.state.onCustomerTemplatelist);
|
// const onCustomerTemplatelist = computed(() => store.state.onCustomerTemplatelist);
|
||||||
const onTemplate = computed(() => store.state.onTemplate);
|
const onTemplate = computed(() => store.state.onTemplate);
|
||||||
const onInstancelist = computed(() => store.state.onInstancelist);
|
const onInstancelist = computed(() => store.state.onInstancelist);
|
||||||
const onInstance = computed(() => store.state.onInstance);
|
const onInstance = computed(() => store.state.onInstance);
|
||||||
|
|
||||||
definePageMeta({
|
definePageMeta({
|
||||||
layout: 'default'
|
layout: 'default',
|
||||||
|
title: 'Production Orders'
|
||||||
})
|
})
|
||||||
|
|
||||||
const darkMode = ref(true)
|
const darkMode = ref(true)
|
||||||
|
|||||||
@ -39,7 +39,8 @@ import UserAppearance from "../components/server/UserAppearance.vue";
|
|||||||
import UserRightsList from "../components/server/UserRightsList.vue";
|
import UserRightsList from "../components/server/UserRightsList.vue";
|
||||||
|
|
||||||
definePageMeta({
|
definePageMeta({
|
||||||
layout: 'default'
|
layout: 'default',
|
||||||
|
title: 'Settings'
|
||||||
})
|
})
|
||||||
|
|
||||||
const darkMode = ref(true)
|
const darkMode = ref(true)
|
||||||
|
|||||||
@ -6,9 +6,9 @@
|
|||||||
</router-link>
|
</router-link>
|
||||||
</div>
|
</div>
|
||||||
<div id="content-body">
|
<div id="content-body">
|
||||||
<ClientSearch v-if="onSolutionlist || onCustomerSolutionlist" />
|
<CustomerSearch v-if="onSolutionlist" />
|
||||||
<SolutionTable v-if="onSolutionlist" />
|
<SolutionTable v-if="onSolutionlist" />
|
||||||
<SolutionTableNoClient v-if="onCustomerSolutionlist" />
|
<!-- <SolutionTableNoCustomer v-if="onCustomerSolutionlist" /> -->
|
||||||
<Solution v-if="onSolution" />
|
<Solution v-if="onSolution" />
|
||||||
<SolutionChecklist v-if="onSolution" />
|
<SolutionChecklist v-if="onSolution" />
|
||||||
</div>
|
</div>
|
||||||
@ -18,9 +18,9 @@
|
|||||||
<script setup>
|
<script setup>
|
||||||
import { ref } from 'vue';
|
import { ref } from 'vue';
|
||||||
|
|
||||||
import ClientSearch from "../components/ClientSearch.vue";
|
import CustomerSearch from "../components/CustomerSearch.vue";
|
||||||
import SolutionTable from "../components/server/SolutionTable.vue";
|
import SolutionTable from "../components/server/SolutionTable.vue";
|
||||||
import SolutionTableNoClient from "../components/server/SolutionTableNoClient.vue";
|
// import SolutionTableNoCustomer from "../components/server/SolutionTableNoCustomer.vue";
|
||||||
import Solution from "../components/server/Solution.vue";
|
import Solution from "../components/server/Solution.vue";
|
||||||
import SolutionChecklist from "../components/server/SolutionChecklist.vue";
|
import SolutionChecklist from "../components/server/SolutionChecklist.vue";
|
||||||
import { useStore } from 'vuex';
|
import { useStore } from 'vuex';
|
||||||
@ -28,11 +28,12 @@ import { computed } from 'vue';
|
|||||||
|
|
||||||
const store = useStore();
|
const store = useStore();
|
||||||
const onSolutionlist = computed(() => store.state.onSolutionlist);
|
const onSolutionlist = computed(() => store.state.onSolutionlist);
|
||||||
const onCustomerSolutionlist = computed(() => store.state.onCustomerSolutionlist);
|
// const onCustomerSolutionlist = computed(() => store.state.onCustomerSolutionlist);
|
||||||
const onSolution = computed(() => store.state.onSolution);
|
const onSolution = computed(() => store.state.onSolution);
|
||||||
|
|
||||||
definePageMeta({
|
definePageMeta({
|
||||||
layout: 'default'
|
layout: 'default',
|
||||||
|
title: 'Solutions'
|
||||||
})
|
})
|
||||||
|
|
||||||
const defaultSolutionPage = () => {
|
const defaultSolutionPage = () => {
|
||||||
|
|||||||
300
plugins/vuex.js
300
plugins/vuex.js
@ -8,15 +8,28 @@ const store = createStore({
|
|||||||
searchable: false,
|
searchable: false,
|
||||||
deleteBool: false,
|
deleteBool: false,
|
||||||
new: false,
|
new: false,
|
||||||
clientChanged: false,
|
customerChanged: false,
|
||||||
changedClientId: -1,
|
changedCustomerId: -1,
|
||||||
filteredByClient: '',
|
filteredByCustomer: '',
|
||||||
|
|
||||||
|
addIcon: false,
|
||||||
|
addSolutionIcon: false,
|
||||||
|
solutionIcon: false,
|
||||||
|
addInstanceIcon: false,
|
||||||
|
filterIcon: false,
|
||||||
|
searchIcon: false,
|
||||||
|
instancesIcon: false,
|
||||||
|
attachmentsIcon: false,
|
||||||
|
sellIcon: false,
|
||||||
|
archiveIcon: false,
|
||||||
|
editIcon: false,
|
||||||
|
deleteIcon: false,
|
||||||
|
|
||||||
onAssetlist: true,
|
onAssetlist: true,
|
||||||
onCustomerAssetlist: false,
|
|
||||||
onAsset: false,
|
onAsset: false,
|
||||||
onSolutionlistAsset: false,
|
onSolutionlistAsset: false,
|
||||||
chosenAssetId: -1,
|
chosenAssetId: -1,
|
||||||
|
newAsset: false,
|
||||||
newAssetName: '',
|
newAssetName: '',
|
||||||
newCustomerID: '',
|
newCustomerID: '',
|
||||||
newCustomer: '',
|
newCustomer: '',
|
||||||
@ -41,7 +54,6 @@ const store = createStore({
|
|||||||
newLicense: '',
|
newLicense: '',
|
||||||
|
|
||||||
onTemplatelist: true,
|
onTemplatelist: true,
|
||||||
onCustomerTemplatelist: false,
|
|
||||||
onTemplate: false,
|
onTemplate: false,
|
||||||
onInstancelist: false,
|
onInstancelist: false,
|
||||||
onInstance: false,
|
onInstance: false,
|
||||||
@ -65,7 +77,6 @@ const store = createStore({
|
|||||||
chosenMVTId: -1,
|
chosenMVTId: -1,
|
||||||
|
|
||||||
onSolutionlist: true,
|
onSolutionlist: true,
|
||||||
onCustomerSolutionlist: false,
|
|
||||||
onSolution: false,
|
onSolution: false,
|
||||||
chosenSolutionId: -1,
|
chosenSolutionId: -1,
|
||||||
newSolutionNameSol: '',
|
newSolutionNameSol: '',
|
||||||
@ -79,7 +90,6 @@ const store = createStore({
|
|||||||
newNotesSol: '',
|
newNotesSol: '',
|
||||||
|
|
||||||
onIssueSliplist: true,
|
onIssueSliplist: true,
|
||||||
onCustomerIssueSliplist: false,
|
|
||||||
onIssueSlip: false,
|
onIssueSlip: false,
|
||||||
chosenIssueSlipId: -1,
|
chosenIssueSlipId: -1,
|
||||||
newTicketNoIS: '',
|
newTicketNoIS: '',
|
||||||
@ -140,111 +150,284 @@ const store = createStore({
|
|||||||
} else {
|
} else {
|
||||||
state.searchable = false
|
state.searchable = false
|
||||||
}
|
}
|
||||||
state.filteredByClient = ''
|
state.filteredByCustomer = ''
|
||||||
},
|
},
|
||||||
toggleClientChanged(state) {
|
toggleCustomerChanged(state) {
|
||||||
state.clientChanged = !state.clientChanged
|
state.customerChanged = !state.customerChanged
|
||||||
},
|
},
|
||||||
toggleClientId(state, id) {
|
toggleCustomerId(state, id) {
|
||||||
state.changedClientId = id
|
state.changedCustomerId = id
|
||||||
},
|
},
|
||||||
|
|
||||||
|
refresh() {
|
||||||
|
//
|
||||||
|
},
|
||||||
|
|
||||||
// functions to change the asset pages
|
// functions to change the asset pages
|
||||||
changeToAssetlist(state) {
|
changeToAssetlist(state) {
|
||||||
state.onAssetlist = true
|
state.onAssetlist = true
|
||||||
state.onCustomerAssetlist = false
|
|
||||||
state.onAsset = false
|
state.onAsset = false
|
||||||
state.onSolutionlistAsset = false
|
state.onSolutionlistAsset = false
|
||||||
|
|
||||||
|
state.addIcon = true
|
||||||
|
state.addSolutionIcon = false
|
||||||
|
state.solutionIcon = false
|
||||||
|
state.addInstanceIcon = false
|
||||||
|
state.filterIcon = true
|
||||||
|
state.searchIcon = true
|
||||||
|
state.instancesIcon = false
|
||||||
|
state.attachmentsIcon = false
|
||||||
|
state.sellIcon = false
|
||||||
|
state.archiveIcon = false
|
||||||
|
state.editIcon = false
|
||||||
|
state.deleteIcon = false
|
||||||
},
|
},
|
||||||
changeToCustomerAssetlist(state) {
|
changeToCustomerAssetlist(state) {
|
||||||
state.onAssetlist = false
|
state.onAssetlist = false
|
||||||
state.onCustomerAssetlist = true
|
|
||||||
state.onAsset = false
|
state.onAsset = false
|
||||||
state.onSolutionlistAsset = false
|
state.onSolutionlistAsset = false
|
||||||
|
|
||||||
|
state.addIcon = true
|
||||||
|
state.addSolutionIcon = false
|
||||||
|
state.solutionIcon = false
|
||||||
|
state.addInstanceIcon = false
|
||||||
|
state.filterIcon = true
|
||||||
|
state.searchIcon = true
|
||||||
|
state.instancesIcon = false
|
||||||
|
state.attachmentsIcon = false
|
||||||
|
state.sellIcon = false
|
||||||
|
state.archiveIcon = false
|
||||||
|
state.editIcon = false
|
||||||
|
state.deleteIcon = false
|
||||||
},
|
},
|
||||||
changeToAsset(state) {
|
changeToAsset(state) {
|
||||||
state.onAssetlist = false
|
state.onAssetlist = false
|
||||||
state.onCustomerAssetlist = false
|
|
||||||
state.onAsset = true
|
state.onAsset = true
|
||||||
state.onSolutionlistAsset = false
|
state.onSolutionlistAsset = false
|
||||||
|
|
||||||
|
state.addIcon = false
|
||||||
|
state.addSolutionIcon = false
|
||||||
|
state.solutionIcon = true
|
||||||
|
state.addInstanceIcon = false
|
||||||
|
state.filterIcon = false
|
||||||
|
state.searchIcon = false
|
||||||
|
state.instancesIcon = false
|
||||||
|
state.attachmentsIcon = true
|
||||||
|
state.sellIcon = false
|
||||||
|
state.archiveIcon = false
|
||||||
|
state.editIcon = true
|
||||||
|
state.deleteIcon = true
|
||||||
},
|
},
|
||||||
changeToSolutionlistAsset(state) {
|
changeToSolutionlistAsset(state) {
|
||||||
state.onAssetlist = false
|
state.onAssetlist = false
|
||||||
state.onCustomerAssetlist = false
|
|
||||||
state.onAsset = false
|
state.onAsset = false
|
||||||
state.onSolutionlistAsset = true
|
state.onSolutionlistAsset = true
|
||||||
|
|
||||||
|
state.addIcon = false
|
||||||
|
state.addSolutionIcon = true
|
||||||
|
state.solutionIcon = false
|
||||||
|
state.addInstanceIcon = false
|
||||||
|
state.filterIcon = true
|
||||||
|
state.searchIcon = true
|
||||||
|
state.instancesIcon = false
|
||||||
|
state.attachmentsIcon = false
|
||||||
|
state.sellIcon = false
|
||||||
|
state.archiveIcon = false
|
||||||
|
state.editIcon = false
|
||||||
|
state.deleteIcon = false
|
||||||
},
|
},
|
||||||
|
|
||||||
// functions to change the production order and maintenance visit pages
|
// functions to change the production order and maintenance visit pages
|
||||||
changeToTemplatelist(state) {
|
changeToTemplatelist(state) {
|
||||||
state.onTemplatelist = true
|
state.onTemplatelist = true
|
||||||
state.onCustomerTemplatelist = false
|
|
||||||
state.onTemplate = false
|
state.onTemplate = false
|
||||||
state.onInstancelist = false
|
state.onInstancelist = false
|
||||||
state.onInstance = false
|
state.onInstance = false
|
||||||
|
|
||||||
|
state.addIcon = true
|
||||||
|
state.addSolutionIcon = false
|
||||||
|
state.solutionIcon = false
|
||||||
|
state.addInstanceIcon = false
|
||||||
|
state.filterIcon = true
|
||||||
|
state.searchIcon = true
|
||||||
|
state.instancesIcon = false
|
||||||
|
state.attachmentsIcon = false
|
||||||
|
state.sellIcon = false
|
||||||
|
state.archiveIcon = false
|
||||||
|
state.editIcon = false
|
||||||
|
state.deleteIcon = false
|
||||||
},
|
},
|
||||||
changeToCustomerTemplatelist(state) {
|
changeToCustomerTemplatelist(state) {
|
||||||
state.onTemplatelist = false
|
state.onTemplatelist = false
|
||||||
state.onCustomerTemplatelist = true
|
|
||||||
state.onTemplate = false
|
state.onTemplate = false
|
||||||
state.onInstancelist = false
|
state.onInstancelist = false
|
||||||
state.onInstance = false
|
state.onInstance = false
|
||||||
|
|
||||||
|
state.addIcon = true
|
||||||
|
state.addSolutionIcon = false
|
||||||
|
state.solutionIcon = false
|
||||||
|
state.addInstanceIcon = false
|
||||||
|
state.filterIcon = true
|
||||||
|
state.searchIcon = true
|
||||||
|
state.instancesIcon = false
|
||||||
|
state.attachmentsIcon = false
|
||||||
|
state.sellIcon = false
|
||||||
|
state.archiveIcon = false
|
||||||
|
state.editIcon = false
|
||||||
|
state.deleteIcon = false
|
||||||
},
|
},
|
||||||
changeToTemplate(state) {
|
changeToTemplate(state) {
|
||||||
state.onTemplatelist = false
|
state.onTemplatelist = false
|
||||||
state.onCustomerTemplatelist = false
|
|
||||||
state.onTemplate = true
|
state.onTemplate = true
|
||||||
state.onInstancelist = false
|
state.onInstancelist = false
|
||||||
state.onInstance = false
|
state.onInstance = false
|
||||||
|
|
||||||
|
state.addIcon = false
|
||||||
|
state.addSolutionIcon = false
|
||||||
|
state.solutionIcon = false
|
||||||
|
state.addInstanceIcon = true
|
||||||
|
state.filterIcon = false
|
||||||
|
state.searchIcon = false
|
||||||
|
state.instancesIcon = true
|
||||||
|
state.attachmentsIcon = true
|
||||||
|
state.sellIcon = false
|
||||||
|
state.archiveIcon = false
|
||||||
|
state.editIcon = true
|
||||||
|
state.deleteIcon = true
|
||||||
},
|
},
|
||||||
changeToInstancelist(state) {
|
changeToInstancelist(state) {
|
||||||
state.onTemplatelist = false
|
state.onTemplatelist = false
|
||||||
state.onCustomerTemplatelist = false
|
|
||||||
state.onTemplate = false
|
state.onTemplate = false
|
||||||
state.onInstancelist = true
|
state.onInstancelist = true
|
||||||
state.onInstance = false
|
state.onInstance = false
|
||||||
|
|
||||||
|
state.addIcon = false
|
||||||
|
state.addSolutionIcon = false
|
||||||
|
state.solutionIcon = false
|
||||||
|
state.addInstanceIcon = true
|
||||||
|
state.filterIcon = true
|
||||||
|
state.searchIcon = true
|
||||||
|
state.instancesIcon = false
|
||||||
|
state.attachmentsIcon = false
|
||||||
|
state.sellIcon = false
|
||||||
|
state.archiveIcon = false
|
||||||
|
state.editIcon = false
|
||||||
|
state.deleteIcon = false
|
||||||
},
|
},
|
||||||
changeToInstance(state) {
|
addNewAsset(state) {
|
||||||
state.onTemplatelist = false
|
state.newAsset = true
|
||||||
state.onCustomerTemplatelist = false
|
state.editable = false
|
||||||
state.onTemplate = false
|
state.filtered = false
|
||||||
state.onInstancelist = false
|
state.searchable = false
|
||||||
state.onInstance = true
|
state.onAssetlist = false
|
||||||
|
state.onAsset = true
|
||||||
|
state.onSolutionlistAsset = false
|
||||||
},
|
},
|
||||||
|
|
||||||
// functions to change the solution pages
|
// functions to change the solution pages
|
||||||
changeToSolutionlist(state) {
|
changeToSolutionlist(state) {
|
||||||
state.onSolutionlist = true
|
state.onSolutionlist = true
|
||||||
state.onCustomerSolutionlist = false
|
|
||||||
state.onSolution = false
|
state.onSolution = false
|
||||||
|
|
||||||
|
state.addIcon = true
|
||||||
|
state.addSolutionIcon = false
|
||||||
|
state.solutionIcon = false
|
||||||
|
state.addInstanceIcon = false
|
||||||
|
state.filterIcon = true
|
||||||
|
state.searchIcon = true
|
||||||
|
state.instancesIcon = false
|
||||||
|
state.attachmentsIcon = false
|
||||||
|
state.sellIcon = false
|
||||||
|
state.archiveIcon = false
|
||||||
|
state.editIcon = false
|
||||||
|
state.deleteIcon = false
|
||||||
},
|
},
|
||||||
changeToCustomerSolutionlist(state) {
|
changeToCustomerSolutionlist(state) {
|
||||||
state.onSolutionlist = false
|
state.onSolutionlist = false
|
||||||
state.onCustomerSolutionlist = true
|
|
||||||
state.onSolution = false
|
state.onSolution = false
|
||||||
|
|
||||||
|
state.addIcon = true
|
||||||
|
state.addSolutionIcon = false
|
||||||
|
state.solutionIcon = false
|
||||||
|
state.addInstanceIcon = false
|
||||||
|
state.filterIcon = true
|
||||||
|
state.searchIcon = true
|
||||||
|
state.instancesIcon = false
|
||||||
|
state.attachmentsIcon = false
|
||||||
|
state.sellIcon = false
|
||||||
|
state.archiveIcon = false
|
||||||
|
state.editIcon = false
|
||||||
|
state.deleteIcon = false
|
||||||
},
|
},
|
||||||
changeToSolution(state) {
|
changeToSolution(state) {
|
||||||
state.onSolutionlist = false
|
state.onSolutionlist = false
|
||||||
state.onCustomerSolutionlist = false
|
|
||||||
state.onSolution = true
|
state.onSolution = true
|
||||||
|
|
||||||
|
state.addIcon = false
|
||||||
|
state.addSolutionIcon = false
|
||||||
|
state.solutionIcon = false
|
||||||
|
state.addInstanceIcon = false
|
||||||
|
state.filterIcon = false
|
||||||
|
state.searchIcon = false
|
||||||
|
state.instancesIcon = false
|
||||||
|
state.attachmentsIcon = true
|
||||||
|
state.sellIcon = false
|
||||||
|
state.archiveIcon = false
|
||||||
|
state.editIcon = true
|
||||||
|
state.deleteIcon = true
|
||||||
},
|
},
|
||||||
|
|
||||||
// functions to change the issue slip pages
|
// functions to change the issue slip pages
|
||||||
changeToIssueSliplist(state) {
|
changeToIssueSliplist(state) {
|
||||||
state.onIssueSliplist = true
|
state.onIssueSliplist = true
|
||||||
state.onCustomerIssueSliplist = false
|
|
||||||
state.onIssueSlip = false
|
state.onIssueSlip = false
|
||||||
|
|
||||||
|
state.addIcon = true
|
||||||
|
state.addSolutionIcon = false
|
||||||
|
state.solutionIcon = false
|
||||||
|
state.addInstanceIcon = false
|
||||||
|
state.filterIcon = true
|
||||||
|
state.searchIcon = true
|
||||||
|
state.instancesIcon = false
|
||||||
|
state.attachmentsIcon = false
|
||||||
|
state.sellIcon = false
|
||||||
|
state.archiveIcon = false
|
||||||
|
state.editIcon = false
|
||||||
|
state.deleteIcon = false
|
||||||
},
|
},
|
||||||
changeToCustomerIssueSliplist(state) {
|
changeToCustomerIssueSliplist(state) {
|
||||||
state.onIssueSliplist = false
|
state.onIssueSliplist = false
|
||||||
state.onCustomerIssueSliplist = true
|
|
||||||
state.onIssueSlip = false
|
state.onIssueSlip = false
|
||||||
|
|
||||||
|
state.addIcon = true
|
||||||
|
state.addSolutionIcon = false
|
||||||
|
state.solutionIcon = false
|
||||||
|
state.addInstanceIcon = false
|
||||||
|
state.filterIcon = true
|
||||||
|
state.searchIcon = true
|
||||||
|
state.instancesIcon = false
|
||||||
|
state.attachmentsIcon = false
|
||||||
|
state.sellIcon = false
|
||||||
|
state.archiveIcon = false
|
||||||
|
state.editIcon = false
|
||||||
|
state.deleteIcon = false
|
||||||
},
|
},
|
||||||
changeToIssueSlip(state) {
|
changeToIssueSlip(state) {
|
||||||
state.onIssueSliplist = false
|
state.onIssueSliplist = false
|
||||||
state.onCustomerIssueSliplist = false
|
|
||||||
state.onIssueSlip = true
|
state.onIssueSlip = true
|
||||||
|
|
||||||
|
state.addIcon = false
|
||||||
|
state.addSolutionIcon = false
|
||||||
|
state.solutionIcon = false
|
||||||
|
state.addInstanceIcon = false
|
||||||
|
state.filterIcon = false
|
||||||
|
state.searchIcon = false
|
||||||
|
state.instancesIcon = false
|
||||||
|
state.attachmentsIcon = true
|
||||||
|
state.sellIcon = false
|
||||||
|
state.archiveIcon = false
|
||||||
|
state.editIcon = true
|
||||||
|
state.deleteIcon = true
|
||||||
},
|
},
|
||||||
|
|
||||||
// functions to change the issue pages
|
// functions to change the issue pages
|
||||||
@ -252,16 +435,55 @@ const store = createStore({
|
|||||||
state.onIssueItemList = true
|
state.onIssueItemList = true
|
||||||
state.onIssueItem = false
|
state.onIssueItem = false
|
||||||
state.onIssueItemVariant = false
|
state.onIssueItemVariant = false
|
||||||
|
|
||||||
|
state.addIcon = true
|
||||||
|
state.addSolutionIcon = false
|
||||||
|
state.solutionIcon = false
|
||||||
|
state.addInstanceIcon = false
|
||||||
|
state.filterIcon = true
|
||||||
|
state.searchIcon = true
|
||||||
|
state.instancesIcon = false
|
||||||
|
state.attachmentsIcon = false
|
||||||
|
state.sellIcon = false
|
||||||
|
state.archiveIcon = false
|
||||||
|
state.editIcon = false
|
||||||
|
state.deleteIcon = false
|
||||||
},
|
},
|
||||||
changeToIssueItem(state) {
|
changeToIssueItem(state) {
|
||||||
state.onIssueItemList = false
|
state.onIssueItemList = false
|
||||||
state.onIssueItem = true
|
state.onIssueItem = true
|
||||||
state.onIssueItemVariant = false
|
state.onIssueItemVariant = false
|
||||||
|
|
||||||
|
state.addIcon = false
|
||||||
|
state.addSolutionIcon = false
|
||||||
|
state.solutionIcon = false
|
||||||
|
state.addInstanceIcon = false
|
||||||
|
state.filterIcon = true
|
||||||
|
state.searchIcon = true
|
||||||
|
state.instancesIcon = false
|
||||||
|
state.attachmentsIcon = false
|
||||||
|
state.sellIcon = false
|
||||||
|
state.archiveIcon = true
|
||||||
|
state.editIcon = true
|
||||||
|
state.deleteIcon = true
|
||||||
},
|
},
|
||||||
changeToIssueItemVariant(state) {
|
changeToIssueItemVariant(state) {
|
||||||
state.onIssueItemList = false
|
state.onIssueItemList = false
|
||||||
state.onIssueItem = false
|
state.onIssueItem = false
|
||||||
state.onIssueItemVariant = true
|
state.onIssueItemVariant = true
|
||||||
|
|
||||||
|
state.addIcon = false
|
||||||
|
state.addSolutionIcon = false
|
||||||
|
state.solutionIcon = false
|
||||||
|
state.addInstanceIcon = false
|
||||||
|
state.filterIcon = false
|
||||||
|
state.searchIcon = false
|
||||||
|
state.instancesIcon = false
|
||||||
|
state.attachmentsIcon = false
|
||||||
|
state.sellIcon = true
|
||||||
|
state.archiveIcon = true
|
||||||
|
state.editIcon = true
|
||||||
|
state.deleteIcon = true
|
||||||
},
|
},
|
||||||
|
|
||||||
// functions to update the asset
|
// functions to update the asset
|
||||||
@ -413,10 +635,10 @@ const store = createStore({
|
|||||||
state.searchable = false
|
state.searchable = false
|
||||||
state.deleteBool = false
|
state.deleteBool = false
|
||||||
state.chosenAssetId = -1
|
state.chosenAssetId = -1
|
||||||
state.filteredByClient = ''
|
state.filteredByCustomer = ''
|
||||||
state.new = false
|
state.new = false
|
||||||
state.clientChanged = false
|
state.customerChanged = false
|
||||||
state.changedClientId = -1
|
state.changedCustomerId = -1
|
||||||
|
|
||||||
// reset the asset page variables
|
// reset the asset page variables
|
||||||
state.newAssetName = ''
|
state.newAssetName = ''
|
||||||
@ -521,8 +743,8 @@ const store = createStore({
|
|||||||
},
|
},
|
||||||
|
|
||||||
// function to update the asset filter
|
// function to update the asset filter
|
||||||
updateFilterbyClient(state, client) {
|
updateFilterbyCustomer(state, customer) {
|
||||||
state.filteredByClient = client
|
state.filteredByCustomer = customer
|
||||||
},
|
},
|
||||||
|
|
||||||
// function to get to the add page
|
// function to get to the add page
|
||||||
@ -534,25 +756,21 @@ const store = createStore({
|
|||||||
|
|
||||||
// set the asset variables
|
// set the asset variables
|
||||||
state.onAssetlist = false
|
state.onAssetlist = false
|
||||||
state.onCustomerAssetlist = false
|
|
||||||
state.onAsset = true
|
state.onAsset = true
|
||||||
state.onSolutionlistAsset = false
|
state.onSolutionlistAsset = false
|
||||||
|
|
||||||
// set the production order and maintenance visit variables
|
// set the production order and maintenance visit variables
|
||||||
state.onTemplatelist = false
|
state.onTemplatelist = false
|
||||||
state.onCustomerTemplatelist = false
|
|
||||||
state.onTemplate = true
|
state.onTemplate = true
|
||||||
state.onInstancelist = false
|
state.onInstancelist = false
|
||||||
state.onInstance = false
|
state.onInstance = false
|
||||||
|
|
||||||
// set the solution variables
|
// set the solution variables
|
||||||
state.onSolutionlist = false
|
state.onSolutionlist = false
|
||||||
state.onCustomerSolutionlist = false
|
|
||||||
state.onSolution = true
|
state.onSolution = true
|
||||||
|
|
||||||
// set the issue slips variables
|
// set the issue slips variables
|
||||||
state.onIssueSliplist = false
|
state.onIssueSliplist = false
|
||||||
state.onCustomerIssueSliplist = false
|
|
||||||
state.onIssueSlip = true
|
state.onIssueSlip = true
|
||||||
|
|
||||||
// set the issue variables
|
// set the issue variables
|
||||||
|
|||||||
3
public/icons/actionbar-icons/Departments-Icon.svg
Normal file
3
public/icons/actionbar-icons/Departments-Icon.svg
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
<svg xmlns="http://www.w3.org/2000/svg" width="12" height="11" fill="none" viewBox="0 0 12 11">
|
||||||
|
<path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" d="M5 7v2c0 .6-.4 1-1 1H2a1 1 0 0 1-1-1V7c0-.6.4-1 1-1h2c.6 0 1 .4 1 1Zm3-5v2c0 .6-.4 1-1 1H5a1 1 0 0 1-1-1V2c0-.6.4-1 1-1h2c.6 0 1 .4 1 1Zm3 5v2c0 .6-.4 1-1 1H8a1 1 0 0 1-1-1V7c0-.6.4-1 1-1h2c.6 0 1 .4 1 1Zm-8 .5V6m3-3.5V1m3 6.5V6"/>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 415 B |
7
public/icons/actionbar-icons/Employees-Icon.svg
Normal file
7
public/icons/actionbar-icons/Employees-Icon.svg
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
<svg xmlns="http://www.w3.org/2000/svg" width="12" height="11" fill="none" viewBox="0 0 12 11">
|
||||||
|
<path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="0.75" d="M7.5 5.5v-.3a1.7 1.7 0 1 1 3.5 0v.3"/>
|
||||||
|
<path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="0.75" d="M9.3 3.5a1 1 0 1 0 0-2 1 1 0 0 0 0 2ZM6 2.5a1 1 0 1 0 0-2 1 1 0 0 0 0 2Zm-5 3v-.3a1.7 1.7 0 1 1 3.5 0v.3"/>
|
||||||
|
<path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="0.75" d="M2.8 3.5a1 1 0 1 0 0-2 1 1 0 0 0 0 2Z"/>
|
||||||
|
<path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" d="M3 9.9v-.5a3 3 0 1 1 6 0v.5"/>
|
||||||
|
<path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" d="M6 6.4A1.7 1.7 0 1 0 6 3a1.7 1.7 0 0 0 0 3.4Z"/>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 831 B |
|
Before Width: | Height: | Size: 506 B After Width: | Height: | Size: 506 B |
@ -1,6 +1,6 @@
|
|||||||
// import { createRouter, createWebHistory } from 'vue-router';
|
// import { createRouter, createWebHistory } from 'vue-router';
|
||||||
// import HomePage from '../pages/home.vue';
|
// import HomePage from '../pages/home.vue';
|
||||||
// import ClientsPage from '../pages/clients.vue';
|
// import CustomersPage from '../pages/customers.vue';
|
||||||
// import LoginPage from '../pages/login.vue';
|
// import LoginPage from '../pages/login.vue';
|
||||||
// import AssetPage from '../pages/assets.vue';
|
// import AssetPage from '../pages/assets.vue';
|
||||||
// import SolutionPage from '../pages/solutions.vue';
|
// import SolutionPage from '../pages/solutions.vue';
|
||||||
@ -52,8 +52,8 @@
|
|||||||
// component: IssuesPages
|
// component: IssuesPages
|
||||||
// },
|
// },
|
||||||
// {
|
// {
|
||||||
// path: '/clients',
|
// path: '/customers',
|
||||||
// component: ClientsPage
|
// component: CustomersPage
|
||||||
// },
|
// },
|
||||||
// {
|
// {
|
||||||
// path: '/settings',
|
// path: '/settings',
|
||||||
|
|||||||
@ -7,6 +7,7 @@ export default defineEventHandler(async (event) => {
|
|||||||
'Access-Control-Allow-Origin': 'https://tueitapp.tueit.de',
|
'Access-Control-Allow-Origin': 'https://tueitapp.tueit.de',
|
||||||
'Access-Control-Allow-Headers': 'authorization, content-type',
|
'Access-Control-Allow-Headers': 'authorization, content-type',
|
||||||
'Access-Control-Allow-Methods': 'OPTIONS,GET,HEAD,PUT,PATCH,POST,DELETE',
|
'Access-Control-Allow-Methods': 'OPTIONS,GET,HEAD,PUT,PATCH,POST,DELETE',
|
||||||
|
'Access-Control-Allow-Credentials': 'true',
|
||||||
};
|
};
|
||||||
setResponseHeaders(event, headers)
|
setResponseHeaders(event, headers)
|
||||||
|
|
||||||
|
|||||||
@ -7,6 +7,7 @@ export default defineEventHandler(async (event) => {
|
|||||||
'Access-Control-Allow-Origin': 'https://tueitapp.tueit.de',
|
'Access-Control-Allow-Origin': 'https://tueitapp.tueit.de',
|
||||||
'Access-Control-Allow-Headers': 'authorization, content-type',
|
'Access-Control-Allow-Headers': 'authorization, content-type',
|
||||||
'Access-Control-Allow-Methods': 'OPTIONS,GET,HEAD,PUT,PATCH,POST,DELETE',
|
'Access-Control-Allow-Methods': 'OPTIONS,GET,HEAD,PUT,PATCH,POST,DELETE',
|
||||||
|
'Access-Control-Allow-Credentials': 'true',
|
||||||
};
|
};
|
||||||
setResponseHeaders(event, headers)
|
setResponseHeaders(event, headers)
|
||||||
|
|
||||||
|
|||||||
@ -7,6 +7,7 @@ export default defineEventHandler(async (event) => {
|
|||||||
'Access-Control-Allow-Origin': 'https://tueitapp.tueit.de',
|
'Access-Control-Allow-Origin': 'https://tueitapp.tueit.de',
|
||||||
'Access-Control-Allow-Headers': 'authorization, content-type',
|
'Access-Control-Allow-Headers': 'authorization, content-type',
|
||||||
'Access-Control-Allow-Methods': 'OPTIONS,GET,HEAD,PUT,PATCH,POST,DELETE',
|
'Access-Control-Allow-Methods': 'OPTIONS,GET,HEAD,PUT,PATCH,POST,DELETE',
|
||||||
|
'Access-Control-Allow-Credentials': 'true',
|
||||||
};
|
};
|
||||||
setResponseHeaders(event, headers)
|
setResponseHeaders(event, headers)
|
||||||
|
|
||||||
|
|||||||
@ -7,6 +7,7 @@ export default defineEventHandler(async (event) => {
|
|||||||
'Access-Control-Allow-Origin': 'https://tueitapp.tueit.de',
|
'Access-Control-Allow-Origin': 'https://tueitapp.tueit.de',
|
||||||
'Access-Control-Allow-Headers': 'authorization, content-type',
|
'Access-Control-Allow-Headers': 'authorization, content-type',
|
||||||
'Access-Control-Allow-Methods': 'OPTIONS,GET,HEAD,PUT,PATCH,POST,DELETE',
|
'Access-Control-Allow-Methods': 'OPTIONS,GET,HEAD,PUT,PATCH,POST,DELETE',
|
||||||
|
'Access-Control-Allow-Credentials': 'true',
|
||||||
};
|
};
|
||||||
setResponseHeaders(event, headers)
|
setResponseHeaders(event, headers)
|
||||||
|
|
||||||
|
|||||||
@ -7,6 +7,7 @@ export default defineEventHandler(async (event) => {
|
|||||||
'Access-Control-Allow-Origin': 'https://tueitapp.tueit.de',
|
'Access-Control-Allow-Origin': 'https://tueitapp.tueit.de',
|
||||||
'Access-Control-Allow-Headers': 'authorization, content-type',
|
'Access-Control-Allow-Headers': 'authorization, content-type',
|
||||||
'Access-Control-Allow-Methods': 'OPTIONS,GET,HEAD,PUT,PATCH,POST,DELETE',
|
'Access-Control-Allow-Methods': 'OPTIONS,GET,HEAD,PUT,PATCH,POST,DELETE',
|
||||||
|
'Access-Control-Allow-Credentials': 'true',
|
||||||
};
|
};
|
||||||
setResponseHeaders(event, headers)
|
setResponseHeaders(event, headers)
|
||||||
|
|
||||||
|
|||||||
@ -7,6 +7,7 @@ export default defineEventHandler(async (event) => {
|
|||||||
'Access-Control-Allow-Origin': 'https://tueitapp.tueit.de',
|
'Access-Control-Allow-Origin': 'https://tueitapp.tueit.de',
|
||||||
'Access-Control-Allow-Headers': 'authorization, content-type',
|
'Access-Control-Allow-Headers': 'authorization, content-type',
|
||||||
'Access-Control-Allow-Methods': 'OPTIONS,GET,HEAD,PUT,PATCH,POST,DELETE',
|
'Access-Control-Allow-Methods': 'OPTIONS,GET,HEAD,PUT,PATCH,POST,DELETE',
|
||||||
|
'Access-Control-Allow-Credentials': 'true',
|
||||||
};
|
};
|
||||||
setResponseHeaders(event, headers)
|
setResponseHeaders(event, headers)
|
||||||
|
|
||||||
|
|||||||
@ -7,6 +7,7 @@ export default defineEventHandler(async (event) => {
|
|||||||
'Access-Control-Allow-Origin': 'https://tueitapp.tueit.de',
|
'Access-Control-Allow-Origin': 'https://tueitapp.tueit.de',
|
||||||
'Access-Control-Allow-Headers': 'authorization, content-type',
|
'Access-Control-Allow-Headers': 'authorization, content-type',
|
||||||
'Access-Control-Allow-Methods': 'OPTIONS,GET,HEAD,PUT,PATCH,POST,DELETE',
|
'Access-Control-Allow-Methods': 'OPTIONS,GET,HEAD,PUT,PATCH,POST,DELETE',
|
||||||
|
'Access-Control-Allow-Credentials': 'true',
|
||||||
};
|
};
|
||||||
setResponseHeaders(event, headers)
|
setResponseHeaders(event, headers)
|
||||||
|
|
||||||
|
|||||||
@ -7,6 +7,7 @@ export default defineEventHandler(async (event) => {
|
|||||||
'Access-Control-Allow-Origin': 'https://tueitapp.tueit.de',
|
'Access-Control-Allow-Origin': 'https://tueitapp.tueit.de',
|
||||||
'Access-Control-Allow-Headers': 'authorization, content-type',
|
'Access-Control-Allow-Headers': 'authorization, content-type',
|
||||||
'Access-Control-Allow-Methods': 'OPTIONS,GET,HEAD,PUT,PATCH,POST,DELETE',
|
'Access-Control-Allow-Methods': 'OPTIONS,GET,HEAD,PUT,PATCH,POST,DELETE',
|
||||||
|
'Access-Control-Allow-Credentials': 'true',
|
||||||
};
|
};
|
||||||
setResponseHeaders(event, headers)
|
setResponseHeaders(event, headers)
|
||||||
|
|
||||||
|
|||||||
@ -7,6 +7,7 @@ export default defineEventHandler(async (event) => {
|
|||||||
'Access-Control-Allow-Origin': 'https://tueitapp.tueit.de',
|
'Access-Control-Allow-Origin': 'https://tueitapp.tueit.de',
|
||||||
'Access-Control-Allow-Headers': 'authorization, content-type',
|
'Access-Control-Allow-Headers': 'authorization, content-type',
|
||||||
'Access-Control-Allow-Methods': 'OPTIONS,GET,HEAD,PUT,PATCH,POST,DELETE',
|
'Access-Control-Allow-Methods': 'OPTIONS,GET,HEAD,PUT,PATCH,POST,DELETE',
|
||||||
|
'Access-Control-Allow-Credentials': 'true',
|
||||||
};
|
};
|
||||||
setResponseHeaders(event, headers)
|
setResponseHeaders(event, headers)
|
||||||
|
|
||||||
|
|||||||
@ -7,6 +7,7 @@ export default defineEventHandler(async (event) => {
|
|||||||
'Access-Control-Allow-Origin': 'https://tueitapp.tueit.de',
|
'Access-Control-Allow-Origin': 'https://tueitapp.tueit.de',
|
||||||
'Access-Control-Allow-Headers': 'authorization, content-type',
|
'Access-Control-Allow-Headers': 'authorization, content-type',
|
||||||
'Access-Control-Allow-Methods': 'OPTIONS,GET,HEAD,PUT,PATCH,POST,DELETE',
|
'Access-Control-Allow-Methods': 'OPTIONS,GET,HEAD,PUT,PATCH,POST,DELETE',
|
||||||
|
'Access-Control-Allow-Credentials': 'true',
|
||||||
};
|
};
|
||||||
setResponseHeaders(event, headers)
|
setResponseHeaders(event, headers)
|
||||||
|
|
||||||
|
|||||||
@ -7,6 +7,7 @@ export default defineEventHandler(async (event) => {
|
|||||||
'Access-Control-Allow-Origin': 'https://tueitapp.tueit.de',
|
'Access-Control-Allow-Origin': 'https://tueitapp.tueit.de',
|
||||||
'Access-Control-Allow-Headers': 'authorization, content-type',
|
'Access-Control-Allow-Headers': 'authorization, content-type',
|
||||||
'Access-Control-Allow-Methods': 'OPTIONS,GET,HEAD,PUT,PATCH,POST,DELETE',
|
'Access-Control-Allow-Methods': 'OPTIONS,GET,HEAD,PUT,PATCH,POST,DELETE',
|
||||||
|
'Access-Control-Allow-Credentials': 'true',
|
||||||
};
|
};
|
||||||
setResponseHeaders(event, headers)
|
setResponseHeaders(event, headers)
|
||||||
|
|
||||||
|
|||||||
95
server/api/auth/login.ts
Normal file
95
server/api/auth/login.ts
Normal file
@ -0,0 +1,95 @@
|
|||||||
|
import axios, { AxiosError } from 'axios';
|
||||||
|
import serversideConfig from '../../../serversideConfig';
|
||||||
|
import https from 'https';
|
||||||
|
|
||||||
|
let errorMsg = 'error';
|
||||||
|
//const { data } = useAuthState()
|
||||||
|
|
||||||
|
|
||||||
|
export default eventHandler(async (event) => {
|
||||||
|
|
||||||
|
const agent = new https.Agent({
|
||||||
|
rejectUnauthorized: false,
|
||||||
|
});
|
||||||
|
const axiosInstance = axios.create({
|
||||||
|
headers: {
|
||||||
|
'Content-Type': 'application/json',
|
||||||
|
Accept: "*",
|
||||||
|
},
|
||||||
|
httpsAgent: agent
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
const body = await readBody(event)
|
||||||
|
|
||||||
|
// get user object from backend
|
||||||
|
try {
|
||||||
|
let res = await axiosInstance.post(`https://${serversideConfig.url}:${serversideConfig.port}/login`, {
|
||||||
|
username: body.username,
|
||||||
|
password: body.password,
|
||||||
|
});
|
||||||
|
const sessionToken = res.data.token;
|
||||||
|
const user = res.data.user;
|
||||||
|
|
||||||
|
console.log('sessionToken: ', sessionToken);
|
||||||
|
console.log('user: ', user);
|
||||||
|
|
||||||
|
setResponseStatus(event, 200);
|
||||||
|
const resBody = {
|
||||||
|
token: sessionToken,
|
||||||
|
message: 'Login successful'
|
||||||
|
};
|
||||||
|
console.log('resBody: ', resBody);
|
||||||
|
|
||||||
|
return resBody;
|
||||||
|
}
|
||||||
|
catch (err) {
|
||||||
|
if (axios.isAxiosError(err)) {
|
||||||
|
const axiosError = err as AxiosError;
|
||||||
|
|
||||||
|
if (axiosError.response) {
|
||||||
|
// Axios error
|
||||||
|
//console.error(axiosError.response.data.message);
|
||||||
|
//errorMsg = axiosError.response.data.message;
|
||||||
|
} else if (axiosError.request) {
|
||||||
|
// If error was caused by the request
|
||||||
|
console.error(axiosError.request);
|
||||||
|
} else {
|
||||||
|
// Other errors
|
||||||
|
console.error('Error', axiosError.message);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
// No AxiosError
|
||||||
|
console.error('Error', err);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
throw createError({
|
||||||
|
statusCode: 400,
|
||||||
|
statusMessage: errorMsg,
|
||||||
|
})
|
||||||
|
|
||||||
|
|
||||||
|
})
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/*import { loginSuccessful, sessionToken, errorMsg } from "../../middleware/login";
|
||||||
|
import { OutgoingMessage } from 'http';
|
||||||
|
|
||||||
|
export default defineEventHandler(async (event) => {
|
||||||
|
|
||||||
|
if (!loginSuccessful) {
|
||||||
|
throw createError({
|
||||||
|
statusCode: 400,
|
||||||
|
statusMessage: errorMsg,
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
setResponseStatus(event, 200);
|
||||||
|
//setResponseHeader(event, "Set-Cookie", sessionToken);
|
||||||
|
const resBody = {
|
||||||
|
token: sessionToken,
|
||||||
|
message: 'Login successful'
|
||||||
|
};
|
||||||
|
return resBody;
|
||||||
|
})*/
|
||||||
50
server/api/auth/refresh.ts
Normal file
50
server/api/auth/refresh.ts
Normal file
@ -0,0 +1,50 @@
|
|||||||
|
import { createError, eventHandler, readBody, sendRedirect } from 'h3';
|
||||||
|
import jwt from 'jsonwebtoken';
|
||||||
|
|
||||||
|
const SECRET = 'SECRETTUEITKEY'
|
||||||
|
|
||||||
|
interface User {
|
||||||
|
username: string;
|
||||||
|
id: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
interface JwtPayload extends User {
|
||||||
|
exp: number;
|
||||||
|
}
|
||||||
|
|
||||||
|
export default eventHandler(async (event) => {
|
||||||
|
const body = await readBody<{ refreshToken: string }>(event);
|
||||||
|
|
||||||
|
if (!body.refreshToken) {
|
||||||
|
throw createError({
|
||||||
|
statusCode: 403,
|
||||||
|
statusMessage: 'Unauthorized, no refreshToken in payload'
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
const decoded = jwt.verify(body.refreshToken, SECRET) as JwtPayload | undefined;
|
||||||
|
|
||||||
|
if (!decoded) {
|
||||||
|
throw createError({
|
||||||
|
statusCode: 403,
|
||||||
|
statusMessage: 'Unauthorized, refreshToken can`t be verified'
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
// decoded.userId exists on JwtPayload, TS falsely wants decoded.id
|
||||||
|
const user: User = {
|
||||||
|
username: decoded.username,
|
||||||
|
id: decoded.userId,
|
||||||
|
};
|
||||||
|
|
||||||
|
const authToken = jwt.sign( user, SECRET, { expiresIn: 60 * 5 }); // expires in 5 min
|
||||||
|
const refreshToken = jwt.sign( user, SECRET, { expiresIn: 60 * 60 * 24 * 7 }); // expires in 7 days
|
||||||
|
|
||||||
|
return {
|
||||||
|
token: {
|
||||||
|
authToken,
|
||||||
|
refreshToken
|
||||||
|
}
|
||||||
|
};
|
||||||
|
})
|
||||||
36
server/api/auth/session.ts
Normal file
36
server/api/auth/session.ts
Normal file
@ -0,0 +1,36 @@
|
|||||||
|
import { createError, eventHandler, getRequestHeader, H3Event } from 'h3'
|
||||||
|
import jwt from 'jsonwebtoken';
|
||||||
|
|
||||||
|
const TOKEN_TYPE = 'Bearer'
|
||||||
|
|
||||||
|
const extractToken = (authHeaderValue: string) => {
|
||||||
|
const [, token] = authHeaderValue.split(`${TOKEN_TYPE} `)
|
||||||
|
return token
|
||||||
|
}
|
||||||
|
|
||||||
|
const ensureAuth = (event: H3Event) => {
|
||||||
|
const authHeaderValue = getRequestHeader(event, 'authorization')
|
||||||
|
if (typeof authHeaderValue === 'undefined') {
|
||||||
|
throw createError({
|
||||||
|
statusCode: 403,
|
||||||
|
statusMessage:
|
||||||
|
'Need to pass valid Bearer-authorization header to access this endpoint'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
const extractedToken = extractToken(authHeaderValue)
|
||||||
|
try {
|
||||||
|
return jwt.verify(extractedToken, 'SECRETTUEITKEY')
|
||||||
|
} catch (error) {
|
||||||
|
console.error("Login failed. Here's the raw error:", error)
|
||||||
|
throw createError({
|
||||||
|
statusCode: 403,
|
||||||
|
statusMessage: 'You must be logged in to access this page'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
export default eventHandler((event) => {
|
||||||
|
const user = ensureAuth(event)
|
||||||
|
return user
|
||||||
|
})
|
||||||
14
server/api/auth/signup.ts
Normal file
14
server/api/auth/signup.ts
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
import { errorMsg } from "../../middleware/signUp.js";
|
||||||
|
|
||||||
|
export default defineEventHandler(async (event) => {
|
||||||
|
|
||||||
|
if (!(errorMsg === '')) {
|
||||||
|
throw createError({
|
||||||
|
statusCode: 400,
|
||||||
|
statusMessage: errorMsg,
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
setResponseStatus(event, 202)
|
||||||
|
return 'Successfully signed up.'
|
||||||
|
})
|
||||||
@ -7,6 +7,7 @@ export default defineEventHandler(async (event) => {
|
|||||||
'Access-Control-Allow-Origin': 'https://tueitapp.tueit.de',
|
'Access-Control-Allow-Origin': 'https://tueitapp.tueit.de',
|
||||||
'Access-Control-Allow-Headers': 'authorization, content-type',
|
'Access-Control-Allow-Headers': 'authorization, content-type',
|
||||||
'Access-Control-Allow-Methods': 'OPTIONS,GET,HEAD,PUT,PATCH,POST,DELETE',
|
'Access-Control-Allow-Methods': 'OPTIONS,GET,HEAD,PUT,PATCH,POST,DELETE',
|
||||||
|
'Access-Control-Allow-Credentials': 'true',
|
||||||
};
|
};
|
||||||
setResponseHeaders(event, headers)
|
setResponseHeaders(event, headers)
|
||||||
|
|
||||||
|
|||||||
@ -7,6 +7,7 @@ export default defineEventHandler(async (event) => {
|
|||||||
'Access-Control-Allow-Origin': 'https://tueitapp.tueit.de',
|
'Access-Control-Allow-Origin': 'https://tueitapp.tueit.de',
|
||||||
'Access-Control-Allow-Headers': 'authorization, content-type',
|
'Access-Control-Allow-Headers': 'authorization, content-type',
|
||||||
'Access-Control-Allow-Methods': 'OPTIONS,GET,HEAD,PUT,PATCH,POST,DELETE',
|
'Access-Control-Allow-Methods': 'OPTIONS,GET,HEAD,PUT,PATCH,POST,DELETE',
|
||||||
|
'Access-Control-Allow-Credentials': 'true',
|
||||||
};
|
};
|
||||||
setResponseHeaders(event, headers)
|
setResponseHeaders(event, headers)
|
||||||
|
|
||||||
|
|||||||
@ -7,6 +7,7 @@ export default defineEventHandler(async (event) => {
|
|||||||
'Access-Control-Allow-Origin': 'https://tueitapp.tueit.de',
|
'Access-Control-Allow-Origin': 'https://tueitapp.tueit.de',
|
||||||
'Access-Control-Allow-Headers': 'authorization, content-type',
|
'Access-Control-Allow-Headers': 'authorization, content-type',
|
||||||
'Access-Control-Allow-Methods': 'OPTIONS,GET,HEAD,PUT,PATCH,POST,DELETE',
|
'Access-Control-Allow-Methods': 'OPTIONS,GET,HEAD,PUT,PATCH,POST,DELETE',
|
||||||
|
'Access-Control-Allow-Credentials': 'true',
|
||||||
};
|
};
|
||||||
setResponseHeaders(event, headers)
|
setResponseHeaders(event, headers)
|
||||||
|
|
||||||
|
|||||||
@ -7,6 +7,7 @@ export default defineEventHandler(async (event) => {
|
|||||||
'Access-Control-Allow-Origin': 'https://tueitapp.tueit.de',
|
'Access-Control-Allow-Origin': 'https://tueitapp.tueit.de',
|
||||||
'Access-Control-Allow-Headers': 'authorization, content-type',
|
'Access-Control-Allow-Headers': 'authorization, content-type',
|
||||||
'Access-Control-Allow-Methods': 'OPTIONS,GET,HEAD,PUT,PATCH,POST,DELETE',
|
'Access-Control-Allow-Methods': 'OPTIONS,GET,HEAD,PUT,PATCH,POST,DELETE',
|
||||||
|
'Access-Control-Allow-Credentials': 'true',
|
||||||
};
|
};
|
||||||
setResponseHeaders(event, headers)
|
setResponseHeaders(event, headers)
|
||||||
|
|
||||||
|
|||||||
@ -7,6 +7,7 @@ export default defineEventHandler(async (event) => {
|
|||||||
'Access-Control-Allow-Origin': 'https://tueitapp.tueit.de',
|
'Access-Control-Allow-Origin': 'https://tueitapp.tueit.de',
|
||||||
'Access-Control-Allow-Headers': 'authorization, content-type',
|
'Access-Control-Allow-Headers': 'authorization, content-type',
|
||||||
'Access-Control-Allow-Methods': 'OPTIONS,GET,HEAD,PUT,PATCH,POST,DELETE',
|
'Access-Control-Allow-Methods': 'OPTIONS,GET,HEAD,PUT,PATCH,POST,DELETE',
|
||||||
|
'Access-Control-Allow-Credentials': 'true',
|
||||||
};
|
};
|
||||||
setResponseHeaders(event, headers)
|
setResponseHeaders(event, headers)
|
||||||
|
|
||||||
|
|||||||
@ -7,6 +7,7 @@ export default defineEventHandler(async (event) => {
|
|||||||
'Access-Control-Allow-Origin': 'https://tueitapp.tueit.de',
|
'Access-Control-Allow-Origin': 'https://tueitapp.tueit.de',
|
||||||
'Access-Control-Allow-Headers': 'authorization, content-type',
|
'Access-Control-Allow-Headers': 'authorization, content-type',
|
||||||
'Access-Control-Allow-Methods': 'OPTIONS,GET,HEAD,PUT,PATCH,POST,DELETE',
|
'Access-Control-Allow-Methods': 'OPTIONS,GET,HEAD,PUT,PATCH,POST,DELETE',
|
||||||
|
'Access-Control-Allow-Credentials': 'true',
|
||||||
};
|
};
|
||||||
setResponseHeaders(event, headers)
|
setResponseHeaders(event, headers)
|
||||||
|
|
||||||
|
|||||||
@ -7,6 +7,7 @@ export default defineEventHandler(async (event) => {
|
|||||||
'Access-Control-Allow-Origin': 'https://tueitapp.tueit.de',
|
'Access-Control-Allow-Origin': 'https://tueitapp.tueit.de',
|
||||||
'Access-Control-Allow-Headers': 'authorization, content-type',
|
'Access-Control-Allow-Headers': 'authorization, content-type',
|
||||||
'Access-Control-Allow-Methods': 'OPTIONS,GET,HEAD,PUT,PATCH,POST,DELETE',
|
'Access-Control-Allow-Methods': 'OPTIONS,GET,HEAD,PUT,PATCH,POST,DELETE',
|
||||||
|
'Access-Control-Allow-Credentials': 'true',
|
||||||
};
|
};
|
||||||
setResponseHeaders(event, headers)
|
setResponseHeaders(event, headers)
|
||||||
|
|
||||||
|
|||||||
@ -7,6 +7,7 @@ export default defineEventHandler(async (event) => {
|
|||||||
'Access-Control-Allow-Origin': 'https://tueitapp.tueit.de',
|
'Access-Control-Allow-Origin': 'https://tueitapp.tueit.de',
|
||||||
'Access-Control-Allow-Headers': 'authorization, content-type',
|
'Access-Control-Allow-Headers': 'authorization, content-type',
|
||||||
'Access-Control-Allow-Methods': 'OPTIONS,GET,HEAD,PUT,PATCH,POST,DELETE',
|
'Access-Control-Allow-Methods': 'OPTIONS,GET,HEAD,PUT,PATCH,POST,DELETE',
|
||||||
|
'Access-Control-Allow-Credentials': 'true',
|
||||||
};
|
};
|
||||||
setResponseHeaders(event, headers)
|
setResponseHeaders(event, headers)
|
||||||
|
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user