diff --git a/deploy.sh b/deploy.sh index d749018..3053c8d 100755 --- a/deploy.sh +++ b/deploy.sh @@ -2,4 +2,6 @@ docker-compose down +docker rmi cash-register-cash-register + docker-compose up -d \ No newline at end of file diff --git a/pages/components/ExpenseForm.vue b/pages/components/ExpenseForm.vue index d3c721b..7264f8e 100644 --- a/pages/components/ExpenseForm.vue +++ b/pages/components/ExpenseForm.vue @@ -38,7 +38,10 @@ const emits = defineEmits<{ (event: 'cancel'): void; }>(); -const expenseData = ref({ ...props.expense }); +const expenseData = ref({ + ...props.expense, + date: props.expense.date || new Date().toISOString().split('T')[0] +}); const categories = ref(props.categories); diff --git a/pages/expense-form.vue b/pages/expense-form.vue index 9ceac8e..1b98e08 100644 --- a/pages/expense-form.vue +++ b/pages/expense-form.vue @@ -18,7 +18,7 @@ const newExpense = ref({ credit: 0, debit: 0, description: '', - date: '', + date: new Date().toISOString().split('T')[0], category: '', }); @@ -48,7 +48,7 @@ async function addExpense(expense: Expense) { credit: 0, debit: 0, description: '', - date: '', + date: new Date().toISOString().split('T')[0], category: '' };