Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
75 commits
Select commit Hold shift + click to select a range
f32ad07
fixes in promos, user with Date format
clarissaRun May 7, 2025
60e5da0
Merge branch 'dev' into fix/ADM/hotfix-DateFormat
clarissaRun May 7, 2025
54c27dc
fix in status
clarissaRun May 7, 2025
ef29187
Emit notification for order update and listen for delivery update
andres15alvarez May 14, 2025
e8987b4
feature/notify-order-update-only-by-socket
andres15alvarez May 14, 2025
96d7798
Render quick actions buttons only if exists methods
andres15alvarez May 17, 2025
e856053
Pass selectedRow to action table component
andres15alvarez May 17, 2025
44c616d
Add quick actions in table
andres15alvarez May 17, 2025
6a2e3f4
Install sdk version 0.4.18
andres15alvarez May 17, 2025
dd8156e
Add loaders in tables
andres15alvarez May 17, 2025
45907f4
Feature/create quick actions
andres15alvarez May 17, 2025
cc404ff
Add isLoading state and loader in tables
andres15alvarez May 17, 2025
90eb3ad
Update sidebar permissions
andres15alvarez May 17, 2025
1e56883
feature/display-sections-sidebar-by-role
andres15alvarez May 17, 2025
bb81a64
Merge branch 'dev' into fix/ADM/hotfix-DateFormat
andres15alvarez May 17, 2025
190626b
Fix/adm/hotfix date format
andres15alvarez May 17, 2025
900c0fb
Delete useless jsx comments
andres15alvarez May 17, 2025
1d0275f
Add card with sales prediction
andres15alvarez May 17, 2025
df00c76
feature/add-sales-chart-and-prediction
andres15alvarez May 17, 2025
301eba0
updatePasswordSchema: fix validations
gus211 May 18, 2025
be2edbe
registerSchema: phoneNumber no longer requires '+'
gus211 May 18, 2025
cf3db8a
newPresentationSchema: description required
gus211 May 18, 2025
50cf41f
loginSchema: password length between 8 and 255
gus211 May 18, 2025
37f4218
editProfileSchema: phone number no longer requires '+'
gus211 May 18, 2025
2fe96d4
categorySchema: fix description max length message
gus211 May 18, 2025
958364b
updatePasswordSchema: fix passwords inputs min/max length
gus211 May 18, 2025
50bf8a2
registerSchema: rename fields, fix password validation
gus211 May 18, 2025
7f67d25
new/edit users: update schema usage
gus211 May 18, 2025
26aee11
loginSchema: password min length to 8
gus211 May 18, 2025
513e0d8
Standardize validation schemas
andres15alvarez May 18, 2025
5c20113
Update input default border color
andres15alvarez May 19, 2025
e7f2022
Use lint staged instead of pre commit script
andres15alvarez May 19, 2025
c071ea4
Fix optional function onAdd and onSearch if are undefined not render
andres15alvarez May 19, 2025
ef6718f
Set optional functions onAdd and onSearch
andres15alvarez May 19, 2025
a195958
Create page to show list of inventories
andres15alvarez May 19, 2025
7a26f3f
Add new inventories page to sidebar
andres15alvarez May 19, 2025
25c1b00
Install version 0.4.19 of sdk
andres15alvarez May 19, 2025
92174e3
Add branch information in user
andres15alvarez May 19, 2025
3cfeec7
Create stock inventory component
andres15alvarez May 19, 2025
90e6d07
Add new stock input and filter by branch if when user is branch admin
andres15alvarez May 19, 2025
393a93f
Remove unnecessary api call to get user profile
andres15alvarez May 19, 2025
81fedbe
Standarize input border color
andres15alvarez May 19, 2025
ea09a54
Fix missin profile picture
andres15alvarez May 19, 2025
7086e82
Show select checkbox if quick actions exists
andres15alvarez May 19, 2025
f8d0a72
feature/create-inventory-list-page
andres15alvarez May 19, 2025
9b00069
Remove useless components
andres15alvarez May 19, 2025
02bb2ce
Create orders requested list page
andres15alvarez May 19, 2025
213aad8
Add new page for order requested and remove redirections that does no…
andres15alvarez May 19, 2025
deaf349
Delete useless icon
andres15alvarez May 19, 2025
e637a4a
feature/requested-order-page
andres15alvarez May 19, 2025
97fa2ba
Remove API key and resolve merge conflicts
rikardodlpj88 May 20, 2025
3fd83e2
Add @react-google-maps/api dependency
rikardodlpj88 May 20, 2025
ce6c673
npm run format
rikardodlpj88 May 20, 2025
4ed868c
Format price to cents receiving and updating data
andres15alvarez May 26, 2025
ba35ddf
Improve reports style and fix cents usage
andres15alvarez May 26, 2025
d5c727f
Improve styles in upload stock page
andres15alvarez May 26, 2025
ae59b39
Add more columns to inventory and improve UX in update inventory stock
andres15alvarez May 26, 2025
af38bb5
hotfix/minor-fixes
andres15alvarez May 26, 2025
f0c6600
feat: sync map marker with lat/lng inputs
gus211 May 27, 2025
40f44af
delete .env.local
gus211 May 27, 2025
11ca689
Merge remote-tracking branch 'origin/dev' into feature/ADM/branch-cre…
gus211 May 27, 2025
da8816b
Upgrade sdk version to 0.4.21
andres15alvarez May 29, 2025
df6c3c2
Fix order details numbers
andres15alvarez May 29, 2025
d31d9d6
Fix inventory report
andres15alvarez May 29, 2025
3079e02
Hotfix/order details amount
andres15alvarez May 29, 2025
eb00b70
Fix conflicts
andres15alvarez May 29, 2025
7d444cb
Add GoogleMaps component and integrate with API
andres15alvarez May 29, 2025
b0d2b50
Add payment confirmation data in order detail
andres15alvarez May 29, 2025
3d24784
Create lots page
andres15alvarez May 29, 2025
ca12d50
Filter by branch of the branch admin
andres15alvarez May 29, 2025
8671544
Remove search input in navbar
andres15alvarez May 29, 2025
0dac479
Remove useless loader
andres15alvarez May 29, 2025
f7815d5
Feature/add more modules
andres15alvarez May 29, 2025
91cfbf4
Upgrade version to 1.0.0
andres15alvarez May 29, 2025
d2e17a5
Merge branch 'main' into dev
andres15alvarez May 29, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -1 +1 @@
npm run precommit
npx lint-staged
7 changes: 3 additions & 4 deletions .lintstagedrc
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
{
"*/**/*.{js,jsx,ts,tsx}": [
"prettier --write",
"eslint --fix",
"eslint"
"npm run format",
"npm run lint:fix"
],
"*/**/*.{json,css,md}": [
"prettier --write"
"npm run format"
]
}
101 changes: 91 additions & 10 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "dashboard",
"version": "0.4.0",
"version": "1.0.0",
"private": true,
"scripts": {
"dev": "next dev",
Expand All @@ -17,7 +17,8 @@
},
"dependencies": {
"@heroicons/react": "^2.2.0",
"@pharmatech/sdk": "^0.4.16",
"@pharmatech/sdk": "^0.4.21",
"@react-google-maps/api": "^2.20.6",
"@react-pdf/renderer": "^4.3.0",
"blob-stream": "^0.1.3",
"cloudinary": "^2.6.0",
Expand Down
4 changes: 0 additions & 4 deletions src/app/(dashboard)/branches/[id]/edit/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,6 @@ export default function EditBranchPage() {
helperText={errors.name}
helperTextColor={Colors.semanticDanger}
borderSize="1px"
borderColor="#E7E7E6"
onChange={(e) => setName(e.target.value)}
/>
</div>
Expand Down Expand Up @@ -249,7 +248,6 @@ export default function EditBranchPage() {
helperText={errors.address}
helperTextColor={Colors.semanticDanger}
borderSize="1px"
borderColor="#E7E7E6"
onChange={(e) => setAddress(e.target.value)}
/>
</div>
Expand All @@ -263,7 +261,6 @@ export default function EditBranchPage() {
helperText={errors.latitude}
helperTextColor={Colors.semanticDanger}
borderSize="1px"
borderColor="#E7E7E6"
onChange={(e) => setLatitude(e.target.value)}
/>
</div>
Expand All @@ -275,7 +272,6 @@ export default function EditBranchPage() {
helperText={errors.longitude}
helperTextColor={Colors.semanticDanger}
borderSize="1px"
borderColor="#E7E7E6"
onChange={(e) => setLongitude(e.target.value)}
/>
</div>
Expand Down
3 changes: 2 additions & 1 deletion src/app/(dashboard)/branches/[id]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import { REDIRECTION_TIMEOUT } from '@/lib/utils/contants';
import { useAuth } from '@/context/AuthContext';
import { BranchResponse } from '@pharmatech/sdk';
import Input from '@/components/Input/Input';
import Loader from '@/components/Loader';

export default function BranchDetailsPage() {
const params = useParams();
Expand Down Expand Up @@ -165,7 +166,7 @@ export default function BranchDetailsPage() {
</div>
</div>
) : (
<p className="text-[16px]">Cargando datos de la sucursal...</p>
<Loader />
)}
</>
);
Expand Down
24 changes: 20 additions & 4 deletions src/app/(dashboard)/branches/new/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ import Dropdown from '@/components/Dropdown';
import { toast } from 'react-toastify';
import { StateResponse, CityResponse } from '@pharmatech/sdk';
import Input from '@/components/Input/Input';
import GoogleMaps from '@/components/GoogleMap/GoogleMap';
//import { BranchMarker } from '@/components/GoogleMap/GoogleMap';

/// This is a constant that represents the ID of Venezuela.
const COUNTRY_ID = '1238bc2a-45a5-47e4-9cc1-68d573089ca1';
Expand All @@ -29,6 +31,12 @@ export default function NewBranchPage() {
const [cityId, setCityId] = useState('');

const [errors, setErrors] = useState<Record<string, string>>({});
// No branches data available, so markers will be empty

const mapCenter = {
lat: parseFloat(latitude || '10.0653'),
lng: parseFloat(longitude || '-69.3235'),
};

const fetchStates = async () => {
try {
Expand Down Expand Up @@ -188,7 +196,6 @@ export default function NewBranchPage() {
helperText={errors.name}
helperTextColor={Colors.semanticDanger}
borderSize="1px"
borderColor="#E7E7E6"
value={name}
onChange={(e) => setName(e.target.value)}
/>
Expand Down Expand Up @@ -233,7 +240,6 @@ export default function NewBranchPage() {
helperText={errors.address}
helperTextColor={Colors.semanticDanger}
borderSize="1px"
borderColor="#E7E7E6"
onChange={(e) => setAddress(e.target.value)}
/>
</div>
Expand All @@ -247,7 +253,6 @@ export default function NewBranchPage() {
helperText={errors.latitude}
helperTextColor={Colors.semanticDanger}
borderSize="1px"
borderColor="#E7E7E6"
onChange={(e) => setLatitude(e.target.value)}
/>
</div>
Expand All @@ -259,10 +264,21 @@ export default function NewBranchPage() {
helperText={errors.longitude}
helperTextColor={Colors.semanticDanger}
borderSize="1px"
borderColor="#E7E7E6"
onChange={(e) => setLongitude(e.target.value)}
/>
</div>
<div>
<GoogleMaps
center={mapCenter}
draggable
onCoordinateChange={(lat, lng) => {
setLatitude(lat.toFixed(6).toString());
setLongitude(lng.toFixed(6).toString());
}}
mapWidth="200%"
mapHeight="220px"
/>
</div>
</div>
</div>
</>
Expand Down
5 changes: 1 addition & 4 deletions src/app/(dashboard)/branches/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -163,11 +163,8 @@ export default function BranchesPage() {
},
itemsPerPageOptions: [5, 10, 15, 20],
}}
isLoading={isLoading}
/>

{isLoading && (
<div className="mt-4 text-center">Cargando sucursales...</div>
)}
</div>
);
}
2 changes: 0 additions & 2 deletions src/app/(dashboard)/categories/[id]/edit/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,6 @@ export default function EditCategoryPage() {
helperText={errors.name}
helperTextColor={Colors.semanticDanger}
borderSize="1px"
borderColor="#d1d5db"
/>

<Input
Expand All @@ -166,7 +165,6 @@ export default function EditCategoryPage() {
helperText={errors.description}
helperTextColor={Colors.semanticDanger}
borderSize="1px"
borderColor="#d1d5db"
type="text"
isTextArea
rows={4}
Expand Down
2 changes: 0 additions & 2 deletions src/app/(dashboard)/categories/new/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,6 @@ export default function NewCategoryPage() {
}}
helperText={errors.name}
helperTextColor={Colors.semanticDanger}
borderColor="#d1d5db"
borderSize="1px"
/>

Expand All @@ -130,7 +129,6 @@ export default function NewCategoryPage() {
}}
helperText={errors.description}
helperTextColor={Colors.semanticDanger}
borderColor="#d1d5db"
type="text"
borderSize="1px"
isTextArea
Expand Down
5 changes: 1 addition & 4 deletions src/app/(dashboard)/categories/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -113,11 +113,8 @@ export default function CategoriesPage() {
},
itemsPerPageOptions: [5, 10, 15, 20],
}}
isLoading={isLoading}
/>

{isLoading && (
<div className="mt-4 text-center">Cargando categorías...</div>
)}
</div>
);
}
Loading
Loading