Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
C
concept-front-mojsprat-v2
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Djordje Mutavdzic
concept-front-mojsprat-v2
Commits
20b47c84
Commit
20b47c84
authored
Dec 22, 2022
by
Djordje
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix navbar overlap and documents dates, add translations for payment order, remove overview tab
parent
fa7f194c
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
45 additions
and
24 deletions
+45
-24
ApplicationTab.tsx
src/components/ApplicationTab.tsx
+1
-1
DocumentsList.tsx
src/components/Documents/DocumentsList.tsx
+1
-1
LoginForm.tsx
src/components/LoginForm.tsx
+1
-1
NavBar.css
src/components/NavBar/NavBar.css
+2
-0
SideMenuData.tsx
src/components/SideMenu/SideMenuData.tsx
+2
-2
PaymentOrder.tsx
src/components/TenantInvoices/PaymentOrder.tsx
+9
-9
PaymentOrderItem.tsx
src/components/TenantInvoices/PaymentOrderItem.tsx
+3
-1
TenantInvoices.tsx
src/components/TenantInvoices/TenantInvoices.tsx
+7
-8
en.json
src/locale/en.json
+9
-0
sr.json
src/locale/sr.json
+9
-0
i18n.ts
src/services/i18n.ts
+1
-1
No files found.
src/components/ApplicationTab.tsx
View file @
20b47c84
...
@@ -27,7 +27,7 @@ export const ApplicationTab = ({ building, selectedUnit }: { building: any, sele
...
@@ -27,7 +27,7 @@ export const ApplicationTab = ({ building, selectedUnit }: { building: any, sele
return
(
return
(
<
Box
sx=
{
classes
.
wrapper
}
>
<
Box
sx=
{
classes
.
wrapper
}
>
<
Routes
>
<
Routes
>
<
Route
path=
'overview'
element=
{
<
div
>
Hello from overview
</
div
>
}
/>
{
/* <Route path='overview' element={<div>Hello from overview</div>} /> */
}
<
Route
path=
'notifications'
element=
{
<
Notifications
notifications=
{
building
.
notifications
}
/>
}
/>
<
Route
path=
'notifications'
element=
{
<
Notifications
notifications=
{
building
.
notifications
}
/>
}
/>
<
Route
path=
'issues'
element=
{
<
Issues
issues=
{
building
.
issues
}
/>
}
/>
<
Route
path=
'issues'
element=
{
<
Issues
issues=
{
building
.
issues
}
/>
}
/>
<
Route
path=
'voting'
element=
{
<
Voting
/>
}
/>
<
Route
path=
'voting'
element=
{
<
Voting
/>
}
/>
...
...
src/components/Documents/DocumentsList.tsx
View file @
20b47c84
...
@@ -57,7 +57,7 @@ export const DocumentsList = ({ documents }: { documents: any }) => {
...
@@ -57,7 +57,7 @@ export const DocumentsList = ({ documents }: { documents: any }) => {
{
documents
.
map
((
payable
:
any
)
=>
(
{
documents
.
map
((
payable
:
any
)
=>
(
<
TableRow
key=
{
payable
.
_id
}
sx=
{
classes
.
tableBody
}
>
<
TableRow
key=
{
payable
.
_id
}
sx=
{
classes
.
tableBody
}
>
<
TableCell
align=
"left"
>
{
payable
.
name
}
</
TableCell
>
<
TableCell
align=
"left"
>
{
payable
.
name
}
</
TableCell
>
<
TableCell
align=
"center"
>
{
t
(
"formatDate"
,
{
date
:
new
Date
(
payable
.
created
)
})
}
</
TableCell
>
<
TableCell
align=
"center"
>
{
!!
payable
.
created
?
t
(
"formatDate"
,
{
date
:
new
Date
(
payable
.
created
)
})
:
'Nepoznat datum'
}
</
TableCell
>
<
TableCell
align=
"center"
><
a
href=
{
payable
.
link
}
>
{
(
payable
.
link
.
includes
(
'dropboxusercontent'
))
?
<
DownloadIcon
/>
:
<
LinkIcon
/>
}
</
a
></
TableCell
>
<
TableCell
align=
"center"
><
a
href=
{
payable
.
link
}
>
{
(
payable
.
link
.
includes
(
'dropboxusercontent'
))
?
<
DownloadIcon
/>
:
<
LinkIcon
/>
}
</
a
></
TableCell
>
</
TableRow
>
</
TableRow
>
))
}
))
}
...
...
src/components/LoginForm.tsx
View file @
20b47c84
...
@@ -85,7 +85,7 @@ export const LoginForm = () => {
...
@@ -85,7 +85,7 @@ export const LoginForm = () => {
}
}
localStorage
.
setItem
(
JWT_TENANT
,
res
);
localStorage
.
setItem
(
JWT_TENANT
,
res
);
navigate
(
'../tenant/
overview
'
);
navigate
(
'../tenant/
notifications
'
);
}
}
const
handleKeyUp
=
(
event
:
React
.
KeyboardEvent
<
HTMLDivElement
>
):
void
=>
{
const
handleKeyUp
=
(
event
:
React
.
KeyboardEvent
<
HTMLDivElement
>
):
void
=>
{
...
...
src/components/NavBar/NavBar.css
View file @
20b47c84
...
@@ -9,4 +9,5 @@
...
@@ -9,4 +9,5 @@
padding
:
0.5vh
;
padding
:
0.5vh
;
display
:
flex
;
display
:
flex
;
align-items
:
center
;
align-items
:
center
;
z-index
:
1
;
}
}
\ No newline at end of file
src/components/SideMenu/SideMenuData.tsx
View file @
20b47c84
...
@@ -2,7 +2,7 @@ import { SubMenu } from "../../internal-types";
...
@@ -2,7 +2,7 @@ import { SubMenu } from "../../internal-types";
import
{
ActivityIcon
}
from
"../icons/ActivityIcon"
;
import
{
ActivityIcon
}
from
"../icons/ActivityIcon"
;
import
{
BuidlingInvoicesIcon
}
from
"../icons/BuildingInvoicesIcon"
;
import
{
BuidlingInvoicesIcon
}
from
"../icons/BuildingInvoicesIcon"
;
import
{
DocumentIcon
}
from
"../icons/DocumentIcon"
;
import
{
DocumentIcon
}
from
"../icons/DocumentIcon"
;
import
{
HomeIcon
}
from
"../icons/HomeIcon"
;
//
import { HomeIcon } from "../icons/HomeIcon";
import
{
InvoicesIcon
}
from
"../icons/InvoicesIcon"
;
import
{
InvoicesIcon
}
from
"../icons/InvoicesIcon"
;
import
{
LanguageIcon
}
from
"../icons/LanguageIcon"
;
import
{
LanguageIcon
}
from
"../icons/LanguageIcon"
;
import
{
NotificationIcon
}
from
"../icons/NotificationIcon"
;
import
{
NotificationIcon
}
from
"../icons/NotificationIcon"
;
...
@@ -14,7 +14,7 @@ export const subMenu: SubMenu[] = [
...
@@ -14,7 +14,7 @@ export const subMenu: SubMenu[] = [
{
{
title
:
'Main menu'
,
title
:
'Main menu'
,
items
:
[
items
:
[
{
title
:
'Overview'
,
icon
:
<
HomeIcon
/>,
path
:
'overview'
},
//
{ title: 'Overview', icon: <HomeIcon />, path: 'overview' },
{
title
:
'Notifications'
,
icon
:
<
NotificationIcon
/>,
path
:
'notifications'
},
{
title
:
'Notifications'
,
icon
:
<
NotificationIcon
/>,
path
:
'notifications'
},
{
title
:
'Issues'
,
icon
:
<
ActivityIcon
/>,
path
:
'issues'
},
{
title
:
'Issues'
,
icon
:
<
ActivityIcon
/>,
path
:
'issues'
},
{
title
:
'Voting'
,
icon
:
<
VotingIcon
/>,
path
:
'voting'
}
{
title
:
'Voting'
,
icon
:
<
VotingIcon
/>,
path
:
'voting'
}
...
...
src/components/TenantInvoices/PaymentOrder.tsx
View file @
20b47c84
...
@@ -42,24 +42,24 @@ export const PaymentOrder = ({ recipient, debit, bankAccount, payReference }: {
...
@@ -42,24 +42,24 @@ export const PaymentOrder = ({ recipient, debit, bankAccount, payReference }: {
return
(
return
(
<
Card
>
<
Card
>
<
Typography
sx=
{
classes
.
title
}
>
Nalog za uplatu
</
Typography
>
<
Typography
sx=
{
classes
.
title
}
>
{
t
(
'Payment order'
)
}
</
Typography
>
<
Box
sx=
{
classes
.
mainContainer
}
>
<
Box
sx=
{
classes
.
mainContainer
}
>
<
Box
sx=
{
classes
.
itemsContainer
}
>
<
Box
sx=
{
classes
.
itemsContainer
}
>
<
PaymentOrderItem
flex=
{
1
}
label=
"
Uplatilac
"
size=
"large"
value=
{
`${tenantInfo.firstName} ${tenantInfo.lastName}`
}
/>
<
PaymentOrderItem
flex=
{
1
}
label=
"
Payer
"
size=
"large"
value=
{
`${tenantInfo.firstName} ${tenantInfo.lastName}`
}
/>
<
PaymentOrderItem
flex=
{
1
}
label=
"
Svrha uplate
"
size=
"large"
/>
<
PaymentOrderItem
flex=
{
1
}
label=
"
Purpose of payment
"
size=
"large"
/>
<
PaymentOrderItem
flex=
{
1
}
label=
"
Primalac
"
size=
"large"
value=
{
recipient
}
/>
<
PaymentOrderItem
flex=
{
1
}
label=
"
Recipient
"
size=
"large"
value=
{
recipient
}
/>
</
Box
>
</
Box
>
<
Divider
sx=
{
classes
.
divider
}
orientation=
"vertical"
variant=
"middle"
flexItem
/>
<
Divider
sx=
{
classes
.
divider
}
orientation=
"vertical"
variant=
"middle"
flexItem
/>
<
Box
sx=
{
classes
.
itemsContainer
}
>
<
Box
sx=
{
classes
.
itemsContainer
}
>
<
Box
sx=
{
classes
.
itemsGroup
}
>
<
Box
sx=
{
classes
.
itemsGroup
}
>
<
PaymentOrderItem
flex=
{
1
}
label=
'
sifra placanja
'
size=
"small"
value=
'221'
/>
<
PaymentOrderItem
flex=
{
1
}
label=
'
payment code
'
size=
"small"
value=
'221'
/>
<
PaymentOrderItem
flex=
{
1
}
label=
'
valuta
'
size=
"small"
value=
"RSD"
/>
<
PaymentOrderItem
flex=
{
1
}
label=
'
currency
'
size=
"small"
value=
"RSD"
/>
<
PaymentOrderItem
flex=
{
4
}
label=
'
iznos
'
size=
"small"
value=
{
t
(
"nalog"
,
{
num
:
(
debit
>
0
?
debit
:
0
)
})
}
/>
<
PaymentOrderItem
flex=
{
4
}
label=
'
amount
'
size=
"small"
value=
{
t
(
"nalog"
,
{
num
:
(
debit
>
0
?
debit
:
0
)
})
}
/>
</
Box
>
</
Box
>
<
PaymentOrderItem
flex=
{
1
}
label=
'Racun primaoca'
size=
"small"
value=
{
bankAccount
}
/>
<
PaymentOrderItem
flex=
{
1
}
label=
"Recipient's account"
size=
"small"
value=
{
bankAccount
}
/>
<
Box
sx=
{
classes
.
itemsGroup
}
>
<
Box
sx=
{
classes
.
itemsGroup
}
>
<
PaymentOrderItem
flex=
{
1
}
label=
'model'
size=
"small"
value=
'00'
/>
<
PaymentOrderItem
flex=
{
1
}
label=
'model'
size=
"small"
value=
'00'
/>
<
PaymentOrderItem
flex=
{
4
}
label=
'
poziv na broj
'
size=
"small"
value=
{
payReference
.
replaceAll
(
'-'
,
''
)
}
/>
<
PaymentOrderItem
flex=
{
4
}
label=
'
Invoice Id
'
size=
"small"
value=
{
payReference
.
replaceAll
(
'-'
,
''
)
}
/>
</
Box
>
</
Box
>
<
div
style=
{
{
marginLeft
:
"auto"
,
maxWidth
:
80
}
}
>
<
div
style=
{
{
marginLeft
:
"auto"
,
maxWidth
:
80
}
}
>
<
QRCode
<
QRCode
...
...
src/components/TenantInvoices/PaymentOrderItem.tsx
View file @
20b47c84
import
{
Box
,
Button
,
Typography
}
from
"@mui/material"
;
import
{
Box
,
Button
,
Typography
}
from
"@mui/material"
;
import
{
useState
}
from
"react"
;
import
{
useState
}
from
"react"
;
import
{
useTranslation
}
from
"react-i18next"
;
import
{
CopyIcon
}
from
"../icons/CopyIcon"
;
import
{
CopyIcon
}
from
"../icons/CopyIcon"
;
const
classes
=
{
const
classes
=
{
...
@@ -34,10 +35,11 @@ const classes = {
...
@@ -34,10 +35,11 @@ const classes = {
export
const
PaymentOrderItem
=
({
flex
,
label
,
value
,
size
}:
{
flex
:
number
,
label
:
string
,
value
?:
string
,
size
:
string
})
=>
{
export
const
PaymentOrderItem
=
({
flex
,
label
,
value
,
size
}:
{
flex
:
number
,
label
:
string
,
value
?:
string
,
size
:
string
})
=>
{
const
[
hovered
,
setHovered
]
=
useState
(
false
);
const
[
hovered
,
setHovered
]
=
useState
(
false
);
const
{
t
}
=
useTranslation
();
return
(
return
(
<
Box
sx=
{
{
flex
,
...
classes
.
mainContainer
}
}
>
<
Box
sx=
{
{
flex
,
...
classes
.
mainContainer
}
}
>
<
Typography
variant=
{
size
===
'large'
?
'body2'
:
'caption'
}
>
{
label
}
</
Typography
>
<
Typography
variant=
{
size
===
'large'
?
'body2'
:
'caption'
}
>
{
t
(
label
)
}
</
Typography
>
<
Box
<
Box
sx=
{
{
minHeight
:
size
===
'large'
?
'40px'
:
'25px'
,
...
classes
.
valueContainer
}
}
sx=
{
{
minHeight
:
size
===
'large'
?
'40px'
:
'25px'
,
...
classes
.
valueContainer
}
}
onMouseEnter=
{
()
=>
{
setHovered
(
true
);
}
}
onMouseEnter=
{
()
=>
{
setHovered
(
true
);
}
}
...
...
src/components/TenantInvoices/TenantInvoices.tsx
View file @
20b47c84
...
@@ -58,7 +58,7 @@ export const TenantInvoices = ({ building, unit }: { building: any, unit: any })
...
@@ -58,7 +58,7 @@ export const TenantInvoices = ({ building, unit }: { building: any, unit: any })
return
{
invoices
,
bankAccount
,
lastUnpaid
,
payReference
};
return
{
invoices
,
bankAccount
,
lastUnpaid
,
payReference
};
},
[
building
.
finance
,
unit
.
invoices
]);
},
[
building
.
finance
,
unit
.
invoices
]);
const
{
t
,
i18n
}
=
useTranslation
();
const
{
t
}
=
useTranslation
();
const
[
info
,
setInfo
]
=
useState
<
Test
>
(
getInfo
());
const
[
info
,
setInfo
]
=
useState
<
Test
>
(
getInfo
());
...
@@ -93,13 +93,11 @@ export const TenantInvoices = ({ building, unit }: { building: any, unit: any })
...
@@ -93,13 +93,11 @@ export const TenantInvoices = ({ building, unit }: { building: any, unit: any })
{
info
.
invoices
.
length
===
0
&&
<
Typography
sx=
{
classes
.
noRecords
}
>
{
t
(
'No records'
)
}
</
Typography
>
}
{
info
.
invoices
.
length
===
0
&&
<
Typography
sx=
{
classes
.
noRecords
}
>
{
t
(
'No records'
)
}
</
Typography
>
}
</
TableContainer
>
</
TableContainer
>
</
Card
>
</
Card
>
{
i18n
.
language
===
'sr'
&&
<
PaymentOrder
<
PaymentOrder
recipient=
{
building
.
name
}
recipient=
{
building
.
name
}
debit=
{
unit
.
debit
}
debit=
{
unit
.
debit
}
bankAccount=
{
info
.
bankAccount
}
bankAccount=
{
info
.
bankAccount
}
payReference=
{
info
.
payReference
}
/>
payReference=
{
info
.
payReference
}
/>
}
</
TabWrapper
>
</
TabWrapper
>
);
);
}
}
\ No newline at end of file
src/locale/en.json
View file @
20b47c84
...
@@ -43,6 +43,15 @@
...
@@ -43,6 +43,15 @@
"per group/per unit"
:
"per group"
,
"per group/per unit"
:
"per group"
,
"per unit/per unit"
:
"per unit"
,
"per unit/per unit"
:
"per unit"
,
"per unit/per area"
:
"per area"
,
"per unit/per area"
:
"per area"
,
"Payment order"
:
"Payment order"
,
"Payer"
:
"Payer"
,
"Purpose of payment"
:
"Purpose of payment"
,
"Recipient"
:
"Recipient"
,
"payment code"
:
"payment code"
,
"currency"
:
"currency"
,
"amount"
:
"amount"
,
"Recipient's account"
:
"Recipient's account"
,
"model"
:
"model"
,
"Name"
:
"Name"
,
"Name"
:
"Name"
,
"Action"
:
"Action"
,
"Action"
:
"Action"
,
...
...
src/locale/sr.json
View file @
20b47c84
...
@@ -46,6 +46,15 @@
...
@@ -46,6 +46,15 @@
"per group/per unit"
:
"ukupno"
,
"per group/per unit"
:
"ukupno"
,
"per unit/per unit"
:
"po stanu"
,
"per unit/per unit"
:
"po stanu"
,
"per unit/per area"
:
"po kvadraturi"
,
"per unit/per area"
:
"po kvadraturi"
,
"Payment order"
:
"Nalog za uplatu"
,
"Payer"
:
"Uplatilac"
,
"Purpose of payment"
:
"Svrha uplate"
,
"Recipient"
:
"Primalac"
,
"payment code"
:
"sifra plaćanja"
,
"currency"
:
"valuta"
,
"amount"
:
"iznos"
,
"Recipient's account"
:
"Račun primaoca"
,
"model"
:
"model"
,
"Name"
:
"Naziv"
,
"Name"
:
"Naziv"
,
"Action"
:
"Akcija"
,
"Action"
:
"Akcija"
,
...
...
src/services/i18n.ts
View file @
20b47c84
...
@@ -13,7 +13,7 @@ i18next
...
@@ -13,7 +13,7 @@ i18next
.
use
(
LanguageDetector
)
.
use
(
LanguageDetector
)
.
init
({
.
init
({
resources
,
resources
,
debug
:
tru
e
,
debug
:
fals
e
,
fallbackLng
:
'sr'
,
fallbackLng
:
'sr'
,
detection
:
{
detection
:
{
order
:
[
'localStorage'
,
'navigator'
],
order
:
[
'localStorage'
,
'navigator'
],
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment