Updated variables
This commit is contained in:
3
.dockerignore
Executable file
3
.dockerignore
Executable file
@@ -0,0 +1,3 @@
|
|||||||
|
node_modules/
|
||||||
|
.svelte-kit
|
||||||
|
.idea
|
||||||
19
.gitignore
vendored
Executable file
19
.gitignore
vendored
Executable file
@@ -0,0 +1,19 @@
|
|||||||
|
.DS_Store
|
||||||
|
node_modules
|
||||||
|
package-lock.json
|
||||||
|
/build
|
||||||
|
/.svelte-kit
|
||||||
|
/package
|
||||||
|
.env
|
||||||
|
.env.*
|
||||||
|
!.env.example
|
||||||
|
vite.config.js.timestamp-*
|
||||||
|
vite.config.ts.timestamp-*
|
||||||
|
/.idea/.gitignore
|
||||||
|
/.idea/auburnoil_frontend.iml
|
||||||
|
/.idea/misc.xml
|
||||||
|
/.idea/modules.xml
|
||||||
|
/.idea/inspectionProfiles/profiles_settings.xml
|
||||||
|
/.idea/inspectionProfiles/Project_Default.xml
|
||||||
|
/.idea/vcs.xml
|
||||||
|
*.pyc
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
FROM node:latest
|
FROM node:latest
|
||||||
|
|
||||||
ENV PUBLIC_BASE_URL=http://localhost:4056
|
ENV PUBLIC_BASE_URL=http://localhost:5170
|
||||||
|
|
||||||
RUN mkdir -p /app
|
RUN mkdir -p /app
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,7 @@
|
|||||||
|
|
||||||
FROM node:20.11.1 AS builder
|
FROM node:20.11.1 AS builder
|
||||||
|
|
||||||
|
ENV PUBLIC_BASE_URL=https://api.auburnoil.com
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
COPY package*.json .
|
COPY package*.json .
|
||||||
RUN npm ci
|
RUN npm ci
|
||||||
@@ -8,6 +10,7 @@ RUN npm run build
|
|||||||
RUN npm prune --production
|
RUN npm prune --production
|
||||||
|
|
||||||
FROM node:20.11.1
|
FROM node:20.11.1
|
||||||
|
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
COPY --from=builder /app/build build/
|
COPY --from=builder /app/build build/
|
||||||
COPY --from=builder /app/node_modules node_modules/
|
COPY --from=builder /app/node_modules node_modules/
|
||||||
|
|||||||
@@ -2,12 +2,96 @@
|
|||||||
|
|
||||||
export type oilprice = {
|
export type oilprice = {
|
||||||
ok: boolean
|
ok: boolean
|
||||||
price_for_employee: string;
|
todays_price: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
export type company = {
|
export type company = {
|
||||||
ok: boolean
|
ok: boolean
|
||||||
name: string;
|
company_name: string;
|
||||||
telephone: string;
|
company_phone_number: string;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
export type deliverytype = {
|
||||||
|
ok: boolean
|
||||||
|
id: number;
|
||||||
|
customer_id: string;
|
||||||
|
customer_name: string;
|
||||||
|
customer_address: string;
|
||||||
|
customer_town: string;
|
||||||
|
customer_state: number;
|
||||||
|
customer_zip: string;
|
||||||
|
gallons_ordered: number;
|
||||||
|
customer_asked_for_fill: number;
|
||||||
|
gallons_delivered: string;
|
||||||
|
customer_filled: number;
|
||||||
|
delivery_status: number;
|
||||||
|
when_ordered: string;
|
||||||
|
when_delivered: string;
|
||||||
|
expected_delivery_date: string;
|
||||||
|
automatic: number;
|
||||||
|
oil_id: number;
|
||||||
|
supplier_price: string;
|
||||||
|
customer_price: string;
|
||||||
|
customer_temperature: string;
|
||||||
|
dispatcher_notes: string;
|
||||||
|
prime: number;
|
||||||
|
same_day: number;
|
||||||
|
payment_type: number;
|
||||||
|
payment_card_id: number;
|
||||||
|
driver_employee_id: number;
|
||||||
|
driver_first_name: string;
|
||||||
|
driver_last_name: string;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
export type customertype = {
|
||||||
|
ok: boolean
|
||||||
|
id: number;
|
||||||
|
user_id: number;
|
||||||
|
customer_first_name: string;
|
||||||
|
customer_last_name: string;
|
||||||
|
customer_town: string;
|
||||||
|
customer_address: string;
|
||||||
|
customer_state: number;
|
||||||
|
customer_zip: string;
|
||||||
|
customer_apt: string;
|
||||||
|
customer_home_type: number;
|
||||||
|
customer_phone_number: string;
|
||||||
|
account_number: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
export type pastdeliverytype = {
|
||||||
|
ok: boolean
|
||||||
|
id: number;
|
||||||
|
customer_id: string;
|
||||||
|
customer_name: string;
|
||||||
|
customer_address: string;
|
||||||
|
customer_town: string;
|
||||||
|
customer_state: number;
|
||||||
|
customer_zip: string;
|
||||||
|
gallons_ordered: number;
|
||||||
|
customer_asked_for_fill: number;
|
||||||
|
gallons_delivered: string;
|
||||||
|
customer_filled: number;
|
||||||
|
delivery_status: number;
|
||||||
|
when_ordered: string;
|
||||||
|
when_delivered: string;
|
||||||
|
expected_delivery_date: string;
|
||||||
|
automatic: number;
|
||||||
|
oil_id: number;
|
||||||
|
supplier_price: string;
|
||||||
|
customer_price: string;
|
||||||
|
customer_temperature: string;
|
||||||
|
dispatcher_notes: string;
|
||||||
|
prime: number;
|
||||||
|
same_day: number;
|
||||||
|
payment_type: number;
|
||||||
|
payment_card_id: number;
|
||||||
|
driver_employee_id: number;
|
||||||
|
driver_first_name: string;
|
||||||
|
driver_last_name: string;
|
||||||
|
}
|
||||||
@@ -9,10 +9,10 @@
|
|||||||
|
|
||||||
let price_of_oil: string = '';
|
let price_of_oil: string = '';
|
||||||
let company_name: string = '';
|
let company_name: string = '';
|
||||||
let tel_number: string = '';
|
let company_phone_number: string = '';
|
||||||
|
|
||||||
onMount(async () => {
|
onMount(async () => {
|
||||||
await fetch(PUBLIC_BASE_URL + "/info/price/oil", {
|
await fetch(PUBLIC_BASE_URL + "/info/price/today", {
|
||||||
method: "get",
|
method: "get",
|
||||||
credentials: "include",
|
credentials: "include",
|
||||||
headers: {
|
headers: {
|
||||||
@@ -23,8 +23,7 @@
|
|||||||
.then((result) => (oil_price_data = result));
|
.then((result) => (oil_price_data = result));
|
||||||
|
|
||||||
if (oil_price_data["ok"] == true) {
|
if (oil_price_data["ok"] == true) {
|
||||||
console.log("here")
|
price_of_oil = oil_price_data["todays_price"];
|
||||||
price_of_oil = oil_price_data["price_for_employee"];
|
|
||||||
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@@ -40,8 +39,8 @@
|
|||||||
.then((result) => (company_data = result));
|
.then((result) => (company_data = result));
|
||||||
|
|
||||||
if (company_data["ok"] == true) {
|
if (company_data["ok"] == true) {
|
||||||
company_name = company_data["name"];
|
company_name = company_data["company_name"];
|
||||||
tel_number = company_data["telephone"];
|
company_phone_number = company_data["company_phone_number"];
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
@@ -49,13 +48,13 @@
|
|||||||
<div class="grid grid-cols-12 bg-white overflow-hidden">
|
<div class="grid grid-cols-12 bg-white overflow-hidden">
|
||||||
<div class="col-span-12 md:col-span-3 text-3xl p-10 text-base-100 font-bold invisible md:visible h-0 md:h-auto">
|
<div class="col-span-12 md:col-span-3 text-3xl p-10 text-base-100 font-bold invisible md:visible h-0 md:h-auto">
|
||||||
<div class="text-center pt-5">Call Today</div>
|
<div class="text-center pt-5">Call Today</div>
|
||||||
<div class="text-center">{tel_number}</div>
|
<div class="text-center">{company_phone_number}</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="col-span-12 md:col-span-6 md:p-10 text-center font-bold ">
|
<div class="col-span-12 md:col-span-6 md:p-10 text-center font-bold ">
|
||||||
<div class="flex justify-center">
|
<div class="md:flex md:justify-center pb-5 md:pb-0 gap-5">
|
||||||
<a
|
<a
|
||||||
class="normal-case text-8xl text-white bg-primary"
|
class="normal-case text-8xl text-primary"
|
||||||
href="/"
|
href="/"
|
||||||
>
|
>
|
||||||
Auburn
|
Auburn
|
||||||
@@ -68,7 +67,7 @@
|
|||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
<a
|
<a
|
||||||
class="normal-case text-3xl text-primary text-primary"
|
class="normal-case text-3xl text-primary "
|
||||||
href="/">Oil thats good for your system</a
|
href="/">Oil thats good for your system</a
|
||||||
>
|
>
|
||||||
</div>
|
</div>
|
||||||
@@ -78,7 +77,7 @@
|
|||||||
class=" col-span-12 md:col-span-3 md:p-10 text-3xl text-base-100 font-bold"
|
class=" col-span-12 md:col-span-3 md:p-10 text-3xl text-base-100 font-bold"
|
||||||
>
|
>
|
||||||
<div class="text-center pt-5">Todays Price</div>
|
<div class="text-center pt-5">Todays Price</div>
|
||||||
<div class="text-center">{price_of_oil}</div>
|
<div class="text-center">${price_of_oil}</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
@@ -107,6 +106,7 @@
|
|||||||
tabindex="0"
|
tabindex="0"
|
||||||
class="menu menu-sm dropdown-content mt-3 z-[1] p-2 shadow bg-white rounded-box w-52 font-bold text-blue-800 "
|
class="menu menu-sm dropdown-content mt-3 z-[1] p-2 shadow bg-white rounded-box w-52 font-bold text-blue-800 "
|
||||||
>
|
>
|
||||||
|
<li><a class="text-2xl py-2 hover:bg-base-100" href="/">Home</a></li>
|
||||||
<li><a class="text-2xl py-2 hover:bg-base-100" href="/delivery">Oil Delivery</a></li>
|
<li><a class="text-2xl py-2 hover:bg-base-100" href="/delivery">Oil Delivery</a></li>
|
||||||
<li><a class="text-2xl py-2 hover:bg-base-100" href="/servicearea">Delivery Area</a></li>
|
<li><a class="text-2xl py-2 hover:bg-base-100" href="/servicearea">Delivery Area</a></li>
|
||||||
<li><a class="text-2xl py-2 hover:bg-base-100" href="/about">About Us</a></li>
|
<li><a class="text-2xl py-2 hover:bg-base-100" href="/about">About Us</a></li>
|
||||||
@@ -117,6 +117,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="navbar-center hidden lg:flex text-white">
|
<div class="navbar-center hidden lg:flex text-white">
|
||||||
<ul class="menu menu-horizontal px-1 text-xl">
|
<ul class="menu menu-horizontal px-1 text-xl">
|
||||||
|
<li><a href="/">Home</a></li>
|
||||||
<li><a href="/delivery">Oil Delivery</a></li>
|
<li><a href="/delivery">Oil Delivery</a></li>
|
||||||
<li><a href="/servicearea">Delivery Area</a></li>
|
<li><a href="/servicearea">Delivery Area</a></li>
|
||||||
<li><a href="/about">About Us</a></li>
|
<li><a href="/about">About Us</a></li>
|
||||||
@@ -133,7 +134,7 @@
|
|||||||
|
|
||||||
<div class="grid grid-cols-12 bg-secondary py-10 w-full">
|
<div class="grid grid-cols-12 bg-secondary py-10 w-full">
|
||||||
<div
|
<div
|
||||||
class="col-span-12 md:col-span-4 text-center text-white text-bold text-6xl"
|
class="col-span-12 md:col-span-4 text-center text-white text-bold text-6xl "
|
||||||
>
|
>
|
||||||
<div class="flex justify-center pt-5">
|
<div class="flex justify-center pt-5">
|
||||||
<div class=" text-white px-1">Auburn</div>
|
<div class=" text-white px-1">Auburn</div>
|
||||||
@@ -141,15 +142,15 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div
|
<div
|
||||||
class="col-span-12 md:col-span-4 text-center text-bold text-xl text-white"
|
class="col-span-12 md:col-span-4 text-center text-bold text-xl text-white pb-10"
|
||||||
>
|
>
|
||||||
<div class="">{tel_number}</div>
|
<div class="">{company_phone_number}</div>
|
||||||
<div class="">Worcester Ma</div>
|
<div class="">Worcester Ma</div>
|
||||||
<div class="">Mon - Fri 8:00 am - 5:00 pm</div>
|
<div class="">Mon - Fri 8:00 am - 5:00 pm</div>
|
||||||
<div class="">Sat Closed | Sun Closed</div>
|
<div class="">Sat Closed | Sun Closed</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-span-4 text-center"></div>
|
<div class="col-span-4 text-center"></div>
|
||||||
<div class="col-span-12 h-auto bg-primary text-white w-full">
|
<div class="col-span-12 h-auto bg-primary text-white w-full ">
|
||||||
<div class=" mx-auto max-w-7xl p-5">
|
<div class=" mx-auto max-w-7xl p-5">
|
||||||
<div class="text-xl font-bold text-center">
|
<div class="text-xl font-bold text-center">
|
||||||
© 2023 by Rocket Services LLC - Auburn, MA | All Rights Reserved
|
© 2023 by Rocket Services LLC - Auburn, MA | All Rights Reserved
|
||||||
|
|||||||
@@ -7,12 +7,14 @@
|
|||||||
export let company_data: company;
|
export let company_data: company;
|
||||||
export let oil_price_data: oilprice;
|
export let oil_price_data: oilprice;
|
||||||
|
|
||||||
|
|
||||||
let price_of_oil: string = '';
|
let price_of_oil: string = '';
|
||||||
let company_name: string = '';
|
let company_name: string = '';
|
||||||
let tel_number: string = '';
|
let company_phone_number: string = '';
|
||||||
|
|
||||||
|
|
||||||
onMount(async () => {
|
onMount(async () => {
|
||||||
await fetch(PUBLIC_BASE_URL + "/info/price/oil", {
|
await fetch(PUBLIC_BASE_URL + "/info/price/today", {
|
||||||
method: "get",
|
method: "get",
|
||||||
credentials: "include",
|
credentials: "include",
|
||||||
headers: {
|
headers: {
|
||||||
@@ -23,7 +25,7 @@
|
|||||||
.then((result) => (oil_price_data = result));
|
.then((result) => (oil_price_data = result));
|
||||||
|
|
||||||
if (oil_price_data["ok"] == true) {
|
if (oil_price_data["ok"] == true) {
|
||||||
price_of_oil = oil_price_data["price"];
|
price_of_oil = oil_price_data["todays_price"];
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
onMount(async () => {
|
onMount(async () => {
|
||||||
@@ -38,8 +40,8 @@
|
|||||||
.then((result) => (company_data = result));
|
.then((result) => (company_data = result));
|
||||||
|
|
||||||
if (company_data["ok"] == true) {
|
if (company_data["ok"] == true) {
|
||||||
company_name = company_data["name"];
|
company_name = company_data["company_name"];
|
||||||
tel_number = company_data["telephone"];
|
company_phone_number = company_data["company_phone_number"];
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
@@ -52,7 +54,7 @@
|
|||||||
<div class="mx-auto p-10">
|
<div class="mx-auto p-10">
|
||||||
<div class="mx-auto pb-5 text-5xl text-center">Order Now</div>
|
<div class="mx-auto pb-5 text-5xl text-center">Order Now</div>
|
||||||
<div class="mx-auto text-5xl text-center">
|
<div class="mx-auto text-5xl text-center">
|
||||||
{tel_number}
|
{company_phone_number}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="grid grid-cols-12 gap-5 px-5 text-center mt-10">
|
<div class="grid grid-cols-12 gap-5 px-5 text-center mt-10">
|
||||||
@@ -70,13 +72,15 @@
|
|||||||
<div class="col-span-12 lg:col-span-3 bg-base-100 p-10">
|
<div class="col-span-12 lg:col-span-3 bg-base-100 p-10">
|
||||||
<div class="text-4xl mb-3">Phone Support</div>
|
<div class="text-4xl mb-3">Phone Support</div>
|
||||||
<div class="text-lg">
|
<div class="text-lg">
|
||||||
We dont cut our product with products. Our Oil is pure #2 heating oil.
|
Real live person on the phone when you call.
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-span-12 lg:col-span-3 bg-base-100 p-10">
|
<div class="col-span-12 lg:col-span-3 bg-base-100 p-10">
|
||||||
<div class="text-4xl mb-3">Top Quality Oil</div>
|
<div class="text-4xl mb-3">Top Quality Oil</div>
|
||||||
<div class="text-lg">
|
<div class="text-lg">
|
||||||
We dont cut our product with products. Our Oil is pure #2 heating oil.
|
We dont cut our product with biodiesel. We use the best available
|
||||||
|
natural oil-12
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-span-12 lg:col-span-2"></div>
|
<div class="col-span-12 lg:col-span-2"></div>
|
||||||
|
|||||||
@@ -2,17 +2,17 @@
|
|||||||
import "../../app.postcss";
|
import "../../app.postcss";
|
||||||
import { onMount } from "svelte";
|
import { onMount } from "svelte";
|
||||||
import { PUBLIC_BASE_URL } from "$env/static/public";
|
import { PUBLIC_BASE_URL } from "$env/static/public";
|
||||||
import type { company, oilprice } from '$lib/types/types'
|
import type { company, oilprice } from "$lib/types/types";
|
||||||
|
|
||||||
export let company_data: company;
|
export let company_data: company;
|
||||||
export let oil_price_data: oilprice;
|
export let oil_price_data: oilprice;
|
||||||
|
|
||||||
let price_of_oil: string = '';
|
let price_of_oil: string = "";
|
||||||
let company_name: string = '';
|
let company_name: string = "";
|
||||||
let tel_number: string = '';
|
let company_phone_number: string = "";
|
||||||
|
|
||||||
onMount(async () => {
|
onMount(async () => {
|
||||||
await fetch(PUBLIC_BASE_URL + "/info/price/oil", {
|
await fetch(PUBLIC_BASE_URL + "/info/price/today", {
|
||||||
method: "get",
|
method: "get",
|
||||||
credentials: "include",
|
credentials: "include",
|
||||||
headers: {
|
headers: {
|
||||||
@@ -23,7 +23,7 @@
|
|||||||
.then((result) => (oil_price_data = result));
|
.then((result) => (oil_price_data = result));
|
||||||
|
|
||||||
if (oil_price_data["ok"] == true) {
|
if (oil_price_data["ok"] == true) {
|
||||||
price_of_oil = oil_price_data["price"];
|
price_of_oil = oil_price_data["todays_price"];
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
onMount(async () => {
|
onMount(async () => {
|
||||||
@@ -38,8 +38,8 @@
|
|||||||
.then((result) => (company_data = result));
|
.then((result) => (company_data = result));
|
||||||
|
|
||||||
if (company_data["ok"] == true) {
|
if (company_data["ok"] == true) {
|
||||||
company_name = company_data["name"];
|
company_name = company_data["company_name"];
|
||||||
tel_number = company_data["telephone"];
|
company_phone_number = company_data["company_phone_number"];
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
@@ -52,10 +52,10 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="max-w-7xl mx-auto px-10">
|
<div class="max-w-7xl mx-auto px-10">
|
||||||
<div class="grid grid-cols-2">
|
<div class="grid grid-cols-2 gap-5">
|
||||||
<div class="col-span-1 p-5">
|
<div class="col-span-2 md:col-span-1">
|
||||||
<div class="text-2xl font-bold text-primary">Contact Good Oil</div>
|
<div class="text-2xl font-bold text-primary">Contact Us</div>
|
||||||
<div class="mb-20 text-xl">Phone: {tel_number}</div>
|
<div class="mb-20 text-xl">Phone: {company_phone_number}</div>
|
||||||
|
|
||||||
<div class="mb-10">
|
<div class="mb-10">
|
||||||
<div class="font-bold text-2xl text-primary max-w-7xl mx-auto">
|
<div class="font-bold text-2xl text-primary max-w-7xl mx-auto">
|
||||||
@@ -84,8 +84,8 @@
|
|||||||
<div class="text-xl">Sunday: Closed</div>
|
<div class="text-xl">Sunday: Closed</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-span-1">
|
<div class="col-span-2 md:col-span-1">
|
||||||
<img class=" w-auto" src="/images/contact.png" alt="" />
|
<img class="w-auto" src="/images/contact.png" alt="" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -2,10 +2,10 @@
|
|||||||
import "../../app.postcss";
|
import "../../app.postcss";
|
||||||
import { onMount } from "svelte";
|
import { onMount } from "svelte";
|
||||||
import { PUBLIC_BASE_URL } from "$env/static/public";
|
import { PUBLIC_BASE_URL } from "$env/static/public";
|
||||||
import type { company, oilprice } from '$lib/types/types'
|
import type { company } from '$lib/types/types'
|
||||||
|
|
||||||
export let company_data: company;
|
export let company_data: company;
|
||||||
export let oil_price_data: oilprice;
|
|
||||||
|
|
||||||
let company_name: string = '';
|
let company_name: string = '';
|
||||||
let tel_number: string = '';
|
let tel_number: string = '';
|
||||||
@@ -22,8 +22,8 @@
|
|||||||
.then((result) => (company_data = result));
|
.then((result) => (company_data = result));
|
||||||
|
|
||||||
if (company_data["ok"] == true) {
|
if (company_data["ok"] == true) {
|
||||||
company_name = company_data["name"];
|
company_name = company_data["company_name"];
|
||||||
tel_number = company_data["telephone"];
|
tel_number = company_data["company_phone_number"];
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -32,6 +32,7 @@
|
|||||||
<div class="bg-secondary px-10">
|
<div class="bg-secondary px-10">
|
||||||
<div
|
<div
|
||||||
class="max-w-7xl justify-center py-5 mx-auto font-bold text-2xl text-white"
|
class="max-w-7xl justify-center py-5 mx-auto font-bold text-2xl text-white"
|
||||||
|
>
|
||||||
|
|
||||||
Heating Oil Delivery
|
Heating Oil Delivery
|
||||||
</div>
|
</div>
|
||||||
@@ -45,6 +46,7 @@
|
|||||||
<div class="col-span-12 font-bold text-2xl my-10">
|
<div class="col-span-12 font-bold text-2xl my-10">
|
||||||
We know it can be tough to order oil. We make it simple!
|
We know it can be tough to order oil. We make it simple!
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
<div class="col-span-12 font-bold text-xl text-primary">
|
<div class="col-span-12 font-bold text-xl text-primary">
|
||||||
Worcester County
|
Worcester County
|
||||||
@@ -54,6 +56,7 @@
|
|||||||
<ul>Prime - 25$</ul>
|
<ul>Prime - 25$</ul>
|
||||||
<ul>Same Day - 150$</ul>
|
<ul>Same Day - 150$</ul>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
<div class="col-span-12 font-bold mt-10 text-xl text-primary">
|
<div class="col-span-12 font-bold mt-10 text-xl text-primary">
|
||||||
Payments Methods
|
Payments Methods
|
||||||
@@ -62,29 +65,41 @@
|
|||||||
<ul>Cash on Delivery (C.O.D)</ul>
|
<ul>Cash on Delivery (C.O.D)</ul>
|
||||||
<ul>Credit Card</ul>
|
<ul>Credit Card</ul>
|
||||||
<ul>Money Order</ul>
|
<ul>Money Order</ul>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-span-12 mx-auto py-10">
|
|
||||||
<img class=" h-20 w-auto" src="/images/creditcards.png" alt="">
|
|
||||||
|
|
||||||
<div class="col-span-12 mb-10">
|
<div class="col-span-12 mb-10">
|
||||||
<ul>
|
<ul>
|
||||||
<div class="flex gap-5">
|
<div class="col-span-12 font-bold mt-10 text-xl text-primary">
|
||||||
<img class=" p-0 m-0 h-10 w-5" src="/images/flame.png" alt="" />
|
|
||||||
How to Order Oil
|
How to Order Oil
|
||||||
</div>
|
</div>
|
||||||
<div class="flex gap-5">
|
<div class="flex gap-5">
|
||||||
|
|
||||||
<li class=" font-bold">
|
<li class=" font-bold">
|
||||||
1.) Call {tel_number} to place an order.
|
1.) Call {tel_number} to place an order.
|
||||||
</li>
|
</li>
|
||||||
</div>
|
</div>
|
||||||
<div class="flex gap-5">
|
<div class="flex gap-5">
|
||||||
|
|
||||||
<li class=" font-bold">
|
<li class=" font-bold">
|
||||||
|
2.) Give your name, address, fill location, and phone number.
|
||||||
|
</li>
|
||||||
|
</div>
|
||||||
|
<div class="flex gap-5">
|
||||||
|
<li class=" font-bold">
|
||||||
|
3.) Decide if you want a fill or specific gallons
|
||||||
|
</li>
|
||||||
|
</div>
|
||||||
|
<div class="flex gap-5">
|
||||||
|
<li class=" font-bold">
|
||||||
4.) Pay with Credit Card or pay the driver cash
|
4.) Pay with Credit Card or pay the driver cash
|
||||||
</li>
|
</li>
|
||||||
</div>
|
</div>
|
||||||
</ul>
|
</ul>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="col-span-12 mx-auto py-10">
|
||||||
|
<img class=" h-20 w-auto" src="/images/creditcards.png" alt="">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -73,7 +73,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="col-span-12 py-5 ">
|
<div class="col-span-12 py-5 ">
|
||||||
<div class="flex justify-center items-center md:h-auto ">
|
<div class="flex justify-center items-center md:h-auto ">
|
||||||
<img class="" src="/images/map.png">
|
<img class="" src="/images/map.png" alt="">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
178
src/routes/ticket/[id]/+page.svelte
Normal file
178
src/routes/ticket/[id]/+page.svelte
Normal file
@@ -0,0 +1,178 @@
|
|||||||
|
<!-- <script lang="ts">
|
||||||
|
import "../../../app.postcss";
|
||||||
|
|
||||||
|
import { onMount } from "svelte";
|
||||||
|
import { PUBLIC_BASE_URL } from "$env/static/public";
|
||||||
|
import type {
|
||||||
|
deliverytype,
|
||||||
|
customertype,
|
||||||
|
} from "$lib/types/types";
|
||||||
|
|
||||||
|
export let delivery_data: deliverytype;
|
||||||
|
export let customer_data: customertype;
|
||||||
|
let datatickets: any[] = [];
|
||||||
|
|
||||||
|
|
||||||
|
let user_id: string = "";
|
||||||
|
|
||||||
|
let dispatcher_notes: string = '';
|
||||||
|
onMount(async () => {
|
||||||
|
await fetch(PUBLIC_BASE_URL + "/delivery/" + data.ticketid, {
|
||||||
|
method: "get",
|
||||||
|
credentials: "include",
|
||||||
|
headers: {
|
||||||
|
"Content-Type": "application/json",
|
||||||
|
},
|
||||||
|
})
|
||||||
|
.then((response) => response.json())
|
||||||
|
.then((result) => (delivery_data = result));
|
||||||
|
|
||||||
|
|
||||||
|
if (delivery_data["ok"] == true) {
|
||||||
|
let dispatcher_notes = delivery_data["dispatcher_notes"];
|
||||||
|
delivery_data.payment_type = delivery_data["payment_type"];
|
||||||
|
delivery_data.customer_address = delivery_data["customer_address"];
|
||||||
|
delivery_data.customer_town = delivery_data["customer_town"];
|
||||||
|
delivery_data.customer_state = delivery_data["customer_state"];
|
||||||
|
delivery_data.customer_zip = delivery_data["customer_zip"];
|
||||||
|
delivery_data.when_ordered = delivery_data["when_ordered"];
|
||||||
|
delivery_data.when_delivered = delivery_data["when_delivered"];
|
||||||
|
delivery_data.gallons_delivered = delivery_data["gallons_delivered"];
|
||||||
|
delivery_data.expected_delivery_date = delivery_data["expected_delivery_date"];
|
||||||
|
delivery_data.customer_price = delivery_data["customer_price"];
|
||||||
|
delivery_data.driver_employee_id = delivery_data["driver_employee_id"];
|
||||||
|
user_id = delivery_data["customer_id"];
|
||||||
|
console.log("going ...")
|
||||||
|
|
||||||
|
fetchCustomer(delivery_data["customer_id"]);
|
||||||
|
fetchData(delivery_data["customer_id"]);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
// user info
|
||||||
|
|
||||||
|
async function fetchCustomer(user_id:string) {
|
||||||
|
console.log("fetching customer");
|
||||||
|
console.log(PUBLIC_BASE_URL + "/customer/" + user_id,)
|
||||||
|
const response = await fetch(PUBLIC_BASE_URL + "/customer/" + user_id, {
|
||||||
|
method: "get",
|
||||||
|
credentials: "include",
|
||||||
|
headers: {
|
||||||
|
"Content-Type": "application/json",
|
||||||
|
},
|
||||||
|
})
|
||||||
|
const customer_data = await response.json();
|
||||||
|
console.log("poop")
|
||||||
|
|
||||||
|
};
|
||||||
|
// past deliveries
|
||||||
|
async function fetchData(user_id:string) {
|
||||||
|
|
||||||
|
const response = await fetch(PUBLIC_BASE_URL + "/delivery/past/" + user_id, {
|
||||||
|
method: "get",
|
||||||
|
credentials: "include",
|
||||||
|
headers: {
|
||||||
|
"Content-Type": "application/json",
|
||||||
|
},
|
||||||
|
})
|
||||||
|
const jsonData = await response.json();
|
||||||
|
datatickets = jsonData;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<template>
|
||||||
|
{dispatcher_notes}
|
||||||
|
<div class="absolute" id="page">
|
||||||
|
<div class="p-10 max-w-5xl bg-white text-black">
|
||||||
|
<div class="grid grid-cols-12">
|
||||||
|
<div class="col-span-9">
|
||||||
|
<div class="grid grid-cols-12 pb-10">
|
||||||
|
<div class="col-span-2">#2 Heating</div>
|
||||||
|
<div class="col-span-2"></div>
|
||||||
|
<div class="col-span-2">0</div>
|
||||||
|
<div class="col-span-2">275</div>
|
||||||
|
<div class="col-span-2">
|
||||||
|
{customer_data.customer_phone_number}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="grid grid-cols-12 pl-5 pb-10">
|
||||||
|
<div class="col-span-8">
|
||||||
|
{customer_data.customer_first_name}
|
||||||
|
{customer_data.customer_last_name}
|
||||||
|
</div>
|
||||||
|
<div class="col-span-4">
|
||||||
|
{customer_data.account_number}
|
||||||
|
</div>
|
||||||
|
<div class="col-span-12">
|
||||||
|
{customer_data.customer_address}
|
||||||
|
{customer_data.customer_apt}
|
||||||
|
</div>
|
||||||
|
<div class="col-span-3">
|
||||||
|
<div class="grid grid-cols-12">
|
||||||
|
<div class="col-span-5">
|
||||||
|
{delivery_data.customer_town}
|
||||||
|
</div>
|
||||||
|
<div class="col-span-3">
|
||||||
|
{delivery_data.customer_state}
|
||||||
|
</div>
|
||||||
|
<div class="col-span-4">
|
||||||
|
{delivery_data.customer_zip}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="grid grid-cols-12 pl-5 pb-10">
|
||||||
|
<div class="col-span-12 pb-5">
|
||||||
|
{delivery_data.dispatcher_notes}
|
||||||
|
</div>
|
||||||
|
{#if delivery_data.payment_type == 0}
|
||||||
|
<div class="col-span-12">CASH</div>
|
||||||
|
{:else if delivery_data.payment_type == 1}
|
||||||
|
<div class="col-span-12">Credit Card</div>
|
||||||
|
{:else if delivery_data.payment_type == 2}
|
||||||
|
<div class="col-span-12">Credit Card/Cash</div>
|
||||||
|
{:else}{/if}
|
||||||
|
</div>
|
||||||
|
<div class="grid grid-cols-12">
|
||||||
|
|
||||||
|
{#each datatickets as item}
|
||||||
|
<div class="col-span-6 flex">
|
||||||
|
<div>
|
||||||
|
{item.when_delivered} - {item.gallons_delivered}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
{/each}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-span-3">
|
||||||
|
<div class="grid grid-cols-12">
|
||||||
|
<div class="col-span-12 h-7">
|
||||||
|
{delivery_data.when_ordered}
|
||||||
|
</div>
|
||||||
|
<div class="col-span-12 h-7">
|
||||||
|
{delivery_data.expected_delivery_date}
|
||||||
|
</div>
|
||||||
|
<div class="col-span-12 h-7"></div>
|
||||||
|
<div class="col-span-12 h-7">
|
||||||
|
{delivery_data.customer_price}
|
||||||
|
</div>
|
||||||
|
<div class="col-span-12 h-7">
|
||||||
|
{delivery_data.when_ordered}
|
||||||
|
</div>
|
||||||
|
<div class="col-span-12 h-7"></div>
|
||||||
|
<div class="col-span-12 h-7"></div>
|
||||||
|
<div class="col-span-12 h-7">
|
||||||
|
{delivery_data.driver_employee_id}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</template> -->
|
||||||
Reference in New Issue
Block a user