Compare commits

...

1 Commits

Author SHA1 Message Date
sonali d63ed80855 " mew changes in ui " 2024-12-25 18:28:03 +05:30
36 changed files with 1528 additions and 1426 deletions

View File

@ -8,7 +8,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="theme-color" content="#000000" />
<meta name="description" content="" />
<link href="https://fonts.googleapis.com/css2?family=Manrope:wght@400;600&display=swap" rel="stylesheet" />
<link href="https://fonts.googleapis.com/css2?family=Comfortaa:wght@400;600&display=swap" rel="stylesheet">
<link rel="apple-touch-icon" href="%PUBLIC_URL%/logo192.png" />
<link rel="manifest" href="%PUBLIC_URL%/manifest.json" />
@ -29,14 +29,14 @@
<!-- <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/js/bootstrap.bundle.min.js"></script> -->
<style>
body {
background-color: #E9ECFF;
background-color: #f9fff6;
background-image: url('../src/assets/Image/Pattern.png');
background-size: cover;
background-repeat: no-repeat;
background-position: center;
background-blend-mode: overlay;
font-family: Manrope;
font-family: 'Comfortaa', sans-serif;
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 461 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 527 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 785 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 683 B

View File

@ -144,7 +144,7 @@ body {
align-items: center;
}
.nav-link {
font-family: "Manrope";
font-family: 'Comfortaa', sans-serif;
font-size: 16px !important;
color: #002300;
@ -306,7 +306,25 @@ body {
list-style-type: none;
padding: 0;
margin: 0;
margin-left: 80%;
position: absolute;
/* margin-left: 140px; */
top: 100%; /* Positions dropdown below the parent */
left: 0;
background-color: #FFFFFF;
border: 1px solid #F6F6F6;
z-index: 1000;
border-radius: 10px;
min-width: 120px; /* Optional minimum width */
filter: drop-shadow(0px 4px 4px rgba(0, 0, 0, 0.25));
}
.nav-menu-drop {
list-style-type: none;
padding: 0;
margin: 0;
position: absolute;
/* margin-left: 140px; */
top: 100%; /* Positions dropdown below the parent */
@ -501,6 +519,7 @@ body {
height: 50px;
background: #f4f4f4;
border-radius: 50px;
border: none;
padding-left: 40px;
font-size: 16px;
@ -514,8 +533,8 @@ body {
}
.search-container-icon {
position: absolute;
left: 10px;
top: 50%;
left: 12px;
top: 47%;
transform: translateY(-50%);
pointer-events: none;
}
@ -725,6 +744,7 @@ h3 {
box-shadow: none;
outline: none;
width: auto;
height: 42px;
padding: 8px 12px;
font-size: 16px;

View File

@ -318,7 +318,7 @@ const ATMDepositTable = (props) => {
style={{
backgroundColor: "#fff8e6",
border: "1px solid #ffd700",
borderRadius: "8px",
borderRadius: "20px",
padding: "16px 24px",
display: "flex",
flexDirection: "column",
@ -341,7 +341,7 @@ const ATMDepositTable = (props) => {
style={{
backgroundColor: "#e6ffee",
border: "1px solid #00b300",
borderRadius: "8px",
borderRadius: "20px",
padding: "16px 24px",
display: "flex",
flexDirection: "column",
@ -364,7 +364,7 @@ const ATMDepositTable = (props) => {
style={{
backgroundColor: "#ffe6e6",
border: "1px solid #ff4d4d",
borderRadius: "8px",
borderRadius: "20px",
padding: "16px 24px",
display: "flex",
flexDirection: "column",

View File

@ -737,18 +737,20 @@ function AddInvoice() {
>
Pay Invoice
</button>
<button
className={`btn ${activeButton === '/bankDeposit' ? 'active' : ''}`}
onClick={() => handleLinkClick('/bankDeposit')}
>
Bank Deposit
</button>
<button
className={`btn ${activeButton === '/atmDeposit' ? 'active' : ''}`}
onClick={() => handleLinkClick('/atmDeposit')}
>
ATM Deposit
</button>
<button
className={`btn ${activeButton === '/bankDeposit' ? 'active' : ''}`}
onClick={() => handleLinkClick('/bankDeposit')}
>
Bank Deposit
</button>
</div>
</div>
<div className="formcontainer">

View File

@ -161,18 +161,20 @@ function AtmDeposit() {
>
Pay Invoice
</button>
<button
className={`btn ${activeButton === '/bankDeposit' ? 'active' : ''}`}
onClick={() => handleLinkClick('/bankDeposit')}
>
Bank Deposit
</button>
<button
className={`btn ${activeButton === '/atmDeposit' ? 'active' : ''}`}
onClick={() => handleLinkClick('/atmDeposit')}
>
ATM Deposit
</button>
<button
className={`btn ${activeButton === '/bankDeposit' ? 'active' : ''}`}
onClick={() => handleLinkClick('/bankDeposit')}
>
Bank Deposit
</button>
</div>
</div>
<div className="formcontainer">

View File

@ -169,18 +169,20 @@ function BankDeposit() {
>
Pay Invoice
</button>
<button
className={`btn ${activeButton === '/bankDeposit' ? 'active' : ''}`}
onClick={() => handleLinkClick('/bankDeposit')}
>
Bank Deposit
</button>
<button
className={`btn ${activeButton === '/atmDeposit' ? 'active' : ''}`}
onClick={() => handleLinkClick('/atmDeposit')}
>
ATM Deposit
</button>
<button
className={`btn ${activeButton === '/bankDeposit' ? 'active' : ''}`}
onClick={() => handleLinkClick('/bankDeposit')}
>
Bank Deposit
</button>
</div>
</div>
<div className="formcontainer">

View File

@ -323,7 +323,7 @@ const BankDepositTable = (props) => {
style={{
backgroundColor: "#fff8e6",
border: "1px solid #ffd700",
borderRadius: "8px",
borderRadius: "20px",
padding: "16px 24px",
display: "flex",
flexDirection: "column",
@ -346,7 +346,7 @@ const BankDepositTable = (props) => {
style={{
backgroundColor: "#e6ffee",
border: "1px solid #00b300",
borderRadius: "8px",
borderRadius: "20px",
padding: "16px 24px",
display: "flex",
flexDirection: "column",
@ -369,7 +369,7 @@ const BankDepositTable = (props) => {
style={{
backgroundColor: "#ffe6e6",
border: "1px solid #ff4d4d",
borderRadius: "8px",
borderRadius: "20px",
padding: "16px 24px",
display: "flex",
flexDirection: "column",

View File

@ -23,12 +23,9 @@
background-color: #ffffff;
width: auto;
border-radius: 44px;
padding: 10px 50px;
padding: 10px 20px; /* Equal padding on left and right sides */
}
/* Active button styles */
.btn.active {
background-color: #ffaf32; /* Yellow background */
@ -131,6 +128,7 @@
background-color: #ffffff;
justify-content: center;
align-items: center;
gap: 10px;
}
.pgbtn {
@ -139,7 +137,7 @@
border: #ced4da;
width: 30px;
height: 30px;
border-radius: 30px;
border-radius: 50%;
}
.active-pgbtn {
@ -147,7 +145,7 @@
border: 1px solid #00230007;
width: 30px;
height: 30px;
border-radius: 30px;
border-radius: 50%;
}
.filterbutton {

View File

@ -298,7 +298,7 @@ const InvoiceTable = ({ reloadData }) => {
style={{
backgroundColor: "#fff8e6",
border: "1px solid #ffd700",
borderRadius: "8px",
borderRadius: "20px",
padding: "16px 24px",
display: "flex",
flexDirection: "column",
@ -321,7 +321,7 @@ const InvoiceTable = ({ reloadData }) => {
style={{
backgroundColor: "#e6ffee",
border: "1px solid #00b300",
borderRadius: "8px",
borderRadius: "20px",
padding: "16px 24px",
display: "flex",
flexDirection: "column",
@ -344,7 +344,7 @@ const InvoiceTable = ({ reloadData }) => {
style={{
backgroundColor: "#ffe6e6",
border: "1px solid #ff4d4d",
borderRadius: "8px",
borderRadius: "20px",
padding: "16px 24px",
display: "flex",
flexDirection: "column",

View File

@ -314,18 +314,20 @@ function PayInvoice() {
>
Pay Invoice
</button>
<button
className={`btn ${activeButton === '/bankDeposit' ? 'active' : ''}`}
onClick={() => handleLinkClick('/bankDeposit')}
>
Bank Deposit
</button>
<button
className={`btn ${activeButton === '/atmDeposit' ? 'active' : ''}`}
onClick={() => handleLinkClick('/atmDeposit')}
>
ATM Deposit
</button>
<button
className={`btn ${activeButton === '/bankDeposit' ? 'active' : ''}`}
onClick={() => handleLinkClick('/bankDeposit')}
>
Bank Deposit
</button>
</div>
</div>
<div className="formcontainer">

View File

@ -326,7 +326,7 @@ const PayInvoiceTable = ({ onEdit, reloadData }) => {
style={{
backgroundColor: "#fff8e6",
border: "1px solid #ffd700",
borderRadius: "8px",
borderRadius: "20px",
padding: "16px 24px",
display: "flex",
flexDirection: "column",
@ -349,7 +349,7 @@ const PayInvoiceTable = ({ onEdit, reloadData }) => {
style={{
backgroundColor: "#e6ffee",
border: "1px solid #00b300",
borderRadius: "8px",
borderRadius: "20px",
padding: "16px 24px",
display: "flex",
flexDirection: "column",
@ -372,7 +372,7 @@ const PayInvoiceTable = ({ onEdit, reloadData }) => {
style={{
backgroundColor: "#ffe6e6",
border: "1px solid #ff4d4d",
borderRadius: "8px",
borderRadius: "20px",
padding: "16px 24px",
display: "flex",
flexDirection: "column",

View File

@ -628,139 +628,85 @@ export default function Expense() {
<div className="main-container">
<div className="d-flex p-2 ">
<div className="expensecontainer d-flex flex-column pd-2 ">
<div className="d-flex align-items-center mb-3" style={{ gap: "10px" }}>
<button className="btn cus d-flex align-items-center" onClick={toggleModal}>
<div
className="d-flex align-items-center mb-3"
style={{
justifyContent: "space-between",
gap: "10px",
marginBottom: "10px",
}}
>
{/* Title on the left */}
<h3 className="mb-1" style={{ margin: "0" }}>Expense</h3>
+ Add Invoice
{/* Buttons on the right */}
<div className="d-flex align-items-center" style={{ gap: "10px" }}>
<button
style={{
backgroundColor: "#4A5546",
boxShadow: "none",
outline: "none",
width: "auto",
height: "42px",
padding: "8px 12px",
fontSize: "14px",
border: "none",
borderRadius: "10px",
color: "#F4FFEE",
cursor: "pointer",
}}
>
Add Expense Type
<img
src={expensetype}
alt="Expense Type Icon"
style={{ width: "20px", height: "20px", marginLeft: "8px" }}
/>
</button>
<button
style={{
backgroundColor: "#4A5546",
boxShadow: "none",
outline: "none",
width: "auto",
height: "42px",
padding: "8px 12px",
fontSize: "14px",
border: "none",
borderRadius: "10px",
color: "#F4FFEE",
cursor: "pointer",
}}
>
Add New Vendor
<img
src={vendor}
alt="Vendor Icon"
style={{ width: "20px", height: "20px", marginLeft: "8px" }}
/>
</button>
<button
className="btn cus d-flex align-items-center" onClick={toggleModal}
style={{
width: "180px",
height: "42px",
justifyContent:"center",
textAlign:'center',
}}
>
Add Invoice
<img
src={invoiceIcon}
alt="Invoice Icon"
style={{ width: "20px", height: "20px", marginLeft: "8px" }}
/>
</button>
<button style={{
backgroundColor: "#4A5546",
boxShadow: "none",
outline: "none",
width: "auto",
height: "42px",
padding: "8px 12px",
fontSize: "16px",
border: "none",
borderRadius: "10px",
color: "#F4FFEE",
cursor: "pointer",
}}>
+ Add New Vendor
<img
src={vendor}
alt="Invoice Icon"
style={{ width: "20px", height: "20px", marginLeft: "8px" }}
/>
</button>
<button style={{
backgroundColor: "#4A5546",
boxShadow: "none",
outline: "none",
width: "auto",
height: "42px",
padding: "8px 12px",
fontSize: "16px",
border: "none",
borderRadius: "10px",
color: "#F4FFEE",
cursor: "pointer",
}}
>
+ Add Expense Type
<img
src={expensetype}
alt="Invoice Icon"
style={{ width: "20px", height: "20px", marginLeft: "8px" }}
/>
</button>
<div
style={{
display: "flex",
gap: "16px",
justifyContent: "center",
alignItems: "center",
margin: "20px",
}}
>
{/* Invoice due this month */}
<div
style={{
backgroundColor: "#fff8e6",
border: "1px solid #ffd700",
borderRadius: "8px",
padding: "16px 24px",
display: "flex",
flexDirection: "column",
justifyContent: "center",
alignItems: "flex-start",
width: "300px",
textAlign: "left",
}}
>
<p style={{ fontSize: "24px", fontWeight: "bold", margin: "0" }}>
$500
</p>
<p style={{ fontSize: "14px", color: "#555", margin: "4px 0" }}>
Invoice due this month
</p>
</div>
{/* Last 7 days sale */}
<div
style={{
backgroundColor: "#e6ffee",
border: "1px solid #00b300",
borderRadius: "8px",
padding: "16px 24px",
display: "flex",
flexDirection: "column",
justifyContent: "center",
alignItems: "flex-start",
width: "300px",
textAlign: "left",
}}
>
<p style={{ fontSize: "24px", fontWeight: "bold", margin: "0" }}>
$1900
</p>
<p style={{ fontSize: "14px", color: "#555", margin: "4px 0" }}>
Last 7 days sale
</p>
</div>
{/* Expense this month */}
<div
style={{
backgroundColor: "#ffe6e6",
border: "1px solid #ff4d4d",
borderRadius: "8px",
padding: "16px 24px",
display: "flex",
flexDirection: "column",
justifyContent: "center",
alignItems: "flex-start",
width: "300px",
textAlign: "left",
}}
>
<p style={{ fontSize: "24px", fontWeight: "bold", margin: "0" }}>
$0.00
</p>
<p style={{ fontSize: "14px", color: "#555", margin: "4px 0" }}>
Expense this month
</p>
</div>
</div>
</div>
@ -796,11 +742,11 @@ export default function Expense() {
className="modal-container"
onClick={(e) => e.stopPropagation()}
style={{
width: "1200px",
width: "1800px",
backgroundColor: "white",
margin: "100px auto",
padding: "20px",
borderRadius: "8px",
// padding: "2px",
borderRadius: "30px",
position: "relative",
boxShadow: "0 4px 6px rgba(0, 0, 0, 0.1)",
}}
@ -830,7 +776,7 @@ export default function Expense() {
</div>
<div className="modal-body">
<form>
<div className="form-row form-group col-md-12 position-relative d-flex">
<div className="form-row form-group col-md-12 position-relative d-flex gap-3">
<div className="col-md-3 " style={{ paddingRight: "10px" }}>
<input
style={{
@ -872,7 +818,7 @@ export default function Expense() {
/>
</div>
<div className="col-md-6" style={{ paddingRight: "10px" }}>
<div className="col-md-5" style={{ paddingRight: "10px" }}>
<select
style={{
backgroundColor: "#ffffff",
@ -910,7 +856,7 @@ export default function Expense() {
</div>
</div>
<div className="d-flex col-md-12">
<div className="d-flex align-items-center justify-content-center col-md-12 gap-3">
<div className="col-md-3" style={{ paddingRight: "10px" }}>
<select
@ -997,7 +943,7 @@ export default function Expense() {
padding: '10px 10px',
width: 'fit-content',
borderRadius: '40px',
// marginTop:'20px',
marginTop:'10px',
display: 'flex', // Use flexbox
gap: '10px', // Add spacing between the options
}}
@ -1018,7 +964,7 @@ export default function Expense() {
style={{
backgroundColor: formData.pay_method_status === 'pay_later' ? '#4a5546' : 'transparent',
color: formData.pay_method_status === 'pay_later' ? '#fff' : '#000',
padding: '5px 10px',
padding: '5px 5px',
borderRadius: '20px',
}}
@ -1042,7 +988,7 @@ export default function Expense() {
style={{
backgroundColor: formData.pay_method_status === 'pay_now' ? '#4a5546' : 'transparent',
color: formData.pay_method_status === 'pay_now' ? '#fff' : '#000',
padding: '5px 10px',
padding: '5px 5px',
borderRadius: '20px',
}}
@ -1066,7 +1012,7 @@ export default function Expense() {
style={{
backgroundColor: formData.pay_method_status === 'credit_invoice' ? '#4a5546' : 'transparent',
color: formData.pay_method_status === 'credit_invoice' ? '#fff' : '#000',
padding: '5px 10px',
padding: '5px 5px',
borderRadius: '20px',
}}
@ -1084,7 +1030,7 @@ export default function Expense() {
className="d-flex col-md-6 mb-3"
style={{
border: '2px solid #ACB4AA',
padding: '10px 10px',
padding: '5px 5px',
width: 'fit-content',
borderRadius: '40px',
display: 'flex', // Use flexbox for inner items
@ -1104,7 +1050,7 @@ export default function Expense() {
backgroundColor: formData.pay_method === method.value ? "#4a5546" : "transparent",
color: formData.pay_method === method.value ? "white" : "black",
padding: '5px 10px', // Add padding for better appearance
padding: '5px 5px', // Add padding for better appearance
borderRadius: '20px', // Optional: Round the corners of the label
cursor: "pointer",
}}

View File

@ -13,4 +13,6 @@
font-size: 22px;
font-weight: 600;
color: #000;
text-align: center; /* Center the text */
width: 100%; /* Ensure it spans the full width */
}

View File

@ -6,6 +6,9 @@ import useApi from "../../../../utils/api-manager/Helper/useApi";
import AuthContext from "../../.././../utils/secure-route/AuthContext";
import SettingTable from "../ManageSettings/SettingTable";
import Swal from "sweetalert2";
import atmdeposite from "../../../../assets/Image/Atm Deposite.png"
export default function GeneralLedgerATM() {
const { user } = useContext(AuthContext);
@ -249,9 +252,21 @@ export default function GeneralLedgerATM() {
<ToastContainer />
<div className="due-days">
<div className="header-row mb-4">
<div className="setting-title">ATM Deposit</div>
<button className="gas-invoice-add-button" onClick={toggleModal}>
+ Add ATM Deposit
<div className="setting-title" style={{marginLeft:"8px"}}>ATM Deposit</div>
<button className="btn cus d-flex align-items-center" style={{
width: "250px",
height: "48px",
justifyContent:"center"
// justifyContent:"center",
// textAlign:'center',
}} onClick={toggleModal}>
Add ATM Deposit
<img
src={atmdeposite}
alt="Atm Deposite Icon"
style={{ width: "30px", height: "30px", marginLeft: "18px" }}
/>
</button>
</div>
@ -275,7 +290,7 @@ export default function GeneralLedgerATM() {
backgroundColor: "white",
margin: "100px auto",
// padding: "20px",
borderRadius: "8px",
borderRadius: "40px",
position: "relative",
boxShadow: "0 4px 6px rgba(0, 0, 0, 0.1)",
}}
@ -306,12 +321,26 @@ export default function GeneralLedgerATM() {
</div>
<div className="modal-body">
<form onSubmit={handleAtmDeposit}>
<div className="form-row form-group col-md-5 position-relative">
<div className="form-row">
{/* Date Input Field */}
{/* Amount Input Field */}
<div className="form-group col-12">
<div
className="d-flex gap-3 align-items-center"
style={{ display: "flex", justifyContent: "space-between" }}
>
{/* Date Input */}
<input
style={{
backgroundColor: "#0023000C",
borderRadius: "10px",
backgroundColor: "#ffffff",
border: "none", // Remove all borders
borderBottom: "2px solid #ccc", // Set bottom border
borderRadius: "0px", // Remove border radius
height: "52px",
flex: 1, // Flex-grow to manage space
}}
type="date"
className="form-control"
@ -320,14 +349,52 @@ export default function GeneralLedgerATM() {
onChange={handleDateChange}
required
/>
{/* Amount Input */}
<div
className="input-group"
style={{
backgroundColor: "#ffffff",
border: "none", // Remove all borders
borderBottom: "2px solid #ccc", // Set bottom border
borderRadius: "0px", // Remove border radius
height: "52px",
flex: 1, // Flex-grow to manage space
}}
>
<input
type="text"
name="amount"
className="form-control sampletext"
value={formData.amount}
onChange={handleChange}
placeholder="Amount"
aria-label="Amount"
aria-describedby="addon-wrapping"
onInput={(e) => {
// Allow only numbers and a decimal point with two digits after it
e.target.value = e.target.value
.replace(/[^0-9.]/g, "") // Remove non-numeric characters except the decimal point
.replace(/^(\d*\.?\d{0,2}).*/g, "$1") // Allow only two decimal places
.slice(0, 12); // Limit input length (10 digits + 1 decimal + 2 decimal places)
}}
/>
</div>
</div>
</div>
<div className="d-flex col-md-12">
<div className="form-row d-flex col-md-6">
<select
style={{
backgroundColor: "#0023000C",
borderRadius: "10px",
backgroundColor: "#ffffff",
backgroundColor: "#ffffff",
border: "none", // Remove all borders
borderBottom: "2px solid #ccc", // Set bottom border
borderRadius: "0px", // Remove border radius
height: "52px",
}}
className="form-control"
@ -337,7 +404,7 @@ export default function GeneralLedgerATM() {
onChange={handleChange}
required
>
<option value="">Type</option>
<option value="">Cash Type</option>
<option value="Business cash">Business Cash</option>
<option value="Gas cash">Gas Cash</option>
<option value="Lottery cash">Lottery Cash</option>
@ -499,6 +566,7 @@ export default function GeneralLedgerATM() {
)}
</div>
</div>
)}
<div className="form-row d-flex col-md-12">
<textarea
@ -513,56 +581,7 @@ export default function GeneralLedgerATM() {
></textarea>
</div>
<div className="form-row d-flex col-md-6 ">
<div class="containercolor">
<div
class="input-group col-md-6 p-2 mt-2"
style={{
backgroundColor: "#0023000C",
borderRadius: "10px",
height: "52px",
border: "1px lightgray solid",
}}
>
<div
class="input-group-prepend"
style={{
background: "#F5F5F5",
height: "100%",
borderRadius: "10px 0 0 10px",
display: "flex",
alignItems: "center",
}}
>
<span
class="input-group-text prefixtext"
style={{
border: "none",
fontSize: "14px",
}}
>
USD
</span>
</div>
<input
type="text"
name="amount"
className="form-control sampletext"
value={formData.amount}
onChange={handleChange}
placeholder="Amount"
aria-label="Username"
aria-describedby="addon-wrapping"
onInput={(e) => {
// Allow only numbers and a decimal point with two digits after it
e.target.value = e.target.value
.replace(/[^0-9.]/g, '') // Remove non-numeric characters except the decimal point
.replace(/^(\d*\.?\d{0,2}).*/g, '$1') // Allow only two decimal places
.slice(0, 12); // Limit input length (10 digits + 1 decimal + 2 decimal places)
}}
/>
</div>
</div>
</div>
<div className="modal-footer" style={{ border: "none" }}>
<button

View File

@ -7,6 +7,8 @@ import AuthContext from "../../.././../utils/secure-route/AuthContext";
import SettingTable from "../ManageSettings/SettingTable";
import "./GeneralLedger.css";
import Swal from "sweetalert2";
import bankdeposite from '../../../../assets/Image/Bank Deposite .png'
export default function GeneralLedgerBank() {
const { user } = useContext(AuthContext);
@ -275,11 +277,19 @@ export default function GeneralLedgerBank() {
<div className="header-row mb-4">
<div className="setting-title">Bank Deposit</div>
<button
className="gas-invoice-add-button-bank-deposit"
className="btn cus d-flex align-items-center"
onClick={openAddModal}
style={{ Width: "200px" }}
style={{ width: "250px",
height: "48px",
justifyContent:"center" }}
>
+ Add Bank Deposit
Add Bank Deposit
<img
src={bankdeposite}
alt="Bank Deposite Icon"
style={{ width: "30px", height: "30px", marginLeft: "18px" }}
/>
</button>
</div>

View File

@ -8,7 +8,7 @@ import AuthContext from "../../.././../utils/secure-route/AuthContext";
import SettingTable from "../ManageSettings/SettingTable";
import "./GeneralLedger.css";
import Swal from "sweetalert2";
import otherincome from '../../../../assets/Image/other income.png'
export default function GeneralLedgerOtherIncome() {
const { user } = useContext(AuthContext);
@ -300,11 +300,18 @@ export default function GeneralLedgerOtherIncome() {
<div className="header-row mb-4">
<div className="setting-title">Other Income</div>
<button
className="gas-invoice-add-button-bank-deposit"
className="btn cus d-flex align-items-center"
onClick={handleAddOtherIncome}
style={{ Width: "200px" }}
style={{ width: "250px",
height: "48px",
justifyContent:"center" }}
>
+ Add Other Income
Add Other Income
<img
src={otherincome}
alt="Bank Deposite Icon"
style={{ width: "30px", height: "30px", marginLeft: "18px" }}
/>
</button>
</div>

View File

@ -4,6 +4,10 @@ import SettingTable from "../ManageSettings/SettingTable";
import useApi from "../../../../utils/api-manager/Helper/useApi";
import AuthContext from "../../.././../utils/secure-route/AuthContext";
import { toast,ToastContainer } from "react-toastify";
import prepaid from '../../../../assets/Image/prepaid.png'
export default function GeneralLedgerSalesTax() {
// const [billDate, setBillDate] = useState("2024-09-20"); // Example default date
// const dateInputRef = useRef(null);
@ -126,9 +130,18 @@ export default function GeneralLedgerSalesTax() {
<div className="expensecontainer d-flex flex-column pd-2">
<div className="d-flex justify-content-between align-items-center mb-3">
<h3 className="mb-1">Sales Tax</h3>
<button className="btn btn-primary cus" onClick={toggleModal}>
<button className="btn cus d-flex align-items-center"
style={{ width: "250px",
height: "48px",
justifyContent:"center" }}
onClick={toggleModal}>
{" "}
+ Add Prepaid Tax
Add Prepaid Tax
<img
src={prepaid}
alt="Bank Deposite Icon"
style={{ width: "30px", height: "30px", marginLeft: "18px" }}
/>
</button>
</div>

View File

@ -241,42 +241,21 @@ const PayrollTable = ({
</button>
{/* <button className="btn custbtn2" type="submit">
<svg
width="24"
height="24"
viewBox="0 0 24 24"
fill="none"
xmlns="http://www.w3.org/2000/svg"
style={{ marginRight: "3px" }}
>
<g opacity="0.8">
<path
d="M19 3H5C3.586 3 2.879 3 2.44 3.412C2.001 3.824 2 4.488 2 5.815V6.505C2 7.542 2 8.061 2.26 8.491C2.52 8.921 2.993 9.189 3.942 9.723L6.855 11.363C7.491 11.721 7.81 11.9 8.038 12.098C8.512 12.509 8.804 12.993 8.936 13.588C9 13.872 9 14.206 9 14.873V17.543C9 18.452 9 18.907 9.252 19.261C9.504 19.616 9.952 19.791 10.846 20.141C12.725 20.875 13.664 21.242 14.332 20.824C15 20.406 15 19.452 15 17.542V14.872C15 14.206 15 13.872 15.064 13.587C15.1896 13.0042 15.5059 12.4798 15.963 12.097C16.19 11.9 16.509 11.721 17.145 11.362L20.058 9.722C21.006 9.189 21.481 8.922 21.74 8.492C22 8.062 22 7.542 22 6.504V5.814C22 4.488 22 3.824 21.56 3.412C21.122 3 20.415 3 19 3Z"
stroke="white"
strokeWidth="1.5"
/>
</g>
</svg>
Filter
</button> */}
</div>
<div style={{ marginRight: "58%" }}>
<div style={{ marginRight: "1%" }}>
<div
className="expense-search d-flex align-items-center"
className="expense-search align-items-center"
style={{
display: "flex",
alignItems: "center",
backgroundColor: "#FFFFFF",
border: "1px solid #DBDBDB",
borderRadius: "10px",
// boxSizing: "border-box",
cursor: "pointer",
width: "200px",
width: "170px",
gap: "10px",
}}
>
<span
@ -284,9 +263,9 @@ const PayrollTable = ({
fontFamily: "'Comfortaa'",
fontStyle: "normal",
fontWeight: "400",
fontSize: "16px",
padding: "5px",
fontSize: "14px", // Compact text
color: "#000000",
marginLeft:"10px"
}}
>
Show Rows:
@ -296,17 +275,18 @@ const PayrollTable = ({
id="pageSelect"
className="selectoptions"
style={{
backgroundColor: "#282E26",
borderRadius: "0px 10px 10px 0px",
color: "#F4FFEE",
backgroundColor: "#282E26", // Match background color
color: "#FFFFFF", // White text color
fontFamily: "'Comfortaa'",
fontStyle: "normal",
fontWeight: "700",
fontSize: "16px",
lineHeight: "18px",
padding: "5px 8px",
border: "none",
fontSize: "14px",
lineHeight: "16px",
padding: "4px 10px", // Adjust padding for the dropdown
border: "none", // No border
borderRadius: "0 10px 10px 0", // Rounded on the right side only
cursor: "pointer",
marginLeft: "auto", // Push to the right
}}
value={rowsPerPage}
onChange={(e) => {
@ -323,7 +303,6 @@ const PayrollTable = ({
</div>
</div>
<table className="data-table custom-table ">
<thead className="table-header" >

View File

@ -132,7 +132,9 @@ function ManageDepartments() {
}}
required
/>
<button className="btn cus d-flex align-items-center" onClick={handleSaveDepartment}>
<button className="btn d-flex align-items-center"
style={{width:"208px" , height:"33px" , backgroundColor: "#FFAF32" , borderRadius:"10px" , justifyContent:"center"}}
onClick={handleSaveDepartment}>
{editDepartmentId ? "Update Department" : " + Add Department"}
</button>
</div>

View File

@ -1,6 +1,5 @@
/* eslint-disable react-hooks/exhaustive-deps */
import React, { useState, useEffect, useContext } from "react";
import ReusableModal from "./ReusableModal";
import useApi from "../../../../utils/api-manager/Helper/useApi";
import AuthContext from "../../../../utils/secure-route/AuthContext";
import "./Settings.css";
@ -8,17 +7,14 @@ import SettingTable from "./SettingTable";
import Swal from "sweetalert2";
import { toast, ToastContainer } from "react-toastify";
function ManageExpenseType() {
let { user } = useContext(AuthContext);
const storeId = user.store;
const [showModal, setShowModal] = useState(false);
const [isEditMode, setIsEditMode] = useState(false);
const [selectedExpenseType, setSelectedExpenseType] = useState(null);
const [expenseType, setExpenseType] = useState("");
const [expenseTypes, setExpenseTypes] = useState([]);
const [selectedExpenseTypeId, setSelectedExpenseTypeId] = useState(null); // Store the ID of the currently selected expense type
const { Get, Post, Put, Delete } = useApi();
useEffect(() => {
const fetchExpenseTypes = async () => {
try {
@ -30,73 +26,56 @@ function ManageExpenseType() {
};
fetchExpenseTypes();
}, []);
const handleShow = () => {
setShowModal(true);
setIsEditMode(false);
setSelectedExpenseType(null);
const handleAddNew = () => {
setExpenseType("");
setSelectedExpenseTypeId(null); // Reset the selected ID
};
const handleEdit = (expenseType) => {
setShowModal(true);
setIsEditMode(true);
setSelectedExpenseType(expenseType);
setExpenseType(expenseType.title);
setSelectedExpenseTypeId(expenseType.id); // Store the ID of the selected expense type
};
const handleClose = () => {
setShowModal(false);
setIsEditMode(false);
setSelectedExpenseType(null);
setExpenseType("");
};
const handleSave = async () => {
if (expenseType) {
try {
if (isEditMode && selectedExpenseType) {
if (selectedExpenseTypeId) {
// Update existing expense type
const response = await Put(
"vendorDepartmentServiceData",
selectedExpenseType.id,
{ title: expenseType, store: storeId, type: "expense type" } // Send the data with store and type
);
if (response.status === 200) {
setExpenseTypes(
expenseTypes.map((et) =>
et.id === selectedExpenseType.id
? { ...et, title: expenseType }
: et
)
);
toast.success("Expense type updated successfully!");
} else {
console.error("Error updating expense type:", response.data);
toast.error("Error updating expense type: " + response.data);
}
} else {
// Add new expense type
const response = await Post("vendorDepartmentServiceData", {
const response = await Put("vendorDepartmentServiceData", selectedExpenseTypeId, {
title: expenseType,
store: storeId,
type: "expense type",
title: expenseType,
});
if (response.status === 201) {
setExpenseTypes([...expenseTypes, response.data]);
toast.success("Expense type added successfully!");
if (response.status === 200) {
// Update the state with the edited expense type
setExpenseTypes(expenseTypes.map((et) =>
et.id === selectedExpenseTypeId ? { ...et, title: expenseType } : et
));
toast.success("Expense type updated successfully!");
}
} else {
console.error("Error saving expense type:", response.data);
toast.error("Error saving expense type: " + response.data);
// Add a new expense type
const response = await Post("vendorDepartmentServiceData", {
title: expenseType,
store: storeId,
type: "expense type",
});
if (response.status === 201) { // Assuming a 201 status code for successful creation
setExpenseTypes([...expenseTypes, response.data]); // Assuming response.data returns the new expense type
toast.success("Expense type added successfully!");
}
}
handleClose();
handleAddNew(); // Reset after saving (adding or updating)
} catch (error) {
toast.error(
isEditMode ? "Error updating expense type: " (error.response ? error.response.data : error.message) :
"Error saving expense type: " + (error.response ? error.response.data : error.message)
);
toast.error("Error saving expense type: " + (error.response ? error.response.data : error.message));
}
} else {
toast.warn("Expense type is required");
}
};
const handleDelete = async (id) => {
const result = await Swal.fire({
title: "Are you sure?",
@ -108,7 +87,6 @@ function ManageExpenseType() {
confirmButtonText: "Yes, delete it!",
});
// Check if the user clicked the confirm button
if (!result.isConfirmed) return; // Exit if the user cancels
try {
await Delete("vendorDepartmentServiceData", id);
@ -118,41 +96,16 @@ function ManageExpenseType() {
toast.error("Error deleting expense type: " + (error.response ? error.response.data : error.message));
}
};
const data = expenseTypes.filter((et) => et.type === "expense type");
const columns = [{ header: "Department / Expense Type", field: "title" }];
return (
<>
<div className="due-days">
<div className="header-row">
<div className="setting-title">Manage Expense Type</div>
<div className="btn-position">
<button className="vendor-add-button" onClick={handleShow}>
+ Add Expense Type
</button>
</div>
</div>
<SettingTable
data={data}
showFooter={true}
columns={columns}
showAction={true}
onEdit={handleEdit}
onDelete={handleDelete}
/>
<ReusableModal
show={showModal}
handleClose={handleClose}
title={isEditMode ? "Edit Expense Type" : "Add Expense Type"}
width="697px"
height="171px"
>
<form
onSubmit={(e) => {
e.preventDefault();
handleSave();
}}
>
<div className="form-group d-flex align-items-center ">
<div className="" style={{ marginTop: "5%" }}>
<div className="department-container">
<div className="input-container">
<div className="input-row">
<input
type="text"
id="expenseTypeName"
@ -160,33 +113,40 @@ function ManageExpenseType() {
placeholder="Expense Type"
value={expenseType}
onChange={(e) => setExpenseType(e.target.value)}
style={{ width: "483px", marginRight: "10px" }}
style={{ width: "483px", marginRight: "10px" ,
border: "none", // Remove all borders
borderBottom: "2px solid #ccc", // Set bottom border
borderRadius: "0px", // Remove border radius
}}
/>
<button
type="submit"
style={{
padding: "6px 8px",
backgroundColor: "#4545db",
color: "white",
border: "none",
borderRadius: "40px",
cursor: "pointer",
width: "103px",
height: "42px",
fontSize: "18px",
marginLeft:"20px",
isEditMode
}}
type="button" // Prevent form submission
className="btn d-flex align-items-center"
style={{width:"208px" , height:"33px" , backgroundColor: "#FFAF32" , borderRadius:"10px" , justifyContent:"center"}}
onClick={handleSave} // Call handleSave on button click
>
{isEditMode ? "Update" : "Submit"}
{selectedExpenseTypeId ? "Update Expense" : "Add Expense Type"}
</button>
</div>
</form>
</ReusableModal>
</div>
</div>
</div>
<div className="due-days">
<SettingTable
data={data}
showFooter={true}
columns={columns}
showAction={true}
onEdit={handleEdit} // Pass handleEdit to SettingTable
onDelete={handleDelete}
/>
<ToastContainer />
</div>
</>
);
}
export default ManageExpenseType;

View File

@ -413,23 +413,13 @@ const ManageSettings = () => {
<div className="card">
<div className="card-body">
<p className="question-text">{setting.question}</p>
<CustomSwitch
setting={setting}
isActive={
setting.id === 13 ||
setting.id === 14 ||
checkedStates[setting.id]
}
handleSwitchChange={handleSwitchChange}
disabled={setting.id === 13 || setting.id === 14} // Disable for IDs 13 and 14
/>
</div>
</div>
</div>
))}
<div className="row setting-manage">
{/* First Dropdown */}
<div className="col-md-6">
{isDropdownVisible && (
<select
@ -442,7 +432,9 @@ const ManageSettings = () => {
</select>
)}
</div>
<div className="col-md-6 mb-3">
{/* Second Dropdown */}
<div className="col-md-6">
{isDropdownVisible && (
<select
className="form-select mt-3"
@ -450,20 +442,18 @@ const ManageSettings = () => {
value={selectedLotteryRegister}
onChange={handleLotteryRegisterChange}
>
{renderOptions(
selectedLotteryRegister,
numberOfLotteryRegisters
)}
{renderOptions(selectedLotteryRegister, numberOfLotteryRegisters)}
</select>
)}
</div>
<div className="col-md-12">
<div className="col-md-6 mb-3">
<label htmlFor="sales_tax_percentage">
{/* Sales Tax Percentage Input */}
<div className="col-md-12 d-flex align-items-center mt-3" style={{
}}>
<label htmlFor="sales_tax_percentage" className="me-2">
Sales Tax Percentage:
</label>
</div>
<div className="col-md-6">
<input
type="number"
id="sales_tax_percentage"
@ -471,13 +461,13 @@ const ManageSettings = () => {
onBlur={handleIncrementSalesTax} // Trigger the function when input loses focus
onChange={(e) => setSalesTax(e.target.value)} // Allow editing the value while typing
placeholder="Enter percentage"
className="form-control"
className="form-control w-25" // Adjust width as needed
/>
</div>
</div>
</div>
</div>
</div>
<div className="bank-container">
<div className="header-row">
<div className="setting-title">Manage Bank</div>
@ -535,7 +525,7 @@ const ManageSettings = () => {
show={showModal && formType === "bank"}
handleClose={handleClose}
title="Add Bank"
width="1054px"
width="600px"
height="auto"
>
<form>
@ -546,7 +536,11 @@ const ManageSettings = () => {
onChange={(e) => setBankName(e.target.value)}
className="input-field"
placeholder="Bank Name"
style={{ width: "483px", marginRight: "10px" }}
style={{
width: "483px", marginRight: "10px", backgroundColor: "#ffffff",
border: "none", // Remove all borders
borderBottom: "2px solid #ccc", // Set bottom border
}}
/>
<input
type="text"
@ -554,7 +548,11 @@ const ManageSettings = () => {
onChange={(e) => setBankBranch(e.target.value)}
className="input-field"
placeholder="Bank Short Name"
style={{ width: "483px", marginRight: "10px" }}
style={{
width: "483px", marginRight: "10px", backgroundColor: "#ffffff",
border: "none", // Remove all borders
borderBottom: "2px solid #ccc", // Set bottom border
}}
/>
</div>
<div className="form-group d-flex align-items-center mt-1">
@ -564,7 +562,11 @@ const ManageSettings = () => {
onChange={(e) => setAccountNumber(e.target.value)}
className="input-field"
placeholder="Account Number"
style={{ width: "483px", marginRight: "10px" }}
style={{
width: "270px", marginRight: "10px", backgroundColor: "#ffffff",
border: "none", // Remove all borders
borderBottom: "2px solid #ccc", // Set bottom border
}}
/>
</div>
<div style={{ display: "flex", justifyContent: "flex-end" }}>
@ -574,13 +576,13 @@ const ManageSettings = () => {
style={{
marginRight: "40px",
padding: "4px 8px",
backgroundColor: "#4545db",
backgroundColor: " #282E26",
color: "white",
border: "none",
borderRadius: "40px",
cursor: "pointer",
width: "124px",
height: "42px",
width: "181px",
height: "45px",
fontSize: "18px",
}}
>
@ -642,7 +644,11 @@ const ManageSettings = () => {
className="input-day"
value={day.days}
readOnly
style={{ paddingLeft: "10px" }}
style={{
paddingLeft: "10px", backgroundColor: "#ffffff",
border: "none", // Remove all borders
borderBottom: "2px solid #ccc", // Set bottom border
}}
/>
</div>
{/* <button className="card-button day">Mark as Default</button> */}
@ -654,39 +660,50 @@ const ManageSettings = () => {
handleClose={handleClose}
title="Add Due Days"
width="683px"
height="172px"
height="230px"
>
<form>
<div className="form-group d-flex align-items-center">
<div className="form-group mx-5" style={{ display: "flex", flexDirection: "column" }}>
<input
type="number"
value={dueDays}
onChange={(e) => setDueDays(e.target.value)}
className="input-field"
placeholder="Due Days"
style={{ width: "483px", marginRight: "10px" }}
placeholder="Enter Due Days"
style={{
width: "100%",
marginBottom: "10px",
border: "none",
borderBottom: "2px solid #ccc", // Only bottom border
padding: "8px 0",
fontSize: "16px",
outline: "none",
}}
/>
<div style={{ display: "flex", justifyContent: "flex-end" }}>
<button
onClick={handleSaveDueDays}
type="button"
style={{
marginRight: "40px",
padding: "4px 8px",
backgroundColor: "#4545db",
padding: "10px 16px",
backgroundColor: "#282E26",
color: "white",
border: "none",
borderRadius: "40px",
borderRadius: "20px",
cursor: "pointer",
width: "124px",
height: "42px",
fontSize: "18px",
width: "150px",
fontSize: "16px",
}}
>
{editingDueDayId ? "Update" : "Save"}
</button>
</div>
</div>
</form>
</ReusableModal>
</div>
</>
);

View File

@ -278,21 +278,17 @@ const ManageUserTable = ({
)}
</div>
<div style={{ marginRight: "69%" }}>
<div
className="expense-search d-flex align-items-center"
style={{
display: "flex",
alignItems: "center",
backgroundColor: "#FFFFFF",
border: "1px solid #DBDBDB",
borderRadius: "10px",
// boxSizing: "border-box",
cursor: "pointer",
width: "200px",
width: "170px",
gap: "10px",
}}
>
<span
@ -300,9 +296,9 @@ const ManageUserTable = ({
fontFamily: "'Comfortaa'",
fontStyle: "normal",
fontWeight: "400",
fontSize: "16px",
padding: "5px",
fontSize: "14px", // Compact text
color: "#000000",
marginLeft:"10px"
}}
>
Show Rows:
@ -312,17 +308,18 @@ const ManageUserTable = ({
id="pageSelect"
className="selectoptions"
style={{
backgroundColor: "#282E26",
borderRadius: "0px 10px 10px 0px",
color: "#F4FFEE",
backgroundColor: "#282E26", // Match background color
color: "#FFFFFF", // White text color
fontFamily: "'Comfortaa'",
fontStyle: "normal",
fontWeight: "700",
fontSize: "16px",
lineHeight: "18px",
padding: "5px 8px",
border: "none",
fontSize: "14px",
lineHeight: "16px",
padding: "4px 10px", // Adjust padding for the dropdown
border: "none", // No border
borderRadius: "0 10px 10px 0", // Rounded on the right side only
cursor: "pointer",
marginLeft: "auto", // Push to the right
}}
value={rowsPerPage}
onChange={(e) => {
@ -337,7 +334,8 @@ const ManageUserTable = ({
</select>
</div>
</div>
</div>

View File

@ -394,14 +394,28 @@ function ManageUsers() {
<div className="header-row">
<div className="setting-title">Manage Users</div>
<div className="btn-position" style={{ display: "flex", gap: "10px" }}> {/* Set up flex with gap */}
<button
className="btn cus d-flex align-items-center"
onClick={() => handleShowUserModal()} // Open modal for adding a user
style={{
backgroundColor: "#4A5546",
boxShadow: "none",
outline: "none",
width: "auto",
height: "42px",
padding: "8px 12px",
fontSize: "16px",
border: "none",
borderRadius: "10px",
color: "#F4FFEE",
cursor: "pointer",
}}
onClick={() => setAssignOwnerModal(true)} // Open modal for assigning an owner
>
+ Add New User
Assign Existing User As Owner
<img
src={userIcon}
alt="user Icon"
src={ownerIcon}
alt="owner Icon"
style={{ width: "20px", height: "20px", marginLeft: "8px" }}
/>
</button>
@ -421,7 +435,7 @@ function ManageUsers() {
}}
onClick={() => handleShowStoreModal()} // Open modal for adding a user
>
+ Add New Store
Add New Store
<img
src={storeIcon}
alt="store Icon"
@ -429,25 +443,13 @@ function ManageUsers() {
/>
</button>
<button
style={{
backgroundColor: "#4A5546",
boxShadow: "none",
outline: "none",
width: "auto",
height: "42px",
padding: "8px 12px",
fontSize: "16px",
border: "none",
borderRadius: "10px",
color: "#F4FFEE",
cursor: "pointer",
}}
onClick={() => setAssignOwnerModal(true)} // Open modal for assigning an owner
className="btn cus d-flex align-items-center"
onClick={() => handleShowUserModal()} // Open modal for adding a user
>
+ Assign Existing User As Owner
Add New User
<img
src={ownerIcon}
alt="owner Icon"
src={userIcon}
alt="user Icon"
style={{ width: "20px", height: "20px", marginLeft: "8px" }}
/>
</button>
@ -472,7 +474,7 @@ function ManageUsers() {
width="700px"
>
<form>
<div className="form-group d-flex flex-column p-5">
<div className="form-group d-flex flex-column px-5">
<div className="d-flex align-items-center mb-3 ">
<input
type="text"
@ -592,7 +594,7 @@ function ManageUsers() {
width="700px"
>
<form>
<div className="form-group p-5">
<div className="form-group px-5">
{/* Wrapper for Flexbox */}
<div className="d-flex flex-wrap">
{/* Left Side */}
@ -745,7 +747,7 @@ function ManageUsers() {
width="600px"
>
<form onSubmit={handleAssignOwnerSubmit}>
<div className="form-group d-flex flex-column mt-1 p-3 ">
<div className="form-group d-flex flex-column mt-1 px-5 ">
<input
type="email"
className="input-field"

View File

@ -190,8 +190,8 @@ function ManageVendor() {
<div className="header-row">
<div className="setting-title">Manage Vendor</div>
<div className="btn-position">
<button className="vendor-add-button" onClick={handleShow}>
+ Add Vendor
<button className="btn cus d-flex align-items-center" style={{marginBottom:"10px"}} onClick={handleShow}>
Add Vendor
</button>
</div>
</div>
@ -224,7 +224,7 @@ function ManageVendor() {
handleSave();
}}
>
<div className="form-group d-flex align-items-center mt-0">
<div className="form-group d-flex align-items-center mt-0 mx-5">
<input
type="text"
id="vendorName"
@ -232,7 +232,11 @@ function ManageVendor() {
placeholder="Vendor Name"
value={vendorName}
onChange={(e) => setVendorName(e.target.value)}
style={{ width: "400px", marginRight: "10px", height: "44px" }}
style={{ width: "400px", marginRight: "10px", height: "44px" , backgroundColor: "#ffffff",
border: "none", // Remove all borders
borderBottom: "2px solid #ccc", // Set bottom border
borderRadius: "0px", // Remove border radius
}}
/>
<select
id="vendorType"
@ -243,7 +247,11 @@ function ManageVendor() {
setVendorDepartments([]); // Reset departments when type changes
setOpeningBalance("");
}}
style={{ width: "400px", marginRight: "10px", height: "44px" }}
style={{ width: "400px", marginRight: "10px", height: "44px" , backgroundColor: "#ffffff",
border: "none", // Remove all borders
borderBottom: "2px solid #ccc", // Set bottom border
borderRadius: "0px", // Remove border radius
}}
>
<option value="">Vendor Type</option>
<option value="purchase">Purchase</option>
@ -279,6 +287,11 @@ function ManageVendor() {
width: "400px",
marginRight: "10px",
height: "44px",
border: "none", // Remove all borders
borderBottom: "2px solid #ccc", // Set bottom border
borderRadius: "0px", // Remove border radius
marginLeft:"45px"
}}
>
<option value="">
@ -314,6 +327,9 @@ function ManageVendor() {
width: "400px",
marginRight: "10px",
height: "44px",
border: "none", // Remove all borders
borderBottom: "2px solid #ccc", // Set bottom border
borderRadius: "0px", // Remove border radius
}}
/>
)}
@ -325,13 +341,14 @@ function ManageVendor() {
style={{
marginLeft: "690px",
padding: "4px 8px",
backgroundColor: "#4545db",
background: "#282E26",
color: "white",
border: "none",
borderRadius: "40px",
cursor: "pointer",
width: "124px",
height: "42px",
width: "181px",
height: "45px",
fontSize: "18px",
}}
>

View File

@ -7,15 +7,15 @@ import { toast, ToastContainer } from "react-toastify";
import Swal from "sweetalert2";
import "./Settings.css";
function OtherIncomeType() {
let { user } = useContext(AuthContext);
const storeId = user.store;
const [showModal, setShowModal] = useState(false);
const [name, setName] = useState("");
const [incomes, setIncomes] = useState([]);
const [editIncome, setEditIncome] = useState(null);
const { Get, Post, Put, Delete } = useApi();
useEffect(() => {
// Fetch existing income types from the API
const fetchIncomes = async () => {
@ -29,6 +29,7 @@ function OtherIncomeType() {
};
fetchIncomes();
}, []);
const handleShow = (income = null) => {
if (income) {
setEditIncome(income);
@ -37,20 +38,23 @@ function OtherIncomeType() {
setEditIncome(null);
setName(""); // Reset name when adding a new income type
}
setShowModal(true);
};
const handleClose = () => {
setShowModal(false);
setName(""); // Reset name when closing
setEditIncome(null); // Reset editIncome when closing
};
const handleSave = async () => {
if (name) {
try {
if (editIncome) {
// Update existing income type
const response = await Put("otherIncomeData", editIncome.id, {
title: name,store: storeId,
title: name,
store: storeId,
});
const updatedIncome = response.data;
setIncomes((prevIncomes) =>
@ -62,7 +66,8 @@ function OtherIncomeType() {
} else {
// Add new income type
const response = await Post("otherIncomeData", {
title: name,store: storeId,
title: name,
store: storeId,
});
const newIncome = response.data;
setIncomes([...incomes, newIncome]);
@ -77,6 +82,7 @@ function OtherIncomeType() {
toast.warn("Income type name cannot be empty.");
}
};
const handleDelete = async (id) => {
const result = await Swal.fire({
title: "Are you sure?",
@ -104,34 +110,48 @@ function OtherIncomeType() {
toast.error("Failed to delete income type.");
}
};
return (
<>
<div className="due-days">
<div className="header-row">
<div className="setting-title">Other Income Type</div>
<div className="btn-position">
<button className="vendor-add-button" onClick={() => handleShow()}>
+ Add New
<div className="" style={{ marginTop: "5%" }}>
<ToastContainer />
{/* <p className="setting-title">Manage Departments</p> */}
<div className="department-container">
<div className="input-container">
<div className="input-row">
<input
type="text"
id="incomeTypeName"
className="input-field"
placeholder="Enter income type name"
value={name}
onChange={(e) => setName(e.target.value)}
style={{
border: "none", // Remove all borders
borderBottom: "2px solid #ccc", // Set bottom border
borderRadius: "0px", // Remove border radius
}}
/>
<button
onClick={handleSave}
className="btn d-flex align-items-center"
type="button"
style={{width:"208px" , height:"33px" , backgroundColor: "#FFAF32" , borderRadius:"10px" , justifyContent:"center"}}
>
{editIncome ? "Update " : "Add Other Income"}
</button>
</div>
</div>
</div>
<div className="store-container">
<div className="show-department-section">
<div className="dept-cards-row">
{incomes.length === 0 ? (
<p
style={{
textAlign: "center",
fontFamily: "Manrope",
fontWeight: "600",
fontSize: "40px",
background: "linear-gradient(180deg, rgba(255, 255, 255, 0.1) -92.86%, #4545DB 71.43%)",
WebkitBackgroundClip: "text",
WebkitTextFillColor: "transparent",
}}
>
No data found
</p>
) : (
incomes.map((income) => (
{incomes.map((income) => (
<div className="dept-card" key={income.id}>
<input className="dept-info" value={income.title} readOnly />
<svg
@ -150,7 +170,7 @@ function OtherIncomeType() {
</svg>
<svg
className="dept-icon"
onClick={() => handleDelete(income.id)} // Show modal for editing
onClick={() => handleDelete(income.id)}
width="16"
height="16"
viewBox="0 0 16 16"
@ -164,49 +184,15 @@ function OtherIncomeType() {
</svg>
</div>
))
)}
}
</div>
</div>
<ReusableModal
show={showModal}
handleClose={handleClose}
title={editIncome ? "Edit Other Income Type" : "Add Other Income Type"}
width="697px"
height="200px"
>
<form>
<div className="form-group d-flex align-items-center mt-1">
<input
type="text"
id="incomeTypeName"
className="input-field"
placeholder="Enter income type name"
value={name}
onChange={(e) => setName(e.target.value)}
style={{ width: "483px", marginRight: "10px" }}
/>
<button
onClick={handleSave}
type="button"
style={{
padding: "6px 8px",
backgroundColor: "#4545db", // Bootstrap primary color
color: "white",
border: "none",
borderRadius: "40px",
cursor: "pointer",
width: "103px",
height: "42px",
fontSize: "18px",
}}
>
{editIncome ? "Update" : "Save"}
</button>
</div>
</div>
</form>
</ReusableModal>
<ToastContainer/>
</>
);
}
export default OtherIncomeType;

View File

@ -47,7 +47,7 @@ const ReusableModal = ({
};
const modalContentStyle = {
borderRadius: "30px",
borderRadius: "40px",
overflow: "hidden",
width: width, // use the width prop
height: height, // use the height prop

View File

@ -82,7 +82,7 @@ const SettingTable = ({
pages.push(
<li
key={i}
className={`page-item ${currentPage === i ? "active" : ""}`}
className={`page-item ${currentPage === i ? "active" : "pgbtn"}`}
>
<a
className="page-link"
@ -200,6 +200,7 @@ const SettingTable = ({
value={searchTerm}
onChange={(e) => setSearchTerm(e.target.value)}
placeholder="Search"
style={{ height: "50px", backgroundColor: "#fff", border: '1px solid #DBDBDB', boxShadow: "0px 0px 10px rgba(187, 187, 187, 0.25)" }}
/>
<svg
className="search-container-icon"
@ -293,16 +294,55 @@ const SettingTable = ({
</div>
)}
</div>
<div className="expense-searchcontainerend d-flex align-items-center">
<h3 className="me-2">Show</h3>
<div style={{ marginRight: "1%" }}>
<div
className="expense-search d-flex align-items-center"
style={{
display: "flex",
alignItems: "center",
backgroundColor: "#FFFFFF",
border: "1px solid #DBDBDB",
borderRadius: "10px",
cursor: "pointer",
width: "200px",
}}
>
<span
style={{
fontFamily: "'Comfortaa'",
fontStyle: "normal",
fontWeight: "400",
fontSize: "14px", // Compact text
color: "#000000",
marginLeft:"10px"
}}
>
Show Rows:
</span>
<select
name="option"
id="pageSelect"
className="selectoptions"
style={{
backgroundColor: "#282E26", // Match background color
color: "#FFFFFF", // White text color
fontFamily: "'Comfortaa'",
fontStyle: "normal",
fontWeight: "700",
fontSize: "14px",
lineHeight: "16px",
padding: "2px 10px", // Adjust padding for the dropdown
border: "none", // No border
borderRadius: "0 10px 10px 0", // Rounded on the right side only
cursor: "pointer",
marginLeft: "auto", // Push to the right
}}
value={rowsPerPage}
onChange={(e) => {
setRowsPerPage(Number(e.target.value));
setCurrentPage(1); // Reset to first page on change
setCurrentPage(1); // Reset to the first page on change
}}
>
<option value={5}>5</option>
@ -311,7 +351,10 @@ const SettingTable = ({
<option value={20}>20</option>
</select>
</div>
</div>
</div>
<table className="data-table custom-table" style={{borderRadius:"none"}} >
<thead className="table-header">
<tr>
@ -435,7 +478,7 @@ const SettingTable = ({
{showFooter && (
<nav>
<ul className="pagination">
<li className={`prev-next ${currentPage === 1 ? "disabled" : ""}`}>
{/* <li className={`prev-next ${currentPage === 1 ? "disabled" : ""}`}>
<span
style={{
fontSize: "24px",
@ -454,9 +497,9 @@ const SettingTable = ({
&lt;
</span>
&nbsp;
</li>
</li> */}
{renderPagination()}
<li
{/* <li
className={`prev-next ${
currentPage === totalPages ? "disabled" : ""
}`}
@ -479,7 +522,7 @@ const SettingTable = ({
>
&gt;{" "}
</span>
</li>
</li> */}
</ul>
</nav>
)}

View File

@ -1,4 +1,8 @@
/*================================================Setting page===================================================================================*/
/* Dropdown container styles */
.setting-container {
display: flex;
flex-direction: column;
@ -11,6 +15,7 @@
width: 1600px;
max-width: 100%;
}
.setting-title {
margin-bottom: 20px;
font-weight: bold;
@ -18,14 +23,17 @@
color: #002300;
align-self: flex-start;
}
.row.setting-manage {
width: 1600px;
max-width: 100%;
}
.card {
margin-bottom: 20px;
max-width: 100%;
}
.card-body {
display: flex;
justify-content: space-between;
@ -35,6 +43,7 @@
max-height: 100%;
height: 56px;
}
.question-text {
margin-top: 15px;
font-size: 16px;
@ -42,97 +51,126 @@
align-items: center;
}
.form-check {
margin: 0;
}
.card {
width: 100%;
border-radius: 10px;
border: 1px solid #e0e0e0;
background-color: #ffffff;
}
.form-check-input {
cursor: pointer;
}
/*===========================================================================Bank container=================================================================*/
.bank-container {
padding: 20px; /* Adjust as needed */
padding: 20px;
/* Adjust as needed */
margin: 30px auto;
background-color: #ffffff;
border-radius: 10px;
background: #FFFFFF;
border: 1px solid #EBEAF2;
box-shadow: 0px 2px 8px rgba(6, 12, 34, 0.0392157);
border-radius: 40px;
width: 1600px;
height: 467px;
max-width: 100%;
}
.header-row {
display: flex;
justify-content: space-between;
width: 1540px;
max-width: 100%;
}
.setting-title {
font-size: 24px; /* Adjust font size as needed */
margin: 0; /* Remove default margin */
font-size: 24px;
/* Adjust font size as needed */
margin: 0;
/* Remove default margin */
}
.bank-add-button {
padding: 8px 16px;
background-color: #4545db; /* Bootstrap primary color */
color: white;
background-color: #ffaf32;
/* Bootstrap primary color */
color: #000000;
border: none;
border-radius: 40px;
border-radius: 14px;
cursor: pointer;
width: 155px;
height: 42px;
width: 177px;
height: 48px;
font-size: 18px;
}
.second-container {
display: flex;
justify-content: flex-start;
flex-wrap: wrap;
}
.bank-cards {
display: flex;
flex-wrap: wrap; /* Allow wrapping */
flex-wrap: wrap;
/* Allow wrapping */
}
.bank-card {
width: 426px;
height: 206px;
background-color: #ffffff;
border: 1px solid rgba(0, 35, 0, 0.1);
border-radius: 10px;
background: #FFFFFF;
border: 1px solid #EBEAF2;
box-shadow: 0px 2px 8px rgba(6, 12, 34, 0.0392157);
border-radius: 20px;
width: 348px;
height: 303px;
display: flex;
flex-direction: column; /* Stack content vertically */
flex-direction: column;
/* Stack content vertically */
padding: 16px;
margin: 10px 0; /* Vertical margin only */
margin: 10px 0;
/* Vertical margin only */
padding: 16px;
position: relative;
margin-right: 10px;
margin-left: 10px;
}
.bank-header {
display: flex;
justify-content: space-between;
align-items: flex-start;
position: relative;
}
.bank-details {
display: flex;
flex-direction: column;
}
.bank-name-group {
margin-bottom: 16px; /* Space between the groups of names */
margin-bottom: 16px;
/* Space between the groups of names */
}
.bank-name {
font-weight: bold;
font-size: 18px;
color: #002300;
margin-bottom: 2px;
}
.bank-short-name {
font-size: 16px;
color: #002300;
margin: 0;
}
.del-icon {
color: #002300;
position: absolute;
@ -140,6 +178,7 @@
right: 16px;
cursor: pointer;
}
.card-button {
text-align: left;
border: 1px solid #4545db;
@ -151,45 +190,60 @@
font-size: 18px;
color: #4545db;
}
.card-button.default {
width: 212px;
}
.card-button.atm {
width: 252px;
}
.card-button.ltry {
width: 277px;
}
.card-button.credit {
width: 313px;
}
/*======================================================Due Days css Start==========================================================================*/
.due-days {
padding: 20px; /* Adjust as needed */
padding: 20px;
/* Adjust as needed */
margin: 20px auto;
background-color: #ffffff;
border: 1px solid #EBEAF2;
box-shadow: "0px 2px 8px rgba(6, 12, 34, 0.0392157)";
box-shadow: 0px 2px 8px rgba(6, 12, 34, 0.0392157);
border-radius: 40px;
width: 1600px;
max-width: 100%;
background-color: #ffffff;
}
.due-card {
position: relative;
width: 360px; /* Fixed width for each card */
height: 185px; /* Fixed height for each card */
background-color: #ffffff;
border: 1px solid rgba(0, 35, 0, 0.1);
border-radius: 10px;
width: 348px;
height: 196px;
background: #FFFFFF;
border: 1px solid #EBEAF2;
box-shadow: 0px 2px 8px rgba(6, 12, 34, 0.0392157);
border-radius: 20px;
display: flex;
flex-direction: column; /* Column layout inside the card */
flex-direction: column;
/* Column layout inside the card */
padding: 16px;
margin: 10px; /* Margin for spacing */
margin: 10px;
/* Margin for spacing */
}
.due-details {
display: flex;
flex-direction: column;
}
.due-icon {
display: flex;
align-items: center;
@ -199,28 +253,41 @@
right: 16px;
cursor: pointer;
}
.input-day {
width: 260px;
height: 44px;
background-color: #f6f6f6;
border: 1px solid rgba(0, 35, 0, 0.1);
background-color: #ffffff;
border: none;
/* Remove all borders */
border-bottom: 2px solid #ccc;
/* Only apply the bottom border */
border-radius: 4px;
/* Optional: apply a border-radius if needed */
outline: none;
/* Optional: removes the default focus outline */
}
.card-button.day {
margin-top: 20px;
width: 191px;
}
.btn-position {
display: flex;
justify-content: flex-end;
}
.vendor-add {
flex-direction: column;
margin-bottom: 10px; /* Space between rows */
margin-bottom: 10px;
/* Space between rows */
}
.vendor-add-button {
padding: 8px 26px;
background-color: #4545db; /* Bootstrap primary color */
background-color: #4545db;
/* Bootstrap primary color */
color: white;
border: none;
border-radius: 40px;
@ -228,48 +295,64 @@
height: 42px;
font-size: 18px;
margin-left: 10px;
margin-bottom: 10px; /* Space between buttons */
margin-bottom: 10px;
/* Space between buttons */
}
/* Remove the margin from the last button */
.vendor-add-button:last-child {
margin-bottom: 0; /* No margin for the last button */
margin-bottom: 0;
/* No margin for the last button */
}
/* Mobile responsiveness */
@media (max-width: 600px) {
.vendor-add-button {
width: 100%; /* Full width buttons */
margin-bottom: 10px; /* Maintain spacing for mobile */
width: 100%;
/* Full width buttons */
margin-bottom: 10px;
/* Maintain spacing for mobile */
}
}
/* styles.css */
.rounded-table {
border-radius: 20px;
overflow: hidden;
border: 1px solid #ccc;
}
.table-head {
background-color: #f4f4f4;
}
.table-head th {
padding: 10px;
font-size: 18px;
font-weight: 600;
}
.table-body td {
font-size: 16px;
}
/*===============================================================Store Css Start===============================================================*/
.store-container {
display: flex;
flex-direction: column;
justify-content: flex-start;
align-items: flex-start; /* Align items to the start (left) */
border-radius: 40px;
align-items: flex-start;
/* Align items to the start (left) */
padding: 30px;
margin: 20px auto;
background-color: #ffffff;
width: 1600px;
max-width: 100%;
background: #FFFFFF;
border: 1px solid #EBEAF2;
box-shadow: "0px 2px 8px rgba(6, 12, 34, 0.0392157)";
border-radius: 14px;
}
@ -277,33 +360,44 @@
.department-container {
display: flex;
flex-direction: column;
justify-content: flex-start; /* Align items to the start (top) */
align-items: flex-start; /* Align items to the start (left) */
justify-content: flex-start;
box-shadow: 0px 2px 8px rgba(6, 12, 34, 0.0392157);
align-items: flex-start;
border: 1px solid #EBEAF2;
border-radius: 20px;
padding: 30px;
margin: 10px 0;
border: none; /* Ensure no border */
border-bottom: 2px solid #ccc; /* Set a bottom border */
margin: 20px 0; /* Center vertically with top and bottom margins */
background-color: #ffffff;
width: 850px; /* Set a fixed width */
max-width: 100%; /* Ensure it doesn't exceed the screen width */
margin-left: 160px; /* Align to the left with 9% margin */
width: 850px;
max-width: 100%;
margin-left: 160px;
}
.setting-title {
margin-bottom: 10px; /* Space between title and inputs */
font-size: 24px; /* Adjust as needed */
margin-bottom: 10px;
/* Space between title and inputs */
font-size: 24px;
/* Adjust as needed */
}
.input-container {
width: 100%; /* Ensure it takes the full width */
width: 100%;
/* Ensure it takes the full width */
}
.input-row {
display: flex; /* Use flexbox to align input fields */
gap: 10px; /* Space between input fields */
display: flex;
/* Use flexbox to align input fields */
gap: 10px;
/* Space between input fields */
}
.input-field {
padding: 10px;
width: 600px;
@ -312,19 +406,24 @@
border: 1px solid #f6f6f6;
border-radius: 5px;
}
.card-container {
display: flex;
justify-content: center;
gap: 30px;
}
.plan-title {
align-items: center; /* This centers the items vertically */
align-items: center;
/* This centers the items vertically */
gap: 10px;
width: 308px;
height: 46px;
font-size: 20px;
justify-content: center; /* Center items horizontally */
justify-content: center;
/* Center items horizontally */
}
.current-plan {
font-weight: 600;
font-size: 20px;
@ -336,23 +435,30 @@
justify-content: center;
align-items: center;
}
.card-store {
width: 377px; /* Set card width */
height: 400px; /* Set card height */
width: 377px;
/* Set card width */
height: 400px;
/* Set card height */
border: 1px solid rgba(69, 69, 219, 0.3);
box-shadow: 12px 4px 4px rgba(0, 0, 0, 0.18);
border-radius: 20px;
position: relative;
}
.card-store.basic {
background-color: #f4f6ff;
}
.card-store.premium {
background-color: #ececfb;
}
.card-store.enterprise {
background-color: #f4f6ff;
}
.card-store-title {
width: 313px;
font-size: 32px;
@ -360,11 +466,13 @@
margin-left: 20px;
font-weight: 600px;
}
.card-store-description {
width: 325px;
font-size: 20px;
margin-left: 20px;
}
.card-store-sub-amount {
display: flex;
align-items: center;
@ -373,35 +481,42 @@
margin-left: 20px;
font-weight: 600px;
}
.dollar-sign {
font-size: 40px;
margin-right: 8px;
}
.card-store-button {
display: flex;
justify-content: center;
align-items: center;
margin: auto; /* Center horizontally */
margin: auto;
/* Center horizontally */
border: 1px solid #4545db;
border-radius: 40px;
margin-top: 10px;
background-color: #ffffff;
height: 52px;
width: 300px; /* Adjust width */
width: 300px;
/* Adjust width */
padding: 0 25px;
font-size: 18px;
color: #4545db;
cursor: pointer;
}
.card-store-button.premium {
background-color: #4545db;
color: #ffffff;
}
.sub-icon {
position: absolute;
top: 16px;
right: 16px;
}
/*-----------------------------------------------------upcoming invoice-------------------------------------*/
.saved-card {
width: 260px;
@ -415,45 +530,63 @@
position: relative;
margin: 0 10px;
}
.card-head {
display: flex;
justify-content: space-between; /* Align label and bank name */
align-items: center; /* Center vertically */
margin-bottom: 10px; /* Space below header */
justify-content: space-between;
/* Align label and bank name */
align-items: center;
/* Center vertically */
margin-bottom: 10px;
/* Space below header */
}
.credit-card-label {
font-size: 16px;
margin: 0;
}
.bank-name-card {
font-size: 16px;
text-align: right; /* Align bank name to the right */
margin: 0; /* Remove default margin */
text-align: right;
/* Align bank name to the right */
margin: 0;
/* Remove default margin */
}
.card-number {
text-align: center;
font-size: 20px; /* Adjust size as needed */
font-size: 20px;
/* Adjust size as needed */
margin-top: 20px;
font-weight: 500;
}
.card-bottom {
display: flex;
justify-content: space-between; /* Space between card holder and validity */
margin-top: auto; /* Push footer to the bottom */
justify-content: space-between;
/* Space between card holder and validity */
margin-top: auto;
/* Push footer to the bottom */
}
.card-holder {
font-size: 16px;
text-align: left;
margin: 0; /* Remove default margin */
margin: 0;
/* Remove default margin */
}
.valid-through {
font-size: 12px;
text-align: right;
margin: 0;
}
.dept-button {
padding: 6px 8px;
background-color: #4545db; /* Bootstrap primary color */
background-color: #4545db;
/* Bootstrap primary color */
color: white;
border: none;
border-radius: 40px;
@ -462,59 +595,81 @@
height: 42px;
font-size: 18px;
}
.dept-cards-row {
margin-top: 30px;
display: flex;
flex-wrap: wrap; /* Allow wrapping to the next row */
gap: 10px; /* Space between cards */ /* space above cards */
flex-wrap: wrap;
/* Allow wrapping to the next row */
gap: 10px;
/* Space between cards */
/* space above cards */
}
.dept-card {
width: 474px; /* Fixed width */
height: 70px; /* Fixed height */
width: 474px;
/* Fixed width */
height: 70px;
/* Fixed height */
padding: 10px;
border: 1px solid #EBEAF2; /* Add border color */
border-radius: 20px; /* Rounded corners */
display: flex; /* Flexbox layout */
align-items: center; /* Center items vertically */
justify-content: space-between; /* Space items evenly */
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2); /* Add box shadow */
border: 1px solid #EBEAF2;
/* Add border color */
border-radius: 20px;
/* Rounded corners */
display: flex;
/* Flexbox layout */
align-items: center;
/* Center items vertically */
justify-content: space-between;
/* Space items evenly */
/* Add box shadow */
}
.dept-info {
width: 386px;
height: 50px;
padding: 10px;
background-color: #ffffff;
border: none; /* Remove the redundant border */
border: none;
/* Remove the redundant border */
border-radius: 10px; /* Rounded corners */
border-radius: 10px;
/* Rounded corners */
}
.create-department-section {
width: 100%;
}
.dept-icon {
cursor: pointer;
}
/* ===========================================================Expense Screen CSS Start =============================================================*/
input[type="date"]::-webkit-calendar-picker-indicator {
color: rgba(0, 0, 0, 0);
opacity: 1;
display: block;
background: url('data:image/svg+xml;utf8,<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M8 2V5" stroke="%23002300" stroke-width="1.5" stroke-miterlimit="10" stroke-linecap="round" stroke-linejoin="round"/><path d="M16 2V5" stroke="%23002300" stroke-width="1.5" stroke-miterlimit="10" stroke-linecap="round" stroke-linejoin="round"/><path d="M3.5 9.08984H20.5" stroke="%23002300" stroke-width="1.5" stroke-miterlimit="10" stroke-linecap="round" stroke-linejoin="round"/><path d="M21 8.5V17C21 20 19.5 22 16 22H8C4.5 22 3 20 3 17V8.5C3 5.5 4.5 3.5 8 3.5H16C19.5 3.5 21 5.5 21 8.5Z" stroke="%23002300" stroke-width="1.5" stroke-miterlimit="10" stroke-linecap="round" stroke-linejoin="round"/><path d="M15.6947 13.6992H15.7037" stroke="%23002300" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/><path d="M15.6947 16.6992H15.7037" stroke="%23002300" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/><path d="M11.9955 13.6992H12.0045" stroke="%23002300" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/><path d="M11.9955 16.6992H12.0045" stroke="%23002300" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/><path d="M8.29431 13.6992H8.30329" stroke="%23002300" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/><path d="M8.29431 16.6992H8.30329" stroke="%23002300" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/></svg>')
no-repeat;
background: url('data:image/svg+xml;utf8,<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M8 2V5" stroke="%23002300" stroke-width="1.5" stroke-miterlimit="10" stroke-linecap="round" stroke-linejoin="round"/><path d="M16 2V5" stroke="%23002300" stroke-width="1.5" stroke-miterlimit="10" stroke-linecap="round" stroke-linejoin="round"/><path d="M3.5 9.08984H20.5" stroke="%23002300" stroke-width="1.5" stroke-miterlimit="10" stroke-linecap="round" stroke-linejoin="round"/><path d="M21 8.5V17C21 20 19.5 22 16 22H8C4.5 22 3 20 3 17V8.5C3 5.5 4.5 3.5 8 3.5H16C19.5 3.5 21 5.5 21 8.5Z" stroke="%23002300" stroke-width="1.5" stroke-miterlimit="10" stroke-linecap="round" stroke-linejoin="round"/><path d="M15.6947 13.6992H15.7037" stroke="%23002300" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/><path d="M15.6947 16.6992H15.7037" stroke="%23002300" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/><path d="M11.9955 13.6992H12.0045" stroke="%23002300" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/><path d="M11.9955 16.6992H12.0045" stroke="%23002300" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/><path d="M8.29431 13.6992H8.30329" stroke="%23002300" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/><path d="M8.29431 16.6992H8.30329" stroke="%23002300" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/></svg>') no-repeat;
width: 20px;
height: 20px;
border-width: thin;
}
input[type="date"] {
cursor: default;
}
/*==================================================================vendor multiselect==========================================================*/
.chips-container {
display: flex;
flex-wrap: wrap;
margin-bottom: 5px; /* Space between chips and dropdown */
max-width: 483px; /* Match the dropdown width */
margin-bottom: 5px;
/* Space between chips and dropdown */
max-width: 483px;
/* Match the dropdown width */
}
.chip {
@ -531,6 +686,7 @@ input[type="date"] {
margin-left: 5px;
cursor: pointer;
}
/* Custom styles for the select element and option hover */
@ -539,6 +695,7 @@ input[type="date"] {
max-width: 100%;
width: 100%;
}
.data-table {
width: 100%;
border: 2px solid #F4F4F4;
@ -546,17 +703,22 @@ input[type="date"] {
/* border-radius: 20px 20px 0 0; */
overflow: hidden;
}
.table-header th, .table-body td {
.table-header th,
.table-body td {
/* border: 1px solid #F4F4F4; */
padding: 12px;
text-align: left;
text-align: center;
padding-left: 20px;
}
.table-header th {
background-color: #282e26;
color: white;
cursor: pointer; /* Added cursor for sortable columns */
cursor: pointer;
/* Added cursor for sortable columns */
}
.table-body td {
padding-left: 20px;
color: #002300;
@ -564,20 +726,25 @@ input[type="date"] {
border-bottom: 1px solid #EBEAF2;
}
.table-body tr:last-child td {
border-bottom: 1px solid #ffffff;
}
.table-body {
border-bottom: 2px solid #EBEAF2;
}
.no-column {
width: 100px;
}
.action-column {
color: #002300;
width: auto;
text-align: right;
}
.action-button {
background: none;
border: none;
@ -585,56 +752,86 @@ input[type="date"] {
padding: 0;
margin: 0 5px;
}
.action-button svg {
width: 16px;
height: 16px;
fill: #002300;
transition: fill 0.3s;
}
.action-button:hover svg {
fill: #005600;
}
.pagination {
display: flex;
justify-content: end;
padding: 10px 0;
.p.pagination {
border-end-start-radius: 24px;
border-end-end-radius: 24px;
border-radius: 50%;
/* Overall border radius for the pagination container */
border-bottom: 2px solid #EBEAF2;
background-color: #ffffff;
display: flex;
/* Ensure it behaves as a flex container */
justify-content: center;
align-items: center;
}
.pagination .page-item {
margin: 0 5px;
width: 30px;
/* Fixed width */
height: 30px;
/* Fixed height */
border-radius: 50%;
/* Make sure all page items are circular */
display: flex;
/* Center the content */
align-items: center;
/* Center the content vertically */
justify-content: center;
/* Center the content horizontally */
}
.pagination .page-link {
padding: 10px;
border: 1px solid #F4F4F4;
/* background-color: #ffffff; */
background-color: #b6d7a8;
border-radius: 30px;
border-radius: 50%;
/* Make sure links are circular */
color: #002300;
text-decoration: none;
display: flex;
/* Center the content */
align-items: center;
/* Center the content vertically */
justify-content: center;
/* Center the content horizontally */
width: 30px;
/* Fixed width */
height: 30px;
/* Fixed height */
transition: background-color 0.3s, color 0.3s;
}
.pagination .page-link:hover {
background-color: red;
background-color: #b6d7a8;
/* Same background color on hover */
border-radius: 50%;
}
.pagination .page-item.active .page-link {
width: 30px;
height: 30px;
border-radius: 30px;
background-color: #ffaf32; /* Yellow background */
background-color: #ffaf32;
/* Yellow background for active item */
color: #002300;
border-color:#fbfbfbfb;
border: 1px solid #d3d3d3fb;
}
.pagination .page-item.disabled .page-link {
opacity: 0.5;
pointer-events: none;
border-radius: 50%;
border-color: #d3d3d3;
/* Border color for active item */
}
.pagination .page-item.pgbtn .page-link {
border-radius: 50%;
}

View File

@ -418,7 +418,7 @@ export default function Payroll() {
<div
className="modal-container"
onClick={(e) => e.stopPropagation()}
style={{ width: modalType === 'payment' ? '650px' : '700px', borderRadius: '40px' }}
style={{ width: modalType === 'payment' ? '800px' : '700px', borderRadius: '40px' }}
>
<div
className="modal-header"
@ -678,7 +678,7 @@ export default function Payroll() {
backgroundColor: paymentData.payment_method === "cash" ? "#4a5546" : "transparent",
color: paymentData.payment_method === "cash" ? "#ffffff" : "#000000",
border: 'none',
padding: '5px 5px',
padding: '5px 0px',
borderRadius: '20px',
cursor: 'pointer',
}}

View File

@ -267,38 +267,50 @@ const PayrollTableWithButton = ({
<div
className="expense-search d-flex align-items-center"
style={{
backgroundColor: "#4A5546",
boxShadow: "none",
outline: "none",
width: "auto",
height: "42px",
padding: "8px 12px",
fontSize: "16px",
border: "none",
display: "flex",
alignItems: "center",
backgroundColor: "#FFFFFF",
border: "1px solid #DBDBDB",
borderRadius: "10px",
color: "#F4FFEE",
cursor: "pointer",
width: "200px",
}}
>
<h6 className="" style={{ margin: '10px' }}>Show</h6>
<span
style={{
fontFamily: "'Comfortaa'",
fontStyle: "normal",
fontWeight: "400",
fontSize: "14px", // Compact text
color: "#000000",
marginLeft:"10px"
}}
>
Show Rows:
</span>
<select
name="option"
id="pageSelect"
className="selectoptions"
style={{
height: "30px",
padding: "2px 6px",
border: "1px solid #ccc",
backgroundColor: "#282E26",
color: "#fff",
backgroundColor: "#282E26", // Match background color
color: "#FFFFFF", // White text color
fontFamily: "'Comfortaa'",
fontStyle: "normal",
fontWeight: "700",
fontSize: "14px",
lineHeight: "16px",
padding: "4px 10px", // Adjust padding for the dropdown
border: "none", // No border
borderRadius: "0 10px 10px 0", // Rounded on the right side only
cursor: "pointer",
marginLeft: "auto", // Push to the right
}}
value={rowsPerPage}
onChange={(e) => {
setRowsPerPage(Number(e.target.value));
setCurrentPage(1); // Reset to first page on change
setCurrentPage(1); // Reset to the first page on change
}}
>
<option value={5}>5</option>
@ -307,6 +319,7 @@ const PayrollTableWithButton = ({
<option value={20}>20</option>
</select>
</div>
</div>
</div>

View File

@ -623,17 +623,37 @@ export default function Purchase() {
<div className="main-container">
<div className="d-flex p-2">
<div className="expensecontainer d-flex flex-column pd-2">
<div className="d-flex align-items-center mb-3" style={{ gap: "10px" }}>
<button className="btn cus d-flex align-items-center" onClick={toggleModal}>
{" "}
+ Add Invoice
<div className="d-flex align-items-center mb-3" style={{
justifyContent: "space-between",
gap: "10px",
marginBottom: "10px",
}}>
<h3 className="mb-1" style={{ margin: "0" }}>Purchase</h3>
<div className="d-flex align-items-center" style={{ gap: "10px" }}>
<button style={{
backgroundColor: "#4A5546",
boxShadow: "none",
outline: "none",
width: "auto",
height: "42px",
padding: "8px 12px",
fontSize: "16px",
border: "none",
borderRadius: "10px",
color: "#F4FFEE",
cursor: "pointer",
}}
>
Add Department
<img
src={invoiceIcon}
src={department}
alt="Invoice Icon"
style={{ width: "20px", height: "20px", marginLeft: "8px" }}
/>
</button>
<button style={{
backgroundColor: "#4A5546",
boxShadow: "none",
@ -648,116 +668,36 @@ export default function Purchase() {
cursor: "pointer",
}}>
+ Add New Vendor
Add New Vendor
<img
src={vendor}
alt="Invoice Icon"
style={{ width: "20px", height: "20px", marginLeft: "8px" }}
/>
</button>
<button style={{
backgroundColor: "#4A5546",
boxShadow: "none",
outline: "none",
width: "auto",
<button className="btn cus d-flex align-items-center"
style={{
width: "180px",
height: "42px",
padding: "8px 12px",
fontSize: "16px",
border: "none",
borderRadius: "10px",
color: "#F4FFEE",
cursor: "pointer",
justifyContent:"center",
textAlign:'center',
}}
>
+ Add Department
onClick={toggleModal}>
{" "}
Add Invoice
<img
src={department}
src={invoiceIcon}
alt="Invoice Icon"
style={{ width: "20px", height: "20px", marginLeft: "8px" }}
/>
</button>
<div
style={{
display: "flex",
gap: "16px",
justifyContent: "center",
alignItems: "center",
margin: "20px",
}}
>
{/* Invoice due this month */}
<div
style={{
backgroundColor: "#fff8e6",
border: "1px solid #ffd700",
borderRadius: "8px",
padding: "16px 24px",
display: "flex",
flexDirection: "column",
justifyContent: "center",
alignItems: "flex-start",
width: "300px",
textAlign: "left",
}}
>
<p style={{ fontSize: "24px", fontWeight: "bold", margin: "0" }}>
$500
</p>
<p style={{ fontSize: "14px", color: "#555", margin: "4px 0" }}>
Invoice due this month
</p>
</div>
{/* Last 7 days sale */}
<div
style={{
backgroundColor: "#e6ffee",
border: "1px solid #00b300",
borderRadius: "8px",
padding: "16px 24px",
display: "flex",
flexDirection: "column",
justifyContent: "center",
alignItems: "flex-start",
width: "300px",
textAlign: "left",
}}
>
<p style={{ fontSize: "24px", fontWeight: "bold", margin: "0" }}>
$1900
</p>
<p style={{ fontSize: "14px", color: "#555", margin: "4px 0" }}>
Last 7 days sale
</p>
</div>
{/* Expense this month */}
<div
style={{
backgroundColor: "#ffe6e6",
border: "1px solid #ff4d4d",
borderRadius: "8px",
padding: "16px 24px",
display: "flex",
flexDirection: "column",
justifyContent: "center",
alignItems: "flex-start",
width: "300px",
textAlign: "left",
}}
>
<p style={{ fontSize: "24px", fontWeight: "bold", margin: "0" }}>
$0.00
</p>
<p style={{ fontSize: "14px", color: "#555", margin: "4px 0" }}>
Expense this month
</p>
</div>
</div>
</div>
{/* Table Start */}
@ -787,10 +727,10 @@ export default function Purchase() {
className="modal-container"
onClick={(e) => e.stopPropagation()}
style={{
width: "700px",
width: "800px",
backgroundColor: "white",
margin: "100px auto",
padding: "20px",
// padding: "10px",
borderRadius: "8px",
position: "relative",
boxShadow: "0 4px 6px rgba(0, 0, 0, 0.1)",
@ -867,7 +807,7 @@ export default function Purchase() {
</div>
</div>
<div className="d-flex col-md-12">
<div className="col-md-6" style={{ paddingRight: "10px" }}>
<div className="col-md-5" style={{ paddingRight: "10px" }}>
<select
style={{
backgroundColor: "#ffffff",
@ -946,7 +886,7 @@ export default function Purchase() {
</div>
</div>
<div className="d-flex col-md-12 mt-2">
<div className="d-flex col-md-12 mt-2 gap-4">
<div
className="form-row d-flex col-md-5 p-2 mt-2 "
style={{

View File

@ -34,14 +34,9 @@ const Header = () => {
const settingsRef = useRef(null);
const lotteryRef = useRef(null);
const gasRef = useRef(null);
// const [selectedNav, setSelectedNav] = useState("/");
const [selectedNav, setSelectedNav] = useState("/");
const { Get, getAPI, Post } = useApi();
const [parentLabel, setParentLabel] = useState("Expense"); // Parent label
const [selectedChild, setSelectedChild] = useState(""); // Selected child label
const [selectedNav, setSelectedNav] = useState("Expense");
const [isMobileMenuOpen, setIsMobileMenuOpen] = useState(false);
const toggleMobileMenu = () => {
setIsMobileMenuOpen(!isMobileMenuOpen);
@ -64,18 +59,6 @@ const Header = () => {
logOutUser();
};
const handleChildSelection = (childLabel) => {
setSelectedChild(childLabel); // Update the selected child label
setExpenseDropdownOpen(false); // Close the dropdown
};
const toggleDropdown = () => {
setExpenseDropdownOpen(!expenseDropdownOpen);
if (expenseDropdownOpen) {
setSelectedChild(""); // Clear selected child if closing
}
};
const handleStoreManageClick = async () => {
setDropdownVisible(!isDropdownVisible);
@ -158,8 +141,6 @@ const Header = () => {
setLotteryDropdownOpen(false);
setGasDropdownOpen(false);
setDropdownVisible(false);
setSelectedChild("");
};
useEffect(() => {
@ -191,7 +172,8 @@ const Header = () => {
> <ul className="navbar-nav me-auto">
{userRole === "store owner" && (
<li
className={`nav-item ${selectedNav === "/owner-dashboard" ? "active" : ""
className={`nav-item ${
selectedNav === "/owner-dashboard" ? "active" : ""
}`}
>
<Link
@ -219,80 +201,28 @@ const Header = () => {
Dashboard
</Link>
</li>
<li
className={`nav-item ${expenseDropdownOpen ? "active" : ""}`}
className={`nav-item ${selectedNav === "#" ? "active" : ""}`}
ref={expenseRef}
onClick={() => {
closeDropdowns();
setExpenseDropdownOpen(!expenseDropdownOpen);
}}
style={{
display: "flex",
flexDirection: "column", // Ensures child label is displayed below
alignItems: "flex-start", // Align labels to the left
position: "relative",
marginTop: "12px",
}}
>
{/* Parent Label */}
<a
className="nav-link"
href="#"
onClick={(e) => e.preventDefault()}
>
{parentLabel}
Expense
</a>
{/* Selected Child Label Below Parent Label */}
{selectedChild && (
<span
style={{
fontSize: "14px",
color: "white",
// borderBottom:'1px solid blue',
backgroundColor: "#282e26",
padding: "0px 20px",
borderRadius: '20px',
fontStyle: "normal",
}}
>
{selectedChild}
</span>
)}
{/* Dropdown Menu */}
{expenseDropdownOpen && (
<ul
className="nav-menu-drop"
style={{
listStyle: "none",
padding: "10px",
margin: "0px",
border: "1px solid #ccc",
borderRadius: "4px",
boxShadow: "0 2px 4px rgba(0,0,0,0.1)",
backgroundColor: "#fff",
position: "absolute",
top: "100%", // Ensures dropdown appears below labels
left: "0",
zIndex: 10,
transform: "translateY(20px)", // Moves dropdown below header area
}}
>
<ul className="nav-menu-drop">
<li>
<Link
className="nav-menu-drop-item"
to="/expense"
onClick={() => handleChildSelection("Expense")}
style={{
display: "block",
padding: "8px 12px",
color: "#000",
textDecoration: "none",
}}
onClick={closeDropdowns}
>
Expense
</Link>
@ -301,13 +231,7 @@ const Header = () => {
<Link
className="nav-menu-drop-item"
to="/purchase"
onClick={() => handleChildSelection("Purchase")}
style={{
display: "block",
padding: "8px 12px",
color: "#000",
textDecoration: "none",
}}
onClick={closeDropdowns}
>
Purchase
</Link>
@ -315,9 +239,9 @@ const Header = () => {
</ul>
)}
</li>
<li
className={`nav-item ${selectedNav === "/payroll" ? "active" : ""
className={`nav-item ${
selectedNav === "/payroll" ? "active" : ""
}`}
>
<Link
@ -333,7 +257,8 @@ const Header = () => {
</li>
<li
className={`nav-item ${selectedNav === "/reportDateSelection" ? "active" : ""
className={`nav-item ${
selectedNav === "/reportDateSelection" ? "active" : ""
}`}
>
<Link