Set orderDate to orderDateInput
This commit is contained in:
@@ -415,9 +415,7 @@ async function refreshData() {
|
|||||||
|
|
||||||
currentDateEl.textContent = currentDate;
|
currentDateEl.textContent = currentDate;
|
||||||
orderDateInput.min = currentDate;
|
orderDateInput.min = currentDate;
|
||||||
if (!orderDateInput.value) {
|
orderDateInput.value = currentDate
|
||||||
orderDateInput.value = currentDate;
|
|
||||||
}
|
|
||||||
|
|
||||||
renderInventory();
|
renderInventory();
|
||||||
renderOrders();
|
renderOrders();
|
||||||
@@ -444,9 +442,7 @@ function initializeApp() {
|
|||||||
currentDate = initialDate;
|
currentDate = initialDate;
|
||||||
currentDateEl.textContent = initialDate;
|
currentDateEl.textContent = initialDate;
|
||||||
orderDateInput.min = initialDate;
|
orderDateInput.min = initialDate;
|
||||||
if (!orderDateInput.value) {
|
|
||||||
orderDateInput.value = initialDate;
|
orderDateInput.value = initialDate;
|
||||||
}
|
|
||||||
|
|
||||||
orderForm.addEventListener('submit', async (event) => {
|
orderForm.addEventListener('submit', async (event) => {
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
|
|||||||
@@ -24,7 +24,7 @@ app.use(express.json());
|
|||||||
app.use((req, res, next) => {
|
app.use((req, res, next) => {
|
||||||
res.setHeader('Access-Control-Allow-Origin', '*');
|
res.setHeader('Access-Control-Allow-Origin', '*');
|
||||||
res.setHeader('Access-Control-Allow-Headers', 'Content-Type');
|
res.setHeader('Access-Control-Allow-Headers', 'Content-Type');
|
||||||
res.setHeader('Access-Control-Allow-Methods', 'GET,POST,PUT,DELETE');
|
res.setHeader('Access-Control-Allow-Methods', 'GET,POST,PUT,DELETE,OPTIONS');
|
||||||
if (req.method === 'OPTIONS') {
|
if (req.method === 'OPTIONS') {
|
||||||
res.sendStatus(204);
|
res.sendStatus(204);
|
||||||
return;
|
return;
|
||||||
|
|||||||
Reference in New Issue
Block a user