Skip to content
This repository was archived by the owner on Aug 21, 2023. It is now read-only.

Commit 9f01b79

Browse files
final build
1 parent 7a2134f commit 9f01b79

36 files changed

+6915
-555
lines changed

assets/img/qrcode.png

80.9 KB
Loading

assets/js/jquery.min.js

Lines changed: 5574 additions & 0 deletions
Large diffs are not rendered by default.

dashboard.php

Lines changed: 23 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -32,13 +32,26 @@
3232
<h3 class="text-dark mb-0">Dashboard</h3>
3333
</div>
3434
<div class="row">
35+
<div class="col-md-6 col-xl-3 mb-4">
36+
<div class="card shadow border-start-primary py-2">
37+
<div class="card-body">
38+
<div class="row align-items-center no-gutters">
39+
<div class="col me-2">
40+
<div class="text-uppercase text-primary fw-bold text-xs mb-1"><span>Total Cashier</span></div>
41+
<div class="text-dark fw-bold h5 mb-0"><span><?php include_once 'functions/dashboard-users.php'; ?></span></div>
42+
</div>
43+
<div class="col-auto"><i class="fas fa-calendar fa-2x text-gray-300"></i></div>
44+
</div>
45+
</div>
46+
</div>
47+
</div>
3548
<div class="col-md-6 col-xl-3 mb-4">
3649
<div class="card shadow border-start-primary py-2">
3750
<div class="card-body">
3851
<div class="row align-items-center no-gutters">
3952
<div class="col me-2">
4053
<div class="text-uppercase text-primary fw-bold text-xs mb-1"><span>Earnings (today)</span></div>
41-
<div class="text-dark fw-bold h5 mb-0"><span>$40,000</span></div>
54+
<div class="text-dark fw-bold h5 mb-0"><span><?php include_once 'functions/dashboard-today-sales.php'; ?></span></div>
4255
</div>
4356
<div class="col-auto"><i class="fas fa-calendar fa-2x text-gray-300"></i></div>
4457
</div>
@@ -51,7 +64,7 @@
5164
<div class="row align-items-center no-gutters">
5265
<div class="col me-2">
5366
<div class="text-uppercase text-success fw-bold text-xs mb-1"><span>Earnings (month)</span></div>
54-
<div class="text-dark fw-bold h5 mb-0"><span>$215,000</span></div>
67+
<div class="text-dark fw-bold h5 mb-0"><span><?php include_once 'functions/dashboard-month-sales.php'; ?></span></div>
5568
<div class="text-dark fw-bold h5 mb-0"></div>
5669
</div>
5770
<div class="col-auto"><i class="fas fa-dollar-sign fa-2x text-gray-300"></i></div>
@@ -65,7 +78,7 @@
6578
<div class="row align-items-center no-gutters">
6679
<div class="col me-2">
6780
<div class="text-uppercase text-success fw-bold text-xs mb-1"><span>Earnings (annual)</span></div>
68-
<div class="text-dark fw-bold h5 mb-0"><span>$215,000</span></div>
81+
<div class="text-dark fw-bold h5 mb-0"><span><?php include_once 'functions/dashboard-year-sales.php'; ?></span></div>
6982
<div class="text-dark fw-bold h5 mb-0"></div>
7083
</div>
7184
<div class="col-auto"><i class="fas fa-dollar-sign fa-2x text-gray-300"></i></div>
@@ -74,24 +87,15 @@
7487
</div>
7588
</div>
7689
</div>
77-
<div class="row">
78-
<div class="col">
79-
<div class="card shadow mb-4">
80-
<div class="card-header d-flex justify-content-between align-items-center">
81-
<h6 class="text-primary fw-bold m-0">Earnings Overview</h6>
82-
<div class="dropdown no-arrow"><button class="btn btn-link btn-sm dropdown-toggle" aria-expanded="false" data-bs-toggle="dropdown" type="button"><i class="fas fa-ellipsis-v text-gray-400"></i></button>
83-
<div class="dropdown-menu shadow dropdown-menu-end animated--fade-in">
84-
<p class="text-center dropdown-header">dropdown header:</p><a class="dropdown-item" href="#">&nbsp;Action</a><a class="dropdown-item" href="#">&nbsp;Another action</a>
85-
<div class="dropdown-divider"></div><a class="dropdown-item" href="#">&nbsp;Something else here</a>
86-
</div>
87-
</div>
88-
</div>
89-
<div class="card-body">
90-
<div class="chart-area"><canvas data-bss-chart="{&quot;type&quot;:&quot;line&quot;,&quot;data&quot;:{&quot;labels&quot;:[&quot;Jan&quot;,&quot;Feb&quot;,&quot;Mar&quot;,&quot;Apr&quot;,&quot;May&quot;,&quot;Jun&quot;,&quot;Jul&quot;,&quot;Aug&quot;],&quot;datasets&quot;:[{&quot;label&quot;:&quot;Earnings&quot;,&quot;fill&quot;:true,&quot;data&quot;:[&quot;0&quot;,&quot;10000&quot;,&quot;5000&quot;,&quot;15000&quot;,&quot;10000&quot;,&quot;20000&quot;,&quot;15000&quot;,&quot;25000&quot;],&quot;backgroundColor&quot;:&quot;rgba(78, 115, 223, 0.05)&quot;,&quot;borderColor&quot;:&quot;rgba(78, 115, 223, 1)&quot;}]},&quot;options&quot;:{&quot;maintainAspectRatio&quot;:false,&quot;legend&quot;:{&quot;display&quot;:false,&quot;labels&quot;:{&quot;fontStyle&quot;:&quot;normal&quot;}},&quot;title&quot;:{&quot;fontStyle&quot;:&quot;normal&quot;},&quot;scales&quot;:{&quot;xAxes&quot;:[{&quot;gridLines&quot;:{&quot;color&quot;:&quot;rgb(234, 236, 244)&quot;,&quot;zeroLineColor&quot;:&quot;rgb(234, 236, 244)&quot;,&quot;drawBorder&quot;:false,&quot;drawTicks&quot;:false,&quot;borderDash&quot;:[&quot;2&quot;],&quot;zeroLineBorderDash&quot;:[&quot;2&quot;],&quot;drawOnChartArea&quot;:false},&quot;ticks&quot;:{&quot;fontColor&quot;:&quot;#858796&quot;,&quot;fontStyle&quot;:&quot;normal&quot;,&quot;padding&quot;:20}}],&quot;yAxes&quot;:[{&quot;gridLines&quot;:{&quot;color&quot;:&quot;rgb(234, 236, 244)&quot;,&quot;zeroLineColor&quot;:&quot;rgb(234, 236, 244)&quot;,&quot;drawBorder&quot;:false,&quot;drawTicks&quot;:false,&quot;borderDash&quot;:[&quot;2&quot;],&quot;zeroLineBorderDash&quot;:[&quot;2&quot;]},&quot;ticks&quot;:{&quot;fontColor&quot;:&quot;#858796&quot;,&quot;fontStyle&quot;:&quot;normal&quot;,&quot;padding&quot;:20}}]}}}"></canvas></div>
91-
</div>
92-
</div>
90+
91+
<div class="card-body">
92+
<div class="chart-area">
93+
<?php
94+
include_once 'functions/dashboard-chart.php';
95+
?>
9396
</div>
9497
</div>
98+
9599
</div>
96100
</div>
97101
<footer class="bg-white sticky-footer">

database/db_hash 5-16-2023.sql

Lines changed: 217 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,217 @@
1+
-- phpMyAdmin SQL Dump
2+
-- version 5.2.1
3+
-- https://www.phpmyadmin.net/
4+
--
5+
-- Host: 127.0.0.1
6+
-- Generation Time: May 16, 2023 at 07:09 AM
7+
-- Server version: 10.4.28-MariaDB
8+
-- PHP Version: 8.0.28
9+
10+
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
11+
START TRANSACTION;
12+
SET time_zone = "+00:00";
13+
14+
15+
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
16+
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
17+
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
18+
/*!40101 SET NAMES utf8mb4 */;
19+
20+
--
21+
-- Database: `db_hash`
22+
--
23+
24+
-- --------------------------------------------------------
25+
26+
--
27+
-- Table structure for table `history`
28+
--
29+
30+
CREATE TABLE `history` (
31+
`id` int(11) NOT NULL,
32+
`user_id` int(11) NOT NULL,
33+
`product_id` int(11) NOT NULL,
34+
`product_name` varchar(255) NOT NULL,
35+
`size` int(11) NOT NULL,
36+
`qty` int(11) NOT NULL,
37+
`price` int(11) NOT NULL,
38+
`status` varchar(255) NOT NULL,
39+
`created` datetime NOT NULL DEFAULT current_timestamp()
40+
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
41+
42+
-- --------------------------------------------------------
43+
44+
--
45+
-- Table structure for table `inventory`
46+
--
47+
48+
CREATE TABLE `inventory` (
49+
`id` int(11) NOT NULL,
50+
`user_id` int(11) NOT NULL,
51+
`product_code` varchar(255) NOT NULL,
52+
`stock_in` int(11) NOT NULL,
53+
`stock_out` int(11) NOT NULL,
54+
`created` datetime NOT NULL
55+
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
56+
57+
-- --------------------------------------------------------
58+
59+
--
60+
-- Table structure for table `products`
61+
--
62+
63+
CREATE TABLE `products` (
64+
`id` int(11) NOT NULL,
65+
`product_name` varchar(255) NOT NULL,
66+
`size` int(11) NOT NULL,
67+
`qty` int(11) NOT NULL,
68+
`price` int(11) NOT NULL,
69+
`created` datetime NOT NULL DEFAULT current_timestamp()
70+
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
71+
72+
-- --------------------------------------------------------
73+
74+
--
75+
-- Table structure for table `transaction`
76+
--
77+
78+
CREATE TABLE `transaction` (
79+
`id` int(11) NOT NULL,
80+
`user_id` int(11) NOT NULL,
81+
`sales` int(11) NOT NULL,
82+
`amount` int(11) NOT NULL,
83+
`discounted_sales` int(11) NOT NULL,
84+
`created` datetime NOT NULL DEFAULT current_timestamp()
85+
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
86+
87+
-- --------------------------------------------------------
88+
89+
--
90+
-- Table structure for table `users`
91+
--
92+
93+
CREATE TABLE `users` (
94+
`id` int(11) NOT NULL,
95+
`username` varchar(255) NOT NULL,
96+
`password` varchar(255) NOT NULL,
97+
`level` int(11) NOT NULL,
98+
`created` datetime NOT NULL DEFAULT current_timestamp()
99+
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
100+
101+
-- --------------------------------------------------------
102+
103+
--
104+
-- Table structure for table `user_logs`
105+
--
106+
107+
CREATE TABLE `user_logs` (
108+
`id` int(11) NOT NULL,
109+
`username` varchar(255) NOT NULL,
110+
`type` varchar(255) NOT NULL,
111+
`sign_in` datetime NOT NULL,
112+
`sign_out` datetime NOT NULL,
113+
`created` datetime NOT NULL
114+
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
115+
116+
--
117+
-- Indexes for dumped tables
118+
--
119+
120+
--
121+
-- Indexes for table `history`
122+
--
123+
ALTER TABLE `history`
124+
ADD PRIMARY KEY (`id`),
125+
ADD KEY `product_id` (`product_id`);
126+
127+
--
128+
-- Indexes for table `inventory`
129+
--
130+
ALTER TABLE `inventory`
131+
ADD PRIMARY KEY (`id`);
132+
133+
--
134+
-- Indexes for table `products`
135+
--
136+
ALTER TABLE `products`
137+
ADD PRIMARY KEY (`id`);
138+
139+
--
140+
-- Indexes for table `transaction`
141+
--
142+
ALTER TABLE `transaction`
143+
ADD PRIMARY KEY (`id`),
144+
ADD KEY `user_id` (`user_id`);
145+
146+
--
147+
-- Indexes for table `users`
148+
--
149+
ALTER TABLE `users`
150+
ADD PRIMARY KEY (`id`);
151+
152+
--
153+
-- Indexes for table `user_logs`
154+
--
155+
ALTER TABLE `user_logs`
156+
ADD PRIMARY KEY (`id`);
157+
158+
--
159+
-- AUTO_INCREMENT for dumped tables
160+
--
161+
162+
--
163+
-- AUTO_INCREMENT for table `history`
164+
--
165+
ALTER TABLE `history`
166+
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;
167+
168+
--
169+
-- AUTO_INCREMENT for table `inventory`
170+
--
171+
ALTER TABLE `inventory`
172+
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;
173+
174+
--
175+
-- AUTO_INCREMENT for table `products`
176+
--
177+
ALTER TABLE `products`
178+
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;
179+
180+
--
181+
-- AUTO_INCREMENT for table `transaction`
182+
--
183+
ALTER TABLE `transaction`
184+
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;
185+
186+
--
187+
-- AUTO_INCREMENT for table `users`
188+
--
189+
ALTER TABLE `users`
190+
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;
191+
192+
--
193+
-- AUTO_INCREMENT for table `user_logs`
194+
--
195+
ALTER TABLE `user_logs`
196+
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;
197+
198+
--
199+
-- Constraints for dumped tables
200+
--
201+
202+
--
203+
-- Constraints for table `history`
204+
--
205+
ALTER TABLE `history`
206+
ADD CONSTRAINT `history_ibfk_1` FOREIGN KEY (`product_id`) REFERENCES `products` (`id`);
207+
208+
--
209+
-- Constraints for table `transaction`
210+
--
211+
ALTER TABLE `transaction`
212+
ADD CONSTRAINT `transaction_ibfk_1` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`);
213+
COMMIT;
214+
215+
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
216+
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
217+
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;

0 commit comments

Comments
 (0)