1
0
mirror of https://github.com/lana-k/sqliteviz.git synced 2025-12-07 02:28:54 +08:00

fix tests

This commit is contained in:
lana-k
2025-10-03 22:13:33 +02:00
parent d3fbf08569
commit 6fbf75b601
7 changed files with 45 additions and 33 deletions

View File

@@ -1,16 +1,13 @@
<template>
<div id="app">
<router-view />
<modals-container />
</div>
</template>
<script>
import storedInquiries from '@/lib/storedInquiries'
import { ModalsContainer } from 'vue-final-modal'
export default {
components: { ModalsContainer },
computed: {
inquiries() {
return this.$store.state.inquiries

View File

@@ -30,14 +30,16 @@ export default {
let inquiryIndex
// Set createdAt
if (newName) {
value.createdAt = new Date()
value.createdAt = new Date().toJSON()
} else {
inquiryIndex = myInquiries.findIndex(
oldInquiry => oldInquiry.id === inquiryTab.id
)
value.createdAt =
inquiryIndex !== -1 ? myInquiries[inquiryIndex].createdAt : new Date()
inquiryIndex !== -1
? myInquiries[inquiryIndex].createdAt
: new Date().toJSON()
}
// Insert in inquiries list