Skip to content

Commit

Permalink
Merge pull request #466 from team-monite/chore/merge-dev-to-main
Browse files Browse the repository at this point in the history
fix(devops): merge dev to main
  • Loading branch information
marcperezmonite authored Dec 3, 2024
2 parents 9a8a694 + 6270f23 commit de49af2
Show file tree
Hide file tree
Showing 63 changed files with 1,921 additions and 1,584 deletions.
5 changes: 5 additions & 0 deletions .changeset/afraid-files-brake.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@monite/sdk-react': minor
---

Design improved in BillPay (payables) component
5 changes: 5 additions & 0 deletions .changeset/cold-garlics-drum.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@monite/sdk-react': minor
---

feat(DEV-13257): add min height to all table components
5 changes: 5 additions & 0 deletions .changeset/curly-shrimps-swim.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@monite/sdk-react': patch
---

refactor(DEV-12983): remove purchase order field and update design alignment of invoice fields
2 changes: 2 additions & 0 deletions .changeset/kind-ants-remember.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
---
---
6 changes: 6 additions & 0 deletions .changeset/nine-suns-bow.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
'@team-monite/sdk-themes': patch
'@monite/sdk-react': patch
---

Prevent click event on table rows when selecting text
2 changes: 2 additions & 0 deletions .changeset/six-dragons-divide.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
---
---
2 changes: 2 additions & 0 deletions .changeset/smooth-jeans-thank.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
---
---
5 changes: 5 additions & 0 deletions .changeset/wild-kiwis-taste.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@monite/sdk-react': minor
---

fix(DEV-13228): Allow payments on partially_paid payables
5 changes: 5 additions & 0 deletions .changeset/witty-feet-pretend.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@monite/sdk-react': minor
---

chore: update api version by last schema from our current open api spec and added new query param for autocomplete search field component
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ import { useEffect, useState } from 'react';

import Image from 'next/image';

import { Box, Stack } from '@mui/material';
import { useMoniteContext } from '@monite/sdk-react';
import { Box, Stack, Skeleton } from '@mui/material';

import DashboardCard from '@/components/DashboardCard';
import EmptyState from '@/components/EmptyState';
Expand All @@ -18,8 +19,12 @@ import {
IconPresentation,
} from '@/icons';

import dashboardBalance from './balance.svg';
import dashboardCashflow from './cashflow.svg';
import dashboardBalanceUS from './balance.svg';
import dashboardCashflowUS from './cashflow.svg';
import dashboardBalanceEU from './dashboard-widgets-1-eur.svg';
import dashboardBalanceUK from './dashboard-widgets-1-gbp.svg';
import dashboardCashflowEU from './dashboard-widgets-2-eur.svg';
import dashboardCashflowUK from './dashboard-widgets-2-gbp.svg';
import dashboardHeader from './header.svg';

export default function DefaultPage() {
Expand All @@ -40,11 +45,100 @@ export default function DefaultPage() {
}

const DashboardMockup = () => {
const dashboardBalanceImages: { [key: string]: string } = {
US: dashboardBalanceUS, // US
GB: dashboardBalanceUK, // UK
AT: dashboardBalanceEU, // Austria
BE: dashboardBalanceEU, // Belgium
CY: dashboardBalanceEU, // Cyprus
EE: dashboardBalanceEU, // Estonia
FI: dashboardBalanceEU, // Finland
FR: dashboardBalanceEU, // France
DE: dashboardBalanceEU, // Germany
GR: dashboardBalanceEU, // Greece
IE: dashboardBalanceEU, // Ireland
IT: dashboardBalanceEU, // Italy
LV: dashboardBalanceEU, // Latvia
LT: dashboardBalanceEU, // Lithuania
LU: dashboardBalanceEU, // Luxembourg
MT: dashboardBalanceEU, // Malta
NL: dashboardBalanceEU, // Netherlands
PT: dashboardBalanceEU, // Portugal
SK: dashboardBalanceEU, // Slovakia
SI: dashboardBalanceEU, // Slovenia
ES: dashboardBalanceEU, // Spain
};
const dashboardCashflowImages: { [key: string]: string } = {
US: dashboardCashflowUS, // US
GB: dashboardCashflowUK, // UK
AT: dashboardCashflowEU, // Austria
BE: dashboardCashflowEU, // Belgium
CY: dashboardCashflowEU, // Cyprus
EE: dashboardCashflowEU, // Estonia
FI: dashboardCashflowEU, // Finland
FR: dashboardCashflowEU, // France
DE: dashboardCashflowEU, // Germany
GR: dashboardCashflowEU, // Greece
IE: dashboardCashflowEU, // Ireland
IT: dashboardCashflowEU, // Italy
LV: dashboardCashflowEU, // Latvia
LT: dashboardCashflowEU, // Lithuania
LU: dashboardCashflowEU, // Luxembourg
MT: dashboardCashflowEU, // Malta
NL: dashboardCashflowEU, // Netherlands
PT: dashboardCashflowEU, // Portugal
SK: dashboardCashflowEU, // Slovakia
SI: dashboardCashflowEU, // Slovenia
ES: dashboardCashflowEU, // Spain
};

const { api } = useMoniteContext();
const { data: entity, isLoading } =
api.entityUsers.getEntityUsersMyEntity.useQuery();
const getDashboardCashFlowImage = (countryCode?: string) =>
countryCode && countryCode in dashboardCashflowImages
? dashboardCashflowImages[countryCode]
: dashboardCashflowUS;

const getDashboardBalanceImage = (countryCode?: string) =>
countryCode && countryCode in dashboardBalanceImages
? dashboardBalanceImages[countryCode]
: dashboardBalanceUS;

const currentCountry = entity?.address.country;

return (
<Stack direction="column" justifyContent="flex-start" alignItems="center">
<Image priority src={dashboardHeader} alt="" />
<Image priority src={dashboardBalance} alt="" />
<Image priority src={dashboardCashflow} alt="" />
{isLoading ? (
<>
<p>
<Skeleton variant="rounded" width={1127} height={150} />
</p>
<p>
<Skeleton variant="rounded" width={1127} height={400} />
</p>
<p>
<Skeleton variant="rounded" width={1127} height={150} />
</p>
<p>
<Skeleton variant="rounded" width={1127} height={150} />
</p>
</>
) : (
<>
<Image priority src={dashboardHeader} alt="" />
<Image
priority
alt=""
src={getDashboardBalanceImage(currentCountry)}
/>
<Image
priority
src={getDashboardCashFlowImage(currentCountry)}
alt=""
/>
</>
)}
</Stack>
);
};
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
"lint-staged": "~13.0.2",
"prettier": "^2.8.8",
"pretty-quick": "^3.1.3",
"turbo": "~2.2.3",
"turbo": "~2.3.2",
"typescript": "~5.5.4"
},
"resolutions": {
Expand Down
Loading

0 comments on commit de49af2

Please sign in to comment.