Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
import * as React from "react";

const TableHeader = () => (
<tr>
<th className="px-2 py-1 text-xs font-normal tracking-widest text-left text-miru-black-1000" scope="col">
DATE
</th>
<th
scope="col"
className="px-4 py-1 text-xs font-normal tracking-widest text-left text-miru-black-1000"
>
DESCRIPTION
</th>
<th
scope="col"
className="px-2 py-1 text-xs font-normal tracking-widest text-left text-miru-black-1000"
>
TEAM MEMBERS
</th>
<th
scope="col"
className="px-2 py-1 text-xs font-normal tracking-widest text-center text-miru-black-1000"
>
TOTAL BILL AMT
</th>
<th
scope="col"
className="px-2 py-1 text-xs font-normal tracking-widest text-center text-miru-black-1000"
>
PAYMENT TYPE
</th>
<th scope="col" className="relative px-6 py-3"></th>
</tr>
);

export default TableHeader;
47 changes: 47 additions & 0 deletions app/javascript/src/components/Profile/Billing/Table/TableRow.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
import React, { useState } from "react";
import { DownloadSimple } from "phosphor-react";

const TableRow = ({
data
}) => {
const [isSending, setIsSending] = useState<boolean>(false);

return (
<>
<tr className="last:border-b-0 hover:bg-miru-gray-200 group">
<td className="px-2 py-4 text-xs font-normal text-miru-dark-purple-1000 ">
{data.date}
</td>

<td className="w-10/12 px-4 py-4 text-xs font-normal text-miru-dark-purple-1000 ftracking-wider">
{data.description}
</td>

<td className=" px-2 py-4 text-base font-normal tracking-wider text-miru-dark-purple-1000">
{data.team_members}
</td>

<td className="px-2 py-4 w-2/12 text-center text-xl font-bold tracking-wider text-miru-dark-purple-1000">
{data.total_bill_amt}
</td>

<td className="px-2 py-4 text-xs font-normal text-miru-dark-purple-1000">
{data.payment_type}
</td>

<td className="px-2 py-4 text-sm font-medium text-right whitespace-nowrap">
<div className="flex items-center h-full">
<button
className="hidden group-hover:block text-miru-han-purple-1000"
onClick={() => setIsSending(!isSending)}
>
<DownloadSimple size={16} />
</button>
</div>
</td>
</tr>
</>
);
};

export default TableRow;
24 changes: 24 additions & 0 deletions app/javascript/src/components/Profile/Billing/Table/index.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
import * as React from "react";

import TableHeader from "./TableHeader";
import TableRow from "./TableRow";

const data = [];

const Table = () => (
<table className="min-w-full mt-1 divide-y divide-gray-200">
<thead>
<TableHeader />
</thead>

<tbody className="min-w-full bg-miru-gray-100 divide-y divide-gray-200">
{data.map((data) => (
<TableRow
data={data}
/>
))}
</tbody>
</table>
);

export default Table;
53 changes: 53 additions & 0 deletions app/javascript/src/components/Profile/Billing/index.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
import React from "react";
import { Divider } from "common/Divider";

import Table from "./Table";
import Header from "../Header";

const Billing = () => (
<>
<div className="flex flex-col w-4/5">
<Header
title={"Billing"}
subTitle={"View upcoming bill amount, due date and past bills"}
showButtons={false}
/>
<div className="max-h-70v overflow-scroll">
<div className="pb-5 pt-5 pl-5 pr-5 mt-4 bg-miru-gray-100 max-h-40v">
<div className="flex flex-row py-2 justify-between">
<div className="font-semibold p-2">Next Billing Date</div>
<div className="font-bold p-2">
-
</div>
</div>
<Divider />
<div className="flex flex-row py-2 justify-between items-end">
<div className="p-2">
<p className="font-normal text-xs text-miru-dark-purple-1000">Add-Ons</p>
<p className="font-semibold">1 team member</p>
<p className="font-normal text-xs text-miru-dark-purple-400">-$ per user per month</p>
</div>
<div className="p-2 text-right">
<p className="font-bold mt-2 text-base">-$/mo</p>
<p className="font-normal text-xs text-miru-dark-purple-400">charged every month </p>
</div>
</div>
<Divider />
<div className="flex flex-row py-2 justify-between items-start">
<div className="p-2 font-bold text-2xl"> Total </div>
<div className="p-2 text-right">
<p className="font-bold mt-2">-$</p>
<p className="font-normal text-xs text-miru-dark-purple-400">plus taxes </p>
</div>
</div>
</div>
<div className="pb-5 pt-5 pl-5 pr-5 mt-4 bg-miru-gray-100 min-h-40v">
<p className='font-semibold p-2 text-xl'>Billing History</p>
<Table />
</div>
</div>
</div>
</>
);

export default Billing;
4 changes: 2 additions & 2 deletions app/javascript/src/components/Profile/Header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ const Header = ({
{subTitle}
</span>
{
showButtons && (
<div className="mt-1 text-center">
(
<div className={`mt-1 text-center ${showButtons ? "visible" : "invisible"}`}>
<div>
<button
className="border rounded-md px-3 mx-1 "
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
import * as React from "react";

const TableHeader = () => (
<tr>
<th className="px-2 py-1 text-xs font-normal tracking-widest text-left text-miru-black-1000" scope="col">
DATE
</th>
<th
scope="col"
className="px-4 py-1 text-xs font-normal tracking-widest text-left text-miru-black-1000"
>
DESCRIPTION
</th>
<th
scope="col"
className="px-2 py-1 text-xs font-normal tracking-widest text-left text-miru-black-1000"
>
TEAM MEMBERS
</th>
<th
scope="col"
className="px-2 py-1 text-xs font-normal tracking-widest text-center text-miru-black-1000"
>
TOTAL BILL AMT
</th>
<th
scope="col"
className="px-2 py-1 text-xs font-normal tracking-widest text-center text-miru-black-1000"
>
PAYMENT TYPE
</th>
<th scope="col" className="relative px-6 py-3"></th>
</tr>
);

export default TableHeader;
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
import React, { useState } from "react";
import { DownloadSimple } from "phosphor-react";

const TableRow = ({
data
}) => {
const [isSending, setIsSending] = useState<boolean>(false);

return (
<>
<tr className="last:border-b-0 hover:bg-miru-gray-200 group">
<td className="px-2 py-4 text-xs font-normal text-miru-dark-purple-1000 ">
{data.date}
</td>

<td className="w-10/12 px-4 py-4 text-xs font-normal text-miru-dark-purple-1000 ftracking-wider">
{data.description}
</td>

<td className=" px-2 py-4 text-base font-normal tracking-wider text-miru-dark-purple-1000">
{data.team_members}
</td>

<td className="px-2 py-4 w-2/12 text-center text-xl font-bold tracking-wider text-miru-dark-purple-1000">
{data.total_bill_amt}
</td>

<td className="px-2 py-4 text-xs font-normal text-miru-dark-purple-1000">
{data.payment_type}
</td>

<td className="px-2 py-4 text-sm font-medium text-right whitespace-nowrap">
<div className="flex items-center h-full">
<button
className="hidden group-hover:block text-miru-han-purple-1000"
onClick={() => setIsSending(!isSending)}
>
<DownloadSimple size={16} />
</button>
</div>
</td>
</tr>
</>
);
};

export default TableRow;
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
import * as React from "react";

import TableHeader from "./TableHeader";
import TableRow from "./TableRow";

const data = [];

const Table = () => (
<table className="min-w-full mt-1 divide-y divide-gray-200">
<thead>
<TableHeader />
</thead>

<tbody className="min-w-full bg-miru-gray-100 divide-y divide-gray-200">
{data.map((data) => (
<TableRow
data={data}
/>
))}
</tbody>
</table>
);

export default Table;
Original file line number Diff line number Diff line change
@@ -1,17 +1,53 @@
import React from "react";
import { Divider } from "common/Divider";

import Table from "./Table";
import Header from "../../Header";

const OrgBilling = () => (
<div className="flex flex-col w-4/5">
<Header
title={"Bank Account Details"}
subTitle={"Settings to receive payment from your employer"}
/>
<div className="py-10 pl-10 mt-4 bg-miru-gray-100 h-screen">
<p>Billing Page Coming up</p>
const Billing = () => (
<>
<div className="flex flex-col w-4/5">
<Header
title={"Billing"}
subTitle={"View upcoming bill amount, due date and past bills"}
showButtons={false}
/>
<div className="max-h-70v overflow-scroll">
<div className="pb-5 pt-5 pl-5 pr-5 mt-4 bg-miru-gray-100 max-h-40v">
<div className="flex flex-row py-2 justify-between">
<div className="font-semibold p-2">Next Billing Date</div>
<div className="font-bold p-2">
-
</div>
</div>
<Divider />
<div className="flex flex-row py-2 justify-between items-end">
<div className="p-2">
<p className="font-normal text-xs text-miru-dark-purple-1000">Add-Ons</p>
<p className="font-semibold">1 team member</p>
<p className="font-normal text-xs text-miru-dark-purple-400">-$ per user per month</p>
</div>
<div className="p-2 text-right">
<p className="font-bold mt-2 text-base">-$/mo</p>
<p className="font-normal text-xs text-miru-dark-purple-400">charged every month </p>
</div>
</div>
<Divider />
<div className="flex flex-row py-2 justify-between items-start">
<div className="p-2 font-bold text-2xl"> Total </div>
<div className="p-2 text-right">
<p className="font-bold mt-2">-$</p>
<p className="font-normal text-xs text-miru-dark-purple-400">plus taxes </p>
</div>
</div>
</div>
<div className="pb-5 pt-5 pl-5 pr-5 mt-4 bg-miru-gray-100 min-h-40v">
<p className='font-semibold p-2 text-xl'>Billing History</p>
<Table />
</div>
</div>
</div>
</div>
</>
);

export default OrgBilling;
export default Billing;
4 changes: 2 additions & 2 deletions app/javascript/src/components/Profile/RouteConfig.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import {
} from "react-router-dom";

import BankAccountDetails from "./BankAccountDetails";
import OrgBilling from "./Organization/Billing";
import Billing from "./Organization/Billing";
import OrgEdit from "./Organization/Edit";
import OrgPayment from "./Organization/Payment";
import UserDetails from "./UserDetail";
Expand All @@ -17,7 +17,7 @@ const RouteConfig = () => (
<Route path="bank_account_details" element={<BankAccountDetails />} />
<Route path="" element={<UserDetails />} />
<Route path="paymentsettings" element={<OrgPayment />} />
<Route path="billing" element={<OrgBilling />} />
<Route path="billing" element={<Billing />} />
<Route path="organization" element={<OrgEdit />} />
{/* </Route> */}
</Route>
Expand Down
12 changes: 12 additions & 0 deletions tailwind.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,18 @@ module.exports = {
"90v": "90vh",
"100v": "100vh",
},
maxHeight: {
"10v": "10vh",
"20v": "20vh",
"30v": "30vh",
"40v": "40vh",
"50v": "50vh",
"60v": "60vh",
"70v": "70vh",
"80v": "80vh",
"90v": "90vh",
"100v": "100vh",
},
colors: {
"miru-black": {
1000: "#303A4B",
Expand Down