Skip to content

Commit

Permalink
all prisma files removed
Browse files Browse the repository at this point in the history
  • Loading branch information
wmalarski committed Apr 11, 2023
1 parent 4fbda82 commit 2b45753
Show file tree
Hide file tree
Showing 10 changed files with 96 additions and 266 deletions.
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ dist
.vercel
.netlify
netlify
prisma/dev.db

# dependencies
/node_modules
Expand Down
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
"name": "solid-start-stonks",
"scripts": {
"dev": "solid-start dev",
"build": "solid-start build && cp node_modules/@prisma/engines/*query* .vercel/output/functions/api.func/ && cp node_modules/@prisma/engines/*query* .vercel/output/functions/render.func/ && cp prisma/schema.prisma .vercel/output/functions/render.func/ && cp prisma/schema.prisma .vercel/output/functions/api.func/",
"start": "solid-start start",
"=== LINTERS ===": "",
"lint": "eslint src --fix --ext .tsx,.ts",
Expand Down
85 changes: 0 additions & 85 deletions prisma/schema.prisma

This file was deleted.

85 changes: 0 additions & 85 deletions schema.prisma

This file was deleted.

42 changes: 21 additions & 21 deletions src/modules/InvoiceDetails/InvoiceDetails.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import type { Invoice } from "@prisma/client";
import { useI18n } from "@solid-primitives/i18n";
import { Component } from "solid-js";
import { Invoice } from "~/db/invoices";
import { pricePLN } from "~/utils/pricePLN";

type Props = {
Expand Down Expand Up @@ -28,7 +28,7 @@ export const InvoiceDetails: Component<Props> = (props) => {
};

const sum = () => {
return props.invoice.serviceCount * props.invoice.servicePrice;
return props.invoice.service_count * props.invoice.service_price;
};

const dueDate = () => {
Expand All @@ -48,26 +48,26 @@ export const InvoiceDetails: Component<Props> = (props) => {
<div>
<p class="text-xl font-extrabold">{t("invoice.seller")}</p>
<div class="divider m-0" />
<p class="font-bold">{props.invoice.sellerName}</p>
<p class="text-sm">{props.invoice.sellerAddress1}</p>
<p class="text-sm">{props.invoice.sellerAddress2}</p>
<p class="font-bold">{props.invoice.seller_name}</p>
<p class="text-sm">{props.invoice.seller_address1}</p>
<p class="text-sm">{props.invoice.seller_address2}</p>
<p class="mt-2 text-sm">
{t("invoice.nip", { nip: props.invoice.sellerNip })}
{t("invoice.nip", { nip: props.invoice.seller_nip })}
</p>
</div>
<div>
<p class="text-xl font-extrabold">{t("invoice.buyer")}</p>
<div class="divider m-0" />
<p class="font-bold">{props.invoice.buyerName}</p>
<p class="text-sm">{props.invoice.buyerAddress1}</p>
<p class="text-sm">{props.invoice.buyerAddress2}</p>
<p class="font-bold">{props.invoice.buyer_name}</p>
<p class="text-sm">{props.invoice.buyer_address_1}</p>
<p class="text-sm">{props.invoice.buyer_address_2}</p>
<p class="mt-2 text-sm">
{t("invoice.nip", { nip: props.invoice.buyerNip })}
{t("invoice.nip", { nip: props.invoice.buyer_nip })}
</p>
</div>
<div class="col-span-2">
<p class="m-1 text-center text-2xl font-extrabold">
{t("invoice.title", { title: props.invoice.invoiceTitle })}
{t("invoice.title", { title: props.invoice.invoice_title })}
</p>
<div class="divider m-0" />
</div>
Expand All @@ -78,14 +78,14 @@ export const InvoiceDetails: Component<Props> = (props) => {
<input
type="radio"
class="radio radio-xs"
checked={props.invoice.paymentMethod === "cash"}
checked={props.invoice.payment_method === "cash"}
onChange={() => void 0}
/>
<span>{t("invoice.cash")}</span>
<input
type="radio"
class="radio radio-xs"
checked={props.invoice.paymentMethod === "transfer"}
checked={props.invoice.payment_method === "transfer"}
onChange={() => void 0}
/>
<span>{t("invoice.transfer")}</span>
Expand All @@ -99,11 +99,11 @@ export const InvoiceDetails: Component<Props> = (props) => {
</tr>
<tr>
<td class="text-right">{t("invoice.bankName")}</td>
<td>{props.invoice.paymentBank}</td>
<td>{props.invoice.payment_bank}</td>
</tr>
<tr>
<td class="text-right">{t("invoice.account")}</td>
<td>{props.invoice.paymentAccount}</td>
<td>{props.invoice.payment_account}</td>
</tr>
</tbody>
</table>
Expand All @@ -123,11 +123,11 @@ export const InvoiceDetails: Component<Props> = (props) => {
<tr class="border text-xs">
<td>1</td>
<td class="whitespace-break-spaces">
{props.invoice.serviceTitle}
{props.invoice.service_title}
</td>
<td>{props.invoice.serviceUnit}</td>
<td>{props.invoice.serviceCount}</td>
<td>{props.invoice.servicePrice}</td>
<td>{props.invoice.service_unit}</td>
<td>{props.invoice.service_count}</td>
<td>{props.invoice.service_price}</td>
<td>{numberFormatter(sum())}</td>
</tr>
</tbody>
Expand All @@ -144,13 +144,13 @@ export const InvoiceDetails: Component<Props> = (props) => {
<tr>
<td>{t("invoice.payed")}</td>
<td class="text-right">
{currencyFormatter(props.invoice.servicePayed)}
{currencyFormatter(props.invoice.service_payed)}
</td>
</tr>
<tr>
<td>{t("invoice.leftToPay")}</td>
<td class="text-right">
{currencyFormatter(sum() - props.invoice.servicePayed)}
{currencyFormatter(sum() - props.invoice.service_payed)}
</td>
</tr>
</tbody>
Expand Down
Loading

0 comments on commit 2b45753

Please sign in to comment.