Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
A
Agiliza
Project
Project
Details
Activity
Releases
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
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
evologica
Agiliza
Commits
e63508b1
Commit
e63508b1
authored
Sep 30, 2021
by
Rafael
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Adiciona alterações de migração.
parent
c5e9603f
Changes
169
Hide whitespace changes
Inline
Side-by-side
Showing
169 changed files
with
3343 additions
and
2697 deletions
+3343
-2697
.yarnrc
cli/web/cliente/.yarnrc
+1
-1
babel.config.json
cli/web/cliente/babel.config.json
+8
-8
package.json
cli/web/cliente/package.json
+9
-7
context.d.ts
cli/web/cliente/src/api/domain/simulation/context.d.ts
+9
-0
ButtonWithProgress.tsx
...omponents/atoms/ButtonWithProgress/ButtonWithProgress.tsx
+7
-9
styles.ts
...cliente/src/components/atoms/ButtonWithProgress/styles.ts
+9
-11
ItemWithIcon.tsx
...liente/src/components/atoms/ItemWithIcon/ItemWithIcon.tsx
+7
-6
TextFieldWithIcon.tsx
.../components/atoms/TextFieldWithIcon/TextFieldWithIcon.tsx
+9
-11
styles.ts
.../cliente/src/components/atoms/TextFieldWithIcon/styles.ts
+6
-7
Toolbar.tsx
cli/web/cliente/src/components/molecules/AppBar/Toolbar.tsx
+8
-5
index.tsx
cli/web/cliente/src/components/molecules/AppBar/index.tsx
+11
-12
styles.ts
cli/web/cliente/src/components/molecules/AppBar/styles.ts
+4
-4
CircularProgress.tsx
...omponents/molecules/CircularProgress/CircularProgress.tsx
+6
-9
styles.ts
...iente/src/components/molecules/CircularProgress/styles.ts
+12
-14
ContextButton.tsx
.../src/components/molecules/ContextButton/ContextButton.tsx
+8
-20
DialogLayout.tsx
...te/src/components/molecules/DialogLayout/DialogLayout.tsx
+12
-12
styles.ts
...b/cliente/src/components/molecules/DialogLayout/styles.ts
+5
-4
Drawer.tsx
cli/web/cliente/src/components/molecules/Drawer/Drawer.tsx
+19
-18
styles.ts
cli/web/cliente/src/components/molecules/Drawer/styles.ts
+5
-4
ErrorDialog.tsx
...ente/src/components/molecules/ErrorDialog/ErrorDialog.tsx
+7
-10
styles.ts
...eb/cliente/src/components/molecules/ErrorDialog/styles.ts
+0
-2
PopoverVersion.tsx
...rc/components/molecules/PopoverVersion/PopoverVersion.tsx
+13
-12
styles.ts
...cliente/src/components/molecules/PopoverVersion/styles.ts
+4
-3
DashboardCard.tsx
.../src/components/organisms/DashboardCard/DashboardCard.tsx
+42
-40
ImageUpload.tsx
...ente/src/components/organisms/ImageUpload/ImageUpload.tsx
+17
-15
styles.ts
...eb/cliente/src/components/organisms/ImageUpload/styles.ts
+5
-7
PhoneField.tsx
...liente/src/components/organisms/PhoneField/PhoneField.tsx
+3
-8
styles.ts
...web/cliente/src/components/organisms/PhoneField/styles.ts
+2
-5
BellIcon.tsx
cli/web/cliente/src/components/particles/Icons/BellIcon.tsx
+1
-1
SecurityProfileIcon.tsx
...te/src/components/particles/Icons/SecurityProfileIcon.tsx
+1
-1
ShareSquareIcon.tsx
...liente/src/components/particles/Icons/ShareSquareIcon.tsx
+2
-1
TermIcon.tsx
cli/web/cliente/src/components/particles/Icons/TermIcon.tsx
+1
-1
UploadIcon.tsx
...web/cliente/src/components/particles/Icons/UploadIcon.tsx
+3
-2
VialIcon.tsx
cli/web/cliente/src/components/particles/Icons/VialIcon.tsx
+3
-2
AccountInputsPhoto.tsx
...nents/templates/AccountInputsPhoto/AccountInputsPhoto.tsx
+6
-9
styles.ts
...nte/src/components/templates/AccountInputsPhoto/styles.ts
+13
-16
Address.tsx
cli/web/cliente/src/components/templates/Address/Address.tsx
+10
-10
styles.ts
cli/web/cliente/src/components/templates/Address/styles.ts
+3
-3
FirstAccess.tsx
...ente/src/components/templates/FirstAccess/FirstAccess.tsx
+9
-9
styles.ts
...eb/cliente/src/components/templates/FirstAccess/styles.ts
+3
-3
Login.tsx
cli/web/cliente/src/components/templates/Login/Login.tsx
+10
-11
styles.ts
cli/web/cliente/src/components/templates/Login/styles.ts
+4
-4
NotFound.tsx
...eb/cliente/src/components/templates/NotFound/NotFound.tsx
+11
-10
RGTemplate.tsx
...liente/src/components/templates/RGTemplate/RGTemplate.tsx
+11
-12
styles.ts
...web/cliente/src/components/templates/RGTemplate/styles.ts
+3
-3
styles.ts
cli/web/cliente/src/constants/styles.ts
+3
-3
index.tsx
cli/web/cliente/src/index.tsx
+7
-7
index.ts
cli/web/cliente/src/theme/index.ts
+43
-30
BrowserIncompatible.tsx
...nte/src/views/BrowserIncompatible/BrowserIncompatible.tsx
+24
-25
styles.ts
cli/web/cliente/src/views/BrowserIncompatible/styles.ts
+4
-4
Login.tsx
cli/web/cliente/src/views/Login/Login.tsx
+12
-10
styles.ts
cli/web/cliente/src/views/Login/styles.ts
+5
-6
DrawerItems.tsx
cli/web/cliente/src/views/Main/DrawerItems/DrawerItems.tsx
+13
-18
styles.ts
cli/web/cliente/src/views/Main/DrawerItems/styles.ts
+4
-4
Main.tsx
cli/web/cliente/src/views/Main/Main.tsx
+18
-13
styles.ts
cli/web/cliente/src/views/Main/styles.ts
+5
-4
ListProjects.tsx
...te/src/views/Projects/pages/ListProjects/ListProjects.tsx
+13
-10
styles.ts
...b/cliente/src/views/Projects/pages/ListProjects/styles.ts
+6
-5
router.tsx
cli/web/cliente/src/views/Projects/pages/router.tsx
+9
-10
shared-styles.ts
cli/web/cliente/src/views/Projects/pages/shared-styles.ts
+6
-5
CPFCNPJField.tsx
...oposalData/components/atoms/CPFCNPJField/CPFCNPJField.tsx
+1
-1
Address.tsx
...ews/ProposalData/components/templates/Address/Address.tsx
+3
-7
styles.ts
...views/ProposalData/components/templates/Address/styles.ts
+3
-3
PriceAmountInput.tsx
...omponents/templates/PriceAmountInput/PriceAmountInput.tsx
+1
-1
Address.tsx
...views/ProposalData/pages/BusinessData/Address/Address.tsx
+8
-7
Form.tsx
...ews/ProposalData/pages/BusinessData/Address/Form/Form.tsx
+9
-10
styles.ts
...ws/ProposalData/pages/BusinessData/Address/Form/styles.ts
+3
-3
styles.ts
...c/views/ProposalData/pages/BusinessData/Address/styles.ts
+3
-3
BusinessData.tsx
...rc/views/ProposalData/pages/BusinessData/BusinessData.tsx
+3
-9
Form.tsx
...posalData/pages/BusinessData/Identification/Form/Form.tsx
+13
-14
styles.ts
...osalData/pages/BusinessData/Identification/Form/styles.ts
+3
-3
Identification.tsx
...Data/pages/BusinessData/Identification/Identification.tsx
+8
-7
styles.ts
.../ProposalData/pages/BusinessData/Identification/styles.ts
+3
-3
Dialog.tsx
...ata/pages/BusinessData/ProductsServices/Dialog/Dialog.tsx
+8
-7
styles.ts
...Data/pages/BusinessData/ProductsServices/Dialog/styles.ts
+3
-3
Form.tsx
...salData/pages/BusinessData/ProductsServices/Form/Form.tsx
+12
-13
styles.ts
...alData/pages/BusinessData/ProductsServices/Form/styles.ts
+3
-3
ProductsServices.tsx
.../pages/BusinessData/ProductsServices/ProductsServices.tsx
+12
-11
styles.ts
...roposalData/pages/BusinessData/ProductsServices/styles.ts
+3
-3
Form.tsx
...osalData/pages/BusinessData/StockSalesCosts/Form/Form.tsx
+10
-11
styles.ts
...salData/pages/BusinessData/StockSalesCosts/Form/styles.ts
+3
-3
StockSalesCosts.tsx
...ta/pages/BusinessData/StockSalesCosts/StockSalesCosts.tsx
+8
-8
styles.ts
...ProposalData/pages/BusinessData/StockSalesCosts/styles.ts
+3
-3
styles.ts
...iente/src/views/ProposalData/pages/BusinessData/styles.ts
+3
-3
Address.tsx
...views/ProposalData/pages/CustomerData/Address/Address.tsx
+8
-7
Form.tsx
...ews/ProposalData/pages/CustomerData/Address/Form/Form.tsx
+9
-9
styles.ts
...ws/ProposalData/pages/CustomerData/Address/Form/styles.ts
+3
-3
styles.ts
...c/views/ProposalData/pages/CustomerData/Address/styles.ts
+3
-3
CustomerData.tsx
...rc/views/ProposalData/pages/CustomerData/CustomerData.tsx
+3
-10
Form.tsx
.../views/ProposalData/pages/CustomerData/Home/Form/Form.tsx
+12
-11
styles.ts
...views/ProposalData/pages/CustomerData/Home/Form/styles.ts
+3
-3
Home.tsx
...e/src/views/ProposalData/pages/CustomerData/Home/Home.tsx
+8
-7
styles.ts
.../src/views/ProposalData/pages/CustomerData/Home/styles.ts
+3
-3
Form.tsx
...posalData/pages/CustomerData/Identification/Form/Form.tsx
+10
-11
styles.ts
...osalData/pages/CustomerData/Identification/Form/styles.ts
+3
-3
Identification.tsx
...Data/pages/CustomerData/Identification/Identification.tsx
+8
-8
styles.ts
.../ProposalData/pages/CustomerData/Identification/styles.ts
+3
-3
Form.tsx
...roposalData/pages/CustomerData/PersonalData/Form/Form.tsx
+12
-20
styles.ts
...oposalData/pages/CustomerData/PersonalData/Form/styles.ts
+3
-3
PersonalData.tsx
...osalData/pages/CustomerData/PersonalData/PersonalData.tsx
+8
-7
styles.ts
...ws/ProposalData/pages/CustomerData/PersonalData/styles.ts
+3
-3
Dialog.tsx
...posalData/pages/CustomerData/References/Dialog/Dialog.tsx
+8
-7
styles.ts
...oposalData/pages/CustomerData/References/Dialog/styles.ts
+3
-3
Form.tsx
.../ProposalData/pages/CustomerData/References/Form/Form.tsx
+9
-11
styles.ts
...ProposalData/pages/CustomerData/References/Form/styles.ts
+3
-3
References.tsx
...ProposalData/pages/CustomerData/References/References.tsx
+12
-13
styles.ts
...iews/ProposalData/pages/CustomerData/References/styles.ts
+3
-3
Form.tsx
...roposalData/pages/CustomerData/SourceIncome/Form/Form.tsx
+12
-14
styles.ts
...oposalData/pages/CustomerData/SourceIncome/Form/styles.ts
+3
-3
SourceIncome.tsx
...osalData/pages/CustomerData/SourceIncome/SourceIncome.tsx
+8
-7
styles.ts
...ws/ProposalData/pages/CustomerData/SourceIncome/styles.ts
+3
-3
Form.tsx
...ata/pages/CustomerData/SpouseAdditionalData/Form/Form.tsx
+13
-15
styles.ts
...ta/pages/CustomerData/SpouseAdditionalData/Form/styles.ts
+3
-3
SpouseAdditionalData.tsx
...ustomerData/SpouseAdditionalData/SpouseAdditionalData.tsx
+8
-9
styles.ts
...salData/pages/CustomerData/SpouseAdditionalData/styles.ts
+3
-3
Form.tsx
.../ProposalData/pages/CustomerData/SpouseData/Form/Form.tsx
+12
-20
styles.ts
...ProposalData/pages/CustomerData/SpouseData/Form/styles.ts
+3
-3
SpouseData.tsx
...ProposalData/pages/CustomerData/SpouseData/SpouseData.tsx
+8
-7
styles.ts
...iews/ProposalData/pages/CustomerData/SpouseData/styles.ts
+3
-3
Dialog.tsx
...roposalData/pages/CustomerData/Vehicles/Dialog/Dialog.tsx
+8
-7
styles.ts
...ProposalData/pages/CustomerData/Vehicles/Dialog/styles.ts
+3
-3
Form.tsx
...ws/ProposalData/pages/CustomerData/Vehicles/Form/Form.tsx
+11
-11
styles.ts
...s/ProposalData/pages/CustomerData/Vehicles/Form/styles.ts
+3
-3
Vehicles.tsx
...ews/ProposalData/pages/CustomerData/Vehicles/Vehicles.tsx
+12
-11
styles.ts
.../views/ProposalData/pages/CustomerData/Vehicles/styles.ts
+3
-3
styles.ts
...iente/src/views/ProposalData/pages/CustomerData/styles.ts
+3
-3
AddUpdateDialog.tsx
...People/Identification/AddUpdateDialog/AddUpdateDialog.tsx
+8
-7
styles.ts
...s/InvolvedPeople/Identification/AddUpdateDialog/styles.ts
+3
-3
Customer.tsx
...pages/InvolvedPeople/Identification/Customer/Customer.tsx
+10
-11
styles.ts
...ta/pages/InvolvedPeople/Identification/Customer/styles.ts
+3
-3
Identification.tsx
...ta/pages/InvolvedPeople/Identification/Identification.tsx
+12
-14
SelectTypeDialog.tsx
...ople/Identification/SelectTypeDialog/SelectTypeDialog.tsx
+11
-10
styles.ts
.../InvolvedPeople/Identification/SelectTypeDialog/styles.ts
+3
-3
styles.ts
...roposalData/pages/InvolvedPeople/Identification/styles.ts
+3
-3
InvolvedPeople.tsx
...iews/ProposalData/pages/InvolvedPeople/InvolvedPeople.tsx
+13
-22
styles.ts
...nte/src/views/ProposalData/pages/InvolvedPeople/styles.ts
+3
-3
ProposalData.tsx
...web/cliente/src/views/ProposalData/pages/ProposalData.tsx
+18
-16
ListItem.tsx
...te/src/views/ProposalData/pages/SelectOption/ListItem.tsx
+9
-10
SelectOption.tsx
...rc/views/ProposalData/pages/SelectOption/SelectOption.tsx
+18
-17
styles.ts
...iente/src/views/ProposalData/pages/SelectOption/styles.ts
+4
-4
router.tsxx
cli/web/cliente/src/views/ProposalData/pages/router.tsxx
+2
-2
shared-styles.ts
...web/cliente/src/views/ProposalData/pages/shared-styles.ts
+3
-3
CreditLinesList.tsx
...tionCreditLines/pages/CreditLinesList/CreditLinesList.tsx
+21
-20
SliderField.tsx
...mulationCreditLines/pages/CreditLinesList/SliderField.tsx
+15
-6
styles.ts
...ews/SimulationCreditLines/pages/CreditLinesList/styles.ts
+3
-3
FinishSimulation.tsx
...onCreditLines/pages/FinishSimulation/FinishSimulation.tsx
+9
-8
styles.ts
...ws/SimulationCreditLines/pages/FinishSimulation/styles.ts
+3
-3
CreditLinesInfo.tsx
...ines/pages/Simulation/CreditLinesInfo/CreditLinesInfo.tsx
+13
-12
GridLine.tsx
...CreditLines/pages/Simulation/CreditLinesInfo/GridLine.tsx
+1
-1
InstallmentsDialog.tsx
...CreditLinesInfo/InstallmentsDialog/InstallmentsDialog.tsx
+12
-11
styles.ts
...s/Simulation/CreditLinesInfo/InstallmentsDialog/styles.ts
+4
-4
styles.ts
...ionCreditLines/pages/Simulation/CreditLinesInfo/styles.ts
+6
-5
Simulation.tsx
...ews/SimulationCreditLines/pages/Simulation/Simulation.tsx
+17
-16
CreatePassword.tsx
...rForm/FirstAccessDialog/CreatePassword/CreatePassword.tsx
+9
-9
styles.ts
...ation/UserForm/FirstAccessDialog/CreatePassword/styles.ts
+3
-3
FirstAccessDialog.tsx
...mulation/UserForm/FirstAccessDialog/FirstAccessDialog.tsx
+13
-12
VerifyCPF.tsx
...lation/UserForm/FirstAccessDialog/VerifyCPF/VerifyCPF.tsx
+10
-11
styles.ts
...Simulation/UserForm/FirstAccessDialog/VerifyCPF/styles.ts
+3
-3
VerifyCode.tsx
...tion/UserForm/FirstAccessDialog/VerifyCode/VerifyCode.tsx
+10
-11
styles.ts
...imulation/UserForm/FirstAccessDialog/VerifyCode/styles.ts
+3
-3
styles.ts
...nes/pages/Simulation/UserForm/FirstAccessDialog/styles.ts
+4
-4
UserForm.tsx
...ulationCreditLines/pages/Simulation/UserForm/UserForm.tsx
+13
-12
styles.ts
...SimulationCreditLines/pages/Simulation/UserForm/styles.ts
+3
-3
styles.ts
...rc/views/SimulationCreditLines/pages/Simulation/styles.ts
+6
-5
router.tsx
.../cliente/src/views/SimulationCreditLines/pages/router.tsx
+9
-8
shared-styles.ts
...te/src/views/SimulationCreditLines/pages/shared-styles.ts
+6
-5
shared-styles.ts
cli/web/cliente/src/views/shared-styles.ts
+11
-8
webpack.config.js
cli/web/cliente/webpack.config.js
+1
-1
yarn.lock
cli/web/cliente/yarn.lock
+2107
-1439
No files found.
cli/web/cliente/.yarnrc
View file @
e63508b1
--registry "https://nexus.dev.evologica.com.br/repository/npm
/
"
--registry "https://nexus.dev.evologica.com.br/repository/npm"
"@curio:registry" "https://nexus.dev.evologica.com.br/repository/npm"
"@dynamo:registry" "https://nexus.dev.evologica.com.br/repository/npm"
\ No newline at end of file
cli/web/cliente/babel.config.json
View file @
e63508b1
...
...
@@ -21,8 +21,8 @@
[
"babel-plugin-import"
,
{
"libraryName"
:
"@m
aterial-ui/core
"
,
"libraryDirectory"
:
"
esm
"
,
"libraryName"
:
"@m
ui/material
"
,
"libraryDirectory"
:
""
,
"camel2DashComponentName"
:
false
},
"core"
...
...
@@ -30,20 +30,20 @@
[
"babel-plugin-import"
,
{
"libraryName"
:
"@m
aterial-ui/lab
"
,
"libraryDirectory"
:
"
esm
"
,
"libraryName"
:
"@m
ui/icons-material
"
,
"libraryDirectory"
:
""
,
"camel2DashComponentName"
:
false
},
"
lab
"
"
icons
"
],
[
"babel-plugin-import"
,
{
"libraryName"
:
"@m
aterial-ui/icons
"
,
"libraryDirectory"
:
"
esm
"
,
"libraryName"
:
"@m
ui/lab
"
,
"libraryDirectory"
:
""
,
"camel2DashComponentName"
:
false
},
"
icons
"
"
lab
"
],
"@babel/plugin-proposal-optional-chaining"
,
"@babel/plugin-proposal-nullish-coalescing-operator"
,
...
...
cli/web/cliente/package.json
View file @
e63508b1
...
...
@@ -80,17 +80,19 @@
},
"dependencies"
:
{
"@curio/client"
:
"1.3.3"
,
"@curio/components"
:
"^
0.1.6
"
,
"@curio/components"
:
"^
1.0.3
"
,
"@curio/ui"
:
"^0.1.0"
,
"@date-io/date-fns"
:
"^1.0.0"
,
"@dynamo/components"
:
"0.70.1"
,
"@dynamo/curio"
:
"0.70.1"
,
"@dynamo/material-ui"
:
"0.70.1"
,
"@material-ui/core"
:
"4.11.4"
,
"@material-ui/icons"
:
"^4.11.2"
,
"@material-ui/lab"
:
"4.0.0-alpha.58"
,
"@material-ui/pickers"
:
"^3.3.10"
,
"@emotion/react"
:
"^11.4.1"
,
"@emotion/styled"
:
"^11.3.0"
,
"@microcredito/client"
:
"^0.7.26"
,
"@mui/icons-material"
:
"^5.0.0"
,
"@mui/lab"
:
"^5.0.0-alpha.46"
,
"@mui/material"
:
"^5.0.0"
,
"@mui/system"
:
"^5.0.0"
,
"@reduxjs/toolkit"
:
"^1.2.5"
,
"@types/react-swipeable-views"
:
"^0.13.1"
,
"@types/react-swipeable-views-utils"
:
"^0.13.3"
,
...
...
@@ -103,8 +105,8 @@
"deepmerge"
:
"^4.2.2"
,
"normalizr"
:
"^3.6.1"
,
"p-min-delay"
:
"^4.0.0"
,
"react"
:
"^1
6
.0.0"
,
"react-dom"
:
"^1
6
.0.0"
,
"react"
:
"^1
7
.0.0"
,
"react-dom"
:
"^1
7
.0.0"
,
"react-loading-skeleton"
:
"^2.0.1"
,
"react-redux"
:
"^7.2.0"
,
"react-router"
:
"5.2.0"
,
...
...
cli/web/cliente/src/api/domain/simulation/context.d.ts
View file @
e63508b1
...
...
@@ -21,3 +21,12 @@ export interface CreditInstallment extends Entity {
export
interface
CreditGracePeriod
extends
Entity
{
description
:
string
}
interface
OutputGetVisitContext
{
gracePeriods
:
CreditGracePeriod
}
export
interface
GetVisitContext
{
Input
:
void
Output
:
OutputGetVisitContext
}
cli/web/cliente/src/components/atoms/ButtonWithProgress/ButtonWithProgress.tsx
View file @
e63508b1
import
React
from
'react'
import
{
Button
,
LinearProgress
}
from
'@material-ui/core'
import
{
ButtonProps
}
from
'@material-ui/core/Button'
import
{
withStyles
,
WithStyles
}
from
'@material-ui/core/styles'
import
{
Button
,
LinearProgress
}
from
'@mui/material'
import
{
ButtonProps
}
from
'@mui/material/Button'
import
{
styles
}
from
'./styles'
type
ExtendedTypes
=
WithStyles
<
typeof
styles
>
&
Pick
<
ButtonProps
,
'disabled'
|
'onClick'
|
'type'
|
'children'
|
'className'
|
'color'
|
'size'
|
'variant'
>
type
ExtendedTypes
=
Pick
<
ButtonProps
,
'disabled'
|
'onClick'
|
'type'
|
'children'
|
'sx'
|
'color'
|
'size'
|
'variant'
>
interface
Props
extends
ExtendedTypes
{
fetching
?:
boolean
}
const
ButtonWithProgress
=
(
props
:
Props
)
=>
{
const
{
className
,
classes
,
fetching
,
disabled
,
onClick
,
type
,
children
,
color
=
'primary'
,
size
,
variant
=
'contained'
}
=
props
const
{
sx
,
fetching
,
disabled
,
onClick
,
type
,
children
,
color
=
'primary'
,
size
,
variant
=
'contained'
}
=
props
return
(
<
Button
className=
{
className
}
disabled=
{
disabled
||
fetching
}
onClick=
{
onClick
}
variant=
{
variant
}
color=
{
color
}
type=
{
type
}
size=
{
size
}
>
{
fetching
&&
<
LinearProgress
className=
{
class
es
.
progress
}
/>
}
<
Button
sx=
{
sx
}
disabled=
{
disabled
||
fetching
}
onClick=
{
onClick
}
variant=
{
variant
}
color=
{
color
}
type=
{
type
}
size=
{
size
}
>
{
fetching
&&
<
LinearProgress
sx=
{
styl
es
.
progress
}
/>
}
{
children
}
</
Button
>
)
}
export
default
withStyles
(
styles
)(
ButtonWithProgress
)
export
default
ButtonWithProgress
cli/web/cliente/src/components/atoms/ButtonWithProgress/styles.ts
View file @
e63508b1
import
{
Theme
,
createStyles
}
from
'@material-ui/core/styles
'
import
{
createSxStyles
}
from
'@agiliza/theme
'
export
const
styles
=
(
theme
:
Theme
)
=>
{
return
createStyles
({
progress
:
{
bottom
:
0
,
margin
:
0
,
width
:
'100%'
,
position
:
'absolute'
}
})
}
export
const
styles
=
createSxStyles
({
progress
:
{
bottom
:
0
,
margin
:
0
,
width
:
'100%'
,
position
:
'absolute'
,
},
})
cli/web/cliente/src/components/atoms/ItemWithIcon/ItemWithIcon.tsx
View file @
e63508b1
import
React
from
'react'
import
ListItem
from
'@material-ui/core/ListItem'
import
ListItemIcon
from
'@material-ui/core/ListItemIcon'
import
ListItemText
from
'@material-ui/core/ListItemText'
import
ListItem
,
{
ListItemProps
}
from
'@mui/material/ListItem'
import
ListItemIcon
from
'@mui/material/ListItemIcon'
import
ListItemText
from
'@mui/material/ListItemText'
interface
Props
{
label
:
string
className
?:
string
sx
?:
ListItemProps
[
'sx'
]
children
:
React
.
ReactElement
onClick
?:
()
=>
void
}
const
ItemWithIcon
=
(
props
:
Props
)
=>
{
const
{
className
,
label
,
children
,
onClick
}
=
props
const
{
sx
,
label
,
children
,
onClick
}
=
props
return
(
<
ListItem
button
className=
{
className
}
onClick=
{
onClick
}
>
<
ListItem
button
sx=
{
sx
}
onClick=
{
onClick
}
>
<
ListItemIcon
>
{
children
}
</
ListItemIcon
>
<
ListItemText
primary=
{
label
}
/>
</
ListItem
>
...
...
cli/web/cliente/src/components/atoms/TextFieldWithIcon/TextFieldWithIcon.tsx
View file @
e63508b1
import
React
,
{
useState
}
from
'react'
import
InputAdornment
from
'@material-ui/core/InputAdornment'
import
TextField
,
{
TextFieldProps
}
from
'@material-ui/core/TextField'
import
Visibility
from
'@material-ui/icons/Visibility'
import
VisibilityOff
from
'@material-ui/icons/VisibilityOff'
import
withStyles
,
{
WithStyles
}
from
'@material-ui/styles/withStyles'
import
Visibility
from
'@mui/icons-material/Visibility'
import
VisibilityOff
from
'@mui/icons-material/VisibilityOff'
import
InputAdornment
from
'@mui/material/InputAdornment'
import
TextField
,
{
TextFieldProps
}
from
'@mui/material/TextField'
import
styles
from
'./styles'
type
BaseProps
=
WithStyles
<
typeof
styles
>
&
Pick
<
TextFieldProps
,
'value'
|
'onChange'
|
'required'
|
'label'
|
'type'
|
'className'
|
'InputProps'
|
'autoFocus'
|
'inputProps'
>
type
BaseProps
=
Pick
<
TextFieldProps
,
'value'
|
'onChange'
|
'required'
|
'label'
|
'type'
|
'sx'
|
'InputProps'
|
'autoFocus'
|
'inputProps'
>
interface
Props
extends
BaseProps
{}
const
TextFieldWithIcon
=
(
props
:
Props
)
=>
{
const
[
isPasswordVisible
,
setIsPasswordVisible
]
=
useState
(
false
)
const
{
onChange
,
required
,
value
,
label
,
type
,
className
,
InputProps
,
classe
s
,
autoFocus
}
=
props
const
{
onChange
,
required
,
value
,
label
,
type
,
sx
,
InputProp
s
,
autoFocus
}
=
props
return
(
<
TextField
autoFocus=
{
autoFocus
}
...
...
@@ -23,14 +21,14 @@ const TextFieldWithIcon = (props: Props) => {
value=
{
value
}
onChange=
{
onChange
}
label=
{
label
}
className=
{
className
}
sx=
{
sx
}
variant=
"outlined"
type=
{
type
===
'password'
?
(
isPasswordVisible
?
undefined
:
type
)
:
type
}
InputProps=
{
InputProps
||
{
startAdornment
:
type
===
'password'
?
(
<
InputAdornment
position=
"start"
onClick=
{
()
=>
setIsPasswordVisible
(
!
isPasswordVisible
)
}
className=
{
class
es
.
inputAdorment
}
>
<
InputAdornment
position=
"start"
onClick=
{
()
=>
setIsPasswordVisible
(
!
isPasswordVisible
)
}
sx=
{
styl
es
.
inputAdorment
}
>
{
isPasswordVisible
?
<
Visibility
/>
:
<
VisibilityOff
/>
}
</
InputAdornment
>
)
:
null
,
...
...
@@ -40,4 +38,4 @@ const TextFieldWithIcon = (props: Props) => {
)
}
export
default
withStyles
(
styles
)(
TextFieldWithIcon
)
export
default
TextFieldWithIcon
cli/web/cliente/src/components/atoms/TextFieldWithIcon/styles.ts
View file @
e63508b1
import
{
createS
tyles
,
Theme
}
from
'@material-ui/core/styles
'
import
{
createS
xStyles
}
from
'@agiliza/theme
'
export
default
(
theme
:
Theme
)
=>
createStyles
({
inputAdorment
:
{
cursor
:
'pointer'
}
})
export
default
createSxStyles
({
inputAdorment
:
{
cursor
:
'pointer'
,
},
})
cli/web/cliente/src/components/molecules/AppBar/Toolbar.tsx
View file @
e63508b1
import
React
from
'react'
import
MuiToolbar
from
'@material-ui/core/Toolbar'
import
{
Box
}
from
'@mui/material'
import
{
useTheme
}
from
'@mui/material/styles'
import
MuiToolbar
,
{
ToolbarProps
as
MuiToolbarProps
}
from
'@mui/material/Toolbar'
import
{
useStyles
}
from
'./styles'
...
...
@@ -8,14 +10,15 @@ export interface ToolbarProps {
title
?:
React
.
ReactNode
actions
?:
React
.
ReactNode
nav
?:
React
.
ReactNode
sx
?:
MuiToolbarProps
[
'sx'
]
}
export
function
Toolbar
({
nav
,
title
,
actions
}:
ToolbarProps
)
{
const
classes
=
useStyles
(
)
export
function
Toolbar
({
nav
,
title
,
actions
,
sx
}:
ToolbarProps
)
{
const
styles
=
useStyles
(
useTheme
()
)
return
(
<
MuiToolbar
>
<
div
className=
{
classes
.
nav
}
>
{
nav
}
</
div
>
{
title
?
<
div
className=
{
classes
.
grow
}
>
{
title
}
</
div
>
:
<
div
className=
{
class
es
.
grow
}
/>
}
<
Box
sx=
{
styles
.
nav
}
>
{
nav
}
</
Box
>
{
title
?
<
Box
sx=
{
styles
.
grow
}
>
{
title
}
</
Box
>
:
<
Box
sx=
{
styl
es
.
grow
}
/>
}
{
actions
}
</
MuiToolbar
>
)
...
...
cli/web/cliente/src/components/molecules/AppBar/index.tsx
View file @
e63508b1
import
cn
from
'classnames
'
import
deepmerge
from
'deepmerge
'
import
React
,
{
useState
}
from
'react'
import
{
Collapse
,
CollapseProps
,
Fade
}
from
'@material-ui/core'
import
MuiAppBar
,
{
AppBarProps
as
MuiAppBarProps
}
from
'@material-ui/core/AppBar'
import
{
createStyles
,
makeStyles
,
Theme
}
from
'@material-ui/core/styles'
import
{
createSxStyles
}
from
'@agiliza/theme'
import
{
Box
,
Collapse
,
CollapseProps
,
Fade
}
from
'@mui/material'
import
MuiAppBar
,
{
AppBarProps
as
MuiAppBarProps
}
from
'@mui/material/AppBar'
import
{
Theme
,
useTheme
}
from
'@mui/material/styles'
import
{
Toolbar
,
ToolbarProps
}
from
'./Toolbar'
const
useStyles
=
makeStyles
(
(
theme
:
Theme
)
=>
createStyles
({
const
useStyles
=
(
theme
:
Theme
)
=>
createS
xS
tyles
({
appBar
:
{
// position: 'fixed',
...
theme
.
mixins
.
toolbar
,
...
...
@@ -21,21 +22,19 @@ const useStyles = makeStyles((theme: Theme) =>
width
:
'100%'
,
},
})
)
type
BaseType
=
Omit
<
ToolbarProps
,
'classes'
|
'nav'
>
export
interface
AppBarProps
extends
BaseType
{
className
?:
string
position
?:
MuiAppBarProps
[
'position'
]
children
?:
React
.
ReactNode
onNavClick
?(
event
:
React
.
MouseEvent
<
HTMLButtonElement
,
MouseEvent
>
):
void
style
?:
MuiAppBarProps
[
'style'
]
}
const
AppBar
=
({
className
,
position
=
'static'
,
actions
,
title
,
children
,
onNavClick
,
style
}:
AppBarProps
)
=>
{
const
classes
=
useStyles
()
const
AppBar
=
({
sx
,
position
=
'static'
,
actions
,
title
,
children
,
onNavClick
,
style
}:
AppBarProps
)
=>
{
const
[
fadeIn
,
setFadeIn
]
=
useState
(
false
)
const
styles
=
useStyles
(
useTheme
())
const
onCollapse
:
CollapseProps
[
'onEntered'
]
=
(
el
,
isAppearing
)
=>
{
setFadeIn
(
isAppearing
)
...
...
@@ -48,13 +47,13 @@ const AppBar = ({ className, position = 'static', actions, title, children, onNa
// ) : null
return
(
<>
<
MuiAppBar
className=
{
cn
(
classes
.
appBar
,
className
)
}
position=
{
position
}
style=
{
style
}
>
<
MuiAppBar
sx=
{
deepmerge
(
styles
.
appBar
,
sx
||
{}
)
}
position=
{
position
}
style=
{
style
}
>
<
Toolbar
title=
{
title
}
actions=
{
actions
}
/*nav={nav}*/
/>
{
children
&&
(
<
Collapse
appear
enter
in
onEntered=
{
onCollapse
}
timeout=
{
400
}
>
<
div
>
<
Fade
in=
{
fadeIn
}
enter
timeout=
{
600
}
>
<
div
className=
{
classes
.
content
}
>
{
children
}
</
div
>
<
Box
sx=
{
styles
.
content
}
>
{
children
}
</
Box
>
</
Fade
>
</
div
>
</
Collapse
>
...
...
cli/web/cliente/src/components/molecules/AppBar/styles.ts
View file @
e63508b1
import
{
createStyles
,
makeStyles
,
Theme
}
from
'@material-ui/core/styles'
import
{
createSxStyles
}
from
'@agiliza/theme'
import
{
Theme
}
from
'@mui/material/styles'
export
const
useStyles
=
makeStyles
(
(
theme
:
Theme
)
=>
createStyles
({
export
const
useStyles
=
(
theme
:
Theme
)
=>
createS
xS
tyles
({
grow
:
{
flexGrow
:
1
,
},
...
...
@@ -9,4 +10,3 @@ export const useStyles = makeStyles((theme: Theme) =>
marginRight
:
theme
.
spacing
(
2
),
},
})
)
cli/web/cliente/src/components/molecules/CircularProgress/CircularProgress.tsx
View file @
e63508b1
import
cn
from
'classnames
'
import
deepmerge
from
'deepmerge
'
import
React
from
'react'
import
CircularProgressMUI
from
'@material-ui/core/CircularProgress
'
import
C
ontainer
from
'@material-ui/core/Container
'
import
Box
from
'@mui/material/Box
'
import
C
ircularProgressMUI
from
'@mui/material/CircularProgress
'
import
{
useS
tyles
}
from
'./styles'
import
{
s
tyles
}
from
'./styles'
interface
Props
{
className
?:
string
...
...
@@ -12,13 +12,10 @@ interface Props {
}
const
CircularProgress
=
(
props
:
Props
)
=>
{
const
classes
=
useStyles
()
return
(
<
Container
className=
{
cn
(
classes
.
container
,
{
[
classes
.
allContainer
]:
props
.
root
})
}
>
<
Box
sx=
{
deepmerge
(
styles
.
container
,
props
.
root
?
styles
.
allContainer
:
{})
}
>
<
CircularProgressMUI
className=
{
props
.
className
}
color=
"secondary"
/>
</
Container
>
</
Box
>
)
}
...
...
cli/web/cliente/src/components/molecules/CircularProgress/styles.ts
View file @
e63508b1
import
{
createS
tyles
,
makeStyles
,
Theme
}
from
'@material-ui/core/styles
'
import
{
createS
xStyles
}
from
'@agiliza/theme
'
export
const
useStyles
=
makeStyles
((
theme
:
Theme
)
=>
createStyles
({
container
:
{
display
:
'flex'
,
flex
:
1
,
justifyContent
:
'center'
,
alignItems
:
'center'
},
allContainer
:
{
height
:
'100vh'
}
})
)
export
const
styles
=
createSxStyles
({
container
:
{
display
:
'flex'
,
flex
:
1
,
justifyContent
:
'center'
,
alignItems
:
'center'
,
},
allContainer
:
{
height
:
'100vh'
,
},
})
cli/web/cliente/src/components/molecules/ContextButton/ContextButton.tsx
View file @
e63508b1
import
React
from
'react'
import
IconButton
from
'@material-ui/core/IconButton'
import
ListItemText
from
'@material-ui/core/ListItemText'
import
Menu
from
'@material-ui/core/Menu'
import
MenuItem
from
'@material-ui/core/MenuItem'
import
{
MoreVert
as
ContextIconVertical
}
from
'@material-ui/icons'
import
{
MoreVert
as
ContextIconVertical
}
from
'@mui/icons-material'
import
IconButton
from
'@mui/material/IconButton'
import
ListItemText
from
'@mui/material/ListItemText'
import
Menu
from
'@mui/material/Menu'
import
MenuItem
from
'@mui/material/MenuItem'
export
interface
ContextItem
{
icon
?:
React
.
ReactElement
...
...
@@ -38,23 +39,10 @@ export default function ContextButton({ menuId, disabled, menuItems, className,
return
(
<>
<
IconButton
disabled=
{
disabled
}
className=
{
className
}
aria
-
controls=
{
menuId
}
aria
-
haspopup=
"true"
onClick=
{
handleClick
}
>
<
IconButton
disabled=
{
disabled
}
className=
{
className
}
aria
-
controls=
{
menuId
}
aria
-
haspopup=
"true"
onClick=
{
handleClick
}
>
<
ContextIconVertical
/>
</
IconButton
>
<
Menu
id=
{
menuId
}
anchorEl=
{
anchorEl
}
keepMounted
open=
{
Boolean
(
anchorEl
)
}
onClose=
{
handleClose
}
className=
{
menuClassName
}
>
<
Menu
id=
{
menuId
}
anchorEl=
{
anchorEl
}
keepMounted
open=
{
Boolean
(
anchorEl
)
}
onClose=
{
handleClose
}
className=
{
menuClassName
}
>
{
menuItems
.
map
((
item
,
index
)
=>
(
<
MenuItem
key=
{
index
}
onClick=
{
(
e
)
=>
handleItemClick
(
e
,
item
)
}
>
{
/* <ListItemIcon>{item.icon}</ListItemIcon> */
}
...
...
cli/web/cliente/src/components/molecules/DialogLayout/DialogLayout.tsx
View file @
e63508b1
import
React
from
'react'
// import AppBar from '@m
aterial-ui/core
/AppBar'
// import AppBar from '@m
ui/material
/AppBar'
import
AppBar
from
'@agiliza/components/molecules/AppBar'
import
{
IconButton
}
from
'@material-ui/cor
e'
import
Dialog
from
'@material-ui/core/Dialog
'
import
Dialog
Actions
from
'@material-ui/core/DialogActions
'
// import Toolbar from '@material-ui/core/Toolbar
'
// import
IconButton from '@material-ui/core/IconButton
'
import
DialogContent
from
'@material-ui/core/DialogContent
'
import
Dialog
Title
from
'@material-ui/core/DialogTitle
'
import
Slide
from
'@material-ui/core/Slid
e'
import
{
TransitionProps
}
from
'@material-ui/core/transitions/transition
'
import
CloseIcon
from
'@material-ui/icons/Close
'
import
CloseIcon
from
'@mui/icons-material/Clos
e'
import
{
IconButton
}
from
'@mui/material
'
import
Dialog
from
'@mui/material/Dialog
'
import
DialogActions
from
'@mui/material/DialogActions
'
// import
Toolbar from '@mui/material/Toolbar
'
// import IconButton from '@mui/material/IconButton
'
import
Dialog
Content
from
'@mui/material/DialogContent
'
import
DialogTitle
from
'@mui/material/DialogTitl
e'
import
Slide
from
'@mui/material/Slide
'
import
{
TransitionProps
}
from
'@mui/material/transitions/transition
'
import
type
{
DialogProps
}
from
'@m
aterial-ui/core
/Dialog'
import
type
{
DialogProps
}
from
'@m
ui/material
/Dialog'
const
Transition
=
React
.
forwardRef
(
function
Transition
(
props
:
TransitionProps
&
{
children
?:
React
.
ReactElement
<
any
,
any
>
},
ref
:
React
.
Ref
<
unknown
>
...
...
cli/web/cliente/src/components/molecules/DialogLayout/styles.ts
View file @
e63508b1
import
{
Theme
,
createStyles
}
from
'@material-ui/core/styles'
import
{
createSxStyles
}
from
'@agiliza/theme'
import
{
Theme
}
from
'@mui/material'
export
const
styles
=
(
theme
:
Theme
)
=>
createStyles
({
createS
xS
tyles
({
appBar
:
{
position
:
'relative'
},
title
:
{
marginLeft
:
theme
.
spacing
(
2
),
flex
:
1
}
flex
:
1
,
}
,
})
cli/web/cliente/src/components/molecules/Drawer/Drawer.tsx
View file @
e63508b1
import
cn
from
'classnames
'
import
deepmerge
from
'deepmerge
'
import
React
from
'react'
import
{
RouteComponentProps
}
from
'react-router'
import
logo
from
'@agiliza/public/images/logo.svg'
import
{
actions
as
loginActions
}
from
'@agiliza/redux/ui/login'
import
Divider
from
'@material-ui/core/Divider'
import
MUIDrawer
from
'@material-ui/core/Drawer'
import
{
ListItemProps
}
from
'@mui/material'
import
Divider
from
'@mui/material/Divider'
import
MUIDrawer
from
'@mui/material/Drawer'
import
{
useTheme
}
from
'@mui/material/styles'
import
{
useStyles
}
from
'./styles'
type
ExtendedTypes
=
RouteComponentProps
interface
DrawerItemsProps
extends
ExtendedTypes
{
listItemClassName
?:
string
sx
:
ListItemProps
[
'sx'
]
toggleDrawer
:
()
=>
void
logout
:
Props
[
'logout'
]
}
...
...
@@ -28,30 +30,29 @@ export interface Props extends BaseProps {
const
Drawer
=
(
props
:
Props
)
=>
{
const
{
drawerOpen
,
toggleDrawer
,
Items
,
logout
,
...
routeProps
}
=
props
const
classes
=
useStyles
()
const
styles
=
useStyles
(
useTheme
())
return
(
<
MUIDrawer
variant=
"temporary"
open=
{
drawerOpen
}
className=
{
cn
(
classes
.
drawer
,
{
[
classes
.
drawerOpen
]:
drawerOpen
,
[
classes
.
drawerClose
]:
!
drawerOpen
,
})
}
classes=
{
{
paper
:
cn
(
classes
.
drawer
,
{
[
classes
.
drawerOpen
]:
drawerOpen
,
[
classes
.
drawerClose
]:
!
drawerOpen
,
}
),
sx=
{
deepmerge
(
styles
.
drawer
,
drawerOpen
?
styles
.
drawerOpen
:
styles
.
drawerClose
)
}
// classes={{
// paper: cn(classes.drawer, {
// [classes.drawerOpen]: drawerOpen,
// [classes.drawerClose]: !drawerOpen,
// }),
// }}
PaperProps=
{
{
sx
:
deepmerge
(
styles
.
drawer
,
drawerOpen
?
styles
.
drawerOpen
:
styles
.
drawerClose
),
}
}
onBackdropClick=
{
()
=>
toggleDrawer
()
}
>
<
div
className=
{
class
es
.
header
}
>
<
img
src=
{
logo
}
className=
{
class
es
.
headerLogo
}
alt=
"Camedics Logo"
/>
<
div
style=
{
styl
es
.
header
}
>
<
img
src=
{
logo
}
style=
{
styl
es
.
headerLogo
}
alt=
"Camedics Logo"
/>
</
div
>
<
Divider
/>
{
Items
?
<
Items
logout=
{
logout
}
listItemClassName=
{
class
es
.
listItem
}
toggleDrawer=
{
toggleDrawer
}
{
...
routeProps
}
/>
:
null
}
{
Items
?
<
Items
logout=
{
logout
}
sx=
{
styl
es
.
listItem
}
toggleDrawer=
{
toggleDrawer
}
{
...
routeProps
}
/>
:
null
}
{
/* <DrawerItems listItemClassName={classes.listItem} toggleDrawer={toggleDrawer} {...routerProps} /> */
}
{
/* <div className={classes.grow} /> */
}
{
/* <Divider /> */
}
...
...
cli/web/cliente/src/components/molecules/Drawer/styles.ts
View file @
e63508b1
import
{
drawerWidth
,
toolbarHeight
}
from
'@agiliza/constants/styles'
import
{
createStyles
,
makeStyles
,
Theme
}
from
'@material-ui/core/styles'
import
{
createSxStyles
}
from
'@agiliza/theme'
import
{
Theme
}
from
'@mui/material'
export
const
useStyles
=
makeStyles
(
(
theme
:
Theme
)
=>
{
export
const
useStyles
=
(
theme
:
Theme
)
=>
{
const
drawerClosedWidth
=
theme
.
spacing
(
0
)
const
hover
=
'&:hover'
return
createStyles
({
return
createS
xS
tyles
({
grow
:
{
flexGrow
:
1
,
},
...
...
@@ -87,4 +88,4 @@ export const useStyles = makeStyles((theme: Theme) => {
},
headerLogo
:
{
width
:
100
,
height
:
'auto'
},
})
}
)
}
cli/web/cliente/src/components/molecules/ErrorDialog/ErrorDialog.tsx
View file @
e63508b1
...
...
@@ -4,15 +4,12 @@ import { bindActionCreators, Dispatch } from 'redux'
import
{
StoreState
}
from
'@agiliza/redux'
import
{
actions
as
errorActions
,
selectors
,
State
as
ErrorState
}
from
'@agiliza/redux/ui/error'
import
Button
from
'@material-ui/core/Button'
import
Dialog
from
'@material-ui/core/Dialog'
import
DialogActions
from
'@material-ui/core/DialogActions'
import
DialogContent
from
'@material-ui/core/DialogContent'
import
DialogContentText
from
'@material-ui/core/DialogContentText'
import
DialogTitle
from
'@material-ui/core/DialogTitle'
import
{
withStyles
}
from
'@material-ui/styles'
import
{
styles
}
from
'./styles'
import
Button
from
'@mui/material/Button'
import
Dialog
from
'@mui/material/Dialog'
import
DialogActions
from
'@mui/material/DialogActions'
import
DialogContent
from
'@mui/material/DialogContent'
import
DialogContentText
from
'@mui/material/DialogContentText'
import
DialogTitle
from
'@mui/material/DialogTitle'
interface
Props
{
error
:
ErrorState
[
'error'
]
...
...
@@ -60,4 +57,4 @@ const mapDispatchToProps = (dispatch: Dispatch) =>
dispatch
)
export
default
connect
(
mapStateToProps
,
mapDispatchToProps
)(
withStyles
(
styles
)(
ErrorDialog
)
)
export
default
connect
(
mapStateToProps
,
mapDispatchToProps
)(
ErrorDialog
)
cli/web/cliente/src/components/molecules/ErrorDialog/styles.ts
View file @
e63508b1
import
{
Theme
,
createStyles
}
from
'@material-ui/core/styles'
export
const
styles
=
(
theme
:
Theme
)
=>
createStyles
({})
cli/web/cliente/src/components/molecules/PopoverVersion/PopoverVersion.tsx
View file @
e63508b1
import
React
,
{
useState
}
from
'react'
import
Popover
from
'@material-ui/core/Popover
'
import
Typography
from
'@material-ui/core/Typography
'
import
InfoIcon
from
'@material-ui/icons/InfoRounded
'
import
{
WithStyles
,
withStyles
}
from
'@material-ui/styles
'
import
InfoIcon
from
'@mui/icons-material/InfoRounded
'
import
Popover
from
'@mui/material/Popover
'
import
{
useTheme
}
from
'@mui/material/styles
'
import
Typography
from
'@mui/material/Typography
'
import
{
s
tyles
}
from
'./styles'
import
{
useS
tyles
}
from
'./styles'
interface
Props
extends
WithStyles
<
typeof
styles
>
{}
interface
Props
{}
interface
PopItem
{
key
:
string
...
...
@@ -16,10 +16,11 @@ interface PopItem {
}
const
PopoverVersion
=
(
props
:
Props
)
=>
{
const
{
classes
}
=
props
const
[
popItems
]
=
useState
<
PopItem
[]
>
([])
const
[
anchor
,
setAnchor
]
=
useState
<
HTMLDivElement
|
null
>
(
null
)
const
styles
=
useStyles
(
useTheme
())
// useEffect(() => {
// let items: PopItem[] = [{ key: 'Versão', value: VERSION }]
// if (service) {
...
...
@@ -35,16 +36,16 @@ const PopoverVersion = (props: Props) => {
const
createPopItems
=
(
items
:
PopItem
[])
=>
items
.
map
((
item
,
i
)
=>
(
<
Typography
className=
{
classes
.
msg
}
color=
"textPrimary"
key=
{
i
}
>
<
Typography
sx=
{
styles
.
msg
}
color=
"textPrimary"
key=
{
i
}
component=
"span"
>
{
`${item.key}: `
}
{
<
span
style=
{
{
textDecoration
:
item
.
underline
?
'underline'
:
undefined
}
}
>
{
item
.
value
||
''
}
</
span
>
}
</
Typography
>
))
return
(
<
div
className=
{
class
es
.
root
}
>
<
div
style=
{
styl
es
.
root
}
>
<
div
onClick=
{
(
evt
)
=>
setAnchor
(
evt
.
currentTarget
)
}
>
<
InfoIcon
className=
{
class
es
.
infoBtn
}
color=
"primary"
/>
<
InfoIcon
sx=
{
styl
es
.
infoBtn
}
color=
"primary"
/>
</
div
>
<
Popover
id=
"version-popover"
...
...
@@ -60,9 +61,9 @@ const PopoverVersion = (props: Props) => {
horizontal
:
'right'
,
}
}
>
<
div
className=
{
class
es
.
popoverContent
}
>
{
createPopItems
(
popItems
)
}
</
div
>
<
div
style=
{
styl
es
.
popoverContent
}
>
{
createPopItems
(
popItems
)
}
</
div
>
</
Popover
>
</
div
>
)
}
export
default
withStyles
(
styles
)(
PopoverVersion
)
export
default
PopoverVersion
cli/web/cliente/src/components/molecules/PopoverVersion/styles.ts
View file @
e63508b1
import
{
createStyles
,
Theme
}
from
'@material-ui/core/styles'
import
{
createSxStyles
}
from
'@agiliza/theme'
import
{
Theme
}
from
'@mui/material'
export
const
s
tyles
=
(
theme
:
Theme
)
=>
createStyles
({
export
const
useS
tyles
=
(
theme
:
Theme
)
=>
createS
xS
tyles
({
root
:
{
position
:
'fixed'
,
bottom
:
theme
.
spacing
(
5
),
right
:
theme
.
spacing
(
5
)
},
popoverContent
:
{
padding
:
theme
.
spacing
(
1.5
)
},
msg
:
{
...
...
cli/web/cliente/src/components/organisms/DashboardCard/DashboardCard.tsx
View file @
e63508b1
import
cn
from
'classnames
'
import
deepmerge
from
'deepmerge
'
import
React
from
'react'
import
{
makeStyles
,
Theme
}
from
'@material-ui/core/styles'
import
{
createSxStyles
}
from
'@agiliza/theme'
import
{
Theme
,
useTheme
}
from
'@mui/material/styles'
const
useStyles
=
makeStyles
((
theme
:
Theme
)
=>
({
card
:
{
// backgroundColor: '#fafafa',
height
:
100
,
width
:
175
,
padding
:
theme
.
spacing
(
1
),
border
:
'1px solid #dfdfdf'
,
borderRadius
:
'10px'
,
display
:
'flex'
,
flexDirection
:
'column'
,
alignItems
:
'center'
,
justifyContent
:
'center'
,
// color: theme.palette.grey[500],
transform
:
'scale(1)'
,
transition
:
theme
.
transitions
.
create
([
'color'
,
'border'
,
'transform'
],
{
duration
:
theme
.
transitions
.
duration
.
short
,
}),
'&:hover'
:
{
transform
:
'scale(1.03)'
,
color
:
theme
.
palette
.
primary
.
main
,
borderColor
:
theme
.
palette
.
primary
.
main
,
cursor
:
'pointer'
,
border
:
`1px solid
${
theme
.
palette
.
primary
.
main
}
`
,
const
useStyles
=
(
theme
:
Theme
)
=>
createSxStyles
({
card
:
{
// backgroundColor: '#fafafa',
height
:
'100px'
,
width
:
'175px'
,
padding
:
theme
.
spacing
(
1
),
border
:
'1px solid #dfdfdf'
,
borderRadius
:
'10px'
,
display
:
'flex'
,
flexDirection
:
'column'
,
alignItems
:
'center'
,
justifyContent
:
'center'
,
// color: theme.palette.grey[500],
transform
:
'scale(1)'
,
transition
:
theme
.
transitions
.
create
([
'color'
,
'border'
,
'transform'
],
{
duration
:
theme
.
transitions
.
duration
.
short
,
}),
'&:hover'
:
{
transform
:
'scale(1.03)'
,
color
:
theme
.
palette
.
primary
.
main
,
borderColor
:
theme
.
palette
.
primary
.
main
,
cursor
:
'pointer'
,
border
:
`1px solid
${
theme
.
palette
.
primary
.
main
}
`
,
},
},
},
cardIcon
:
{
display
:
'flex'
,
justifyContent
:
'center'
,
alignItems
:
'center'
,
},
cardDescription
:
{
textAlign
:
'center'
,
},
}))
cardIcon
:
{
display
:
'flex'
,
justifyContent
:
'center'
,
alignItems
:
'center'
,
},
cardDescription
:
{
textAlign
:
'center'
,
},
})
export
interface
DashboardCardProps
{
label
:
string
icon
:
React
.
ReactNode
className
?:
string
style
?:
React
.
CSSProperties
onClick
?():
void
}
function
DashboardCard
(
props
:
DashboardCardProps
)
{
const
classes
=
useStyles
(
)
const
styles
=
useStyles
(
useTheme
()
)
return
(
<
div
onClick=
{
props
.
onClick
}
className=
{
cn
(
classes
.
card
,
props
.
className
)
}
>
<
div
className=
{
class
es
.
cardIcon
}
>
{
props
.
icon
}
</
div
>
<
div
className=
{
class
es
.
cardDescription
}
>
{
props
.
label
}
</
div
>
<
div
onClick=
{
props
.
onClick
}
style=
{
deepmerge
(
styles
.
card
,
props
.
style
||
{}
)
}
>
<
div
style=
{
styl
es
.
cardIcon
}
>
{
props
.
icon
}
</
div
>
<
div
style=
{
styl
es
.
cardDescription
}
>
{
props
.
label
}
</
div
>
</
div
>
)
}
...
...
cli/web/cliente/src/components/organisms/ImageUpload/ImageUpload.tsx
View file @
e63508b1
import
cn
from
'classnames
'
import
deepmerge
from
'deepmerge
'
import
React
from
'react'
import
{
Button
}
from
'@material-ui/core
'
import
{
withStyles
,
WithStyles
}
from
'@material-ui/core/styles
'
import
{
PhotoCamera
as
PhotoCameraIcon
}
from
'@material-ui/icon
s'
import
{
PhotoCamera
as
PhotoCameraIcon
}
from
'@mui/icons-material
'
import
{
Button
,
ButtonProps
}
from
'@mui/material
'
import
{
useTheme
}
from
'@mui/material/style
s'
import
s
tyles
from
'./styles'
import
useS
tyles
from
'./styles'
type
ExtendedProps
=
WithStyles
<
typeof
styles
>
interface
Props
extends
ExtendedProps
{
interface
Props
{
image
?:
string
onChangeImage
:
React
.
DetailedHTMLProps
<
React
.
InputHTMLAttributes
<
HTMLInputElement
>
,
HTMLInputElement
>
[
'onChange'
]
label
:
string
imageStyle
?:
React
.
HTMLAttributes
<
HTMLDivElement
>
[
'style'
]
className
?:
string
buttonClassName
?:
string
style
?:
React
.
CSSProperties
sx
?:
ButtonProps
[
'sx'
]
}
const
ImageUpload
=
(
props
:
Props
)
=>
{
const
{
classes
,
className
,
buttonClassName
,
image
,
onChangeImage
,
label
,
imageStyle
}
=
props
const
{
style
,
sx
=
{},
image
,
onChangeImage
,
label
,
imageStyle
=
{}
}
=
props
const
styles
=
useStyles
(
useTheme
())
return
(
<
div
className=
{
cn
(
className
,
classes
.
container
)
}
>
<
Button
variant=
"text"
component=
"label"
className=
{
cn
(
classes
.
photoBtn
,
buttonClassName
)
}
classes=
{
{
label
:
classes
.
photoLabelBtn
}
}
>
<
div
style=
{
deepmerge
(
style
||
{},
styles
.
container
)
}
>
{
/* <Button variant="text" sx={deepmerge(styles.photoBtn, sx || {})} > */
}
<
Button
variant=
"text"
component=
"label"
sx=
{
deepmerge
(
styles
.
photoBtn
,
sx
||
{})
}
>
{
image
?
(
<
div
className=
{
classes
.
card
}
style=
{
imageStyle
}
>
<
img
src=
{
'data:image/png;base64,'
+
image
}
className=
{
class
es
.
media
}
/>
<
div
style=
{
deepmerge
(
styles
.
card
,
imageStyle
)
}
>
<
img
src=
{
'data:image/png;base64,'
+
image
}
style=
{
styl
es
.
media
}
/>
</
div
>
)
:
(
<
PhotoCameraIcon
/>
...
...
@@ -44,4 +46,4 @@ const ImageUpload = (props: Props) => {
)
}
export
default
withStyles
(
styles
)(
ImageUpload
)
export
default
ImageUpload
cli/web/cliente/src/components/organisms/ImageUpload/styles.ts
View file @
e63508b1
import
{
Theme
}
from
'@material-ui/core/styles
'
import
{
createStyles
}
from
'@material-ui/styles
'
import
{
createSxStyles
}
from
'@agiliza/theme
'
import
{
Theme
}
from
'@mui/material
'
// eslint-disable-next-line
export
default
(
theme
:
Theme
)
=>
{
return
create
Styles
({
export
default
(
theme
:
Theme
)
=>
createSx
Styles
({
container
:
{
width
:
'100%'
,
textAlign
:
'center'
,
marginTop
:
theme
.
spacing
(
1
),
marginBottom
:
theme
.
spacing
(
1
)
},
photoBtn
:
{
width
:
'100%'
},
photoLabelBtn
:
{
display
:
'flex'
,
flexDirection
:
'column'
,
height
:
'280px'
,
alignItems
:
'center'
,
flexGrow
:
1
},
photoBtn
:
{
width
:
'100%'
,
'&.MuiButton-text'
:
{
display
:
'flex'
,
flexDirection
:
'column'
,
height
:
'280px'
,
alignItems
:
'center'
,
flexGrow
:
1
}
},
card
:
{
width
:
'100%'
,
maxWidth
:
'100%'
,
height
:
'100%'
,
textAlign
:
'center'
},
media
:
{
height
:
'230px'
,
...
...
@@ -15,4 +14,3 @@ export default (theme: Theme) => {
// paddingTop: '56.25%', // 16:9
},
})
}
cli/web/cliente/src/components/organisms/PhoneField/PhoneField.tsx
View file @
e63508b1
import
React
from
'react'
import
{
maskPhone
}
from
'@agiliza/utils/masks'
import
{
TextField
,
TextFieldProps
}
from
'@material-ui/core'
import
{
withStyles
,
WithStyles
}
from
'@material-ui/core/styles'
import
{
TextField
,
TextFieldProps
}
from
'@mui/material'
import
styles
from
'./styles'
type
ExtendedProps
=
WithStyles
<
typeof
styles
>
interface
Props
extends
ExtendedProps
{
interface
Props
{
value
?:
string
onChange
:
TextFieldProps
[
'onChange'
]
label
?:
string
...
...
@@ -19,4 +14,4 @@ const PhoneField = (props: Props) => {
return
<
TextField
variant=
"outlined"
label=
{
label
||
'Telefone'
}
value=
{
maskPhone
(
value
)
}
onChange=
{
onChange
}
inputProps=
{
{
maxLength
:
15
}
}
/>
}
export
default
withStyles
(
styles
)(
PhoneField
)
export
default
PhoneField
cli/web/cliente/src/components/organisms/PhoneField/styles.ts
View file @
e63508b1
import
{
Theme
}
from
'@material-ui/core/styles'
import
{
createStyles
}
from
'@material-ui/styles'
import
{
createSxStyles
}
from
'@agiliza/theme'
// eslint-disable-next-line
export
default
(
theme
:
Theme
)
=>
{
return
createStyles
({})
}
export
default
createSxStyles
({})
cli/web/cliente/src/components/particles/Icons/BellIcon.tsx
View file @
e63508b1
import
React
from
'react'
import
{
SvgIcon
}
from
'@m
aterial-ui/core
'
import
{
SvgIcon
}
from
'@m
ui/material
'
interface
Props
{}
...
...
cli/web/cliente/src/components/particles/Icons/SecurityProfileIcon.tsx
View file @
e63508b1
import
React
from
'react'
import
SvgIcon
,
{
SvgIconProps
}
from
'@m
aterial-ui/core
/SvgIcon'
import
SvgIcon
,
{
SvgIconProps
}
from
'@m
ui/material
/SvgIcon'
interface
Props
extends
SvgIconProps
{}
...
...
cli/web/cliente/src/components/particles/Icons/ShareSquareIcon.tsx
View file @
e63508b1
import
React
from
'react'
import
SvgIcon
,
{
SvgIconProps
}
from
'@material-ui/core/SvgIcon'
import
SvgIcon
,
{
SvgIconProps
}
from
'@mui/material/SvgIcon'
interface
Props
extends
SvgIconProps
{}
...
...
cli/web/cliente/src/components/particles/Icons/TermIcon.tsx
View file @
e63508b1
import
React
from
'react'
import
SvgIcon
,
{
SvgIconProps
}
from
'@m
aterial-ui/core
/SvgIcon'
import
SvgIcon
,
{
SvgIconProps
}
from
'@m
ui/material
/SvgIcon'
interface
Props
extends
SvgIconProps
{}
...
...
cli/web/cliente/src/components/particles/Icons/UploadIcon.tsx
View file @
e63508b1
import
React
from
'react'
import
SvgIcon
,
{
SvgIconProps
}
from
'@material-ui/core/SvgIcon'
import
SvgIcon
,
{
SvgIconProps
}
from
'@mui/material/SvgIcon'
interface
Props
extends
SvgIconProps
{}
...
...
@@ -9,7 +10,7 @@ export default (props: Props) => {
{
...
props
}
style=
{
{
width
:
21
,
height
:
21
height
:
21
,
}
}
viewBox=
"0 0 21 21"
>
...
...
cli/web/cliente/src/components/particles/Icons/VialIcon.tsx
View file @
e63508b1
import
React
from
'react'
import
SvgIcon
,
{
SvgIconProps
}
from
'@material-ui/core/SvgIcon'
import
SvgIcon
,
{
SvgIconProps
}
from
'@mui/material/SvgIcon'
interface
Props
extends
SvgIconProps
{}
...
...
@@ -9,7 +10,7 @@ export default (props: Props) => {
{
...
props
}
style=
{
{
width
:
21
,
height
:
21
height
:
21
,
}
}
viewBox=
"0 0 21 21"
>
...
...
cli/web/cliente/src/components/templates/AccountInputsPhoto/AccountInputsPhoto.tsx
View file @
e63508b1
...
...
@@ -3,14 +3,11 @@ import React from 'react'
import
{
BanestesAccount
}
from
'@agiliza/api/domain'
import
ImageUpload
from
'@agiliza/components/organisms/ImageUpload'
import
{
extractNumbers
,
getBase64FromFile
}
from
'@agiliza/utils/method'
import
{
TextField
,
TextFieldProps
}
from
'@material-ui/core'
import
{
withStyles
,
WithStyles
}
from
'@material-ui/core/styles'
import
{
TextField
,
TextFieldProps
}
from
'@mui/material'
import
styles
from
'./styles'
type
ExtendedProps
=
WithStyles
<
typeof
styles
>
interface
Props
extends
ExtendedProps
{
interface
Props
{
values
:
BanestesAccount
onChanges
:
{
account
:
(
type
:
keyof
BanestesAccount
)
=>
TextFieldProps
[
'onChange'
]
...
...
@@ -20,7 +17,7 @@ interface Props extends ExtendedProps {
}
const
AccountInputsPhoto
=
(
props
:
Props
)
=>
{
const
{
classes
,
values
,
onChanges
}
=
props
const
{
values
,
onChanges
}
=
props
const
{
agencyNumber
,
cardPicture
,
number
}
=
values
const
handleChangeField
=
(
type
:
keyof
BanestesAccount
):
TextFieldProps
[
'onChange'
]
=>
onChanges
.
account
(
type
)
...
...
@@ -34,8 +31,8 @@ const AccountInputsPhoto = (props: Props) => {
}
return
(
<
div
className=
{
class
es
.
accountInputsPhotoContainer
}
>
<
div
className=
{
class
es
.
accountInputsContainer
}
>
<
div
style=
{
styl
es
.
accountInputsPhotoContainer
}
>
<
div
style=
{
styl
es
.
accountInputsContainer
}
>
<
TextField
label=
"Número da agência"
value=
{
extractNumbers
(
agencyNumber
)
||
''
}
...
...
@@ -49,4 +46,4 @@ const AccountInputsPhoto = (props: Props) => {
)
}
export
default
withStyles
(
styles
)(
AccountInputsPhoto
)
export
default
AccountInputsPhoto
cli/web/cliente/src/components/templates/AccountInputsPhoto/styles.ts
View file @
e63508b1
import
{
Theme
}
from
'@material-ui/core/styles'
import
{
createStyles
}
from
'@material-ui/styles'
import
{
createSxStyles
}
from
'@agiliza/theme'
// eslint-disable-next-line
export
default
(
theme
:
Theme
)
=>
{
return
createStyles
({
accountInputsPhotoContainer
:
{
width
:
'100%'
,
height
:
'100%'
},
accountInputsContainer
:
{
height
:
'100%'
},
photoBtn
:
{
minWidth
:
'50%'
},
photoLabelBtn
:
{
display
:
'flex'
,
flexDirection
:
'column'
,
height
:
'280px'
,
alignItems
:
'center'
,
flexGrow
:
1
},
card
:
{
width
:
'auto'
,
height
:
'auto'
},
media
:
{
height
:
'250px'
,
width
:
'auto'
,
// paddingTop: '56.25%', // 16:9
},
})
}
export
default
createSxStyles
({
accountInputsPhotoContainer
:
{
width
:
'100%'
,
height
:
'100%'
},
accountInputsContainer
:
{
height
:
'100%'
},
photoBtn
:
{
minWidth
:
'50%'
},
photoLabelBtn
:
{
display
:
'flex'
,
flexDirection
:
'column'
,
height
:
'280px'
,
alignItems
:
'center'
,
flexGrow
:
1
},
card
:
{
width
:
'auto'
,
height
:
'auto'
},
media
:
{
height
:
'250px'
,
width
:
'auto'
,
// paddingTop: '56.25%', // 16:9
},
})
cli/web/cliente/src/components/templates/Address/Address.tsx
View file @
e63508b1
...
...
@@ -3,15 +3,13 @@ import React, { useMemo } from 'react'
import
{
City
,
State
}
from
'@agiliza/api/domain'
import
{
maskCEP
}
from
'@agiliza/utils/masks'
import
{
SelectField
,
SelectFieldProps
}
from
'@curio/components'
import
{
TextField
,
TextFieldProps
}
from
'@m
aterial-ui/core
'
import
{
withStyles
,
WithStyles
}
from
'@material-ui/core
/styles'
import
{
TextField
,
TextFieldProps
}
from
'@m
ui/material
'
import
{
useTheme
}
from
'@mui/material
/styles'
import
{
AddressState
}
from
'./state'
import
s
tyles
from
'./styles'
import
useS
tyles
from
'./styles'
type
ExtendedProps
=
WithStyles
<
typeof
styles
>
interface
Props
extends
ExtendedProps
{
interface
Props
{
states
:
State
[]
cities
:
City
[]
state
:
AddressState
...
...
@@ -19,7 +17,8 @@ interface Props extends ExtendedProps {
}
const
Address
=
(
props
:
Props
)
=>
{
const
{
classes
,
state
:
_state
,
onChange
,
states
,
cities
}
=
props
const
styles
=
useStyles
(
useTheme
())
const
{
state
:
_state
,
onChange
,
states
,
cities
}
=
props
const
{
cep
,
street
,
number
,
complement
,
state
,
city
,
district
}
=
_state
...
...
@@ -54,7 +53,8 @@ const Address = (props: Props) => {
onChange=
{
handleChangeSelect
(
'state'
)
}
items=
{
states
.
map
((
st
)
=>
({
label
:
st
.
name
,
value
:
st
.
id
}))
}
shrink=
{
false
}
className=
{
classes
.
selectField
}
// sx={classes.selectField}
sx=
{
styles
.
selectField
}
/>
<
SelectField
id=
"state-select"
...
...
@@ -65,11 +65,11 @@ const Address = (props: Props) => {
onChange=
{
handleChangeSelect
(
'city'
)
}
items=
{
availableCities
.
map
((
st
)
=>
({
label
:
st
.
name
,
value
:
st
.
id
}))
}
shrink=
{
false
}
className=
{
class
es
.
selectField
}
sx=
{
styl
es
.
selectField
}
/>
<
TextField
variant=
"outlined"
label=
"Bairro"
value=
{
district
}
onChange=
{
handleChange
(
'district'
)
}
/>
</>
)
}
export
default
withStyles
(
styles
)(
Address
)
export
default
Address
cli/web/cliente/src/components/templates/Address/styles.ts
View file @
e63508b1
import
{
Theme
}
from
'@material-ui/core/styles
'
import
{
createStyles
}
from
'@material-ui/styles
'
import
{
createSxStyles
}
from
'@agiliza/theme
'
import
{
Theme
}
from
'@mui/material
'
// eslint-disable-next-line
export
default
(
theme
:
Theme
)
=>
createStyles
({
createS
xS
tyles
({
form
:
{
display
:
'flex'
,
flexDirection
:
'column'
},
selectField
:
{
marginBottom
:
theme
.
spacing
(
2
)
},
})
cli/web/cliente/src/components/templates/FirstAccess/FirstAccess.tsx
View file @
e63508b1
...
...
@@ -5,16 +5,14 @@ import PhoneField from '@agiliza/components/organisms/PhoneField'
import
{
useErrorValidator
}
from
'@agiliza/utils/hooks/errorValidation'
import
{
ActionType
}
from
'@agiliza/utils/hooks/state'
import
CPFCNPJField
from
'@agiliza/views/ProposalData/components/atoms/CPFCNPJField'
import
{
TextField
,
TextFieldProps
}
from
'@m
aterial-ui/core
'
import
{
withStyles
,
WithStyles
}
from
'@material-ui/core
/styles'
import
{
TextField
,
TextFieldProps
}
from
'@m
ui/material
'
import
{
useTheme
}
from
'@mui/material
/styles'
import
AddressForm
,
{
AddressState
}
from
'../Address'
import
{
initState
,
State
as
FirstAccessState
}
from
'./state'
import
s
tyles
from
'./styles'
import
useS
tyles
from
'./styles'
type
ExtendedProps
=
WithStyles
<
typeof
styles
>
interface
Props
extends
ExtendedProps
{
interface
Props
{
states
:
State
[]
cities
:
City
[]
state
:
FirstAccessState
...
...
@@ -22,12 +20,14 @@ interface Props extends ExtendedProps {
}
const
FirstAccess
=
(
props
:
Props
)
=>
{
const
{
classes
,
states
,
cities
,
state
,
actions
}
=
props
const
{
states
,
cities
,
state
,
actions
}
=
props
const
{
cpf
,
name
,
email
,
phone
,
...
addressState
}
=
state
const
{
actions
:
errorActions
}
=
useErrorValidator
(
initState
)
const
styles
=
useStyles
(
useTheme
())
const
handleChange
=
(
key
:
keyof
FirstAccessState
):
TextFieldProps
[
'onChange'
]
=>
(
evt
)
=>
{
...
...
@@ -39,7 +39,7 @@ const FirstAccess = (props: Props) => {
}
return
(
<
form
className=
{
class
es
.
form
}
>
<
form
style=
{
styl
es
.
form
}
>
<
CPFCNPJField
value=
{
cpf
}
onChange=
{
handleChange
(
'cpf'
)
}
onlyCPF
disabled
/>
<
TextField
variant=
"outlined"
label=
"Nome"
value=
{
name
}
onChange=
{
handleChange
(
'name'
)
}
/>
<
TextField
variant=
"outlined"
label=
"Email"
value=
{
email
}
onChange=
{
handleChange
(
'email'
)
}
/>
...
...
@@ -49,4 +49,4 @@ const FirstAccess = (props: Props) => {
)
}
export
default
withStyles
(
styles
)(
FirstAccess
)
export
default
FirstAccess
cli/web/cliente/src/components/templates/FirstAccess/styles.ts
View file @
e63508b1
import
{
Theme
}
from
'@material-ui/core/styles
'
import
{
createStyles
}
from
'@material-ui
/styles'
import
{
createSxStyles
}
from
'@agiliza/theme
'
import
{
Theme
}
from
'@mui/material
/styles'
// eslint-disable-next-line
export
default
(
theme
:
Theme
)
=>
createStyles
({
createS
xS
tyles
({
form
:
{
display
:
'flex'
,
flexDirection
:
'column'
,
...
...
cli/web/cliente/src/components/templates/Login/Login.tsx
View file @
e63508b1
import
React
from
'react'
import
TextFieldWithIcon
from
'@agiliza/components/atoms/TextFieldWithIcon'
import
{
InputAdornment
,
TextFieldProps
}
from
'@material-ui/core
'
import
{
withStyles
,
WithStyles
}
from
'@material-ui/core/styles
'
import
{
AccountCircle
}
from
'@material-ui/icon
s'
import
{
AccountCircle
}
from
'@mui/icons-material
'
import
{
InputAdornment
,
TextFieldProps
}
from
'@mui/material
'
import
{
useTheme
}
from
'@mui/material/style
s'
import
s
tyles
from
'./styles'
import
useS
tyles
from
'./styles'
type
ExtendedProps
=
WithStyles
<
typeof
styles
>
interface
Props
extends
ExtendedProps
{
interface
Props
{
username
:
string
password
:
string
onChange
(
type
:
'username'
|
'password'
):
TextFieldProps
[
'onChange'
]
}
const
Login
=
(
props
:
Props
)
=>
{
const
{
classes
,
username
,
password
,
onChange
}
=
props
const
styles
=
useStyles
(
useTheme
())
const
{
username
,
password
,
onChange
}
=
props
return
(
<
form
className=
{
class
es
.
form
}
>
<
form
style=
{
styl
es
.
form
}
>
<
TextFieldWithIcon
autoFocus
required
value=
{
username
}
onChange=
{
onChange
(
'username'
)
}
label=
"CPF"
className=
{
class
es
.
usernameTxtField
}
sx=
{
styl
es
.
usernameTxtField
}
inputProps=
{
{
maxLength
:
14
}
}
InputProps=
{
{
startAdornment
:
(
...
...
@@ -41,4 +40,4 @@ const Login = (props: Props) => {
)
}
export
default
withStyles
(
styles
)(
Login
)
export
default
Login
cli/web/cliente/src/components/templates/Login/styles.ts
View file @
e63508b1
import
{
Theme
}
from
'@material-ui/core/styles
'
import
{
createStyles
}
from
'@material-ui/styles
'
import
{
createSxStyles
}
from
'@agiliza/theme
'
import
{
Theme
}
from
'@mui/material
'
// eslint-disable-next-line
export
default
(
theme
:
Theme
)
=>
createStyles
({
createS
xS
tyles
({
title
:
{
fontSize
:
'150%'
,
fontWeight
:
'bold'
,
...
...
@@ -30,5 +30,5 @@ export default (theme: Theme) =>
width
:
'100%'
,
margin
:
theme
.
spacing
(
2
),
},
usernameTxtField
:
{
marginBottom
:
10
},
usernameTxtField
:
{
marginBottom
:
theme
.
spacing
(
2
)
},
})
cli/web/cliente/src/components/templates/NotFound/NotFound.tsx
View file @
e63508b1
import
React
from
'react'
import
{
RouteComponentProps
}
from
'react-router-dom'
import
{
Typography
}
from
'@material-ui/cor
e'
import
{
createStyles
,
Theme
}
from
'@material-ui/core/styles
'
import
{
withStyles
,
WithStyles
}
from
'@material-ui
/styles'
import
{
createSxStyles
}
from
'@agiliza/them
e'
import
{
Typography
}
from
'@mui/material
'
import
{
Theme
,
useTheme
}
from
'@mui/material
/styles'
const
s
tyles
=
(
theme
:
Theme
)
=>
createStyles
({
const
useS
tyles
=
(
theme
:
Theme
)
=>
createS
xS
tyles
({
container
:
{
paddingLeft
:
theme
.
spacing
(
2
),
},
...
...
@@ -15,19 +15,20 @@ const styles = (theme: Theme) =>
},
})
type
Props
=
WithStyles
<
typeof
styles
>
&
RouteComponentProps
type
Props
=
RouteComponentProps
interface
NotFoundProps
extends
Props
{}
function
NotFound
({
classes
}:
NotFoundProps
)
{
function
NotFound
(
props
:
NotFoundProps
)
{
const
styles
=
useStyles
(
useTheme
())
return
(
<
div
className=
{
class
es
.
container
}
>
<
div
style=
{
styl
es
.
container
}
>
<
Typography
variant=
"h3"
>
404: Página não encontrada
</
Typography
>
<
div
className=
{
class
es
.
messageBox
}
>
<
div
style=
{
styl
es
.
messageBox
}
>
<
Typography
variant=
"h5"
>
A página pela qual você procurou não existe.
</
Typography
>
</
div
>
</
div
>
)
}
export
default
/*#__PURE__*/
withStyles
(
styles
)(
NotFound
)
export
default
/*#__PURE__*/
NotFound
cli/web/cliente/src/components/templates/RGTemplate/RGTemplate.tsx
View file @
e63508b1
...
...
@@ -4,20 +4,19 @@ import { RG } from '@agiliza/api/domain'
import
ImageUpload
from
'@agiliza/components/organisms/ImageUpload'
import
{
maskRG
}
from
'@agiliza/utils/masks'
import
{
getBase64FromFile
}
from
'@agiliza/utils/method'
import
{
TextField
,
TextFieldProps
}
from
'@m
aterial-ui/core
'
import
{
withStyles
,
WithStyles
}
from
'@material-ui/core
/styles'
import
{
TextField
,
TextFieldProps
}
from
'@m
ui/material
'
import
{
useTheme
}
from
'@mui/material
/styles'
import
s
tyles
from
'./styles'
import
useS
tyles
from
'./styles'
type
ExtendedProps
=
WithStyles
<
typeof
styles
>
interface
Props
extends
ExtendedProps
{
interface
Props
{
rg
?:
RG
onChange
:
(
rg
:
Partial
<
RG
>
)
=>
void
}
const
RGTemplate
=
(
props
:
Props
)
=>
{
const
{
classes
,
rg
,
onChange
}
=
props
const
{
rg
,
onChange
}
=
props
const
styles
=
useStyles
(
useTheme
())
const
handleChangePhoto
=
(
key
:
keyof
Pick
<
RG
,
'front'
|
'back'
>
):
React
.
DetailedHTMLProps
<
React
.
InputHTMLAttributes
<
HTMLInputElement
>
,
HTMLInputElement
>
[
'onChange'
]
=>
...
...
@@ -36,10 +35,10 @@ const RGTemplate = (props: Props) => {
}
return
(
<
div
className=
{
class
es
.
container
}
>
<
div
className=
{
class
es
.
imagesContainer
}
>
<
ImageUpload
label=
"Frente"
image=
{
rg
?.
front
}
onChangeImage=
{
handleChangePhoto
(
'front'
)
}
className=
{
class
es
.
imageUpload
}
/>
<
ImageUpload
label=
"Verso"
image=
{
rg
?.
back
}
onChangeImage=
{
handleChangePhoto
(
'back'
)
}
className=
{
class
es
.
imageUpload
}
/>
<
div
style=
{
styl
es
.
container
}
>
<
div
style=
{
styl
es
.
imagesContainer
}
>
<
ImageUpload
label=
"Frente"
image=
{
rg
?.
front
}
onChangeImage=
{
handleChangePhoto
(
'front'
)
}
sx=
{
styl
es
.
imageUpload
}
/>
<
ImageUpload
label=
"Verso"
image=
{
rg
?.
back
}
onChangeImage=
{
handleChangePhoto
(
'back'
)
}
sx=
{
styl
es
.
imageUpload
}
/>
</
div
>
<
TextField
variant=
"outlined"
...
...
@@ -53,4 +52,4 @@ const RGTemplate = (props: Props) => {
)
}
export
default
withStyles
(
styles
)(
RGTemplate
)
export
default
RGTemplate
cli/web/cliente/src/components/templates/RGTemplate/styles.ts
View file @
e63508b1
import
{
Theme
}
from
'@material-ui/core/styles
'
import
{
createStyles
}
from
'@material-ui
/styles'
import
{
createSxStyles
}
from
'@agiliza/theme
'
import
{
Theme
}
from
'@mui/material
/styles'
// eslint-disable-next-line
export
default
(
theme
:
Theme
)
=>
{
return
createStyles
({
return
createS
xS
tyles
({
container
:
{
display
:
'flex'
,
flexDirection
:
'column'
,
alignItems
:
'center'
},
imagesContainer
:
{
display
:
'flex'
,
width
:
'100%'
,
padding
:
theme
.
spacing
(
1
)
},
imageUpload
:
{
width
:
'50%'
,
textAlign
:
'center'
},
...
...
cli/web/cliente/src/constants/styles.ts
View file @
e63508b1
import
{
CSSProperties
}
from
'@m
aterial-ui/styles/withStyles
'
import
{
CSSProperties
}
from
'@m
ui/system
'
export
const
drawerWidth
=
300
export
const
toolbarHeight
=
124
export
const
drawerWidth
=
'300px'
export
const
toolbarHeight
=
'124px'
export
const
flexColumn
:
CSSProperties
=
{
display
:
'flex'
,
...
...
cli/web/cliente/src/index.tsx
View file @
e63508b1
...
...
@@ -8,9 +8,9 @@ import { render } from 'react-dom'
import
{
Provider
}
from
'react-redux'
import
{
browser
,
SUPPORTED_BROWSERS
}
from
'@agiliza/constants/browser'
import
DateFnsUtils
from
'@date-io/date-fns
'
import
{
MuiThemeProvider
}
from
'@material-ui/core/style
s'
import
{
MuiPickersUtilsProvider
}
from
'@material-ui/picker
s'
import
{
LocalizationProvider
}
from
'@mui/lab
'
import
AdapterDateFns
from
'@mui/lab/AdapterDateFn
s'
import
{
ThemeProvider
}
from
'@mui/material/style
s'
import
{
SESSION_KEY
}
from
'./api/useCases/shared'
import
ErrorDialog
from
'./components/molecules/ErrorDialog'
...
...
@@ -28,12 +28,12 @@ interface Props {}
const
Adm
=
(
props
:
Props
)
=>
{
return
(
<
Provider
store=
{
store
}
>
<
Mui
ThemeProvider
theme=
{
theme
}
>
<
MuiPickersUtilsProvider
utils=
{
DateFnsUtil
s
}
locale=
{
ptBR
}
>
<
ThemeProvider
theme=
{
theme
}
>
<
LocalizationProvider
dateAdapter=
{
AdapterDateFn
s
}
locale=
{
ptBR
}
>
<
Views
/>
<
ErrorDialog
/>
</
MuiPickersUtils
Provider
>
</
Mui
ThemeProvider
>
</
Localization
Provider
>
</
ThemeProvider
>
</
Provider
>
)
}
...
...
cli/web/cliente/src/theme/index.ts
View file @
e63508b1
import
red
from
'@material-ui/core/colors/red'
import
{
createMuiTheme
}
from
'@material-ui/core/styles'
import
red
from
'@mui/material/colors/red'
import
{
createTheme
}
from
'@mui/material/styles'
import
{
SxProps
}
from
'@mui/system'
export
const
defaultToobarHeight
=
64
export
const
theme
=
create
Mui
Theme
({
export
const
theme
=
createTheme
({
palette
:
{
primary
:
{
light
:
'#034da6'
,
main
:
'#0d3366'
main
:
'#0d3366'
,
},
secondary
:
{
main
:
'#23a897'
,
contrastText
:
'#fafafa'
contrastText
:
'#fafafa'
,
},
text
:
{
primary
:
'#2e2e2e'
},
error
:
{
main
:
red
[
500
]
}
main
:
red
[
500
]
,
}
,
},
mixins
:
{
toolbar
:
{
minHeight
:
defaultToobarHeight
}
minHeight
:
defaultToobarHeight
,
}
,
},
typography
:
{
fontSize
:
13
,
fontFamily
:
"'Rubik', 'Roboto', 'Open Sans', sans-serif"
fontFamily
:
"'Rubik', 'Roboto', 'Open Sans', sans-serif"
,
},
override
s
:
{
component
s
:
{
MuiInputBase
:
{
input
:
{
'&:-webkit-autofill'
:
{
WebkitBoxShadow
:
'0 0 0 1000px white inset'
}
}
styleOverrides
:
{
input
:
{
'&:-webkit-autofill'
:
{
WebkitBoxShadow
:
'0 0 0 1000px white inset'
,
},
},
},
},
MuiTableCell
:
{
root
:
{
fontFamily
:
'Heebo'
}
styleOverrides
:
{
root
:
{
fontFamily
:
'Heebo'
,
},
},
},
MuiListItemText
:
{
primary
:
{
fontFamily
:
'Heebo'
}
styleOverrides
:
{
primary
:
{
fontFamily
:
'Heebo'
,
},
},
},
MuiDialogContentText
:
{
root
:
{
fontFamily
:
'Heebo'
}
styleOverrides
:
{
root
:
{
fontFamily
:
'Heebo'
,
},
},
},
MuiListItemIcon
:
{
root
:
{
minWidth
:
40
}
}
}
styleOverrides
:
{
root
:
{
minWidth
:
40
,
},
},
},
},
})
export
const
createSxStyles
=
<
T
extends
{
[
k
:
string
]:
SxProps
<
typeof
theme
>
}
>
(
obj
:
T
)
=>
obj
cli/web/cliente/src/views/BrowserIncompatible/BrowserIncompatible.tsx
View file @
e63508b1
...
...
@@ -2,13 +2,12 @@ import cn from 'classnames'
import
React
from
'react'
import
{
browser
,
SUPPORTED_BROWSERS
}
from
'@agiliza/constants/browser'
import
{
withStyles
,
WithStyles
}
from
'@material-ui/core/styles'
import
{
Link
}
from
'@mui/material'
import
{
useTheme
}
from
'@mui/material/styles'
import
s
tyles
from
'./styles'
import
useS
tyles
from
'./styles'
type
ExtendedProps
=
WithStyles
<
typeof
styles
>
interface
Props
extends
ExtendedProps
{}
interface
Props
{}
const
chrome
=
SUPPORTED_BROWSERS
[
'chrome'
].
replace
(
/
(
>=
)
/g
,
''
)
+
'+'
const
firefox
=
SUPPORTED_BROWSERS
[
'firefox'
].
replace
(
/
(
>=
)
/g
,
''
)
+
'+'
...
...
@@ -16,33 +15,33 @@ const edge = SUPPORTED_BROWSERS['windows']['edge'].replace(/(>=)/g, '') + '+'
const
safari
=
SUPPORTED_BROWSERS
[
'macos'
][
'safari'
].
replace
(
/
(
>=
)
/g
,
''
)
+
'+'
const
BrowserIncompatible
=
(
props
:
Props
)
=>
{
const
{
classes
}
=
props
const
styles
=
useStyles
(
useTheme
())
return
(
<
div
className=
{
class
es
.
page
}
>
<
i
className=
{
cn
(
'fas fa-exclamation-circle'
,
classes
.
titleIcon
)
}
/>
<
h1
className=
{
class
es
.
title
}
>
Navegador não suportado
</
h1
>
<
p
className=
{
class
es
.
subTitle
}
>
{
`Você está usando o ${browser.getBrowserName()} na versão ${browser.getBrowserVersion()}`
}
</
p
>
<
p
className=
{
class
es
.
subTitle
}
>
É recomendado utilizar o
{
process
.
env
.
APP_TITLE
}
em um dos seguintes navegadores:
</
p
>
<
div
className=
{
class
es
.
browserList
}
>
<
a
target=
"#"
className=
{
class
es
.
anchorBrowser
}
href=
"https://www.google.com/chrome/"
>
<
i
className=
{
cn
(
'fab fa-chrome'
,
class
es
.
icon
)
}
/>
<
div
style=
{
styl
es
.
page
}
>
<
i
className=
"fas fa-exclamation-circle"
style=
{
styles
.
titleIcon
}
/>
<
h1
style=
{
styl
es
.
title
}
>
Navegador não suportado
</
h1
>
<
p
style=
{
styl
es
.
subTitle
}
>
{
`Você está usando o ${browser.getBrowserName()} na versão ${browser.getBrowserVersion()}`
}
</
p
>
<
p
style=
{
styl
es
.
subTitle
}
>
É recomendado utilizar o
{
process
.
env
.
APP_TITLE
}
em um dos seguintes navegadores:
</
p
>
<
div
style=
{
styl
es
.
browserList
}
>
<
Link
target=
"#"
sx=
{
styl
es
.
anchorBrowser
}
href=
"https://www.google.com/chrome/"
>
<
i
className=
{
cn
(
'fab fa-chrome'
,
styl
es
.
icon
)
}
/>
Chrome
{
chrome
}
</
a
>
<
a
target=
"#"
className=
{
class
es
.
anchorBrowser
}
href=
"https://www.mozilla.org/en-US/firefox/new/"
>
<
i
className=
{
cn
(
'fab fa-firefox-browser'
,
class
es
.
icon
)
}
/>
</
Link
>
<
Link
target=
"#"
sx=
{
styl
es
.
anchorBrowser
}
href=
"https://www.mozilla.org/en-US/firefox/new/"
>
<
i
className=
{
cn
(
'fab fa-firefox-browser'
,
styl
es
.
icon
)
}
/>
Firefox
{
firefox
}
</
a
>
<
a
target=
"#"
className=
{
class
es
.
anchorBrowser
}
href=
"https://www.microsoft.com/en-us/edge"
>
<
i
className=
{
cn
(
'fab fa-edge'
,
class
es
.
icon
)
}
></
i
>
</
Link
>
<
Link
target=
"#"
sx=
{
styl
es
.
anchorBrowser
}
href=
"https://www.microsoft.com/en-us/edge"
>
<
i
className=
{
cn
(
'fab fa-edge'
,
styl
es
.
icon
)
}
></
i
>
Edge
{
edge
}
</
a
>
<
a
target=
"#"
className=
{
class
es
.
anchorBrowser
}
href=
"https://support.apple.com/downloads/safari"
>
<
i
className=
{
cn
(
'fab fa-safari'
,
class
es
.
icon
)
}
></
i
>
</
Link
>
<
Link
target=
"#"
sx=
{
styl
es
.
anchorBrowser
}
href=
"https://support.apple.com/downloads/safari"
>
<
i
className=
{
cn
(
'fab fa-safari'
,
styl
es
.
icon
)
}
></
i
>
Safari
{
safari
}
</
a
>
</
Link
>
</
div
>
</
div
>
)
}
export
default
withStyles
(
styles
)(
BrowserIncompatible
)
export
default
BrowserIncompatible
cli/web/cliente/src/views/BrowserIncompatible/styles.ts
View file @
e63508b1
import
{
Theme
}
from
'@material-ui/cor
e'
import
{
createStyles
}
from
'@material-ui/core/styles
'
import
{
createSxStyles
}
from
'@agiliza/them
e'
import
{
Theme
}
from
'@mui/material
'
export
default
(
theme
:
Theme
)
=>
{
return
createStyles
({
return
createS
xS
tyles
({
page
:
{
display
:
'flex'
,
flexDirection
:
'column'
,
...
...
@@ -16,7 +16,7 @@ export default (theme: Theme) => {
title
:
{
textAlign
:
'center'
,
marginBottom
:
'1rem'
,
fontSize
:
'xx-large'
,
fontSize
:
'xx
x
-large'
,
fontFamily
:
'-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif'
,
},
subTitle
:
{
...
...
cli/web/cliente/src/views/Login/Login.tsx
View file @
e63508b1
...
...
@@ -9,9 +9,11 @@ import { StoreState } from '@agiliza/redux'
import
{
isAuthenticated
}
from
'@agiliza/redux/session/selectors'
import
{
actions
}
from
'@agiliza/redux/ui/login'
import
{
isFetching
}
from
'@agiliza/redux/ui/login/selectors'
import
InputAdornment
from
'@material-ui/core/InputAdornment'
import
Typography
from
'@material-ui/core/Typography'
import
AccountCircle
from
'@material-ui/icons/AccountCircle'
import
AccountCircle
from
'@mui/icons-material/AccountCircle'
import
Box
from
'@mui/material/Box'
import
InputAdornment
from
'@mui/material/InputAdornment'
import
{
useTheme
}
from
'@mui/material/styles'
import
Typography
from
'@mui/material/Typography'
import
{
useStyles
}
from
'./styles'
...
...
@@ -28,7 +30,7 @@ interface Props extends BaseProps {
const
Login
=
(
props
:
Props
)
=>
{
const
{
loginRequest
,
authenticated
,
fetching
,
redirectTo
}
=
props
const
classes
=
useStyles
(
)
const
styles
=
useStyles
(
useTheme
()
)
const
[
username
,
setUsername
]
=
useState
(
''
)
const
[
password
,
setPassword
]
=
useState
(
''
)
...
...
@@ -42,20 +44,20 @@ const Login = (props: Props) => {
}
return
(
<
div
className=
{
class
es
.
container
}
>
<
div
style=
{
styl
es
.
container
}
>
{
/* <div className={classes.logo} /> */
}
<
div
className=
{
class
es
.
formContainer
}
>
<
Typography
align=
"center"
className=
{
class
es
.
title
}
color=
"primary"
>
<
Box
sx=
{
styl
es
.
formContainer
}
>
<
Typography
align=
"center"
sx=
{
styl
es
.
title
}
color=
"primary"
>
{
process
.
env
.
APP_TITLE
}
</
Typography
>
<
form
className=
{
class
es
.
form
}
onKeyDown=
{
(
evt
)
=>
evt
.
keyCode
===
13
&&
handleLogin
()
}
>
<
form
style=
{
styl
es
.
form
}
onKeyDown=
{
(
evt
)
=>
evt
.
keyCode
===
13
&&
handleLogin
()
}
>
<
TextFieldWithIcon
autoFocus
required
value=
{
username
}
onChange=
{
(
evt
)
=>
setUsername
(
evt
.
target
.
value
)
}
label=
"Usuário"
className=
{
class
es
.
usernameTxtField
}
sx=
{
styl
es
.
usernameTxtField
}
InputProps=
{
{
startAdornment
:
(
<
InputAdornment
position=
"start"
>
...
...
@@ -69,7 +71,7 @@ const Login = (props: Props) => {
<
ButtonWithProgress
disabled=
{
!
username
}
color=
"secondary"
fetching=
{
fetching
}
onClick=
{
handleLogin
}
>
Entrar
</
ButtonWithProgress
>
</
div
>
</
Box
>
{
/* <PopoverVersion service={service} /> */
}
</
div
>
)
...
...
cli/web/cliente/src/views/Login/styles.ts
View file @
e63508b1
import
{
flexColumn
}
from
'@agiliza/constants/styles'
import
{
makeStyles
,
Theme
}
from
'@material-ui/core/styles
'
import
{
createStyles
}
from
'@material-ui
/styles'
import
{
createSxStyles
}
from
'@agiliza/theme
'
import
{
Theme
}
from
'@mui/material
/styles'
// eslint-disable-next-line
export
const
useStyles
=
makeStyles
(
(
theme
:
Theme
)
=>
createStyles
({
export
const
useStyles
=
(
theme
:
Theme
)
=>
createS
xS
tyles
({
title
:
{
fontSize
:
'150%'
,
fontWeight
:
'bold'
,
...
...
@@ -41,6 +41,5 @@ export const useStyles = makeStyles((theme: Theme) =>
display
:
'flex'
,
flexDirection
:
'column'
,
},
usernameTxtField
:
{
marginBottom
:
10
},
usernameTxtField
:
{
marginBottom
:
theme
.
spacing
(
2
)
},
})
)
cli/web/cliente/src/views/Main/DrawerItems/DrawerItems.tsx
View file @
e63508b1
import
cn
from
'classnames'
import
React
from
'react'
import
ItemWithIcon
from
'@agiliza/components/atoms/ItemWithIcon'
import
List
from
'@material-ui/core/List'
import
{
AttachMoney
as
AttachMoneyIcon
,
ExitToApp
}
from
'@material-ui/icons'
import
withStyles
from
'@material-ui/styles/withStyles'
import
{
AttachMoney
as
AttachMoneyIcon
,
ExitToApp
}
from
'@mui/icons-material'
import
{
ListItemProps
}
from
'@mui/material'
import
List
from
'@mui/material/List'
import
{
useTheme
}
from
'@mui/material/styles'
import
{
s
tyles
}
from
'./styles'
import
{
useS
tyles
}
from
'./styles'
import
type
{
WithStyles
}
from
'@material-ui/styles/withStyles'
import
type
{
RouteComponentProps
}
from
'react-router-dom'
import
type
{
Props
as
DrawerProps
}
from
'@agiliza/components/molecules/Drawer'
interface
ListItem
{
...
...
@@ -32,10 +31,10 @@ export const mapPathToTitle = (path: string) => {
return
drawerListItems
.
find
((
dL
)
=>
dL
.
path
===
path
)?.
label
||
''
}
type
ExtendedTypes
=
RouteComponentProps
&
WithStyles
<
typeof
styles
>
type
ExtendedTypes
=
RouteComponentProps
interface
Props
extends
ExtendedTypes
{
listItemClassName
?:
string
sx
:
ListItemProps
[
'sx'
]
toggleDrawer
:
()
=>
void
logout
:
DrawerProps
[
'logout'
]
}
...
...
@@ -46,30 +45,26 @@ const isCurrentPath = (history: RouteComponentProps['history'], path: string) =>
}
const
DrawerItems
=
(
props
:
Props
)
=>
{
const
{
listItemClassName
,
history
,
classes
,
toggleDrawer
,
logout
}
=
props
const
styles
=
useStyles
(
useTheme
())
const
{
sx
,
history
,
toggleDrawer
,
logout
}
=
props
const
handleClick
=
(
path
:
string
)
=>
()
=>
{
history
.
push
(
path
)
toggleDrawer
()
}
const
listItemComponent
=
(
label
:
string
,
path
:
string
,
Icon
:
React
.
ComponentType
)
=>
(
<
ItemWithIcon
key=
{
path
}
label=
{
label
}
className=
{
cn
(
listItemClassName
,
{
[
classes
.
selected
]:
isCurrentPath
(
history
,
path
)
})
}
onClick=
{
handleClick
(
path
)
}
>
<
ItemWithIcon
key=
{
path
}
label=
{
label
}
sx=
{
{
...
sx
,
...(
isCurrentPath
(
history
,
path
)
?
styles
.
selected
:
{})
}
}
onClick=
{
handleClick
(
path
)
}
>
<
Icon
/>
</
ItemWithIcon
>
)
return
(
<
List
className=
{
class
es
.
list
}
>
<
List
sx=
{
styl
es
.
list
}
>
{
drawerListItems
.
map
((
item
)
=>
listItemComponent
(
item
.
label
,
item
.
path
,
item
.
Icon
))
}
<
ItemWithIcon
label=
"Sair"
className=
{
listItemClassName
}
onClick=
{
()
=>
logout
()
}
>
<
ItemWithIcon
label=
"Sair"
sx=
{
sx
}
onClick=
{
()
=>
logout
()
}
>
<
ExitToApp
/>
</
ItemWithIcon
>
</
List
>
)
}
export
default
withStyles
(
styles
)(
DrawerItems
)
export
default
DrawerItems
cli/web/cliente/src/views/Main/DrawerItems/styles.ts
View file @
e63508b1
import
{
drawerWidth
}
from
'@agiliza/constants/styles'
import
{
createStyles
,
Theme
}
from
'@material-ui/core/styles'
import
{
createSxStyles
}
from
'@agiliza/theme'
import
{
Theme
}
from
'@mui/material'
export
const
styles
=
(
theme
:
Theme
)
=>
{
return
create
Styles
({
export
const
useStyles
=
(
theme
:
Theme
)
=>
createSx
Styles
({
selected
:
{
backgroundColor
:
theme
.
palette
.
primary
.
light
,
color
:
theme
.
palette
.
primary
.
contrastText
,
...
...
@@ -37,4 +38,3 @@ export const styles = (theme: Theme) => {
},
grow
:
{
flex
:
1
},
})
}
cli/web/cliente/src/views/Main/Main.tsx
View file @
e63508b1
...
...
@@ -6,20 +6,20 @@ import CircularProgress from '@agiliza/components/molecules/CircularProgress'
import
{
actions
as
drawerActions
}
from
'@agiliza/redux/ui/drawer'
import
{
actions
as
loginActions
}
from
'@agiliza/redux/ui/login'
import
{
ProposalDataRouteState
}
from
'@agiliza/views/ProposalData/pages/ProposalData'
import
{
Button
,
ListItem
,
ListItemIcon
,
ListItemText
,
Menu
,
Typography
}
from
'@material-ui/core
'
import
{
withStyles
,
WithStyles
}
from
'@material-ui/core/styles
'
import
{
AccountCircleOutlined
as
PersonIcon
,
MeetingRoom
as
LogoutIcon
}
from
'@material-ui/icon
s'
import
{
AccountCircleOutlined
as
PersonIcon
,
MeetingRoom
as
LogoutIcon
}
from
'@mui/icons-material
'
import
{
Button
,
Link
,
ListItem
,
ListItemIcon
,
ListItemText
,
Menu
,
Typography
}
from
'@mui/material
'
import
{
useTheme
}
from
'@mui/material/style
s'
import
connect
,
{
ConnectedProps
}
from
'./connect'
import
{
PATHS
}
from
'./DrawerItems'
import
s
tyles
from
'./styles'
import
useS
tyles
from
'./styles'
const
SimulationCreditLines
=
lazy
(()
=>
import
(
'@agiliza/views/SimulationCreditLines/pages/router'
))
const
ProposalData
=
lazy
(()
=>
import
(
'@agiliza/views/ProposalData/pages/ProposalData'
))
const
Projects
=
lazy
(()
=>
import
(
'@agiliza/views/Projects/pages/router'
))
// const SecurityProfile = lazy(() => import('@curio/ui/dist/views/SecurityProfile'))
type
BaseProps
=
RouteComponentProps
&
ConnectedProps
&
WithStyles
<
typeof
styles
>
type
BaseProps
=
RouteComponentProps
&
ConnectedProps
interface
Props
extends
BaseProps
{
toggleDrawer
:
typeof
drawerActions
.
toggleDrawer
...
...
@@ -27,7 +27,8 @@ interface Props extends BaseProps {
}
const
Main
=
(
props
:
Props
)
=>
{
const
{
classes
,
toggleDrawer
,
fetchMenu
,
customer
}
=
props
const
{
toggleDrawer
,
fetchMenu
,
customer
}
=
props
const
styles
=
useStyles
(
useTheme
())
const
history
=
useHistory
()
...
...
@@ -55,20 +56,24 @@ const Main = (props: Props) => {
}
return
(
<
div
className=
{
class
es
.
pageContainer
}
>
<
div
style=
{
styl
es
.
pageContainer
}
>
<
AppBar
onNavClick=
{
toggleDrawer
}
title=
{
<
div
style=
{
{
display
:
'flex'
}
}
>
<
a
onClick=
{
()
=>
history
.
push
(
'/'
)
}
className=
{
class
es
.
titleAnchor
}
>
<
Typography
className=
{
class
es
.
appTitle
}
>
Agiliza
</
Typography
>
</
a
>
<>
<
Link
onClick=
{
()
=>
history
.
push
(
'/'
)
}
sx=
{
styl
es
.
titleAnchor
}
>
<
Typography
sx=
{
styl
es
.
appTitle
}
>
Agiliza
</
Typography
>
</
Link
>
<
div
style=
{
{
flex
:
1
}
}
/>
</>
}
actions=
{
<>
<
Button
color=
"inherit"
variant=
"text"
onClick=
{
()
=>
history
.
push
(
PATHS
.
proposals
)
}
>
Retomar proposta
</
Button
>
{
customer
&&
<
Button
onClick=
{
handleProfileClick
}
key=
"1"
color=
"inherit"
endIcon=
{
<
PersonIcon
/>
}
/>
}
</
div
>
</>
}
/>
{
/* <Drawer drawerOpen={drawerOpen} toggleDrawer={toggleDrawer} logout={logout} Items={DrawerItems} {...routeProps} /> */
}
...
...
@@ -100,4 +105,4 @@ const Main = (props: Props) => {
)
}
export
default
connect
(
withStyles
(
styles
)(
Main
)
)
export
default
connect
(
Main
)
cli/web/cliente/src/views/Main/styles.ts
View file @
e63508b1
import
{
createStyles
,
Theme
}
from
'@material-ui/core/styles'
import
{
createSxStyles
}
from
'@agiliza/theme'
import
{
Theme
}
from
'@mui/material/styles'
import
sharedStyles
from
'../shared-styles'
export
default
(
theme
:
Theme
)
=>
{
return
createStyles
({
return
createS
xS
tyles
({
...
sharedStyles
(
theme
),
pageContainer
:
{
height
:
'100vh'
,
...
...
@@ -14,7 +15,7 @@ export default (theme: Theme) => {
paddingBottom
:
0
,
justifyContent
:
'flex-start'
,
},
appTitle
:
{
flexGrow
:
1
,
fontSize
:
'100%'
,
textTransform
:
'uppercase'
},
titleAnchor
:
{
cursor
:
'pointer'
},
appTitle
:
{
flexGrow
:
1
,
fontSize
:
'100%'
,
textTransform
:
'uppercase'
,
color
:
'white'
},
titleAnchor
:
{
cursor
:
'pointer'
,
display
:
{
xs
:
'none'
,
sm
:
'block'
}
},
})
}
cli/web/cliente/src/views/Projects/pages/ListProjects/ListProjects.tsx
View file @
e63508b1
...
...
@@ -3,27 +3,30 @@ import { RouteComponentProps } from 'react-router'
import
{
Project
}
from
'@agiliza/api/domain/project'
import
{
PATHS
}
from
'@agiliza/views/Main/DrawerItems'
import
{
Apps
as
AppsIcon
}
from
'@mui/icons-material'
import
{
Avatar
,
Box
,
CircularProgress
,
List
,
ListItem
,
ListItemAvatar
,
ListItemText
,
ListSubheader
}
from
'@material-ui/core'
import
{
withStyles
,
WithStyles
}
from
'@material-ui/core/styles'
import
{
Apps
as
AppsIcon
}
from
'@material-ui/icons'
}
from
'@mui/material'
import
{
useTheme
}
from
'@mui/material/styles'
import
{
connected
,
ConnectedProps
}
from
'./connect'
import
s
tyles
from
'./styles'
import
useS
tyles
from
'./styles'
type
ExtendedProps
=
WithStyles
<
typeof
styles
>
&
ConnectedProps
&
RouteComponentProps
type
ExtendedProps
=
ConnectedProps
&
RouteComponentProps
interface
Props
extends
ExtendedProps
{}
const
ListProjects
=
(
props
:
Props
)
=>
{
const
{
classes
,
fetching
,
proposals
,
history
}
=
props
const
{
fetching
,
proposals
,
history
}
=
props
const
styles
=
useStyles
(
useTheme
())
useEffect
(()
=>
{
props
.
getProjects
()
...
...
@@ -37,9 +40,9 @@ const ListProjects = (props: Props) => {
if
(
fetching
)
return
<
CircularProgress
/>
return
(
<
div
className=
{
class
es
.
pageContent
}
>
<
Box
sx=
{
styl
es
.
pageContent
}
>
<
List
className=
{
class
es
.
list
}
sx=
{
styl
es
.
list
}
subheader=
{
<
ListSubheader
component=
"div"
id=
"nested-list-subheader"
>
Projetos
...
...
@@ -57,8 +60,8 @@ const ListProjects = (props: Props) => {
</
ListItem
>
))
}
</
List
>
</
div
>
</
Box
>
)
}
export
default
connected
(
withStyles
(
styles
)(
ListProjects
)
)
export
default
connected
(
ListProjects
)
cli/web/cliente/src/views/Projects/pages/ListProjects/styles.ts
View file @
e63508b1
import
{
Theme
}
from
'@material-ui/core/styles
'
import
{
createStyles
}
from
'@material-ui/styles
'
import
{
createSxStyles
}
from
'@agiliza/theme
'
import
{
Theme
}
from
'@mui/material
'
import
sharedStyles
from
'../shared-styles'
// eslint-disable-next-line
export
default
(
theme
:
Theme
)
=>
createStyles
({
const
styles
=
(
theme
:
Theme
)
=>
createSxStyles
({
...
sharedStyles
(
theme
),
list
:
{
width
:
'100%'
},
})
export
default
styles
cli/web/cliente/src/views/Projects/pages/router.tsx
View file @
e63508b1
...
...
@@ -3,10 +3,10 @@ import { Route, RouteComponentProps, Switch } from 'react-router'
import
AuthRoute
from
'@agiliza/components/atoms/AuthRoute'
import
{
PATHS
}
from
'@agiliza/views/Main/DrawerItems'
import
{
CircularProgress
}
from
'@material-ui/core
'
import
{
withStyles
,
WithStyles
}
from
'@material-ui/core
/styles'
import
{
Box
,
CircularProgress
}
from
'@mui/material
'
import
{
useTheme
}
from
'@mui/material
/styles'
import
s
tyles
from
'./shared-styles'
import
useS
tyles
from
'./shared-styles'
export
const
PROJECTS_PATHS
=
{
login
:
PATHS
.
proposals
+
'/login'
,
...
...
@@ -15,23 +15,22 @@ export const PROJECTS_PATHS = {
const
ListProjects
=
lazy
(()
=>
import
(
'./ListProjects'
))
const
Login
=
lazy
(()
=>
import
(
'@agiliza/views/Login'
))
type
ExtendedProps
=
WithStyles
<
typeof
styles
>
&
RouteComponentProps
type
ExtendedProps
=
RouteComponentProps
interface
Props
extends
ExtendedProps
{}
const
ProposalDataRouter
=
(
props
:
Props
)
=>
{
const
{
classes
}
=
props
const
styles
=
useStyles
(
useTheme
())
return
(
<
div
className=
{
class
es
.
pageContent
}
>
<
Suspense
fallback=
{
<
CircularProgress
className=
{
class
es
.
circularProgress
}
/>
}
>
<
Box
sx=
{
styl
es
.
pageContent
}
>
<
Suspense
fallback=
{
<
CircularProgress
sx=
{
styl
es
.
circularProgress
}
/>
}
>
<
Switch
>
<
Route
path=
{
PROJECTS_PATHS
.
login
}
render=
{
(
renderProps
)
=>
<
Login
{
...
renderProps
}
redirectTo=
{
PATHS
.
proposals
}
/>
}
/>
<
AuthRoute
path=
{
PATHS
.
proposals
}
redirectTo=
{
PROJECTS_PATHS
.
login
}
component=
{
ListProjects
}
/>
</
Switch
>
</
Suspense
>
</
div
>
</
Box
>
)
}
export
default
withStyles
(
styles
)(
ProposalDataRouter
)
export
default
ProposalDataRouter
cli/web/cliente/src/views/Projects/pages/shared-styles.ts
View file @
e63508b1
import
{
createSxStyles
}
from
'@agiliza/theme'
import
sharedStyles
from
'@agiliza/views/shared-styles'
import
{
Theme
}
from
'@material-ui/core/styles'
import
{
createStyles
}
from
'@material-ui/styles'
import
{
Theme
}
from
'@mui/material'
// eslint-disable-next-line
export
default
(
theme
:
Theme
)
=>
createStyles
({
const
styles
=
(
theme
:
Theme
)
=>
createSxStyles
({
...
sharedStyles
(
theme
),
title
:
{
marginBottom
:
theme
.
spacing
(
2
)
},
})
export
default
styles
cli/web/cliente/src/views/ProposalData/components/atoms/CPFCNPJField/CPFCNPJField.tsx
View file @
e63508b1
import
React
from
'react'
import
{
maskCNPJ
,
maskCPFCNPJ
}
from
'@agiliza/utils/masks'
import
{
TextField
,
TextFieldProps
}
from
'@m
aterial-ui/core
'
import
{
TextField
,
TextFieldProps
}
from
'@m
ui/material
'
type
ExtendedProps
=
Record
<
string
,
unknown
>
&
Pick
<
TextFieldProps
,
'value'
|
'onChange'
|
'disabled'
>
...
...
cli/web/cliente/src/views/ProposalData/components/templates/Address/Address.tsx
View file @
e63508b1
...
...
@@ -3,15 +3,11 @@ import React from 'react'
import
{
IPAddress
}
from
'@agiliza/api/domain'
import
{
maskCEP
}
from
'@agiliza/utils/masks'
import
{
extractNumbers
}
from
'@agiliza/utils/method'
import
{
TextField
,
TextFieldProps
}
from
'@material-ui/core'
import
{
withStyles
,
WithStyles
}
from
'@material-ui/core/styles'
import
{
TextField
,
TextFieldProps
}
from
'@mui/material'
import
{
AddressState
}
from
'./state'
import
styles
from
'./styles'
type
ExtendedProps
=
WithStyles
<
typeof
styles
>
interface
Props
extends
ExtendedProps
{
interface
Props
{
state
:
AddressState
onChange
:
(
address
:
Partial
<
IPAddress
>
)
=>
void
}
...
...
@@ -35,4 +31,4 @@ const Address = (props: Props) => {
)
}
export
default
withStyles
(
styles
)(
Address
)
export
default
Address
cli/web/cliente/src/views/ProposalData/components/templates/Address/styles.ts
View file @
e63508b1
import
{
Theme
}
from
'@material-ui/core/styles
'
import
{
createStyles
}
from
'@material-ui
/styles'
import
{
createSxStyles
}
from
'@agiliza/theme
'
import
{
Theme
}
from
'@mui/material
/styles'
// eslint-disable-next-line
export
default
(
theme
:
Theme
)
=>
{
return
createStyles
({
return
createS
xS
tyles
({
form
:
{
'& .MuiTextField-root'
:
{
marginBottom
:
theme
.
spacing
(
2
),
...
...
cli/web/cliente/src/views/ProposalData/components/templates/PriceAmountInput/PriceAmountInput.tsx
View file @
e63508b1
...
...
@@ -2,7 +2,7 @@ import React from 'react'
import
{
extractNumbers
}
from
'@agiliza/utils/extractors'
import
{
formatCurrency
}
from
'@agiliza/utils/formatters'
import
{
TextField
,
TextFieldProps
}
from
'@m
aterial-ui/core
'
import
{
TextField
,
TextFieldProps
}
from
'@m
ui/material
'
const
getTotalPrice
=
<
T
extends
{
price
:
string
;
amount
:
string
}
>
(pva: T) =
>
{
const
{
amount
,
price
}
=
pva
...
...
cli/web/cliente/src/views/ProposalData/pages/BusinessData/Address/Address.tsx
View file @
e63508b1
import
React
from
'react'
import
{
ActionType
}
from
'@agiliza/utils/hooks/state'
import
{
withStyles
,
WithStyles
}
from
'@material-ui/core
/styles'
import
{
useTheme
}
from
'@mui/material
/styles'
import
{
connected
,
ConnectedProps
}
from
'./connect'
import
Form
from
'./Form'
import
{
BDAddressState
}
from
'./state'
import
s
tyles
from
'./styles'
import
useS
tyles
from
'./styles'
type
ExtendedProps
=
WithStyles
<
typeof
styles
>
&
ConnectedProps
type
ExtendedProps
=
ConnectedProps
interface
Props
extends
ExtendedProps
{
state
:
BDAddressState
...
...
@@ -16,15 +16,16 @@ interface Props extends ExtendedProps {
}
const
Address
=
(
props
:
Props
)
=>
{
const
{
classes
,
context
,
state
,
actions
}
=
props
const
{
context
,
state
,
actions
}
=
props
const
styles
=
useStyles
(
useTheme
())
return
(
<
div
className=
{
class
es
.
contentContainer
}
>
<
div
className=
{
class
es
.
content
}
>
<
div
style=
{
styl
es
.
contentContainer
}
>
<
div
style=
{
styl
es
.
content
}
>
<
Form
state=
{
state
}
actions=
{
actions
}
context=
{
context
}
/>
</
div
>
</
div
>
)
}
export
default
connected
(
withStyles
(
styles
)(
Address
)
)
export
default
connected
(
Address
)
cli/web/cliente/src/views/ProposalData/pages/BusinessData/Address/Form/Form.tsx
View file @
e63508b1
...
...
@@ -5,22 +5,21 @@ import ImageUpload from '@agiliza/components/organisms/ImageUpload'
import
AddressTemplate
from
'@agiliza/components/templates/Address'
import
{
ActionType
}
from
'@agiliza/utils/hooks/state'
import
{
getBase64FromFile
}
from
'@agiliza/utils/method'
import
{
TextField
,
TextFieldProps
}
from
'@material-ui/core
'
import
{
withStyles
,
WithStyles
}
from
'@material-ui/core
/styles'
import
{
Box
,
TextField
,
TextFieldProps
}
from
'@mui/material
'
import
{
useTheme
}
from
'@mui/material
/styles'
import
{
BDAddressState
}
from
'../state'
import
s
tyles
from
'./styles'
import
useS
tyles
from
'./styles'
type
ExtendedProps
=
WithStyles
<
typeof
styles
>
interface
Props
extends
ExtendedProps
{
interface
Props
{
state
:
BDAddressState
actions
:
ActionType
<
BDAddressState
>
context
:
AuthenticationContext
}
const
Form
=
(
props
:
Props
)
=>
{
const
{
classes
,
state
:
_state
,
actions
,
context
}
=
props
const
{
state
:
_state
,
actions
,
context
}
=
props
const
styles
=
useStyles
(
useTheme
())
const
{
cep
,
number
,
street
,
city
,
complement
,
district
,
state
,
referencePoint
,
proof
}
=
_state
...
...
@@ -39,7 +38,7 @@ const Form = (props: Props) => {
}
return
(
<
form
className=
{
classes
.
form
}
>
<
Box
sx=
{
styles
.
form
}
component=
"form"
>
<
ImageUpload
label=
"Comprovante de residência"
image=
{
proof
}
onChangeImage=
{
handleChangeProof
}
/>
<
AddressTemplate
states=
{
context
.
states
}
...
...
@@ -48,8 +47,8 @@ const Form = (props: Props) => {
onChange=
{
(
addrs
)
=>
actions
.
update
(
addrs
)
}
/>
<
TextField
variant=
"outlined"
label=
"Ponto de referência"
value=
{
referencePoint
}
onChange=
{
handleChangeText
(
'referencePoint'
)
}
/>
</
form
>
</
Box
>
)
}
export
default
withStyles
(
styles
)(
Form
)
export
default
Form
cli/web/cliente/src/views/ProposalData/pages/BusinessData/Address/Form/styles.ts
View file @
e63508b1
import
{
Theme
}
from
'@material-ui/core/styles
'
import
{
createStyles
}
from
'@material-ui
/styles'
import
{
createSxStyles
}
from
'@agiliza/theme
'
import
{
Theme
}
from
'@mui/material
/styles'
import
sharedStyles
from
'../styles'
// eslint-disable-next-line
export
default
(
theme
:
Theme
)
=>
{
return
createStyles
({
return
createS
xS
tyles
({
...
sharedStyles
(
theme
),
form
:
{
'& .MuiTextField-root'
:
{
...
...
cli/web/cliente/src/views/ProposalData/pages/BusinessData/Address/styles.ts
View file @
e63508b1
import
{
Theme
}
from
'@material-ui/core/styles
'
import
{
createStyles
}
from
'@material-ui
/styles'
import
{
createSxStyles
}
from
'@agiliza/theme
'
import
{
Theme
}
from
'@mui/material
/styles'
import
sharedStyles
from
'../styles'
// eslint-disable-next-line
export
default
(
theme
:
Theme
)
=>
{
return
createStyles
({
return
createS
xS
tyles
({
...
sharedStyles
(
theme
),
})
}
cli/web/cliente/src/views/ProposalData/pages/BusinessData/BusinessData.tsx
View file @
e63508b1
import
React
from
'react'
import
{
RouteComponentProps
}
from
'react-router'
import
{
withStyles
,
WithStyles
}
from
'@material-ui/core/styles'
import
styles
from
'./styles'
type
ExtendedProps
=
WithStyles
<
typeof
styles
>
&
RouteComponentProps
type
ExtendedProps
=
RouteComponentProps
interface
Props
extends
ExtendedProps
{}
const
BusinessData
=
(
props
:
Props
)
=>
{
const
{
classes
}
=
props
return
<
div
className=
{
classes
.
contentContainer
}
></
div
>
return
<
div
></
div
>
}
export
default
withStyles
(
styles
)(
BusinessData
)
export
default
BusinessData
cli/web/cliente/src/views/ProposalData/pages/BusinessData/Identification/Form/Form.tsx
View file @
e63508b1
...
...
@@ -6,22 +6,21 @@ import { ActionType } from '@agiliza/utils/hooks/state'
import
{
getBase64FromFile
}
from
'@agiliza/utils/method'
import
CPFCNPJField
from
'@agiliza/views/ProposalData/components/atoms/CPFCNPJField'
import
{
DatePicker
,
SelectField
,
SelectFieldProps
}
from
'@curio/components'
import
{
TextField
,
TextFieldProps
}
from
'@material-ui/core
'
import
{
withStyles
,
WithStyles
}
from
'@material-ui/core
/styles'
import
{
Box
,
TextField
,
TextFieldProps
}
from
'@mui/material
'
import
{
useTheme
}
from
'@mui/material
/styles'
import
{
BDIdentificationState
}
from
'../state'
import
s
tyles
from
'./styles'
import
useS
tyles
from
'./styles'
type
ExtendedProps
=
WithStyles
<
typeof
styles
>
interface
Props
extends
ExtendedProps
{
interface
Props
{
state
:
BDIdentificationState
actions
:
ActionType
<
BDIdentificationState
>
context
:
ProposalDataContext
}
const
Form
=
(
props
:
Props
)
=>
{
const
{
classes
,
state
,
actions
,
context
}
=
props
const
{
state
,
actions
,
context
}
=
props
const
styles
=
useStyles
(
useTheme
())
const
{
cnpj
,
...
...
@@ -44,8 +43,8 @@ const Form = (props: Props) => {
actions
.
update
({
[
key
]:
evt
.
target
.
value
})
}
const
handleChangeDate
=
(
type
:
keyof
Pick
<
BDIdentificationState
,
'openingDate'
>
)
=>
(
date
:
Date
|
null
)
=>
{
actions
.
update
({
[
type
]:
date
})
const
handleChangeDate
=
(
type
:
keyof
Pick
<
BDIdentificationState
,
'openingDate'
>
)
=>
(
date
:
unknown
)
=>
{
actions
.
update
({
[
type
]:
date
as
Date
})
}
const
handleChangeSelect
=
...
...
@@ -68,7 +67,7 @@ const Form = (props: Props) => {
}
return
(
<
form
className=
{
class
es
.
form
}
>
<
Box
sx=
{
styl
es
.
form
}
>
<
DocumentTemplate
document=
{
document
}
context=
{
context
}
onChangeImage=
{
handleChangeProof
}
onChangeDocumentType=
{
handleChangeDocumentType
}
/>
<
CPFCNPJField
value=
{
cnpj
}
onChange=
{
handleChangeText
(
'cnpj'
)
}
onlyCPNJ
/>
<
DatePicker
...
...
@@ -76,8 +75,8 @@ const Form = (props: Props) => {
label=
"Data da abertura"
value=
{
openingDate
}
onChange=
{
handleChangeDate
(
'openingDate'
)
}
format=
"dd/MM/yyyy"
className=
{
class
es
.
datePicker
}
//
format="dd/MM/yyyy"
sx=
{
styl
es
.
datePicker
}
/>
<
TextField
variant=
"outlined"
label=
"Inscrição estadual"
value=
{
stateRegistration
}
onChange=
{
handleChangeText
(
'stateRegistration'
)
}
/>
<
TextField
variant=
"outlined"
label=
"Inscrição municipal"
value=
{
cityRegistration
}
onChange=
{
handleChangeText
(
'cityRegistration'
)
}
/>
...
...
@@ -117,8 +116,8 @@ const Form = (props: Props) => {
/>
<
TextField
variant=
"outlined"
type=
"tel"
label=
"Código CNAE"
value=
{
codeCNAE
}
onChange=
{
handleChangeText
(
'codeCNAE'
)
}
/>
<
TextField
variant=
"outlined"
label=
"Atividade principal"
value=
{
mainActivity
}
onChange=
{
handleChangeText
(
'mainActivity'
)
}
/>
</
form
>
</
Box
>
)
}
export
default
withStyles
(
styles
)(
Form
)
export
default
Form
cli/web/cliente/src/views/ProposalData/pages/BusinessData/Identification/Form/styles.ts
View file @
e63508b1
import
{
Theme
}
from
'@material-ui/core/styles
'
import
{
createStyles
}
from
'@material-ui
/styles'
import
{
createSxStyles
}
from
'@agiliza/theme
'
import
{
Theme
}
from
'@mui/material
/styles'
import
sharedStyles
from
'../styles'
// eslint-disable-next-line
export
default
(
theme
:
Theme
)
=>
{
return
createStyles
({
return
createS
xS
tyles
({
...
sharedStyles
(
theme
),
form
:
{
'& .MuiTextField-root'
:
{
...
...
cli/web/cliente/src/views/ProposalData/pages/BusinessData/Identification/Identification.tsx
View file @
e63508b1
import
React
from
'react'
import
{
ActionType
}
from
'@agiliza/utils/hooks/state'
import
{
withStyles
,
WithStyles
}
from
'@material-ui/core
/styles'
import
{
useTheme
}
from
'@mui/material
/styles'
import
{
connected
,
ConnectedProps
}
from
'./connect'
import
Form
from
'./Form'
import
{
BDIdentificationState
}
from
'./state'
import
s
tyles
from
'./styles'
import
useS
tyles
from
'./styles'
type
ExtendedProps
=
WithStyles
<
typeof
styles
>
&
ConnectedProps
type
ExtendedProps
=
ConnectedProps
interface
Props
extends
ExtendedProps
{
state
:
BDIdentificationState
...
...
@@ -16,15 +16,16 @@ interface Props extends ExtendedProps {
}
const
Identification
=
(
props
:
Props
)
=>
{
const
{
classes
,
context
,
state
,
actions
}
=
props
const
{
context
,
state
,
actions
}
=
props
const
styles
=
useStyles
(
useTheme
())
return
(
<
div
className=
{
class
es
.
contentContainer
}
>
<
div
className=
{
class
es
.
content
}
>
<
div
style=
{
styl
es
.
contentContainer
}
>
<
div
style=
{
styl
es
.
content
}
>
<
Form
state=
{
state
}
actions=
{
actions
}
context=
{
context
}
/>
</
div
>
</
div
>
)
}
export
default
connected
(
withStyles
(
styles
)(
Identification
)
)
export
default
connected
(
Identification
)
cli/web/cliente/src/views/ProposalData/pages/BusinessData/Identification/styles.ts
View file @
e63508b1
import
{
Theme
}
from
'@material-ui/core/styles
'
import
{
createStyles
}
from
'@material-ui
/styles'
import
{
createSxStyles
}
from
'@agiliza/theme
'
import
{
Theme
}
from
'@mui/material
/styles'
import
sharedStyles
from
'../styles'
// eslint-disable-next-line
export
default
(
theme
:
Theme
)
=>
{
return
createStyles
({
return
createS
xS
tyles
({
...
sharedStyles
(
theme
),
})
}
cli/web/cliente/src/views/ProposalData/pages/BusinessData/ProductsServices/Dialog/Dialog.tsx
View file @
e63508b1
...
...
@@ -10,14 +10,14 @@ import {
DialogContent
,
DialogProps
,
DialogTitle
}
from
'@m
aterial-ui/core
'
import
{
withStyles
,
WithStyles
}
from
'@material-ui/core
/styles'
}
from
'@m
ui/material
'
import
{
useTheme
}
from
'@mui/material
/styles'
import
Form
from
'../Form'
import
{
initialState
}
from
'../state'
import
s
tyles
from
'./styles'
import
useS
tyles
from
'./styles'
type
ExtendedProps
=
Pick
<
DialogProps
,
'open'
>
&
WithStyles
<
typeof
styles
>
type
ExtendedProps
=
Pick
<
DialogProps
,
'open'
>
interface
Props
extends
ExtendedProps
{
onClose
:
()
=>
void
...
...
@@ -27,7 +27,8 @@ interface Props extends ExtendedProps {
}
const
Dialog
=
(
props
:
Props
)
=>
{
const
{
classes
,
fetching
,
open
,
onClose
,
onSave
,
productService
}
=
props
const
{
fetching
,
open
,
onClose
,
onSave
,
productService
}
=
props
const
styles
=
useStyles
(
useTheme
())
const
formState
=
useFormState
(
'VehicleForm'
,
initialState
)
...
...
@@ -43,7 +44,7 @@ const Dialog = (props: Props) => {
}
return
(
<
MUIDialog
onClose=
{
onClose
}
aria
-
labelledby=
"simple-dialog-title"
open=
{
open
}
PaperProps=
{
{
className
:
class
es
.
dialog
}
}
>
<
MUIDialog
onClose=
{
onClose
}
aria
-
labelledby=
"simple-dialog-title"
open=
{
open
}
PaperProps=
{
{
sx
:
styl
es
.
dialog
}
}
>
<
DialogTitle
>
{
productService
?
'Editar'
:
'Adicionar'
}
pessoa envolvida
</
DialogTitle
>
<
DialogContent
>
<
Form
{
...
formState
}
/>
...
...
@@ -58,4 +59,4 @@ const Dialog = (props: Props) => {
)
}
export
default
withStyles
(
styles
)(
Dialog
)
export
default
Dialog
cli/web/cliente/src/views/ProposalData/pages/BusinessData/ProductsServices/Dialog/styles.ts
View file @
e63508b1
import
{
Theme
}
from
'@material-ui/core/styles
'
import
{
createStyles
}
from
'@material-ui
/styles'
import
{
createSxStyles
}
from
'@agiliza/theme
'
import
{
Theme
}
from
'@mui/material
/styles'
import
sharedStyles
from
'../styles'
// eslint-disable-next-line
export
default
(
theme
:
Theme
)
=>
{
return
createStyles
({
return
createS
xS
tyles
({
...
sharedStyles
(
theme
),
dialog
:
{
width
:
'80%'
,
height
:
'55%'
},
})
...
...
cli/web/cliente/src/views/ProposalData/pages/BusinessData/ProductsServices/Form/Form.tsx
View file @
e63508b1
...
...
@@ -5,21 +5,20 @@ import { ActionType } from '@agiliza/utils/hooks/state'
import
PriceAmountInput
,
{
Values
}
from
'@agiliza/views/ProposalData/components/templates/PriceAmountInput'
import
{
TextField
,
TextFieldProps
,
Typography
}
from
'@material-ui/core
'
import
{
withStyles
,
WithStyles
}
from
'@material-ui/core
/styles'
import
{
Box
,
TextField
,
TextFieldProps
,
Typography
}
from
'@mui/material
'
import
{
useTheme
}
from
'@mui/material
/styles'
import
{
BDProductServiceState
}
from
'../state'
import
s
tyles
from
'./styles'
import
useS
tyles
from
'./styles'
type
ExtendedProps
=
WithStyles
<
typeof
styles
>
interface
Props
extends
ExtendedProps
{
interface
Props
{
state
:
BDProductServiceState
actions
:
ActionType
<
BDProductServiceState
>
}
const
Form
=
(
props
:
Props
)
=>
{
const
{
classes
,
state
,
actions
}
=
props
const
{
state
,
actions
}
=
props
const
styles
=
useStyles
(
useTheme
())
const
{
description
,
unit
,
stock
,
monthlySales
,
variableCosts
}
=
state
...
...
@@ -34,17 +33,17 @@ const Form = (props: Props) => {
}
return
(
<
form
className=
{
class
es
.
form
}
>
<
Box
component=
"form"
sx=
{
styl
es
.
form
}
>
<
TextField
variant=
"outlined"
label=
"Descrição do produto / serviço"
value=
{
description
}
onChange=
{
handleChangeText
(
'description'
)
}
/>
<
TextField
variant=
"outlined"
label=
"Unidade"
value=
{
extractNumbers
(
unit
)
}
onChange=
{
handleChangeText
(
'unit'
)
}
type=
"tel"
/>
<
Typography
className=
{
class
es
.
label
}
>
Informações de estoque
</
Typography
>
<
Typography
sx=
{
styl
es
.
label
}
>
Informações de estoque
</
Typography
>
<
PriceAmountInput
values=
{
stock
}
onChange=
{
handleChangePriceAmount
(
'stock'
)
}
/>
<
Typography
className=
{
class
es
.
label
}
>
Vendas mensais
</
Typography
>
<
Typography
sx=
{
styl
es
.
label
}
>
Vendas mensais
</
Typography
>
<
PriceAmountInput
values=
{
monthlySales
}
onChange=
{
handleChangePriceAmount
(
'monthlySales'
)
}
/>
<
Typography
className=
{
class
es
.
label
}
>
Custos variáveis
</
Typography
>
<
Typography
sx=
{
styl
es
.
label
}
>
Custos variáveis
</
Typography
>
<
PriceAmountInput
values=
{
variableCosts
}
onChange=
{
handleChangePriceAmount
(
'variableCosts'
)
}
/>
</
form
>
</
Box
>
)
}
export
default
withStyles
(
styles
)(
Form
)
export
default
Form
cli/web/cliente/src/views/ProposalData/pages/BusinessData/ProductsServices/Form/styles.ts
View file @
e63508b1
import
{
Theme
}
from
'@material-ui/core/styles
'
import
{
createStyles
}
from
'@material-ui
/styles'
import
{
createSxStyles
}
from
'@agiliza/theme
'
import
{
Theme
}
from
'@mui/material
/styles'
import
sharedStyles
from
'../styles'
// eslint-disable-next-line
export
default
(
theme
:
Theme
)
=>
{
return
createStyles
({
return
createS
xS
tyles
({
...
sharedStyles
(
theme
),
form
:
{
'& .MuiTextField-root'
:
{
...
...
cli/web/cliente/src/views/ProposalData/pages/BusinessData/ProductsServices/ProductsServices.tsx
View file @
e63508b1
...
...
@@ -2,16 +2,16 @@ import React, { useState } from 'react'
import
{
BDProductService
}
from
'@agiliza/api/domain'
import
{
ActionType
}
from
'@agiliza/utils/hooks/state'
import
{
A
vatar
,
List
,
ListItem
,
ListItemAvatar
,
ListItemText
}
from
'@material-ui/core
'
import
{
withStyles
,
WithStyles
}
from
'@material-ui/core/styles
'
import
{
Add
as
AddIcon
,
Apps
as
AppsIcon
}
from
'@material-ui/icon
s'
import
{
A
dd
as
AddIcon
,
Apps
as
AppsIcon
}
from
'@mui/icons-material
'
import
{
Avatar
,
List
,
ListItem
,
ListItemAvatar
,
ListItemText
}
from
'@mui/material
'
import
{
useTheme
}
from
'@mui/material/style
s'
import
{
connected
,
ConnectedProps
}
from
'./connect'
import
Dialog
from
'./Dialog'
import
{
BDProductServiceState
}
from
'./state'
import
s
tyles
from
'./styles'
import
useS
tyles
from
'./styles'
type
ExtendedProps
=
WithStyles
<
typeof
styles
>
&
ConnectedProps
type
ExtendedProps
=
ConnectedProps
interface
Props
extends
ExtendedProps
{
projectId
:
string
...
...
@@ -20,7 +20,8 @@ interface Props extends ExtendedProps {
}
const
ProductsServices
=
(
props
:
Props
)
=>
{
const
{
classes
,
fetching
,
projectId
,
productsServices
}
=
props
const
{
fetching
,
projectId
,
productsServices
}
=
props
const
styles
=
useStyles
(
useTheme
())
const
[
selectedProductService
,
setSelectedProductService
]
=
useState
<
BDProductService
|
undefined
>
()
...
...
@@ -51,9 +52,9 @@ const ProductsServices = (props: Props) => {
return
(
<>
<
div
className=
{
class
es
.
contentContainer
}
>
<
div
className=
{
class
es
.
content
}
>
<
List
className=
{
class
es
.
list
}
>
<
div
style=
{
styl
es
.
contentContainer
}
>
<
div
style=
{
styl
es
.
content
}
>
<
List
sx=
{
styl
es
.
list
}
>
{
productsServices
.
map
((
vehicle
,
i
)
=>
(
<
ListItem
key=
{
i
}
button
onClick=
{
handleClickListItem
(
vehicle
)
}
>
<
ListItemAvatar
>
...
...
@@ -67,7 +68,7 @@ const ProductsServices = (props: Props) => {
</
List
>
</
div
>
</
div
>
<
Avatar
className=
{
class
es
.
avatarBtnContainer
}
onClick=
{
handleClickAdd
}
>
<
Avatar
sx=
{
styl
es
.
avatarBtnContainer
}
onClick=
{
handleClickAdd
}
>
<
AddIcon
/>
</
Avatar
>
<
Dialog
fetching=
{
fetching
}
open=
{
open
}
onClose=
{
handleClickClose
}
productService=
{
selectedProductService
}
onSave=
{
handleSave
}
/>
...
...
@@ -75,4 +76,4 @@ const ProductsServices = (props: Props) => {
)
}
export
default
connected
(
withStyles
(
styles
)(
ProductsServices
)
)
export
default
connected
(
ProductsServices
)
cli/web/cliente/src/views/ProposalData/pages/BusinessData/ProductsServices/styles.ts
View file @
e63508b1
import
{
Theme
}
from
'@material-ui/core/styles
'
import
{
createStyles
}
from
'@material-ui
/styles'
import
{
createSxStyles
}
from
'@agiliza/theme
'
import
{
Theme
}
from
'@mui/material
/styles'
import
sharedStyles
from
'../styles'
// eslint-disable-next-line
export
default
(
theme
:
Theme
)
=>
{
return
createStyles
({
return
createS
xS
tyles
({
...
sharedStyles
(
theme
),
list
:
{
width
:
'100%'
},
avatarBtnContainer
:
{
...
...
cli/web/cliente/src/views/ProposalData/pages/BusinessData/StockSalesCosts/Form/Form.tsx
View file @
e63508b1
...
...
@@ -7,15 +7,13 @@ import { ActionType } from '@agiliza/utils/hooks/state'
import
{
maskMonthYear
}
from
'@agiliza/utils/masks'
import
{
getBase64FromFile
}
from
'@agiliza/utils/method'
import
{
SelectField
,
SelectFieldProps
}
from
'@curio/components'
import
{
TextField
,
TextFieldProps
,
Typography
}
from
'@material-ui/core
'
import
{
withStyles
,
WithStyles
}
from
'@material-ui/core
/styles'
import
{
Box
,
TextField
,
TextFieldProps
,
Typography
}
from
'@mui/material
'
import
{
useTheme
}
from
'@mui/material
/styles'
import
{
BDStockSalesCostsState
}
from
'../state'
import
s
tyles
from
'./styles'
import
useS
tyles
from
'./styles'
type
ExtendedProps
=
WithStyles
<
typeof
styles
>
interface
Props
extends
ExtendedProps
{
interface
Props
{
state
:
BDStockSalesCostsState
actions
:
ActionType
<
BDStockSalesCostsState
>
context
:
ProposalDataContext
...
...
@@ -23,7 +21,8 @@ interface Props extends ExtendedProps {
}
const
Form
=
(
props
:
Props
)
=>
{
const
{
classes
,
state
,
actions
,
context
,
productsServices
}
=
props
const
{
state
,
actions
,
context
,
productsServices
}
=
props
const
styles
=
useStyles
(
useTheme
())
const
{
monthYearReference
,
salesCommission
,
document
,
monthRating
}
=
state
...
...
@@ -63,7 +62,7 @@ const Form = (props: Props) => {
}
return
(
<
form
className=
{
class
es
.
form
}
>
<
Box
component=
"form"
sx=
{
styl
es
.
form
}
>
<
DocumentTemplate
context=
{
context
}
document=
{
document
}
onChangeImage=
{
handleChangeImage
}
onChangeDocumentType=
{
handleChangeDocumentType
}
/>
{
/* <Typography className={classes.label}>
Preencha as informações abaixo, e na tela seguinte informe os produtos/serviços e os respectivos dados referente a estoque, vendas mensais e
...
...
@@ -87,7 +86,7 @@ const Form = (props: Props) => {
variant=
"outlined"
shrink=
{
false
}
/>
<
Typography
className=
{
class
es
.
label
}
>
<
Typography
sx=
{
styl
es
.
label
}
>
Após o preenchimento das informações citadas acima, os totais abaixo serão preenchidos automaticamente.
</
Typography
>
<
TextField
variant=
"outlined"
disabled
label=
"Total geral estoque"
value=
{
formatCurrency
(
getTotals
(
'stock'
).
toFixed
(
2
))
||
''
}
/>
...
...
@@ -99,8 +98,8 @@ const Form = (props: Props) => {
value=
{
formatCurrency
(
getTotalCommission
(
salesCommission
).
toFixed
(
2
))
||
''
}
/>
<
TextField
variant=
"outlined"
disabled
label=
"Total geral custos var."
value=
{
formatCurrency
(
getTotals
(
'variableCosts'
).
toFixed
(
2
))
||
''
}
/>
</
form
>
</
Box
>
)
}
export
default
withStyles
(
styles
)(
Form
)
export
default
Form
cli/web/cliente/src/views/ProposalData/pages/BusinessData/StockSalesCosts/Form/styles.ts
View file @
e63508b1
import
{
Theme
}
from
'@material-ui/core/styles
'
import
{
createStyles
}
from
'@material-ui
/styles'
import
{
createSxStyles
}
from
'@agiliza/theme
'
import
{
Theme
}
from
'@mui/material
/styles'
import
sharedStyles
from
'../styles'
// eslint-disable-next-line
export
default
(
theme
:
Theme
)
=>
{
return
createStyles
({
return
createS
xS
tyles
({
...
sharedStyles
(
theme
),
form
:
{
'& .MuiTextField-root'
:
{
...
...
cli/web/cliente/src/views/ProposalData/pages/BusinessData/StockSalesCosts/StockSalesCosts.tsx
View file @
e63508b1
import
React
from
'react'
import
{
ActionType
}
from
'@agiliza/utils/hooks/state'
import
{
withStyles
,
WithStyles
}
from
'@material-ui/core
/styles'
import
{
useTheme
}
from
'@mui/material
/styles'
import
{
connected
,
ConnectedProps
}
from
'./connect'
import
Form
from
'./Form'
import
{
BDStockSalesCostsState
}
from
'./state'
import
s
tyles
from
'./styles'
import
useS
tyles
from
'./styles'
type
ExtendedProps
=
WithStyles
<
typeof
styles
>
&
ConnectedProps
type
ExtendedProps
=
ConnectedProps
interface
Props
extends
ExtendedProps
{
state
:
BDStockSalesCostsState
...
...
@@ -16,15 +16,15 @@ interface Props extends ExtendedProps {
}
const
StockSalesCosts
=
(
props
:
Props
)
=>
{
const
{
c
lasses
,
c
ontext
,
productsServices
,
state
,
actions
}
=
props
const
{
context
,
productsServices
,
state
,
actions
}
=
props
const
styles
=
useStyles
(
useTheme
())
return
(
<
div
className=
{
class
es
.
contentContainer
}
>
<
div
className=
{
class
es
.
content
}
>
<
div
style=
{
styl
es
.
contentContainer
}
>
<
div
style=
{
styl
es
.
content
}
>
<
Form
state=
{
state
}
actions=
{
actions
}
context=
{
context
}
productsServices=
{
productsServices
}
/>
</
div
>
</
div
>
)
}
export
default
connected
(
withStyles
(
styles
)(
StockSalesCosts
)
)
export
default
connected
(
StockSalesCosts
)
cli/web/cliente/src/views/ProposalData/pages/BusinessData/StockSalesCosts/styles.ts
View file @
e63508b1
import
{
Theme
}
from
'@material-ui/core/styles
'
import
{
createStyles
}
from
'@material-ui
/styles'
import
{
createSxStyles
}
from
'@agiliza/theme
'
import
{
Theme
}
from
'@mui/material
/styles'
import
sharedStyles
from
'../styles'
// eslint-disable-next-line
export
default
(
theme
:
Theme
)
=>
{
return
createStyles
({
return
createS
xS
tyles
({
...
sharedStyles
(
theme
),
})
}
cli/web/cliente/src/views/ProposalData/pages/BusinessData/styles.ts
View file @
e63508b1
import
{
Theme
}
from
'@material-ui/core/styles
'
import
{
createStyles
}
from
'@material-ui
/styles'
import
{
createSxStyles
}
from
'@agiliza/theme
'
import
{
Theme
}
from
'@mui/material
/styles'
import
sharedStyles
from
'../shared-styles'
// eslint-disable-next-line
export
default
(
theme
:
Theme
)
=>
createStyles
({
createS
xS
tyles
({
...
sharedStyles
(
theme
),
cardsContainer
:
{
display
:
'flex'
},
gridItem
:
{
display
:
'flex'
,
justifyContent
:
'center'
},
...
...
cli/web/cliente/src/views/ProposalData/pages/CustomerData/Address/Address.tsx
View file @
e63508b1
import
React
from
'react'
import
{
ActionType
}
from
'@agiliza/utils/hooks/state'
import
{
withStyles
,
WithStyles
}
from
'@material-ui/core
/styles'
import
{
useTheme
}
from
'@mui/material
/styles'
import
{
connected
,
ConnectedProps
}
from
'./connect'
import
Form
from
'./Form'
import
{
CDAddressState
}
from
'./state'
import
s
tyles
from
'./styles'
import
useS
tyles
from
'./styles'
type
ExtendedProps
=
WithStyles
<
typeof
styles
>
&
ConnectedProps
type
ExtendedProps
=
ConnectedProps
interface
Props
extends
ExtendedProps
{
state
:
CDAddressState
...
...
@@ -16,15 +16,16 @@ interface Props extends ExtendedProps {
}
const
Address
=
(
props
:
Props
)
=>
{
const
{
classes
,
context
,
state
,
actions
}
=
props
const
{
context
,
state
,
actions
}
=
props
const
styles
=
useStyles
(
useTheme
())
return
(
<
div
className=
{
class
es
.
contentContainer
}
>
<
div
className=
{
class
es
.
content
}
>
<
div
style=
{
styl
es
.
contentContainer
}
>
<
div
style=
{
styl
es
.
content
}
>
<
Form
states=
{
context
.
states
}
cities=
{
context
.
cities
}
state=
{
state
}
actions=
{
actions
}
/>
</
div
>
</
div
>
)
}
export
default
connected
(
withStyles
(
styles
)(
Address
)
)
export
default
connected
(
Address
)
cli/web/cliente/src/views/ProposalData/pages/CustomerData/Address/Form/Form.tsx
View file @
e63508b1
...
...
@@ -5,14 +5,13 @@ import ImageUpload from '@agiliza/components/organisms/ImageUpload'
import
Address
,
{
AddressState
}
from
'@agiliza/components/templates/Address'
import
{
ActionType
}
from
'@agiliza/utils/hooks/state'
import
{
getBase64FromFile
}
from
'@agiliza/utils/method'
import
{
withStyles
,
WithStyles
}
from
'@material-ui/core/styles'
import
{
Box
}
from
'@mui/material'
import
{
useTheme
}
from
'@mui/material/styles'
import
{
CDAddressState
}
from
'../state'
import
s
tyles
from
'./styles'
import
useS
tyles
from
'./styles'
type
ExtendedProps
=
WithStyles
<
typeof
styles
>
interface
Props
extends
ExtendedProps
{
interface
Props
{
states
:
State
[]
cities
:
City
[]
state
:
CDAddressState
...
...
@@ -20,7 +19,8 @@ interface Props extends ExtendedProps {
}
const
Form
=
(
props
:
Props
)
=>
{
const
{
classes
,
state
,
actions
,
states
,
cities
}
=
props
const
{
state
,
actions
,
states
,
cities
}
=
props
const
styles
=
useStyles
(
useTheme
())
const
{
proof
}
=
state
...
...
@@ -37,11 +37,11 @@ const Form = (props: Props) => {
}
return
(
<
form
className=
{
class
es
.
form
}
>
<
Box
component=
"form"
sx=
{
styl
es
.
form
}
>
<
ImageUpload
label=
"Comprovante de residência"
image=
{
proof
}
onChangeImage=
{
handleChangeProof
}
/>
<
Address
state=
{
state
}
onChange=
{
handleChangeAddress
}
states=
{
states
}
cities=
{
cities
}
/>
</
form
>
</
Box
>
)
}
export
default
withStyles
(
styles
)(
Form
)
export
default
Form
cli/web/cliente/src/views/ProposalData/pages/CustomerData/Address/Form/styles.ts
View file @
e63508b1
import
{
Theme
}
from
'@material-ui/core/styles
'
import
{
createStyles
}
from
'@material-ui
/styles'
import
{
createSxStyles
}
from
'@agiliza/theme
'
import
{
Theme
}
from
'@mui/material
/styles'
import
sharedStyles
from
'../styles'
// eslint-disable-next-line
export
default
(
theme
:
Theme
)
=>
{
return
createStyles
({
return
createS
xS
tyles
({
...
sharedStyles
(
theme
),
switchCardPhotoContainer
:
{
flexDirection
:
'row'
,
alignItems
:
'center'
,
justifyContent
:
'space-evenly'
},
datePicker
:
{
marginBottom
:
'0px !important'
},
...
...
cli/web/cliente/src/views/ProposalData/pages/CustomerData/Address/styles.ts
View file @
e63508b1
import
{
Theme
}
from
'@material-ui/core/styles
'
import
{
createStyles
}
from
'@material-ui
/styles'
import
{
createSxStyles
}
from
'@agiliza/theme
'
import
{
Theme
}
from
'@mui/material
/styles'
import
sharedStyles
from
'../styles'
// eslint-disable-next-line
export
default
(
theme
:
Theme
)
=>
{
return
createStyles
({
return
createS
xS
tyles
({
...
sharedStyles
(
theme
),
})
}
cli/web/cliente/src/views/ProposalData/pages/CustomerData/CustomerData.tsx
View file @
e63508b1
import
React
from
'react'
import
{
withStyles
,
WithStyles
}
from
'@material-ui/core/styles'
import
styles
from
'./styles'
type
ExtendedProps
=
WithStyles
<
typeof
styles
>
interface
Props
extends
ExtendedProps
{
interface
Props
{
activeStep
:
number
}
const
CustomerData
=
(
props
:
Props
)
=>
{
const
{
classes
}
=
props
return
<
div
className=
{
classes
.
stepContentContainer
}
>
{}
</
div
>
return
<
div
/>
}
export
default
withStyles
(
styles
)(
CustomerData
)
export
default
CustomerData
cli/web/cliente/src/views/ProposalData/pages/CustomerData/Home/Form/Form.tsx
View file @
e63508b1
...
...
@@ -7,21 +7,20 @@ import { ActionType } from '@agiliza/utils/hooks/state'
import
{
extractNumbers
,
getBase64FromFile
}
from
'@agiliza/utils/method'
import
{
SelectField
,
SelectFieldProps
,
Switch
}
from
'@curio/components'
import
{
Box
,
Checkbox
,
CheckboxProps
,
FormControlLabel
,
FormGroup
,
TextField
,
TextFieldProps
}
from
'@m
aterial-ui/core
'
import
{
withStyles
,
WithStyles
}
from
'@material-ui/core
/styles'
}
from
'@m
ui/material
'
import
{
useTheme
}
from
'@mui/material
/styles'
import
{
CDHomeState
}
from
'../state'
import
s
tyles
from
'./styles'
import
useS
tyles
from
'./styles'
type
ExtendedProps
=
WithStyles
<
typeof
styles
>
interface
Props
extends
ExtendedProps
{
interface
Props
{
addressContext
:
AuthenticationContext
state
:
CDHomeState
actions
:
ActionType
<
CDHomeState
>
...
...
@@ -29,7 +28,9 @@ interface Props extends ExtendedProps {
}
const
Form
=
(
props
:
Props
)
=>
{
const
{
classes
,
addressContext
,
context
,
state
,
actions
}
=
props
const
{
addressContext
,
context
,
state
,
actions
}
=
props
const
styles
=
useStyles
(
useTheme
())
const
{
states
,
cities
}
=
addressContext
const
{
resideTime
,
cityResideTime
,
address
,
hasProperty
,
deed
,
type
,
deedRecord
,
reside
,
hasOnus
}
=
state
...
...
@@ -60,7 +61,7 @@ const Form = (props: Props) => {
}
return
(
<
form
className=
{
class
es
.
form
}
>
<
Box
component=
"form"
sx=
{
styl
es
.
form
}
>
<
Switch
label=
"Possui imóveis?"
value=
{
hasProperty
}
onChange=
{
(
vl
)
=>
actions
.
update
({
hasProperty
:
vl
})
}
required
/>
{
hasProperty
?
(
<>
...
...
@@ -83,7 +84,7 @@ const Form = (props: Props) => {
variant=
"outlined"
shrink=
{
false
}
/>
<
FormGroup
row
className=
{
class
es
.
formGroup
}
>
<
FormGroup
row
sx=
{
styl
es
.
formGroup
}
>
<
FormControlLabel
control=
{
<
Checkbox
name=
"reside"
checked=
{
reside
}
onChange=
{
handleChangeCheckbox
(
'reside'
)
}
/>
}
label=
"Reside no imóvel?"
...
...
@@ -110,8 +111,8 @@ const Form = (props: Props) => {
<
AddressTemplate
states=
{
states
}
cities=
{
cities
}
state=
{
address
}
onChange=
{
(
addrs
)
=>
actions
.
update
({
address
:
addrs
as
IPAddress
})
}
/>
</>
)
:
null
}
</
form
>
</
Box
>
)
}
export
default
withStyles
(
styles
)(
Form
)
export
default
Form
cli/web/cliente/src/views/ProposalData/pages/CustomerData/Home/Form/styles.ts
View file @
e63508b1
import
{
Theme
}
from
'@material-ui/core/styles
'
import
{
createStyles
}
from
'@material-ui
/styles'
import
{
createSxStyles
}
from
'@agiliza/theme
'
import
{
Theme
}
from
'@mui/material
/styles'
import
sharedStyles
from
'../styles'
// eslint-disable-next-line
export
default
(
theme
:
Theme
)
=>
{
return
createStyles
({
return
createS
xS
tyles
({
...
sharedStyles
(
theme
),
switchCardPhotoContainer
:
{
flexDirection
:
'row'
,
alignItems
:
'center'
,
justifyContent
:
'space-evenly'
},
formGroup
:
{
...
...
cli/web/cliente/src/views/ProposalData/pages/CustomerData/Home/Home.tsx
View file @
e63508b1
import
React
from
'react'
import
{
ActionType
}
from
'@agiliza/utils/hooks/state'
import
{
withStyles
,
WithStyles
}
from
'@material-ui/core
/styles'
import
{
useTheme
}
from
'@mui/material
/styles'
import
{
connected
,
ConnectedProps
}
from
'./connect'
import
Form
from
'./Form'
import
{
CDHomeState
}
from
'./state'
import
s
tyles
from
'./styles'
import
useS
tyles
from
'./styles'
type
ExtendedProps
=
WithStyles
<
typeof
styles
>
&
ConnectedProps
type
ExtendedProps
=
ConnectedProps
interface
Props
extends
ExtendedProps
{
state
:
CDHomeState
...
...
@@ -16,15 +16,16 @@ interface Props extends ExtendedProps {
}
const
Home
=
(
props
:
Props
)
=>
{
const
{
classes
,
context
,
addressContext
,
state
,
actions
}
=
props
const
{
context
,
addressContext
,
state
,
actions
}
=
props
const
styles
=
useStyles
(
useTheme
())
return
(
<
div
className=
{
class
es
.
contentContainer
}
>
<
div
className=
{
class
es
.
content
}
>
<
div
style=
{
styl
es
.
contentContainer
}
>
<
div
style=
{
styl
es
.
content
}
>
<
Form
state=
{
state
}
actions=
{
actions
}
addressContext=
{
addressContext
}
context=
{
context
}
/>
</
div
>
</
div
>
)
}
export
default
connected
(
withStyles
(
styles
)(
Home
)
)
export
default
connected
(
Home
)
cli/web/cliente/src/views/ProposalData/pages/CustomerData/Home/styles.ts
View file @
e63508b1
import
{
Theme
}
from
'@material-ui/core/styles
'
import
{
createStyles
}
from
'@material-ui
/styles'
import
{
createSxStyles
}
from
'@agiliza/theme
'
import
{
Theme
}
from
'@mui/material
/styles'
import
sharedStyles
from
'../styles'
// eslint-disable-next-line
export
default
(
theme
:
Theme
)
=>
{
return
createStyles
({
return
createS
xS
tyles
({
...
sharedStyles
(
theme
),
})
}
cli/web/cliente/src/views/ProposalData/pages/CustomerData/Identification/Form/Form.tsx
View file @
e63508b1
...
...
@@ -5,22 +5,21 @@ import AccountInputsPhoto from '@agiliza/components/templates/AccountInputsPhoto
import
{
ActionType
}
from
'@agiliza/utils/hooks/state'
import
CPFCNPJField
from
'@agiliza/views/ProposalData/components/atoms/CPFCNPJField'
import
{
SelectField
,
SelectFieldProps
}
from
'@curio/components'
import
{
FormControlLabel
,
Switch
,
TextField
,
TextFieldProps
}
from
'@material-ui/core
'
import
{
withStyles
,
WithStyles
}
from
'@material-ui/core
/styles'
import
{
Box
,
FormControlLabel
,
Switch
,
TextField
,
TextFieldProps
}
from
'@mui/material
'
import
{
useTheme
}
from
'@mui/material
/styles'
import
{
CDIdentificationState
}
from
'../state'
import
s
tyles
from
'./styles'
import
useS
tyles
from
'./styles'
type
ExtendedProps
=
WithStyles
<
typeof
styles
>
interface
Props
extends
ExtendedProps
{
interface
Props
{
state
:
CDIdentificationState
actions
:
ActionType
<
CDIdentificationState
>
context
:
ProposalDataContext
}
const
Form
=
(
props
:
Props
)
=>
{
const
{
classes
,
state
,
actions
,
context
}
=
props
const
{
state
,
actions
,
context
}
=
props
const
styles
=
useStyles
(
useTheme
())
const
{
cpfcnpj
,
dataType
,
name
,
gender
,
hasAccount
,
account
}
=
state
...
...
@@ -54,7 +53,7 @@ const Form = (props: Props) => {
const
handleChangeValidState
=
(
vldStt
:
boolean
)
=>
{}
return
(
<
form
className=
{
class
es
.
form
}
>
<
Box
component=
"form"
sx=
{
styl
es
.
form
}
>
<
SelectField
id=
"framework-select-field"
label=
"Enquadramento"
...
...
@@ -75,7 +74,7 @@ const Form = (props: Props) => {
variant=
"outlined"
shrink=
{
false
}
/>
<
div
className=
{
class
es
.
switchCardPhotoContainer
}
>
<
div
style=
{
styl
es
.
switchCardPhotoContainer
}
>
<
FormControlLabel
label=
"Possui conta na entidade?"
control=
{
...
...
@@ -96,8 +95,8 @@ const Form = (props: Props) => {
/>
)
:
null
}
</
div
>
</
form
>
</
Box
>
)
}
export
default
withStyles
(
styles
)(
Form
)
export
default
Form
cli/web/cliente/src/views/ProposalData/pages/CustomerData/Identification/Form/styles.ts
View file @
e63508b1
import
{
Theme
}
from
'@material-ui/core/styles
'
import
{
createStyles
}
from
'@material-ui
/styles'
import
{
createSxStyles
}
from
'@agiliza/theme
'
import
{
Theme
}
from
'@mui/material
/styles'
import
sharedStyles
from
'../styles'
// eslint-disable-next-line
export
default
(
theme
:
Theme
)
=>
{
return
createStyles
({
return
createS
xS
tyles
({
...
sharedStyles
(
theme
),
switchCardPhotoContainer
:
{
flexDirection
:
'row'
,
alignItems
:
'center'
,
justifyContent
:
'space-evenly'
},
})
...
...
cli/web/cliente/src/views/ProposalData/pages/CustomerData/Identification/Identification.tsx
View file @
e63508b1
import
React
from
'react'
import
{
ActionType
}
from
'@agiliza/utils/hooks/state'
import
{
withStyles
,
WithStyles
}
from
'@material-ui/core
/styles'
import
{
useTheme
}
from
'@mui/material
/styles'
import
{
connected
,
ConnectedProps
}
from
'./connect'
import
Form
from
'./Form'
import
{
CDIdentificationState
}
from
'./state'
import
s
tyles
from
'./styles'
import
useS
tyles
from
'./styles'
type
ExtendedProps
=
WithStyles
<
typeof
styles
>
&
ConnectedProps
type
ExtendedProps
=
ConnectedProps
interface
Props
extends
ExtendedProps
{
state
:
CDIdentificationState
...
...
@@ -16,16 +16,16 @@ interface Props extends ExtendedProps {
}
const
Identification
=
(
props
:
Props
)
=>
{
const
{
c
lasses
,
c
ontext
,
state
,
actions
}
=
props
const
{
context
,
state
,
actions
}
=
props
const
styles
=
useStyles
(
useTheme
())
return
(
<
div
className=
{
class
es
.
contentContainer
}
>
<
div
className=
{
class
es
.
content
}
>
<
div
style=
{
styl
es
.
contentContainer
}
>
<
div
style=
{
styl
es
.
content
}
>
<
Form
context=
{
context
}
state=
{
state
}
actions=
{
actions
}
/>
</
div
>
</
div
>
)
}
export
default
connected
(
withStyles
(
styles
)(
Identification
)
)
export
default
connected
(
Identification
)
cli/web/cliente/src/views/ProposalData/pages/CustomerData/Identification/styles.ts
View file @
e63508b1
import
{
Theme
}
from
'@material-ui/core/styles
'
import
{
createStyles
}
from
'@material-ui
/styles'
import
{
createSxStyles
}
from
'@agiliza/theme
'
import
{
Theme
}
from
'@mui/material
/styles'
import
sharedStyles
from
'../styles'
// eslint-disable-next-line
export
default
(
theme
:
Theme
)
=>
{
return
createStyles
({
return
createS
xS
tyles
({
...
sharedStyles
(
theme
),
})
}
cli/web/cliente/src/views/ProposalData/pages/CustomerData/PersonalData/Form/Form.tsx
View file @
e63508b1
...
...
@@ -6,22 +6,21 @@ import RGTemplate from '@agiliza/components/templates/RGTemplate'
import
{
ActionType
}
from
'@agiliza/utils/hooks/state'
import
{
maskLandline
}
from
'@agiliza/utils/masks'
import
{
DatePicker
,
SelectField
,
SelectFieldProps
,
Switch
}
from
'@curio/components'
import
{
TextField
,
TextFieldProps
}
from
'@material-ui/core
'
import
{
withStyles
,
WithStyles
}
from
'@material-ui/core
/styles'
import
{
Box
,
TextField
,
TextFieldProps
}
from
'@mui/material
'
import
{
useTheme
}
from
'@mui/material
/styles'
import
{
CDPersonalDataState
}
from
'../state'
import
s
tyles
from
'./styles'
import
useS
tyles
from
'./styles'
type
ExtendedProps
=
WithStyles
<
typeof
styles
>
interface
Props
extends
ExtendedProps
{
interface
Props
{
state
:
CDPersonalDataState
actions
:
ActionType
<
CDPersonalDataState
>
context
:
ProposalDataContext
}
const
Form
=
(
props
:
Props
)
=>
{
const
{
classes
,
state
,
actions
,
context
}
=
props
const
{
state
,
actions
,
context
}
=
props
const
styles
=
useStyles
(
useTheme
())
const
{
birthday
,
...
...
@@ -39,8 +38,8 @@ const Form = (props: Props) => {
landline
,
}
=
state
const
handleChangeDate
=
(
type
:
keyof
Pick
<
CDPersonalDataState
,
'birthday'
>
)
=>
(
date
:
Date
|
null
)
=>
{
actions
.
update
({
[
type
]:
date
})
const
handleChangeDate
=
(
type
:
keyof
Pick
<
CDPersonalDataState
,
'birthday'
>
)
=>
(
date
:
unknown
)
=>
{
actions
.
update
({
[
type
]:
date
as
Date
})
}
const
handleChangeText
=
...
...
@@ -60,15 +59,8 @@ const Form = (props: Props) => {
}
return
(
<
form
className=
{
classes
.
form
}
>
<
DatePicker
id=
"birthday"
label=
"Data de nascimento"
value=
{
birthday
}
onChange=
{
handleChangeDate
(
'birthday'
)
}
format=
"dd/MM/yyyy"
className=
{
classes
.
datePicker
}
/>
<
Box
component=
"form"
sx=
{
styles
.
form
}
>
<
DatePicker
id=
"birthday"
label=
"Data de nascimento"
value=
{
birthday
}
onChange=
{
handleChangeDate
(
'birthday'
)
}
sx=
{
styles
.
datePicker
}
/>
<
RGTemplate
rg=
{
rg
}
onChange=
{
handleChangeRG
}
/>
<
Switch
label=
"Usuário CRAS?"
required
value=
{
userCRAS
}
onChange=
{
(
value
)
=>
actions
.
update
({
userCRAS
:
value
})
}
/>
<
TextField
variant=
"outlined"
label=
"Nome da mãe"
value=
{
mothersName
}
onChange=
{
handleChangeText
(
'mothersName'
)
}
/>
...
...
@@ -103,8 +95,8 @@ const Form = (props: Props) => {
onChange=
{
handleChangeText
(
'landline'
)
}
inputProps=
{
{
maxLength
:
14
}
}
/>
</
form
>
</
Box
>
)
}
export
default
withStyles
(
styles
)(
Form
)
export
default
Form
cli/web/cliente/src/views/ProposalData/pages/CustomerData/PersonalData/Form/styles.ts
View file @
e63508b1
import
{
Theme
}
from
'@material-ui/core/styles
'
import
{
createStyles
}
from
'@material-ui
/styles'
import
{
createSxStyles
}
from
'@agiliza/theme
'
import
{
Theme
}
from
'@mui/material
/styles'
import
sharedStyles
from
'../styles'
// eslint-disable-next-line
export
default
(
theme
:
Theme
)
=>
{
return
createStyles
({
return
createS
xS
tyles
({
...
sharedStyles
(
theme
),
switchCardPhotoContainer
:
{
flexDirection
:
'row'
,
alignItems
:
'center'
,
justifyContent
:
'space-evenly'
},
...
...
cli/web/cliente/src/views/ProposalData/pages/CustomerData/PersonalData/PersonalData.tsx
View file @
e63508b1
import
React
from
'react'
import
{
ActionType
}
from
'@agiliza/utils/hooks/state'
import
{
withStyles
,
WithStyles
}
from
'@material-ui/core
/styles'
import
{
useTheme
}
from
'@mui/material
/styles'
import
{
connected
,
ConnectedProps
}
from
'./connect'
import
Form
from
'./Form'
import
{
CDPersonalDataState
}
from
'./state'
import
s
tyles
from
'./styles'
import
useS
tyles
from
'./styles'
type
ExtendedProps
=
WithStyles
<
typeof
styles
>
&
ConnectedProps
type
ExtendedProps
=
ConnectedProps
interface
Props
extends
ExtendedProps
{
state
:
CDPersonalDataState
...
...
@@ -16,15 +16,16 @@ interface Props extends ExtendedProps {
}
const
PersonalData
=
(
props
:
Props
)
=>
{
const
{
classes
,
context
,
state
,
actions
}
=
props
const
{
context
,
state
,
actions
}
=
props
const
styles
=
useStyles
(
useTheme
())
return
(
<
div
className=
{
class
es
.
contentContainer
}
>
<
div
className=
{
class
es
.
content
}
>
<
div
style=
{
styl
es
.
contentContainer
}
>
<
div
style=
{
styl
es
.
content
}
>
<
Form
context=
{
context
}
state=
{
state
}
actions=
{
actions
}
/>
</
div
>
</
div
>
)
}
export
default
connected
(
withStyles
(
styles
)(
PersonalData
)
)
export
default
connected
(
PersonalData
)
cli/web/cliente/src/views/ProposalData/pages/CustomerData/PersonalData/styles.ts
View file @
e63508b1
import
{
Theme
}
from
'@material-ui/core/styles
'
import
{
createStyles
}
from
'@material-ui
/styles'
import
{
createSxStyles
}
from
'@agiliza/theme
'
import
{
Theme
}
from
'@mui/material
/styles'
import
sharedStyles
from
'../styles'
// eslint-disable-next-line
export
default
(
theme
:
Theme
)
=>
{
return
createStyles
({
return
createS
xS
tyles
({
...
sharedStyles
(
theme
),
})
}
cli/web/cliente/src/views/ProposalData/pages/CustomerData/References/Dialog/Dialog.tsx
View file @
e63508b1
...
...
@@ -10,14 +10,14 @@ import {
DialogContent
,
DialogProps
,
DialogTitle
}
from
'@m
aterial-ui/core
'
import
{
withStyles
,
WithStyles
}
from
'@material-ui/core
/styles'
}
from
'@m
ui/material
'
import
{
useTheme
}
from
'@mui/material
/styles'
import
Form
from
'../Form'
import
{
CDReferenceState
,
initialState
}
from
'../state'
import
s
tyles
from
'./styles'
import
useS
tyles
from
'./styles'
type
ExtendedProps
=
Pick
<
DialogProps
,
'open'
>
&
WithStyles
<
typeof
styles
>
type
ExtendedProps
=
Pick
<
DialogProps
,
'open'
>
interface
Props
extends
ExtendedProps
{
state
:
CDReferenceState
...
...
@@ -30,7 +30,8 @@ interface Props extends ExtendedProps {
}
const
Dialog
=
(
props
:
Props
)
=>
{
const
{
classes
,
fetching
,
open
,
onClose
,
onSave
,
reference
,
context
,
state
,
actions
}
=
props
const
{
fetching
,
open
,
onClose
,
onSave
,
reference
,
context
,
state
,
actions
}
=
props
const
styles
=
useStyles
(
useTheme
())
useEffect
(()
=>
{
if
(
reference
)
actions
.
update
(
reference
)
...
...
@@ -42,7 +43,7 @@ const Dialog = (props: Props) => {
}
return
(
<
MUIDialog
onClose=
{
onClose
}
aria
-
labelledby=
"simple-dialog-title"
open=
{
open
}
PaperProps=
{
{
className
:
class
es
.
dialog
}
}
>
<
MUIDialog
onClose=
{
onClose
}
aria
-
labelledby=
"simple-dialog-title"
open=
{
open
}
PaperProps=
{
{
sx
:
styl
es
.
dialog
}
}
>
<
DialogTitle
>
{
reference
?
'Editar'
:
'Adicionar'
}
pessoa envolvida
</
DialogTitle
>
<
DialogContent
>
<
Form
state=
{
state
}
actions=
{
actions
}
context=
{
context
}
/>
...
...
@@ -57,4 +58,4 @@ const Dialog = (props: Props) => {
)
}
export
default
withStyles
(
styles
)(
Dialog
)
export
default
Dialog
cli/web/cliente/src/views/ProposalData/pages/CustomerData/References/Dialog/styles.ts
View file @
e63508b1
import
{
Theme
}
from
'@material-ui/core/styles
'
import
{
createStyles
}
from
'@material-ui
/styles'
import
{
createSxStyles
}
from
'@agiliza/theme
'
import
{
Theme
}
from
'@mui/material
/styles'
import
sharedStyles
from
'../styles'
// eslint-disable-next-line
export
default
(
theme
:
Theme
)
=>
{
return
createStyles
({
return
createS
xS
tyles
({
...
sharedStyles
(
theme
),
dialog
:
{
width
:
'80%'
,
height
:
'55%'
},
})
...
...
cli/web/cliente/src/views/ProposalData/pages/CustomerData/References/Form/Form.tsx
View file @
e63508b1
...
...
@@ -6,23 +6,21 @@ import PhoneField from '@agiliza/components/organisms/PhoneField'
import
{
ActionType
}
from
'@agiliza/utils/hooks/state'
import
{
getBase64FromFile
}
from
'@agiliza/utils/method'
import
{
SelectField
,
SelectFieldProps
}
from
'@curio/components'
import
{
TextField
,
TextFieldProps
}
from
'@material-ui/core
'
import
{
withStyles
,
WithStyles
}
from
'@material-ui/core
/styles'
import
{
Box
,
TextField
,
TextFieldProps
}
from
'@mui/material
'
import
{
useTheme
}
from
'@mui/material
/styles'
import
{
CDReferenceState
}
from
'../state'
import
s
tyles
from
'./styles'
import
useS
tyles
from
'./styles'
type
ExtendedProps
=
WithStyles
<
typeof
styles
>
interface
Props
extends
ExtendedProps
{
interface
Props
{
state
:
CDReferenceState
actions
:
ActionType
<
CDReferenceState
>
context
:
ProposalDataContext
}
const
Form
=
(
props
:
Props
)
=>
{
const
{
classes
,
state
,
actions
,
context
}
=
props
const
{
state
,
actions
,
context
}
=
props
const
styles
=
useStyles
(
useTheme
())
const
{
name
,
telephone
,
photo
,
type
,
extraInfo
,
concept
}
=
state
const
handleChangeText
=
...
...
@@ -46,7 +44,7 @@ const Form = (props: Props) => {
}
return
(
<
form
className=
{
class
es
.
form
}
>
<
Box
component=
"form"
sx=
{
styl
es
.
form
}
>
<
ImageUpload
label=
"Foto da referência"
image=
{
photo
}
onChangeImage=
{
handleChangePhoto
}
/>
<
SelectField
id=
"type-select"
...
...
@@ -62,8 +60,8 @@ const Form = (props: Props) => {
<
PhoneField
value=
{
telephone
}
onChange=
{
handleChangeText
(
'telephone'
)
}
/>
<
TextField
variant=
"outlined"
label=
"Outras informações"
value=
{
extraInfo
}
onChange=
{
handleChangeText
(
'extraInfo'
)
}
/>
<
TextField
variant=
"outlined"
label=
"Conceito"
value=
{
concept
}
onChange=
{
handleChangeText
(
'concept'
)
}
/>
</
form
>
</
Box
>
)
}
export
default
withStyles
(
styles
)(
Form
)
export
default
Form
cli/web/cliente/src/views/ProposalData/pages/CustomerData/References/Form/styles.ts
View file @
e63508b1
import
{
Theme
}
from
'@material-ui/core/styles
'
import
{
createStyles
}
from
'@material-ui
/styles'
import
{
createSxStyles
}
from
'@agiliza/theme
'
import
{
Theme
}
from
'@mui/material
/styles'
import
sharedStyles
from
'../styles'
// eslint-disable-next-line
export
default
(
theme
:
Theme
)
=>
{
return
createStyles
({
return
createS
xS
tyles
({
...
sharedStyles
(
theme
),
switchCardPhotoContainer
:
{
flexDirection
:
'row'
,
alignItems
:
'center'
,
justifyContent
:
'space-evenly'
},
...
...
cli/web/cliente/src/views/ProposalData/pages/CustomerData/References/References.tsx
View file @
e63508b1
...
...
@@ -2,16 +2,16 @@ import React, { useEffect, useState } from 'react'
import
{
Reference
}
from
'@agiliza/api/domain/proposalData/involvedPeople/reference'
import
{
ActionType
}
from
'@agiliza/utils/hooks/state'
import
{
A
vatar
,
List
,
ListItem
,
ListItemAvatar
,
ListItemText
}
from
'@material-ui/core
'
import
{
withStyles
,
WithStyles
}
from
'@material-ui/core/styles
'
import
{
Add
as
AddIcon
,
EmojiEmotions
as
EmojiEmotionsIcon
}
from
'@material-ui/icon
s'
import
{
A
dd
as
AddIcon
,
EmojiEmotions
as
EmojiEmotionsIcon
}
from
'@mui/icons-material
'
import
{
Avatar
,
List
,
ListItem
,
ListItemAvatar
,
ListItemText
}
from
'@mui/material
'
import
{
useTheme
}
from
'@mui/material/style
s'
import
{
connected
,
ConnectedProps
}
from
'./connect'
import
Dialog
from
'./Dialog'
import
{
CDReferenceState
}
from
'./state'
import
s
tyles
from
'./styles'
import
useS
tyles
from
'./styles'
type
ExtendedProps
=
WithStyles
<
typeof
styles
>
&
ConnectedProps
type
ExtendedProps
=
ConnectedProps
interface
Props
extends
ExtendedProps
{
state
:
CDReferenceState
...
...
@@ -21,9 +21,8 @@ interface Props extends ExtendedProps {
}
const
References
=
(
props
:
Props
)
=>
{
const
{
classes
,
fetching
,
context
,
state
,
actions
,
references
,
projectId
,
personId
}
=
props
console
.
log
(
personId
)
const
{
fetching
,
context
,
state
,
actions
,
references
,
projectId
,
personId
}
=
props
const
styles
=
useStyles
(
useTheme
())
const
[
selectedReference
,
setSelectedReference
]
=
useState
<
Reference
|
undefined
>
()
...
...
@@ -71,9 +70,9 @@ const References = (props: Props) => {
return
(
<>
<
div
className=
{
class
es
.
contentContainer
}
>
<
div
className=
{
class
es
.
content
}
>
<
List
className=
{
class
es
.
list
}
>
<
div
style=
{
styl
es
.
contentContainer
}
>
<
div
style=
{
styl
es
.
content
}
>
<
List
sx=
{
styl
es
.
list
}
>
{
references
.
map
((
reference
,
i
)
=>
(
<
ListItem
key=
{
i
}
button
onClick=
{
handleClickListItem
(
reference
)
}
>
<
ListItemAvatar
>
...
...
@@ -87,7 +86,7 @@ const References = (props: Props) => {
</
List
>
</
div
>
</
div
>
<
Avatar
className=
{
class
es
.
avatarBtnContainer
}
onClick=
{
handleClickAdd
}
>
<
Avatar
sx=
{
styl
es
.
avatarBtnContainer
}
onClick=
{
handleClickAdd
}
>
<
AddIcon
/>
</
Avatar
>
<
Dialog
...
...
@@ -104,4 +103,4 @@ const References = (props: Props) => {
)
}
export
default
connected
(
withStyles
(
styles
)(
References
)
)
export
default
connected
(
References
)
cli/web/cliente/src/views/ProposalData/pages/CustomerData/References/styles.ts
View file @
e63508b1
import
{
Theme
}
from
'@material-ui/core/styles
'
import
{
createStyles
}
from
'@material-ui
/styles'
import
{
createSxStyles
}
from
'@agiliza/theme
'
import
{
Theme
}
from
'@mui/material
/styles'
import
sharedStyles
from
'../styles'
// eslint-disable-next-line
export
default
(
theme
:
Theme
)
=>
{
return
createStyles
({
return
createS
xS
tyles
({
...
sharedStyles
(
theme
),
list
:
{
width
:
'100%'
},
avatarBtnContainer
:
{
...
...
cli/web/cliente/src/views/ProposalData/pages/CustomerData/SourceIncome/Form/Form.tsx
View file @
e63508b1
...
...
@@ -9,27 +9,26 @@ import { ActionType } from '@agiliza/utils/hooks/state'
import
{
getBase64FromFile
}
from
'@agiliza/utils/method'
import
CPFCNPJField
from
'@agiliza/views/ProposalData/components/atoms/CPFCNPJField'
import
{
DatePicker
}
from
'@curio/components'
import
{
TextField
,
TextFieldProps
}
from
'@material-ui/core
'
import
{
withStyles
,
WithStyles
}
from
'@material-ui/core
/styles'
import
{
Box
,
TextField
,
TextFieldProps
}
from
'@mui/material
'
import
{
useTheme
}
from
'@mui/material
/styles'
import
{
CustomerSourceIncomeState
}
from
'../state'
import
s
tyles
from
'./styles'
import
useS
tyles
from
'./styles'
type
ExtendedProps
=
WithStyles
<
typeof
styles
>
interface
Props
extends
ExtendedProps
{
interface
Props
{
state
:
CustomerSourceIncomeState
actions
:
ActionType
<
CustomerSourceIncomeState
>
context
:
AuthenticationContext
}
const
Form
=
(
props
:
Props
)
=>
{
const
{
classes
,
state
,
actions
,
context
}
=
props
const
{
state
,
actions
,
context
}
=
props
const
styles
=
useStyles
(
useTheme
())
const
{
cnpj
,
admissionDate
,
companyName
,
proofAddress
,
mobile
,
netIncome
,
address
}
=
state
const
handleChangeDate
=
(
type
:
keyof
Pick
<
CustomerSourceIncomeState
,
'admissionDate'
>
)
=>
(
date
:
Date
|
null
)
=>
{
actions
.
update
({
[
type
]:
date
})
const
handleChangeDate
=
(
type
:
keyof
Pick
<
CustomerSourceIncomeState
,
'admissionDate'
>
)
=>
(
date
:
unknown
)
=>
{
actions
.
update
({
[
type
]:
date
as
Date
})
}
const
handleChangeText
=
...
...
@@ -51,7 +50,7 @@ const Form = (props: Props) => {
}
return
(
<
form
className=
{
class
es
.
form
}
>
<
Box
component=
"form"
sx=
{
styl
es
.
form
}
>
<
TextField
variant=
"outlined"
label=
"Razão social"
value=
{
companyName
}
onChange=
{
handleChangeText
(
'companyName'
)
}
/>
<
CPFCNPJField
value=
{
cnpj
}
onChange=
{
handleChangeText
(
'cnpj'
)
}
onlyCPNJ
/>
<
DatePicker
...
...
@@ -59,15 +58,14 @@ const Form = (props: Props) => {
label=
"Data de admissão"
value=
{
admissionDate
}
onChange=
{
handleChangeDate
(
'admissionDate'
)
}
format=
"dd/MM/yyyy"
className=
{
classes
.
datePicker
}
sx=
{
styles
.
datePicker
}
/>
<
ImageUpload
label=
"Comprovante"
image=
{
proofAddress
}
onChangeImage=
{
handleChangeProof
}
/>
<
PhoneField
value=
{
mobile
}
onChange=
{
handleChangeText
(
'mobile'
)
}
/>
<
TextField
variant=
"outlined"
label=
"Renda líquida"
value=
{
formatCurrency
(
netIncome
)
}
onChange=
{
handleChangeText
(
'netIncome'
)
}
/>
<
Address
state=
{
address
}
onChange=
{
handleChangeAddress
}
states=
{
context
.
states
}
cities=
{
context
.
cities
}
/>
</
form
>
</
Box
>
)
}
export
default
withStyles
(
styles
)(
Form
)
export
default
Form
cli/web/cliente/src/views/ProposalData/pages/CustomerData/SourceIncome/Form/styles.ts
View file @
e63508b1
import
{
Theme
}
from
'@material-ui/core/styles
'
import
{
createStyles
}
from
'@material-ui
/styles'
import
{
createSxStyles
}
from
'@agiliza/theme
'
import
{
Theme
}
from
'@mui/material
/styles'
import
sharedStyles
from
'../styles'
// eslint-disable-next-line
export
default
(
theme
:
Theme
)
=>
{
return
createStyles
({
return
createS
xS
tyles
({
...
sharedStyles
(
theme
),
switchCardPhotoContainer
:
{
flexDirection
:
'row'
,
alignItems
:
'center'
,
justifyContent
:
'space-evenly'
},
...
...
cli/web/cliente/src/views/ProposalData/pages/CustomerData/SourceIncome/SourceIncome.tsx
View file @
e63508b1
import
React
from
'react'
import
{
ActionType
}
from
'@agiliza/utils/hooks/state'
import
{
withStyles
,
WithStyles
}
from
'@material-ui/core
/styles'
import
{
useTheme
}
from
'@mui/material
/styles'
import
{
connected
,
ConnectedProps
}
from
'./connect'
import
Form
from
'./Form'
import
{
CustomerSourceIncomeState
}
from
'./state'
import
s
tyles
from
'./styles'
import
useS
tyles
from
'./styles'
type
ExtendedProps
=
WithStyles
<
typeof
styles
>
&
ConnectedProps
type
ExtendedProps
=
ConnectedProps
interface
Props
extends
ExtendedProps
{
state
:
CustomerSourceIncomeState
...
...
@@ -16,15 +16,16 @@ interface Props extends ExtendedProps {
}
const
SourceIncome
=
(
props
:
Props
)
=>
{
const
{
classes
,
context
,
state
,
actions
}
=
props
const
{
context
,
state
,
actions
}
=
props
const
styles
=
useStyles
(
useTheme
())
return
(
<
div
className=
{
class
es
.
contentContainer
}
>
<
div
className=
{
class
es
.
content
}
>
<
div
style=
{
styl
es
.
contentContainer
}
>
<
div
style=
{
styl
es
.
content
}
>
<
Form
state=
{
state
}
actions=
{
actions
}
context=
{
context
}
/>
</
div
>
</
div
>
)
}
export
default
connected
(
withStyles
(
styles
)(
SourceIncome
)
)
export
default
connected
(
SourceIncome
)
cli/web/cliente/src/views/ProposalData/pages/CustomerData/SourceIncome/styles.ts
View file @
e63508b1
import
{
Theme
}
from
'@material-ui/core/styles
'
import
{
createStyles
}
from
'@material-ui
/styles'
import
{
createSxStyles
}
from
'@agiliza/theme
'
import
{
Theme
}
from
'@mui/material
/styles'
import
sharedStyles
from
'../styles'
// eslint-disable-next-line
export
default
(
theme
:
Theme
)
=>
{
return
createStyles
({
return
createS
xS
tyles
({
...
sharedStyles
(
theme
),
})
}
cli/web/cliente/src/views/ProposalData/pages/CustomerData/SpouseAdditionalData/Form/Form.tsx
View file @
e63508b1
...
...
@@ -9,21 +9,20 @@ import { maskLandline } from '@agiliza/utils/masks'
import
{
getBase64FromFile
}
from
'@agiliza/utils/method'
import
CPFCNPJField
from
'@agiliza/views/ProposalData/components/atoms/CPFCNPJField'
import
{
DatePicker
}
from
'@curio/components'
import
{
TextField
,
TextFieldProps
,
Typography
}
from
'@material-ui/core
'
import
{
withStyles
,
WithStyles
}
from
'@material-ui/core
/styles'
import
{
Box
,
TextField
,
TextFieldProps
,
Typography
}
from
'@mui/material
'
import
{
useTheme
}
from
'@mui/material
/styles'
import
{
CDSpousePersonalDataState
}
from
'../../SpouseData/state'
import
s
tyles
from
'./styles'
import
useS
tyles
from
'./styles'
type
ExtendedProps
=
WithStyles
<
typeof
styles
>
interface
Props
extends
ExtendedProps
{
interface
Props
{
state
:
CDSpousePersonalDataState
actions
:
ActionType
<
CDSpousePersonalDataState
>
}
const
Form
=
(
props
:
Props
)
=>
{
const
{
classes
,
state
,
actions
}
=
props
const
{
state
,
actions
}
=
props
const
styles
=
useStyles
(
useTheme
())
const
{
mobile
,
landline
,
primaryEmail
,
secundaryEmail
,
workplace
}
=
state
...
...
@@ -47,17 +46,17 @@ const Form = (props: Props) => {
actions
.
update
({
workplace
:
{
[
key
]:
evt
.
target
.
value
}
})
}
const
handleChangeDate
=
(
key
:
keyof
Pick
<
Workplace
,
'admissionDate'
>
)
=>
(
date
:
Date
|
null
)
=>
{
actions
.
update
({
workplace
:
{
[
key
]:
date
}
})
const
handleChangeDate
=
(
key
:
keyof
Pick
<
Workplace
,
'admissionDate'
>
)
=>
(
date
:
unknown
)
=>
{
actions
.
update
({
workplace
:
{
[
key
]:
date
as
Date
}
})
}
return
(
<
form
className=
{
class
es
.
form
}
>
<
Box
component=
"form"
sx=
{
styl
es
.
form
}
>
<
PhoneField
label=
"Telefone celular"
value=
{
mobile
}
onChange=
{
handleChangeText
(
'mobile'
)
}
/>
<
TextField
variant=
"outlined"
label=
"Telefone fixo"
value=
{
maskLandline
(
landline
)
}
onChange=
{
handleChangeText
(
'landline'
)
}
/>
<
TextField
variant=
"outlined"
label=
"Email primário"
value=
{
primaryEmail
}
onChange=
{
handleChangeText
(
'primaryEmail'
)
}
/>
<
TextField
variant=
"outlined"
label=
"Email secundário"
value=
{
secundaryEmail
}
onChange=
{
handleChangeText
(
'secundaryEmail'
)
}
/>
<
Typography
className=
{
class
es
.
workplaceTitle
}
variant=
"h6"
>
<
Typography
sx=
{
styl
es
.
workplaceTitle
}
variant=
"h6"
>
Local de trabalho
</
Typography
>
<
TextField
variant=
"outlined"
label=
"Razão social"
value=
{
workplace
?.
workplaceName
||
''
}
onChange=
{
handleChangeWorkplace
(
'workplaceName'
)
}
/>
...
...
@@ -68,8 +67,7 @@ const Form = (props: Props) => {
label=
"Data de admissão"
value=
{
workplace
?.
admissionDate
}
onChange=
{
handleChangeDate
(
'admissionDate'
)
}
format=
"dd/MM/yyyy"
className=
{
classes
.
datePicker
}
sx=
{
styles
.
datePicker
}
/>
<
PhoneField
value=
{
workplace
?.
phone
}
onChange=
{
handleChangeWorkplace
(
'phone'
)
}
/>
<
TextField
...
...
@@ -79,8 +77,8 @@ const Form = (props: Props) => {
onChange=
{
handleChangeWorkplace
(
'netIncome'
)
}
/>
<
TextField
variant=
"outlined"
label=
"Cargo ou função"
value=
{
workplace
?.
role
}
onChange=
{
handleChangeWorkplace
(
'role'
)
}
/>
</
form
>
</
Box
>
)
}
export
default
withStyles
(
styles
)(
Form
)
export
default
Form
cli/web/cliente/src/views/ProposalData/pages/CustomerData/SpouseAdditionalData/Form/styles.ts
View file @
e63508b1
import
{
Theme
}
from
'@material-ui/core/styles
'
import
{
createStyles
}
from
'@material-ui
/styles'
import
{
createSxStyles
}
from
'@agiliza/theme
'
import
{
Theme
}
from
'@mui/material
/styles'
import
sharedStyles
from
'../styles'
// eslint-disable-next-line
export
default
(
theme
:
Theme
)
=>
{
return
createStyles
({
return
createS
xS
tyles
({
...
sharedStyles
(
theme
),
switchCardPhotoContainer
:
{
flexDirection
:
'row'
,
alignItems
:
'center'
,
justifyContent
:
'space-evenly'
},
...
...
cli/web/cliente/src/views/ProposalData/pages/CustomerData/SpouseAdditionalData/SpouseAdditionalData.tsx
View file @
e63508b1
import
React
from
'react'
import
{
ActionType
}
from
'@agiliza/utils/hooks/state'
import
{
withStyles
,
WithStyles
}
from
'@material-ui/core
/styles'
import
{
useTheme
}
from
'@mui/material
/styles'
import
{
CDSpousePersonalDataState
}
from
'../SpouseData/state'
import
Form
from
'./Form'
import
s
tyles
from
'./styles'
import
useS
tyles
from
'./styles'
type
ExtendedProps
=
WithStyles
<
typeof
styles
>
interface
Props
extends
ExtendedProps
{
interface
Props
{
state
:
CDSpousePersonalDataState
actions
:
ActionType
<
CDSpousePersonalDataState
>
}
const
SpouseAdditionalData
=
(
props
:
Props
)
=>
{
const
{
classes
,
state
,
actions
}
=
props
const
{
state
,
actions
}
=
props
const
styles
=
useStyles
(
useTheme
())
return
(
<
div
className=
{
class
es
.
contentContainer
}
>
<
div
className=
{
class
es
.
content
}
>
<
div
style=
{
styl
es
.
contentContainer
}
>
<
div
style=
{
styl
es
.
content
}
>
<
Form
state=
{
state
}
actions=
{
actions
}
/>
</
div
>
</
div
>
)
}
export
default
withStyles
(
styles
)(
SpouseAdditionalData
)
export
default
SpouseAdditionalData
cli/web/cliente/src/views/ProposalData/pages/CustomerData/SpouseAdditionalData/styles.ts
View file @
e63508b1
import
{
Theme
}
from
'@material-ui/core/styles
'
import
{
createStyles
}
from
'@material-ui
/styles'
import
{
createSxStyles
}
from
'@agiliza/theme
'
import
{
Theme
}
from
'@mui/material
/styles'
import
sharedStyles
from
'../styles'
// eslint-disable-next-line
export
default
(
theme
:
Theme
)
=>
{
return
createStyles
({
return
createS
xS
tyles
({
...
sharedStyles
(
theme
),
})
}
cli/web/cliente/src/views/ProposalData/pages/CustomerData/SpouseData/Form/Form.tsx
View file @
e63508b1
...
...
@@ -7,22 +7,21 @@ import { ActionType } from '@agiliza/utils/hooks/state'
import
{
extractNumbers
,
getBase64FromFile
}
from
'@agiliza/utils/method'
import
CPFCNPJField
from
'@agiliza/views/ProposalData/components/atoms/CPFCNPJField'
import
{
DatePicker
,
SelectField
,
SelectFieldProps
,
Switch
}
from
'@curio/components'
import
{
TextField
,
TextFieldProps
}
from
'@material-ui/core
'
import
{
withStyles
,
WithStyles
}
from
'@material-ui/core
/styles'
import
{
Box
,
TextField
,
TextFieldProps
}
from
'@mui/material
'
import
{
useTheme
}
from
'@mui/material
/styles'
import
{
CDSpousePersonalDataState
}
from
'../state'
import
s
tyles
from
'./styles'
import
useS
tyles
from
'./styles'
type
ExtendedProps
=
WithStyles
<
typeof
styles
>
interface
Props
extends
ExtendedProps
{
interface
Props
{
state
:
CDSpousePersonalDataState
actions
:
ActionType
<
CDSpousePersonalDataState
>
context
:
ProposalDataContext
}
const
Form
=
(
props
:
Props
)
=>
{
const
{
classes
,
state
,
actions
,
context
}
=
props
const
{
state
,
actions
,
context
}
=
props
const
styles
=
useStyles
(
useTheme
())
const
{
cpf
,
...
...
@@ -40,8 +39,8 @@ const Form = (props: Props) => {
dependents
,
}
=
state
const
handleChangeDate
=
(
type
:
keyof
Pick
<
CDSpousePersonalDataState
,
'birthday'
>
)
=>
(
date
:
Date
|
null
)
=>
{
actions
.
update
({
[
type
]:
date
})
const
handleChangeDate
=
(
type
:
keyof
Pick
<
CDSpousePersonalDataState
,
'birthday'
>
)
=>
(
date
:
unknown
)
=>
{
actions
.
update
({
[
type
]:
date
as
Date
})
}
const
handleChangeText
=
...
...
@@ -69,19 +68,12 @@ const Form = (props: Props) => {
}
return
(
<
form
className=
{
class
es
.
form
}
>
<
Box
component=
"form"
sx=
{
styl
es
.
form
}
>
<
CPFCNPJField
value=
{
cpf
}
onChange=
{
handleChangeText
(
'cpf'
)
}
onlyCPF
/>
<
ImageUpload
label=
"Certidão de casamento"
image=
{
marriageCertificate
}
onChangeImage=
{
handleChangeProof
}
/>
<
TextField
variant=
"outlined"
label=
"Nome"
value=
{
name
}
onChange=
{
handleChangeText
(
'name'
)
}
/>
<
RGTemplate
rg=
{
rg
}
onChange=
{
handleChangeRG
}
/>
<
DatePicker
id=
"admission-date"
label=
"Data de nascimento"
value=
{
birthday
}
onChange=
{
handleChangeDate
(
'birthday'
)
}
format=
"dd/MM/yyyy"
className=
{
classes
.
datePicker
}
/>
<
DatePicker
id=
"admission-date"
label=
"Data de nascimento"
value=
{
birthday
}
onChange=
{
handleChangeDate
(
'birthday'
)
}
sx=
{
styles
.
datePicker
}
/>
<
Switch
label=
"Usuário CRAS?"
required
value=
{
userCRAS
}
onChange=
{
(
value
)
=>
actions
.
update
({
userCRAS
:
value
})
}
/>
<
TextField
variant=
"outlined"
label=
"Nome mãe"
value=
{
mothersName
}
onChange=
{
handleChangeText
(
'mothersName'
)
}
/>
<
TextField
variant=
"outlined"
label=
"Nome pai"
value=
{
fathersName
}
onChange=
{
handleChangeText
(
'fathersName'
)
}
/>
...
...
@@ -111,8 +103,8 @@ const Form = (props: Props) => {
onChange=
{
handleChangeText
(
'participationPercentage'
)
}
/>
<
TextField
variant=
"outlined"
label=
"Dependentes"
value=
{
extractNumbers
(
dependents
)
}
onChange=
{
handleChangeText
(
'dependents'
)
}
/>
</
form
>
</
Box
>
)
}
export
default
withStyles
(
styles
)(
Form
)
export
default
Form
cli/web/cliente/src/views/ProposalData/pages/CustomerData/SpouseData/Form/styles.ts
View file @
e63508b1
import
{
Theme
}
from
'@material-ui/core/styles
'
import
{
createStyles
}
from
'@material-ui
/styles'
import
{
createSxStyles
}
from
'@agiliza/theme
'
import
{
Theme
}
from
'@mui/material
/styles'
import
sharedStyles
from
'../styles'
// eslint-disable-next-line
export
default
(
theme
:
Theme
)
=>
{
return
createStyles
({
return
createS
xS
tyles
({
...
sharedStyles
(
theme
),
switchCardPhotoContainer
:
{
flexDirection
:
'row'
,
alignItems
:
'center'
,
justifyContent
:
'space-evenly'
},
...
...
cli/web/cliente/src/views/ProposalData/pages/CustomerData/SpouseData/SpouseData.tsx
View file @
e63508b1
import
React
from
'react'
import
{
ActionType
}
from
'@agiliza/utils/hooks/state'
import
{
withStyles
,
WithStyles
}
from
'@material-ui/core
/styles'
import
{
useTheme
}
from
'@mui/material
/styles'
import
{
connected
,
ConnectedProps
}
from
'./connect'
import
Form
from
'./Form'
import
{
CDSpousePersonalDataState
}
from
'./state'
import
s
tyles
from
'./styles'
import
useS
tyles
from
'./styles'
type
ExtendedProps
=
WithStyles
<
typeof
styles
>
&
ConnectedProps
type
ExtendedProps
=
ConnectedProps
interface
Props
extends
ExtendedProps
{
state
:
CDSpousePersonalDataState
...
...
@@ -16,15 +16,16 @@ interface Props extends ExtendedProps {
}
const
SpouseData
=
(
props
:
Props
)
=>
{
const
{
classes
,
context
,
state
,
actions
}
=
props
const
{
context
,
state
,
actions
}
=
props
const
styles
=
useStyles
(
useTheme
())
return
(
<
div
className=
{
class
es
.
contentContainer
}
>
<
div
className=
{
class
es
.
content
}
>
<
div
style=
{
styl
es
.
contentContainer
}
>
<
div
style=
{
styl
es
.
content
}
>
<
Form
state=
{
state
}
actions=
{
actions
}
context=
{
context
}
/>
</
div
>
</
div
>
)
}
export
default
connected
(
withStyles
(
styles
)(
SpouseData
)
)
export
default
connected
(
SpouseData
)
cli/web/cliente/src/views/ProposalData/pages/CustomerData/SpouseData/styles.ts
View file @
e63508b1
import
{
Theme
}
from
'@material-ui/core/styles
'
import
{
createStyles
}
from
'@material-ui
/styles'
import
{
createSxStyles
}
from
'@agiliza/theme
'
import
{
Theme
}
from
'@mui/material
/styles'
import
sharedStyles
from
'../styles'
// eslint-disable-next-line
export
default
(
theme
:
Theme
)
=>
{
return
createStyles
({
return
createS
xS
tyles
({
...
sharedStyles
(
theme
),
})
}
cli/web/cliente/src/views/ProposalData/pages/CustomerData/Vehicles/Dialog/Dialog.tsx
View file @
e63508b1
...
...
@@ -10,14 +10,14 @@ import {
DialogContent
,
DialogProps
,
DialogTitle
}
from
'@m
aterial-ui/core
'
import
{
withStyles
,
WithStyles
}
from
'@material-ui/core
/styles'
}
from
'@m
ui/material
'
import
{
useTheme
}
from
'@mui/material
/styles'
import
Form
from
'../Form'
import
{
initialState
}
from
'../state'
import
s
tyles
from
'./styles'
import
useS
tyles
from
'./styles'
type
ExtendedProps
=
Pick
<
DialogProps
,
'open'
>
&
WithStyles
<
typeof
styles
>
type
ExtendedProps
=
Pick
<
DialogProps
,
'open'
>
interface
Props
extends
ExtendedProps
{
onClose
:
()
=>
void
...
...
@@ -27,7 +27,8 @@ interface Props extends ExtendedProps {
}
const
Dialog
=
(
props
:
Props
)
=>
{
const
{
classes
,
fetching
,
open
,
onClose
,
onSave
,
vehicle
}
=
props
const
{
fetching
,
open
,
onClose
,
onSave
,
vehicle
}
=
props
const
styles
=
useStyles
(
useTheme
())
const
formState
=
useFormState
(
'VehicleForm'
,
initialState
)
...
...
@@ -43,7 +44,7 @@ const Dialog = (props: Props) => {
}
return
(
<
MUIDialog
onClose=
{
onClose
}
aria
-
labelledby=
"simple-dialog-title"
open=
{
open
}
PaperProps=
{
{
className
:
class
es
.
dialog
}
}
>
<
MUIDialog
onClose=
{
onClose
}
aria
-
labelledby=
"simple-dialog-title"
open=
{
open
}
PaperProps=
{
{
sx
:
styl
es
.
dialog
}
}
>
<
DialogTitle
>
{
vehicle
?
'Editar'
:
'Adicionar'
}
pessoa envolvida
</
DialogTitle
>
<
DialogContent
>
<
Form
{
...
formState
}
/>
...
...
@@ -58,4 +59,4 @@ const Dialog = (props: Props) => {
)
}
export
default
withStyles
(
styles
)(
Dialog
)
export
default
Dialog
cli/web/cliente/src/views/ProposalData/pages/CustomerData/Vehicles/Dialog/styles.ts
View file @
e63508b1
import
{
Theme
}
from
'@material-ui/core/styles
'
import
{
createStyles
}
from
'@material-ui
/styles'
import
{
createSxStyles
}
from
'@agiliza/theme
'
import
{
Theme
}
from
'@mui/material
/styles'
import
sharedStyles
from
'../styles'
// eslint-disable-next-line
export
default
(
theme
:
Theme
)
=>
{
return
createStyles
({
return
createS
xS
tyles
({
...
sharedStyles
(
theme
),
dialog
:
{
width
:
'80%'
,
height
:
'55%'
},
})
...
...
cli/web/cliente/src/views/ProposalData/pages/CustomerData/Vehicles/Form/Form.tsx
View file @
e63508b1
...
...
@@ -6,27 +6,27 @@ import { ActionType } from '@agiliza/utils/hooks/state'
import
{
maskLicensePlate
}
from
'@agiliza/utils/masks'
import
{
getBase64FromFile
}
from
'@agiliza/utils/method'
import
{
Box
,
Checkbox
,
CheckboxProps
,
FormControlLabel
,
FormGroup
,
TextField
,
TextFieldProps
}
from
'@m
aterial-ui/core
'
import
{
withStyles
,
WithStyles
}
from
'@material-ui/core
/styles'
}
from
'@m
ui/material
'
import
{
useTheme
}
from
'@mui/material
/styles'
import
{
CDVehicleState
}
from
'../state'
import
s
tyles
from
'./styles'
import
useS
tyles
from
'./styles'
type
ExtendedProps
=
WithStyles
<
typeof
styles
>
interface
Props
extends
ExtendedProps
{
interface
Props
{
state
:
CDVehicleState
actions
:
ActionType
<
CDVehicleState
>
}
const
Form
=
(
props
:
Props
)
=>
{
const
{
classes
,
state
,
actions
}
=
props
const
{
state
,
actions
}
=
props
const
styles
=
useStyles
(
useTheme
())
const
{
document
,
brand
,
licensePlate
,
model
,
year
,
marketValue
,
hasOnus
,
hasInsurance
}
=
state
...
...
@@ -51,7 +51,7 @@ const Form = (props: Props) => {
}
return
(
<
form
className=
{
class
es
.
form
}
>
<
Box
component=
"form"
sx=
{
styl
es
.
form
}
>
<
ImageUpload
label=
"Documento do veículo"
image=
{
document
}
onChangeImage=
{
handleChangeImage
}
/>
<
TextField
variant=
"outlined"
label=
"Modelo"
value=
{
model
}
onChange=
{
handleChangeText
(
'model'
)
}
/>
<
TextField
variant=
"outlined"
label=
"Marca"
value=
{
brand
}
onChange=
{
handleChangeText
(
'brand'
)
}
/>
...
...
@@ -64,15 +64,15 @@ const Form = (props: Props) => {
/>
<
TextField
variant=
"outlined"
label=
"Ano"
value=
{
year
}
onChange=
{
handleChangeText
(
'year'
)
}
/>
<
TextField
variant=
"outlined"
label=
"Valor de mercado"
value=
{
formatCurrency
(
marketValue
)
}
onChange=
{
handleChangeText
(
'marketValue'
)
}
/>
<
FormGroup
row
className=
{
class
es
.
formGroup
}
>
<
FormGroup
row
sx=
{
styl
es
.
formGroup
}
>
<
FormControlLabel
label=
"Possui ônus?"
control=
{
<
Checkbox
name=
"reside"
checked=
{
hasOnus
}
onChange=
{
handleChangeCheckbox
(
'hasOnus'
)
}
/>
}
/>
<
FormControlLabel
label=
"Possui seguro?"
control=
{
<
Checkbox
name=
"reside"
checked=
{
hasInsurance
}
onChange=
{
handleChangeCheckbox
(
'hasInsurance'
)
}
/>
}
/>
</
FormGroup
>
</
form
>
</
Box
>
)
}
export
default
withStyles
(
styles
)(
Form
)
export
default
Form
cli/web/cliente/src/views/ProposalData/pages/CustomerData/Vehicles/Form/styles.ts
View file @
e63508b1
import
{
Theme
}
from
'@material-ui/core/styles
'
import
{
createStyles
}
from
'@material-ui
/styles'
import
{
createSxStyles
}
from
'@agiliza/theme
'
import
{
Theme
}
from
'@mui/material
/styles'
import
sharedStyles
from
'../styles'
// eslint-disable-next-line
export
default
(
theme
:
Theme
)
=>
{
return
createStyles
({
return
createS
xS
tyles
({
...
sharedStyles
(
theme
),
switchCardPhotoContainer
:
{
flexDirection
:
'row'
,
alignItems
:
'center'
,
justifyContent
:
'space-evenly'
},
datePicker
:
{
marginBottom
:
'0px !important'
},
...
...
cli/web/cliente/src/views/ProposalData/pages/CustomerData/Vehicles/Vehicles.tsx
View file @
e63508b1
...
...
@@ -2,16 +2,16 @@ import React, { useState } from 'react'
import
{
Vehicle
}
from
'@agiliza/api/domain'
import
{
ActionType
}
from
'@agiliza/utils/hooks/state'
import
{
A
vatar
,
List
,
ListItem
,
ListItemAvatar
,
ListItemText
}
from
'@material-ui/core
'
import
{
withStyles
,
WithStyles
}
from
'@material-ui/core/styles
'
import
{
Add
as
AddIcon
,
DriveEta
as
DriveEtaIcon
}
from
'@material-ui/icon
s'
import
{
A
dd
as
AddIcon
,
DriveEta
as
DriveEtaIcon
}
from
'@mui/icons-material
'
import
{
Avatar
,
List
,
ListItem
,
ListItemAvatar
,
ListItemText
}
from
'@mui/material
'
import
{
useTheme
}
from
'@mui/material/style
s'
import
{
connected
,
ConnectedProps
}
from
'./conect'
import
Dialog
from
'./Dialog'
import
{
CDVehicleState
}
from
'./state'
import
s
tyles
from
'./styles'
import
useS
tyles
from
'./styles'
type
ExtendedProps
=
WithStyles
<
typeof
styles
>
&
ConnectedProps
type
ExtendedProps
=
ConnectedProps
interface
Props
extends
ExtendedProps
{
projectId
:
string
...
...
@@ -21,7 +21,8 @@ interface Props extends ExtendedProps {
}
const
Vehicles
=
(
props
:
Props
)
=>
{
const
{
classes
,
fetching
,
projectId
,
personId
,
vehicles
}
=
props
const
{
fetching
,
projectId
,
personId
,
vehicles
}
=
props
const
styles
=
useStyles
(
useTheme
())
const
[
selectedVehicle
,
setSelectedVehicle
]
=
useState
<
Vehicle
|
undefined
>
()
...
...
@@ -66,9 +67,9 @@ const Vehicles = (props: Props) => {
return
(
<>
<
div
className=
{
class
es
.
contentContainer
}
>
<
div
className=
{
class
es
.
content
}
>
<
List
className=
{
class
es
.
list
}
>
<
div
style=
{
styl
es
.
contentContainer
}
>
<
div
style=
{
styl
es
.
content
}
>
<
List
sx=
{
styl
es
.
list
}
>
{
vehicles
.
map
((
vehicle
,
i
)
=>
(
<
ListItem
key=
{
i
}
button
onClick=
{
handleClickListItem
(
vehicle
)
}
>
<
ListItemAvatar
>
...
...
@@ -82,7 +83,7 @@ const Vehicles = (props: Props) => {
</
List
>
</
div
>
</
div
>
<
Avatar
className=
{
class
es
.
avatarBtnContainer
}
onClick=
{
handleClickAdd
}
>
<
Avatar
sx=
{
styl
es
.
avatarBtnContainer
}
onClick=
{
handleClickAdd
}
>
<
AddIcon
/>
</
Avatar
>
<
Dialog
fetching=
{
fetching
}
open=
{
open
}
onClose=
{
handleClickClose
}
vehicle=
{
selectedVehicle
}
onSave=
{
handleSave
}
/>
...
...
@@ -90,4 +91,4 @@ const Vehicles = (props: Props) => {
)
}
export
default
connected
(
withStyles
(
styles
)(
Vehicles
)
)
export
default
connected
(
Vehicles
)
cli/web/cliente/src/views/ProposalData/pages/CustomerData/Vehicles/styles.ts
View file @
e63508b1
import
{
Theme
}
from
'@material-ui/core/styles
'
import
{
createStyles
}
from
'@material-ui
/styles'
import
{
createSxStyles
}
from
'@agiliza/theme
'
import
{
Theme
}
from
'@mui/material
/styles'
import
sharedStyles
from
'../styles'
// eslint-disable-next-line
export
default
(
theme
:
Theme
)
=>
{
return
createStyles
({
return
createS
xS
tyles
({
...
sharedStyles
(
theme
),
list
:
{
width
:
'100%'
},
avatarBtnContainer
:
{
...
...
cli/web/cliente/src/views/ProposalData/pages/CustomerData/styles.ts
View file @
e63508b1
import
{
Theme
}
from
'@material-ui/core/styles
'
import
{
createStyles
}
from
'@material-ui
/styles'
import
{
createSxStyles
}
from
'@agiliza/theme
'
import
{
Theme
}
from
'@mui/material
/styles'
import
sharedStyles
from
'../shared-styles'
// eslint-disable-next-line
export
default
(
theme
:
Theme
)
=>
createStyles
({
createS
xS
tyles
({
...
sharedStyles
(
theme
),
form
:
{
'& .MuiTextField-root'
:
{
...
...
cli/web/cliente/src/views/ProposalData/pages/InvolvedPeople/Identification/AddUpdateDialog/AddUpdateDialog.tsx
View file @
e63508b1
...
...
@@ -9,14 +9,14 @@ import {
DialogContent
,
DialogProps
,
DialogTitle
}
from
'@m
aterial-ui/core
'
import
{
withStyles
,
WithStyles
}
from
'@material-ui/core
/styles'
}
from
'@m
ui/material
'
import
{
useTheme
}
from
'@mui/material
/styles'
import
Customer
from
'../Customer'
import
{
initialState
}
from
'./state'
import
s
tyles
from
'./styles'
import
useS
tyles
from
'./styles'
type
ExtendedProps
=
Pick
<
DialogProps
,
'open'
>
&
WithStyles
<
typeof
styles
>
type
ExtendedProps
=
Pick
<
DialogProps
,
'open'
>
interface
Props
extends
ExtendedProps
{
person
?:
InvolvedPerson
...
...
@@ -26,7 +26,8 @@ interface Props extends ExtendedProps {
}
const
AddUpdateDialog
=
(
props
:
Props
)
=>
{
const
{
classes
,
open
,
onClose
,
type
,
person
,
onSave
}
=
props
const
{
open
,
onClose
,
type
,
person
,
onSave
}
=
props
const
styles
=
useStyles
(
useTheme
())
const
{
actions
,
state
}
=
useFormState
(
'involvedPersonForm'
,
initialState
)
...
...
@@ -51,7 +52,7 @@ const AddUpdateDialog = (props: Props) => {
}
return
(
<
Dialog
onClose=
{
onClose
}
aria
-
labelledby=
"simple-dialog-title"
open=
{
open
}
PaperProps=
{
{
className
:
class
es
.
dialog
}
}
>
<
Dialog
onClose=
{
onClose
}
aria
-
labelledby=
"simple-dialog-title"
open=
{
open
}
PaperProps=
{
{
sx
:
styl
es
.
dialog
}
}
>
<
DialogTitle
>
{
person
?
'Editar'
:
'Adicionar'
}
pessoa envolvida
</
DialogTitle
>
<
DialogContent
>
{
type
&&
renderForm
(
type
)
}
</
DialogContent
>
<
DialogActions
>
...
...
@@ -62,4 +63,4 @@ const AddUpdateDialog = (props: Props) => {
)
}
export
default
withStyles
(
styles
)(
AddUpdateDialog
)
export
default
AddUpdateDialog
cli/web/cliente/src/views/ProposalData/pages/InvolvedPeople/Identification/AddUpdateDialog/styles.ts
View file @
e63508b1
import
{
Theme
}
from
'@material-ui/core/styles
'
import
{
createStyles
}
from
'@material-ui
/styles'
import
{
createSxStyles
}
from
'@agiliza/theme
'
import
{
Theme
}
from
'@mui/material
/styles'
import
sharedStyles
from
'../styles'
// eslint-disable-next-line
export
default
(
theme
:
Theme
)
=>
{
return
createStyles
({
return
createS
xS
tyles
({
...
sharedStyles
(
theme
),
dialog
:
{
height
:
'80%'
,
width
:
'60%'
},
})
...
...
cli/web/cliente/src/views/ProposalData/pages/InvolvedPeople/Identification/Customer/Customer.tsx
View file @
e63508b1
...
...
@@ -6,21 +6,20 @@ import AccountInputsPhoto from '@agiliza/components/templates/AccountInputsPhoto
import
{
ActionType
}
from
'@agiliza/utils/hooks/state'
import
CPFCNPJField
from
'@agiliza/views/ProposalData/components/atoms/CPFCNPJField'
import
{
SelectField
,
SelectFieldProps
}
from
'@curio/components'
import
{
FormControlLabel
,
Switch
,
TextField
,
TextFieldProps
}
from
'@material-ui/core
'
import
{
withStyles
,
WithStyles
}
from
'@material-ui/core
/styles'
import
{
Box
,
FormControlLabel
,
Switch
,
TextField
,
TextFieldProps
}
from
'@mui/material
'
import
{
useTheme
}
from
'@mui/material
/styles'
import
{
IPIdentificationState
}
from
'../AddUpdateDialog/state'
import
s
tyles
from
'./styles'
import
useS
tyles
from
'./styles'
type
ExtendedProps
=
WithStyles
<
typeof
styles
>
interface
Props
extends
ExtendedProps
{
interface
Props
{
state
:
IPIdentificationState
actions
:
ActionType
<
IPIdentificationState
>
}
const
Customer
=
(
props
:
Props
)
=>
{
const
{
classes
,
state
,
actions
}
=
props
const
{
state
,
actions
}
=
props
const
styles
=
useStyles
(
useTheme
())
const
{
cpfcnpj
,
dataType
,
name
,
gender
,
hasAccount
,
account
}
=
state
...
...
@@ -54,7 +53,7 @@ const Customer = (props: Props) => {
const
handleChangeValidState
=
(
vldStt
:
boolean
)
=>
{}
return
(
<
form
className=
{
class
es
.
form
}
>
<
Box
component=
"form"
sx=
{
styl
es
.
form
}
>
<
SelectField
id=
"framework-select-field"
label=
"Enquadramento"
...
...
@@ -75,7 +74,7 @@ const Customer = (props: Props) => {
variant=
"outlined"
shrink=
{
false
}
/>
<
div
className=
{
class
es
.
switchCardPhotoContainer
}
>
<
div
style=
{
styl
es
.
switchCardPhotoContainer
}
>
<
FormControlLabel
label=
"Possui conta no Banestes?"
control=
{
...
...
@@ -96,8 +95,8 @@ const Customer = (props: Props) => {
/>
)
:
null
}
</
div
>
</
form
>
</
Box
>
)
}
export
default
withStyles
(
styles
)(
Customer
)
export
default
Customer
cli/web/cliente/src/views/ProposalData/pages/InvolvedPeople/Identification/Customer/styles.ts
View file @
e63508b1
import
{
Theme
}
from
'@material-ui/core/styles
'
import
{
createStyles
}
from
'@material-ui
/styles'
import
{
createSxStyles
}
from
'@agiliza/theme
'
import
{
Theme
}
from
'@mui/material
/styles'
import
sharedStyles
from
'../styles'
// eslint-disable-next-line
export
default
(
theme
:
Theme
)
=>
{
return
createStyles
({
return
createS
xS
tyles
({
...
sharedStyles
(
theme
),
form
:
{
'& .MuiTextField-root'
:
{
...
...
cli/web/cliente/src/views/ProposalData/pages/InvolvedPeople/Identification/Identification.tsx
View file @
e63508b1
...
...
@@ -4,20 +4,18 @@ import { people } from '@agiliza/__mocks__/proposalData/involvedPeople'
import
{
InvolvedPerson
,
InvolvedPersonType
}
from
'@agiliza/api/domain'
import
{
INVOLVED_PERSON_IDS
,
INVOLVED_PERSON_NAMES
}
from
'@agiliza/constants/involvedPeople'
import
{
maskCPFCNPJ
}
from
'@agiliza/utils/masks'
import
{
A
vatar
,
List
,
ListItem
,
ListItemAvatar
,
ListItemText
,
Typography
}
from
'@material-ui/core
'
import
{
withStyles
,
WithStyles
}
from
'@material-ui/core/styles
'
import
{
Add
as
AddIcon
,
Person
as
PersonIcon
}
from
'@material-ui/icon
s'
import
{
A
dd
as
AddIcon
,
Person
as
PersonIcon
}
from
'@mui/icons-material
'
import
{
Avatar
,
List
,
ListItem
,
ListItemAvatar
,
ListItemText
,
Typography
}
from
'@mui/material
'
import
{
useTheme
}
from
'@mui/material/style
s'
import
AddUpdateDialog
from
'./AddUpdateDialog'
import
SelectTypeDialog
from
'./SelectTypeDialog'
import
s
tyles
from
'./styles'
import
useS
tyles
from
'./styles'
type
ExtendedProps
=
WithStyles
<
typeof
styles
>
interface
Props
extends
ExtendedProps
{}
interface
Props
{}
const
Identification
=
(
props
:
Props
)
=>
{
const
{
classes
}
=
props
const
styles
=
useStyles
(
useTheme
())
const
[
open
,
setOpen
]
=
useState
({
type
:
false
,
form
:
false
})
const
[
type
,
setType
]
=
useState
<
InvolvedPersonType
|
''
>
(
''
)
...
...
@@ -43,10 +41,10 @@ const Identification = (props: Props) => {
return
(
<>
<
div
className=
{
class
es
.
contentContainer
}
>
<
div
className=
{
class
es
.
content
}
>
<
Typography
className=
{
class
es
.
title
}
>
Identicação
</
Typography
>
<
List
className=
{
class
es
.
list
}
>
<
div
style=
{
styl
es
.
contentContainer
}
>
<
div
style=
{
styl
es
.
content
}
>
<
Typography
sx=
{
styl
es
.
title
}
>
Identicação
</
Typography
>
<
List
sx=
{
styl
es
.
list
}
>
{
people
.
map
((
person
,
i
)
=>
(
<
ListItem
key=
{
i
}
button
onClick=
{
handleClickListItem
(
person
)
}
>
<
ListItemAvatar
>
...
...
@@ -64,7 +62,7 @@ const Identification = (props: Props) => {
</
div
>
</
div
>
<
Avatar
className=
{
class
es
.
avatarBtnContainer
}
sx=
{
styl
es
.
avatarBtnContainer
}
onClick=
{
handleClickAdd
}
// rounded
// Component={TouchableOpacity}
...
...
@@ -83,4 +81,4 @@ const Identification = (props: Props) => {
)
}
export
default
withStyles
(
styles
)(
Identification
)
export
default
Identification
cli/web/cliente/src/views/ProposalData/pages/InvolvedPeople/Identification/SelectTypeDialog/SelectTypeDialog.tsx
View file @
e63508b1
import
React
from
'react'
import
{
InvolvedPersonType
}
from
'@agiliza/api/domain'
import
{
Dialog
,
DialogProps
,
List
,
ListItem
,
ListItemText
}
from
'@m
aterial-ui/core
'
import
{
withStyles
,
WithStyles
}
from
'@material-ui/core
/styles'
import
{
Dialog
,
DialogProps
,
List
,
ListItem
,
ListItemText
}
from
'@m
ui/material
'
import
{
useTheme
}
from
'@mui/material
/styles'
import
s
tyles
from
'./styles'
import
useS
tyles
from
'./styles'
type
ExtendedProps
=
Pick
<
DialogProps
,
'open'
|
'onClose'
>
&
WithStyles
<
typeof
styles
>
type
ExtendedProps
=
Pick
<
DialogProps
,
'open'
|
'onClose'
>
interface
Props
extends
ExtendedProps
{
onSelectType
(
type
:
InvolvedPersonType
):
()
=>
void
}
const
SelectTypeDialog
=
(
props
:
Props
)
=>
{
const
{
classes
,
open
,
onClose
,
onSelectType
}
=
props
const
{
open
,
onClose
,
onSelectType
}
=
props
const
styles
=
useStyles
(
useTheme
())
return
(
<
Dialog
onClose=
{
onClose
}
aria
-
labelledby=
"simple-dialog-title"
open=
{
open
}
PaperProps=
{
{
className
:
class
es
.
dialog
}
}
>
<
Dialog
onClose=
{
onClose
}
aria
-
labelledby=
"simple-dialog-title"
open=
{
open
}
PaperProps=
{
{
sx
:
styl
es
.
dialog
}
}
>
<
List
>
<
ListItem
button
onClick=
{
onSelectType
(
'CUSTOMER'
)
}
>
<
ListItemText
primary=
"Cliente"
className=
{
class
es
.
listItemText
}
/>
<
ListItemText
primary=
"Cliente"
sx=
{
styl
es
.
listItemText
}
/>
</
ListItem
>
<
ListItem
button
onClick=
{
onSelectType
(
'GUARANTOR'
)
}
>
<
ListItemText
primary=
"Avalista"
className=
{
class
es
.
listItemText
}
/>
<
ListItemText
primary=
"Avalista"
sx=
{
styl
es
.
listItemText
}
/>
</
ListItem
>
<
ListItem
button
>
<
ListItemText
primary=
"Sócio"
onClick=
{
onSelectType
(
'PARTNER'
)
}
className=
{
class
es
.
listItemText
}
/>
<
ListItemText
primary=
"Sócio"
onClick=
{
onSelectType
(
'PARTNER'
)
}
sx=
{
styl
es
.
listItemText
}
/>
</
ListItem
>
</
List
>
</
Dialog
>
)
}
export
default
withStyles
(
styles
)(
SelectTypeDialog
)
export
default
SelectTypeDialog
cli/web/cliente/src/views/ProposalData/pages/InvolvedPeople/Identification/SelectTypeDialog/styles.ts
View file @
e63508b1
import
{
Theme
}
from
'@material-ui/core/styles
'
import
{
createStyles
}
from
'@material-ui
/styles'
import
{
createSxStyles
}
from
'@agiliza/theme
'
import
{
Theme
}
from
'@mui/material
/styles'
import
sharedStyles
from
'../styles'
// eslint-disable-next-line
export
default
(
theme
:
Theme
)
=>
{
return
createStyles
({
return
createS
xS
tyles
({
...
sharedStyles
(
theme
),
dialog
:
{
width
:
'20%'
},
listItemText
:
{
textAlign
:
'center'
},
...
...
cli/web/cliente/src/views/ProposalData/pages/InvolvedPeople/Identification/styles.ts
View file @
e63508b1
import
{
Theme
}
from
'@material-ui/core/styles
'
import
{
createStyles
}
from
'@material-ui
/styles'
import
{
createSxStyles
}
from
'@agiliza/theme
'
import
{
Theme
}
from
'@mui/material
/styles'
import
sharedStyles
from
'../styles'
// eslint-disable-next-line
export
default
(
theme
:
Theme
)
=>
{
const
width
=
'100%'
return
createStyles
({
return
createS
xS
tyles
({
...
sharedStyles
(
theme
),
list
:
{
width
},
avatarBtnContainer
:
{
...
...
cli/web/cliente/src/views/ProposalData/pages/InvolvedPeople/InvolvedPeople.tsx
View file @
e63508b1
import
React
,
{
ChangeEvent
,
useState
}
from
'react'
import
React
,
{
useState
}
from
'react'
import
{
Tab
}
from
'@material-ui/core'
import
{
withStyles
,
WithStyles
}
from
'@material-ui/core/styles'
import
{
AccountBox
as
AccountBoxIcon
,
CheckBox
as
CheckBoxIcon
,
...
...
@@ -11,11 +9,13 @@ import {
List
as
ListIcon
,
LocalAtm
as
LocalAtmIcon
,
ZoomOutMap
as
ZoomOutMapIcon
}
from
'@material-ui/icons'
import
{
TabContext
,
TabList
,
TabPanel
}
from
'@material-ui/lab'
}
from
'@mui/icons-material'
import
{
TabContext
,
TabList
,
TabListProps
,
TabPanel
}
from
'@mui/lab'
import
{
Tab
}
from
'@mui/material'
import
{
useTheme
}
from
'@mui/material/styles'
import
Identification
from
'./Identification'
import
s
tyles
from
'./styles'
import
useS
tyles
from
'./styles'
export
const
involvedPeopleItems
=
[
{
label
:
'Identificação'
,
icon
:
<
AccountBoxIcon
/>,
component
:
<
Identification
/>
},
...
...
@@ -28,34 +28,25 @@ export const involvedPeopleItems = [
{
label
:
'Moradia'
,
icon
:
<
HomeIcon
/>,
component
:
<
div
>
Moradia
</
div
>
},
]
type
ExtendedProps
=
WithStyles
<
typeof
styles
>
interface
Props
extends
ExtendedProps
{}
interface
Props
{}
const
InvolvedPeople
=
(
props
:
Props
)
=>
{
const
{
classes
}
=
props
const
styles
=
useStyles
(
useTheme
())
const
[
tab
,
setTab
]
=
useState
(
'0'
)
const
handleChange
=
(
evt
:
ChangeEvent
<
Record
<
string
,
unknown
>>
,
newValue
:
number
)
=>
{
const
handleChange
:
TabListProps
[
'onChange'
]
=
(
evt
,
newValue
)
=>
{
setTab
(
newValue
.
toString
())
}
return
(
<
div
className=
{
class
es
.
contentContainer
}
>
<
div
style=
{
styl
es
.
contentContainer
}
>
<
TabContext
value=
{
tab
}
>
<
TabList
orientation=
"vertical"
variant=
"scrollable"
value=
{
tab
}
onChange=
{
handleChange
}
aria
-
label=
"Vertical tabs example"
className=
{
classes
.
tabs
}
>
<
TabList
orientation=
"vertical"
variant=
"scrollable"
value=
{
tab
}
onChange=
{
handleChange
}
aria
-
label=
"Vertical tabs example"
sx=
{
styles
.
tabs
}
>
{
involvedPeopleItems
.
map
(({
component
,
...
tb
},
i
)
=>
(
<
Tab
wrapped
key=
{
i
}
{
...
tb
}
value=
{
i
.
toString
()
}
/>
))
}
</
TabList
>
<
div
className=
{
class
es
.
content
}
>
<
div
style=
{
styl
es
.
content
}
>
{
involvedPeopleItems
.
map
((
tb
,
i
)
=>
(
<
TabPanel
key=
{
i
}
value=
{
i
.
toString
()
}
>
{
tb
.
component
}
...
...
@@ -67,4 +58,4 @@ const InvolvedPeople = (props: Props) => {
)
}
export
default
withStyles
(
styles
)(
InvolvedPeople
)
export
default
InvolvedPeople
cli/web/cliente/src/views/ProposalData/pages/InvolvedPeople/styles.ts
View file @
e63508b1
import
{
Theme
}
from
'@material-ui/core/styles
'
import
{
createStyles
}
from
'@material-ui
/styles'
import
{
createSxStyles
}
from
'@agiliza/theme
'
import
{
Theme
}
from
'@mui/material
/styles'
import
sharedStyles
from
'../shared-styles'
// eslint-disable-next-line
export
default
(
theme
:
Theme
)
=>
createStyles
({
createS
xS
tyles
({
...
sharedStyles
(
theme
),
contentContainer
:
{
display
:
'flex'
,
flexDirection
:
'column'
,
alignItems
:
'center'
,
flexGrow
:
1
,
overflowY
:
'auto'
},
content
:
{
...
...
cli/web/cliente/src/views/ProposalData/pages/ProposalData.tsx
View file @
e63508b1
...
...
@@ -5,8 +5,6 @@ import ButtonWithProgress from '@agiliza/components/atoms/ButtonWithProgress'
import
{
useFormState
}
from
'@agiliza/utils/hooks/state'
import
{
entries
}
from
'@agiliza/utils/method'
import
{
CREDIT_LINES_PATHS
}
from
'@agiliza/views/SimulationCreditLines/pages/router'
import
{
Button
,
CircularProgress
,
MobileStepper
,
Typography
}
from
'@material-ui/core'
import
{
withStyles
,
WithStyles
}
from
'@material-ui/core/styles'
import
{
AccountBox
as
AccountBoxIcon
,
Apartment
as
ApartmentIcon
,
...
...
@@ -22,7 +20,9 @@ import {
List
as
ListIcon
,
LocalAtm
as
LocalAtmIcon
,
ZoomOutMap
as
ZoomOutMapIcon
}
from
'@material-ui/icons'
}
from
'@mui/icons-material'
import
{
Button
,
CircularProgress
,
MobileStepper
,
Typography
}
from
'@mui/material'
import
{
useTheme
}
from
'@mui/material/styles'
import
BDAddress
,
{
initialState
as
bdAddressInitState
}
from
'./BusinessData/Address'
import
BDIdentification
,
{
...
...
@@ -44,7 +44,7 @@ import SourceIncome, { initialState as cdSourceIncomeInitState } from './Custome
import
SpouseAdditionalData
from
'./CustomerData/SpouseAdditionalData'
import
SpouseData
,
{
initialState
as
cdSpouseDataInitState
}
from
'./CustomerData/SpouseData'
import
Vehicles
,
{
initialState
as
cdVehicleInitState
}
from
'./CustomerData/Vehicles'
import
s
tyles
from
'./shared-styles'
import
useS
tyles
from
'./shared-styles'
export
const
PROPOSAL_DATA_PATHS
=
{
selectOption
:
'/selecionarOpcao'
,
...
...
@@ -56,12 +56,14 @@ export interface ProposalDataRouteState {
proposalId
:
string
}
type
ExtendedProps
=
WithStyles
<
typeof
styles
>
&
RouteComponentProps
&
ConnectedProps
type
ExtendedProps
=
RouteComponentProps
&
ConnectedProps
interface
Props
extends
ExtendedProps
{}
const
ProposalData
=
(
props
:
Props
)
=>
{
const
{
classes
,
history
,
fetching
,
proposalId
,
personId
,
customerData
,
businessData
}
=
props
const
{
history
,
fetching
,
proposalId
,
personId
,
customerData
,
businessData
}
=
props
const
styles
=
useStyles
(
useTheme
())
const
[
activeStep
,
setActiveStep
]
=
useState
(
0
)
useEffect
(()
=>
{
...
...
@@ -325,16 +327,16 @@ const ProposalData = (props: Props) => {
}
return
(
<
div
className=
{
class
es
.
pageContent
}
>
<
Typography
className=
{
class
es
.
pageTitle
}
variant=
"h5"
>
<
div
style=
{
styl
es
.
pageContent
}
>
<
Typography
sx=
{
styl
es
.
pageTitle
}
variant=
"h5"
>
{
mapActiveStepToTitle
()
}
</
Typography
>
<
Typography
className=
{
class
es
.
pageSubtitle
}
>
{
proposalDataItems
[
activeStep
].
label
}
</
Typography
>
<
div
className=
{
class
es
.
stepContentContainer
}
>
{
fetching
?
<
CircularProgress
className=
{
class
es
.
circularProgress
}
/>
:
proposalDataItems
[
activeStep
].
component
}
<
Typography
sx=
{
styl
es
.
pageSubtitle
}
>
{
proposalDataItems
[
activeStep
].
label
}
</
Typography
>
<
div
style=
{
styl
es
.
stepContentContainer
}
>
{
fetching
?
<
CircularProgress
style=
{
styl
es
.
circularProgress
}
/>
:
proposalDataItems
[
activeStep
].
component
}
</
div
>
<
div
className=
{
class
es
.
stepperContainer
}
>
{
/* <Stepper activeStep={activeStep} alternativeLabel
className={class
es.stepper}> */
}
<
div
style=
{
styl
es
.
stepperContainer
}
>
{
/* <Stepper activeStep={activeStep} alternativeLabel
style={styl
es.stepper}> */
}
{
/* {propostalDataItems.map((iPI, i) => (
<Step key={i}>
<StepLabel>{iPI.label}</StepLabel>
...
...
@@ -347,7 +349,7 @@ const ProposalData = (props: Props) => {
activeStep=
{
activeStep
}
style=
{
{
width
:
'100%'
}
}
nextButton=
{
<
ButtonWithProgress
fetching=
{
fetching
}
variant=
"text"
size=
"large"
onClick=
{
handleNext
}
className=
{
class
es
.
stepperBtn
}
>
<
ButtonWithProgress
fetching=
{
fetching
}
variant=
"text"
size=
"large"
onClick=
{
handleNext
}
sx=
{
styl
es
.
stepperBtn
}
>
{
activeStep
===
steps
-
1
?
(
'Finalizar'
)
:
(
...
...
@@ -359,7 +361,7 @@ const ProposalData = (props: Props) => {
</
ButtonWithProgress
>
}
backButton=
{
<
Button
size=
"large"
onClick=
{
handleBack
}
disabled=
{
activeStep
===
0
}
className=
{
class
es
.
stepperBtn
}
>
<
Button
size=
"large"
onClick=
{
handleBack
}
disabled=
{
activeStep
===
0
}
style=
{
styl
es
.
stepperBtn
}
>
<
KeyboardArrowLeftIcon
/>
Anterior
</
Button
>
...
...
@@ -371,4 +373,4 @@ const ProposalData = (props: Props) => {
)
}
export
default
connected
(
withStyles
(
styles
)(
ProposalData
)
)
export
default
connected
(
ProposalData
)
cli/web/cliente/src/views/ProposalData/pages/SelectOption/ListItem.tsx
View file @
e63508b1
import
React
from
'react'
import
{
Avatar
,
ListItem
,
ListItemAvatar
,
ListItemText
}
from
'@m
aterial-ui/core
'
import
{
withStyles
,
WithStyles
}
from
'@material-ui/core
/styles'
import
{
Avatar
,
ListItem
,
ListItemAvatar
,
ListItemText
}
from
'@m
ui/material
'
import
{
useTheme
}
from
'@mui/material
/styles'
import
s
tyles
from
'./styles'
import
useS
tyles
from
'./styles'
type
ExtendedProps
=
WithStyles
<
typeof
styles
>
interface
Props
extends
ExtendedProps
{
interface
Props
{
label
:
string
icon
:
JSX
.
Element
onClick
?:
()
=>
void
}
const
GridItem
=
(
props
:
Props
)
=>
{
const
{
classes
,
icon
,
label
,
onClick
}
=
props
const
{
icon
,
label
,
onClick
}
=
props
const
styles
=
useStyles
(
useTheme
())
return
(
<
ListItem
button
onClick=
{
onClick
}
className=
{
class
es
.
listItem
}
>
<
ListItem
button
onClick=
{
onClick
}
sx=
{
styl
es
.
listItem
}
>
<
ListItemAvatar
>
<
Avatar
className=
{
class
es
.
avatar
}
>
{
icon
}
</
Avatar
>
<
Avatar
sx=
{
styl
es
.
avatar
}
>
{
icon
}
</
Avatar
>
</
ListItemAvatar
>
<
ListItemText
primary=
{
label
}
/>
</
ListItem
>
...
...
@@ -29,4 +28,4 @@ const GridItem = (props: Props) => {
)
}
export
default
withStyles
(
styles
)(
GridItem
)
export
default
GridItem
cli/web/cliente/src/views/ProposalData/pages/SelectOption/SelectOption.tsx
View file @
e63508b1
import
React
from
'react'
import
{
RouteComponentProps
}
from
'react-router'
import
{
List
}
from
'@material-ui/core'
import
{
withStyles
,
WithStyles
}
from
'@material-ui/core/styles'
import
{
CheckBox
as
CheckBoxIcon
,
Description
as
DescriptionIcon
,
...
...
@@ -11,42 +9,45 @@ import {
ThumbUp
as
ThumbUpIcon
,
TrendingUp
as
TrendingUpIcon
,
VisibilityOff
as
VisibilityOffIcon
}
from
'@material-ui/icons'
}
from
'@mui/icons-material'
import
{
List
}
from
'@mui/material'
import
{
useTheme
}
from
'@mui/material/styles'
import
{
PROPOSAL_DATA_PATHS
}
from
'../ProposalData'
import
ListItem
from
'./ListItem'
import
s
tyles
from
'./styles'
import
useS
tyles
from
'./styles'
type
ExtendedProps
=
WithStyles
<
typeof
styles
>
&
RouteComponentProps
type
ExtendedProps
=
RouteComponentProps
interface
Props
extends
ExtendedProps
{}
const
SelectOption
=
(
props
:
Props
)
=>
{
const
{
classes
,
history
}
=
props
const
{
history
}
=
props
const
styles
=
useStyles
(
useTheme
())
return
(
<
div
className=
{
class
es
.
contentContainer
}
>
<
div
className=
{
class
es
.
content
}
>
<
List
component=
"nav"
className=
{
class
es
.
list
}
>
<
div
style=
{
styl
es
.
contentContainer
}
>
<
div
style=
{
styl
es
.
content
}
>
<
List
component=
"nav"
sx=
{
styl
es
.
list
}
>
<
ListItem
label=
"Pessoas envolvidas"
icon=
{
<
PersonIcon
className=
{
class
es
.
listItemIcon
}
/>
}
icon=
{
<
PersonIcon
sx=
{
styl
es
.
listItemIcon
}
/>
}
onClick=
{
()
=>
history
.
push
(
PROPOSAL_DATA_PATHS
.
involvedPeople
)
}
/>
<
ListItem
label=
"Dados de negócio"
icon=
{
<
SettingsIcon
className=
{
class
es
.
listItemIcon
}
/>
}
icon=
{
<
SettingsIcon
sx=
{
styl
es
.
listItemIcon
}
/>
}
onClick=
{
()
=>
history
.
push
(
PROPOSAL_DATA_PATHS
.
businessData
)
}
/>
<
ListItem
label=
"LSE"
icon=
{
<
TrendingUpIcon
className=
{
class
es
.
listItemIcon
}
/>
}
/>
<
ListItem
label=
"Solicitação"
icon=
{
<
ThumbUpIcon
className=
{
class
es
.
listItemIcon
}
/>
}
/>
<
ListItem
label=
"Parecer"
icon=
{
<
VisibilityOffIcon
className=
{
class
es
.
listItemIcon
}
/>
}
/>
<
ListItem
label=
"Resumo"
icon=
{
<
DescriptionIcon
className=
{
class
es
.
listItemIcon
}
/>
}
/>
<
ListItem
label=
"Checklist do Projeto"
icon=
{
<
CheckBoxIcon
className=
{
class
es
.
listItemIcon
}
/>
}
/>
<
ListItem
label=
"LSE"
icon=
{
<
TrendingUpIcon
sx=
{
styl
es
.
listItemIcon
}
/>
}
/>
<
ListItem
label=
"Solicitação"
icon=
{
<
ThumbUpIcon
sx=
{
styl
es
.
listItemIcon
}
/>
}
/>
<
ListItem
label=
"Parecer"
icon=
{
<
VisibilityOffIcon
sx=
{
styl
es
.
listItemIcon
}
/>
}
/>
<
ListItem
label=
"Resumo"
icon=
{
<
DescriptionIcon
sx=
{
styl
es
.
listItemIcon
}
/>
}
/>
<
ListItem
label=
"Checklist do Projeto"
icon=
{
<
CheckBoxIcon
sx=
{
styl
es
.
listItemIcon
}
/>
}
/>
</
List
>
</
div
>
</
div
>
)
}
export
default
withStyles
(
styles
)(
SelectOption
)
export
default
SelectOption
cli/web/cliente/src/views/ProposalData/pages/SelectOption/styles.ts
View file @
e63508b1
import
{
grey
}
from
'@material-ui/core/colors
'
import
{
Theme
}
from
'@material-ui/core/style
s'
import
{
createStyles
}
from
'@material-ui
/styles'
import
{
createSxStyles
}
from
'@agiliza/theme
'
import
{
grey
}
from
'@mui/material/color
s'
import
{
Theme
}
from
'@mui/material
/styles'
import
sharedStyles
from
'../shared-styles'
// eslint-disable-next-line
export
default
(
theme
:
Theme
)
=>
createStyles
({
createS
xS
tyles
({
...
sharedStyles
(
theme
),
contentContainer
:
{
display
:
'flex'
,
justifyContent
:
'center'
,
width
:
'100%'
,
height
:
'100%'
},
content
:
{
display
:
'flex'
,
flexDirection
:
'column'
,
width
:
'100%'
},
...
...
cli/web/cliente/src/views/ProposalData/pages/router.tsxx
View file @
e63508b1
...
...
@@ -3,8 +3,8 @@ import { Redirect, Route, RouteComponentProps, Switch } from 'react-router'
import { entries } from '@agiliza/utils/method'
import { PATHS } from '@agiliza/views/Main/DrawerItems'
import { Breadcrumbs, CircularProgress, Link } from '@m
aterial-ui/core
'
import { withStyles, WithStyles } from '@m
aterial-ui/core
/styles'
import { Breadcrumbs, CircularProgress, Link } from '@m
ui/material
'
import { withStyles, WithStyles } from '@m
ui/material
/styles'
import styles from './shared-styles'
...
...
cli/web/cliente/src/views/ProposalData/pages/shared-styles.ts
View file @
e63508b1
import
{
createSxStyles
}
from
'@agiliza/theme'
import
sharedStyles
from
'@agiliza/views/shared-styles'
import
{
Theme
}
from
'@material-ui/core/styles'
import
{
createStyles
}
from
'@material-ui/styles'
import
{
Theme
}
from
'@mui/material/styles'
// eslint-disable-next-line
export
default
(
theme
:
Theme
)
=>
createStyles
({
createS
xS
tyles
({
...
sharedStyles
(
theme
),
title
:
{
marginBottom
:
theme
.
spacing
(
2
)
},
link
:
{
cursor
:
'pointer'
},
...
...
cli/web/cliente/src/views/SimulationCreditLines/pages/CreditLinesList/CreditLinesList.tsx
View file @
e63508b1
...
...
@@ -6,7 +6,9 @@ import { SimulationCategory } from '@agiliza/api/domain'
import
{
extractCurrency
,
extractNumbers
}
from
'@agiliza/utils/extractors'
import
{
formatCurrency
}
from
'@agiliza/utils/formatters'
import
{
SelectField
}
from
'@curio/components'
import
{
Refresh
as
RefreshIcon
}
from
'@mui/icons-material'
import
{
Autocomplete
,
Button
,
CircularProgress
,
IconButton
,
...
...
@@ -14,24 +16,23 @@ import {
TextareaAutosize
,
TextField
,
Typography
}
from
'@material-ui/core'
import
{
withStyles
,
WithStyles
}
from
'@material-ui/core/styles'
import
{
Refresh
as
RefreshIcon
}
from
'@material-ui/icons'
import
{
Autocomplete
}
from
'@material-ui/lab'
}
from
'@mui/material'
import
{
useTheme
}
from
'@mui/material/styles'
import
{
CREDIT_LINES_PATHS
,
SimulationRouteState
}
from
'../router'
import
{
connected
,
ConnectedProps
}
from
'./connect'
import
SliderField
from
'./SliderField'
import
s
tyles
from
'./styles'
import
useS
tyles
from
'./styles'
type
ExtendedProps
=
WithStyles
<
typeof
styles
>
&
RouteComponentProps
&
ConnectedProps
type
ExtendedProps
=
RouteComponentProps
&
ConnectedProps
interface
Props
extends
ExtendedProps
{
fetching
:
boolean
}
const
CreditLinesList
=
(
props
:
Props
)
=>
{
const
{
classes
,
fetching
,
simulationCategories
}
=
props
const
{
fetching
,
simulationCategories
}
=
props
const
styles
=
useStyles
(
useTheme
())
useEffect
(()
=>
{
props
.
fetchSimulationCategories
()
...
...
@@ -63,18 +64,18 @@ const CreditLinesList = (props: Props) => {
}
return
(
<
div
className=
{
class
es
.
pageContent
}
>
<
div
className=
{
class
es
.
contentContainer
}
>
<
div
className=
{
class
es
.
content
}
>
<
Typography
variant=
"h5"
className=
{
class
es
.
title
}
>
<
div
style=
{
styl
es
.
pageContent
}
>
<
div
style=
{
styl
es
.
contentContainer
}
>
<
div
style=
{
styl
es
.
content
}
>
<
Typography
variant=
"h5"
sx=
{
styl
es
.
title
}
>
Escolha a melhor opção para sua empresa e clique em simular!
</
Typography
>
<
Autocomplete
<
SimulationCategory
>
id="credit-lines"
className=
{
class
es
.
creditLinesAutocomplete
}
sx=
{
styl
es
.
creditLinesAutocomplete
}
options=
{
simulationCategories
}
getOptionLabel=
{
(
option
)
=>
option
.
description
}
getOptionSelected
=
{
(
opt
,
val
)
=>
opt
.
id
===
selectedSimulCategory
?.
id
}
isOptionEqualToValue
=
{
(
opt
,
val
)
=>
opt
.
id
===
selectedSimulCategory
?.
id
}
noOptionsText="Nenhum motivo encontrado..."
value=
{
selectedSimulCategory
}
onChange=
{
(
_
,
opt
)
=>
{
...
...
@@ -124,7 +125,7 @@ const CreditLinesList = (props: Props) => {
}
}
/
>
<
TextField
className=
{
class
es
.
description
}
sx=
{
styl
es
.
description
}
label=
"Descrição"
value=
{
selectedSimulCategory
?.
fullDescription
||
''
}
rows=
{
5
}
...
...
@@ -145,10 +146,10 @@ const CreditLinesList = (props: Props) => {
onChange=
{
(
vl
)
=>
setDestination
(
vl
)
}
items=
{
destinations
.
map
((
st
)
=>
({
label
:
st
.
description
,
value
:
st
.
id
}))
}
shrink=
{
false
}
className=
{
class
es
.
destinationsSelect
}
sx=
{
styl
es
.
destinationsSelect
}
/>
<
SliderField
className=
{
class
es
.
sliderField
}
sx=
{
styl
es
.
sliderField
}
title=
"De quanto você precisa?"
// sliderProps={{
// min: 0,
...
...
@@ -178,7 +179,7 @@ const CreditLinesList = (props: Props) => {
}
}
/>
<
SliderField
className=
{
class
es
.
sliderField
}
sx=
{
styl
es
.
sliderField
}
title=
"Quantos meses para pagar?"
sliderProps=
{
{
min
:
0
,
...
...
@@ -208,7 +209,7 @@ const CreditLinesList = (props: Props) => {
}
}
/>
<
SliderField
className=
{
class
es
.
sliderField
}
sx=
{
styl
es
.
sliderField
}
title=
"Quantos meses de carência?"
sliderProps=
{
{
min
:
0
,
...
...
@@ -235,7 +236,7 @@ const CreditLinesList = (props: Props) => {
setGraceMonths
(
graceMonthsValue
<=
selectedSimulCategory
.
maxGraceMonths
?
graceMonthsValue
:
selectedSimulCategory
.
maxGraceMonths
)
}
}
/>
<
div
className=
{
class
es
.
btnContainer
}
>
<
div
style=
{
styl
es
.
btnContainer
}
>
<
Button
disabled=
{
!
selectedSimulCategory
}
variant=
"contained"
color=
"secondary"
onClick=
{
handleSimulate
}
>
Simular
</
Button
>
...
...
@@ -246,4 +247,4 @@ const CreditLinesList = (props: Props) => {
)
}
export default connected(
withStyles(styles)(CreditLinesList)
)
export default connected(
CreditLinesList
)
cli/web/cliente/src/views/SimulationCreditLines/pages/CreditLinesList/SliderField.tsx
View file @
e63508b1
import
React
from
'react'
import
{
Slider
,
SliderProps
,
TextField
,
TextFieldProps
,
Typography
}
from
'@material-ui/core'
import
{
Box
,
BoxProps
,
Slider
,
SliderProps
,
TextField
,
TextFieldProps
,
Typography
}
from
'@mui/material'
type
ExtendedProps
=
Record
<
string
,
unknown
>
...
...
@@ -8,21 +16,21 @@ interface Props extends ExtendedProps {
title
:
string
valueField
:
string
sliderProps
?:
Pick
<
SliderProps
,
'min'
|
'max'
|
'marks'
|
'step'
>
&
{
onChange
:
(
event
:
React
.
ChangeEvent
<
Record
<
string
,
unknown
>>
,
value
:
number
|
number
[])
=>
void
onChange
:
SliderProps
[
'onChange'
]
value
:
number
}
disabled
:
boolean
onChangeField
:
TextFieldProps
[
'onChange'
]
onBlurField
:
TextFieldProps
[
'onBlur'
]
className
?:
string
suffix
?:
string
sx
?:
BoxProps
[
'sx'
]
}
const
SliderField
=
(
props
:
Props
)
=>
{
const
{
className
,
title
,
valueField
,
disabled
,
onChangeField
,
onBlurField
,
suffix
,
sliderProps
}
=
props
const
{
sx
,
title
,
valueField
,
disabled
,
onChangeField
,
onBlurField
,
suffix
,
sliderProps
}
=
props
const
{
step
=
1
}
=
sliderProps
||
{
step
:
1
}
return
(
<
div
className=
{
className
}
>
<
Box
component=
"div"
sx=
{
sx
}
>
<
Typography
gutterBottom
>
{
title
}
</
Typography
>
{
sliderProps
&&
<
Slider
{
...
sliderProps
}
disabled=
{
disabled
}
step=
{
step
}
/>
}
<
TextField
...
...
@@ -32,8 +40,9 @@ const SliderField = (props: Props) => {
onChange=
{
onChangeField
}
onBlur=
{
onBlurField
}
InputProps=
{
{
endAdornment
:
suffix
&&
<
Typography
>
{
suffix
}
</
Typography
>
}
}
variant=
"standard"
/>
</
div
>
</
Box
>
)
}
...
...
cli/web/cliente/src/views/SimulationCreditLines/pages/CreditLinesList/styles.ts
View file @
e63508b1
import
{
Theme
}
from
'@material-ui/core/styles
'
import
{
createStyles
}
from
'@material-ui
/styles'
import
{
createSxStyles
}
from
'@agiliza/theme
'
import
{
Theme
}
from
'@mui/material
/styles'
import
sharedStyles
from
'../shared-styles'
// eslint-disable-next-line
export
default
(
theme
:
Theme
)
=>
createStyles
({
createS
xS
tyles
({
...
sharedStyles
(
theme
),
contentContainer
:
{
display
:
'flex'
,
justifyContent
:
'center'
,
width
:
'100%'
,
overflowY
:
'auto'
},
content
:
{
display
:
'flex'
,
flexDirection
:
'column'
,
alignItems
:
'center'
,
width
:
'50%'
},
...
...
cli/web/cliente/src/views/SimulationCreditLines/pages/FinishSimulation/FinishSimulation.tsx
View file @
e63508b1
import
React
from
'react'
import
{
RouteComponentProps
}
from
'react-router'
import
{
Button
,
Typography
}
from
'@m
aterial-ui/core
'
import
{
withStyles
,
WithStyles
}
from
'@material-ui/core
/styles'
import
{
Button
,
Typography
}
from
'@m
ui/material
'
import
{
useTheme
}
from
'@mui/material
/styles'
import
{
connected
,
ConnectedProps
}
from
'./connect'
import
s
tyles
from
'./styles'
import
useS
tyles
from
'./styles'
type
ExtendedProps
=
WithStyles
<
typeof
styles
>
&
RouteComponentProps
&
ConnectedProps
type
ExtendedProps
=
RouteComponentProps
&
ConnectedProps
interface
Props
extends
ExtendedProps
{}
const
FinishSimulation
=
(
props
:
Props
)
=>
{
const
{
classes
,
history
}
=
props
const
{
history
}
=
props
const
styles
=
useStyles
(
useTheme
())
const
handleClick
=
()
=>
{
props
.
reset
()
history
.
push
(
'/'
)
}
return
(
<
div
className=
{
class
es
.
pageContent
}
>
<
div
className=
{
class
es
.
titleContainer
}
>
<
div
style=
{
styl
es
.
pageContent
}
>
<
div
style=
{
styl
es
.
titleContainer
}
>
<
Typography
variant=
"h4"
>
Sua proposta foi submetida com sucesso!
</
Typography
>
<
Typography
variant=
"h6"
>
Agora é só aguardar que entraremos em contato!
</
Typography
>
</
div
>
...
...
@@ -31,4 +32,4 @@ const FinishSimulation = (props: Props) => {
)
}
export
default
connected
(
withStyles
(
styles
)(
FinishSimulation
)
)
export
default
connected
(
FinishSimulation
)
cli/web/cliente/src/views/SimulationCreditLines/pages/FinishSimulation/styles.ts
View file @
e63508b1
import
{
Theme
}
from
'@material-ui/core/styles
'
import
{
createStyles
}
from
'@material-ui
/styles'
import
{
createSxStyles
}
from
'@agiliza/theme
'
import
{
Theme
}
from
'@mui/material
/styles'
import
sharedStyles
from
'../shared-styles'
// eslint-disable-next-line
export
default
(
theme
:
Theme
)
=>
createStyles
({
createS
xS
tyles
({
...
sharedStyles
(
theme
),
pageContent
:
{
...
sharedStyles
(
theme
).
pageContent
,
height
:
'70%'
,
alignItems
:
'center'
,
justifyContent
:
'center'
},
titleContainer
:
{
...
...
cli/web/cliente/src/views/SimulationCreditLines/pages/Simulation/CreditLinesInfo/CreditLinesInfo.tsx
View file @
e63508b1
...
...
@@ -5,15 +5,15 @@ import { SubProduct } from '@agiliza/api/domain'
import
{
AMORTIZATIONS
}
from
'@agiliza/constants/amortization'
import
{
formatCurrency
}
from
'@agiliza/utils/formatters'
import
{
SelectField
}
from
'@curio/components'
import
{
B
utton
,
Grid
}
from
'@material-ui/core
'
import
{
withStyles
,
WithStyles
}
from
'@material-ui/core
/styles'
import
{
B
ox
,
Button
,
Grid
}
from
'@mui/material
'
import
{
useTheme
}
from
'@mui/material
/styles'
import
{
connected
,
ConnectedProps
}
from
'./connect'
import
GridLine
from
'./GridLine'
import
InstallmentsDialog
from
'./InstallmentsDialog'
import
s
tyles
from
'./styles'
import
useS
tyles
from
'./styles'
type
ExtendedProps
=
WithStyles
<
typeof
styles
>
&
ConnectedProps
type
ExtendedProps
=
ConnectedProps
interface
Props
extends
ExtendedProps
{
subproduct
?:
SubProduct
...
...
@@ -21,7 +21,8 @@ interface Props extends ExtendedProps {
}
const
CreditLinesInfo
=
(
props
:
Props
)
=>
{
const
{
classes
,
subproducts
,
subproduct
,
onChangeSubproduct
}
=
props
const
styles
=
useStyles
(
useTheme
())
const
{
subproducts
,
subproduct
,
onChangeSubproduct
}
=
props
// const [selectedSP, setSelectedSP] = useState<SubProduct | undefined>()
const
[
open
,
setOpen
]
=
useState
(
false
)
...
...
@@ -31,11 +32,11 @@ const CreditLinesInfo = (props: Props) => {
},
[
subproducts
])
return
(
<
div
className=
{
class
es
.
contentContainer
}
>
<
div
className=
{
class
es
.
content
}
>
<
Box
sx=
{
styl
es
.
contentContainer
}
>
<
Box
sx=
{
styl
es
.
content
}
>
<
SelectField
id=
"subproducts"
className=
{
class
es
.
selectField
}
sx=
{
styl
es
.
selectField
}
label=
"Opções de Subproduto"
items=
{
subproducts
.
map
((
sp
)
=>
({
label
:
sp
.
description
||
''
,
value
:
sp
.
id
}))
}
value=
{
subproduct
?.
id
||
''
}
...
...
@@ -45,7 +46,7 @@ const CreditLinesInfo = (props: Props) => {
}
}
shrink=
{
false
}
/>
<
Grid
container
className=
{
class
es
.
gridContainer
}
>
<
Grid
container
sx=
{
styl
es
.
gridContainer
}
>
<
GridLine
label=
"Número de parcelas"
value=
{
subproduct
?.
maxAmountInstallment
||
''
}
/>
{
/* <GridLine label="Valor das parcelas" value={formatCurrency(subproduct?.amount.toFixed(2))} /> */
}
<
GridLine
label=
"Taxa de juros"
value=
{
subproduct
?.
fee
?
`${subproduct?.fee} %`
:
''
}
/>
...
...
@@ -65,9 +66,9 @@ const CreditLinesInfo = (props: Props) => {
Exibir opções de parcelamento
</
Button
>
<
InstallmentsDialog
open=
{
open
}
onClose=
{
()
=>
setOpen
(
false
)
}
installmentOptions=
{
subproduct
?.
installementOptions
}
/>
</
div
>
</
div
>
</
Box
>
</
Box
>
)
}
export
default
connected
(
withStyles
(
styles
)(
CreditLinesInfo
)
)
export
default
connected
(
CreditLinesInfo
)
cli/web/cliente/src/views/SimulationCreditLines/pages/Simulation/CreditLinesInfo/GridLine.tsx
View file @
e63508b1
import
React
from
'react'
import
{
Grid
,
Typography
}
from
'@m
aterial-ui/core
'
import
{
Grid
,
Typography
}
from
'@m
ui/material
'
type
ExtendedProps
=
Record
<
string
,
unknown
>
...
...
cli/web/cliente/src/views/SimulationCreditLines/pages/Simulation/CreditLinesInfo/InstallmentsDialog/InstallmentsDialog.tsx
View file @
e63508b1
...
...
@@ -11,12 +11,12 @@ import {
DialogTitle
,
Grid
,
Typography
}
from
'@m
aterial-ui/core
'
import
{
withStyles
,
WithStyles
}
from
'@material-ui/core
/styles'
}
from
'@m
ui/material
'
import
{
useTheme
}
from
'@mui/material
/styles'
import
s
tyles
from
'./styles'
import
useS
tyles
from
'./styles'
type
ExtendedProps
=
Pick
<
DialogProps
,
'open'
>
&
WithStyles
<
typeof
styles
>
type
ExtendedProps
=
Pick
<
DialogProps
,
'open'
>
interface
Props
extends
ExtendedProps
{
onClose
:
()
=>
void
...
...
@@ -24,21 +24,22 @@ interface Props extends ExtendedProps {
}
const
InstallmentsDialog
=
(
props
:
Props
)
=>
{
const
{
classes
,
open
,
onClose
,
installmentOptions
}
=
props
const
styles
=
useStyles
(
useTheme
())
const
{
open
,
onClose
,
installmentOptions
}
=
props
return
(
<
Dialog
onClose=
{
onClose
}
aria
-
labelledby=
"simple-dialog-title"
open=
{
open
}
PaperProps=
{
{
className
:
class
es
.
dialog
}
}
>
<
Dialog
onClose=
{
onClose
}
aria
-
labelledby=
"simple-dialog-title"
open=
{
open
}
PaperProps=
{
{
sx
:
styl
es
.
dialog
}
}
>
<
DialogTitle
>
Tipos de parcelamento
</
DialogTitle
>
<
DialogContent
>
<
Grid
container
className=
{
class
es
.
gridContainer
}
>
<
Grid
container
sx=
{
styl
es
.
gridContainer
}
>
<
Grid
item
xs=
{
6
}
>
<
Typography
className=
{
class
es
.
gridHeaderText
}
>
Número de parcelas
</
Typography
>
<
Typography
sx=
{
styl
es
.
gridHeaderText
}
>
Número de parcelas
</
Typography
>
</
Grid
>
<
Grid
item
xs=
{
3
}
>
<
Typography
className=
{
class
es
.
gridHeaderText
}
>
Valor parcela
</
Typography
>
<
Typography
sx=
{
styl
es
.
gridHeaderText
}
>
Valor parcela
</
Typography
>
</
Grid
>
<
Grid
item
xs=
{
3
}
>
<
Typography
className=
{
class
es
.
gridHeaderText
}
>
Valor total
</
Typography
>
<
Typography
sx=
{
styl
es
.
gridHeaderText
}
>
Valor total
</
Typography
>
</
Grid
>
</
Grid
>
{
installmentOptions
?.
map
((
iO
)
=>
(
...
...
@@ -65,4 +66,4 @@ const InstallmentsDialog = (props: Props) => {
)
}
export
default
withStyles
(
styles
)(
InstallmentsDialog
)
export
default
InstallmentsDialog
cli/web/cliente/src/views/SimulationCreditLines/pages/Simulation/CreditLinesInfo/InstallmentsDialog/styles.ts
View file @
e63508b1
import
{
Theme
}
from
'@material-ui/core/styles
'
import
{
createStyles
}
from
'@material-ui/styles
'
import
{
createSxStyles
}
from
'@agiliza/theme
'
import
{
Theme
}
from
'@mui/material
'
import
sharedStyles
from
'../styles'
// eslint-disable-next-line
export
default
(
theme
:
Theme
)
=>
createStyles
({
...
sharedStyles
(
theme
)
,
createS
xS
tyles
({
...
sharedStyles
,
gridContainer
:
{
marginBottom
:
theme
.
spacing
(
1
)
},
dialog
:
{
height
:
'45%'
,
width
:
'65%'
},
gridHeaderText
:
{
fontWeight
:
'bold'
},
...
...
cli/web/cliente/src/views/SimulationCreditLines/pages/Simulation/CreditLinesInfo/styles.ts
View file @
e63508b1
import
{
Theme
}
from
'@material-ui/core/styles
'
import
{
createStyles
}
from
'@material-ui/styles
'
import
{
createSxStyles
}
from
'@agiliza/theme
'
import
{
Theme
}
from
'@mui/material
'
import
sharedStyles
from
'../styles'
// eslint-disable-next-line
export
default
(
theme
:
Theme
)
=>
createStyles
({
const
styles
=
(
theme
:
Theme
)
=>
createSxStyles
({
...
sharedStyles
(
theme
),
gridContainer
:
{
marginBottom
:
theme
.
spacing
(
2
)
},
gridItem
:
{
whiteSpace
:
'nowrap'
},
selectField
:
{
marginBottom
:
theme
.
spacing
(
2
)
},
})
export
default
styles
cli/web/cliente/src/views/SimulationCreditLines/pages/Simulation/Simulation.tsx
View file @
e63508b1
...
...
@@ -4,24 +4,25 @@ import { RouteComponentProps } from 'react-router'
import
{
SubProduct
}
from
'@agiliza/api/domain'
import
{
extractNumbers
}
from
'@agiliza/utils/method'
import
{
PATHS
}
from
'@agiliza/views/Main/DrawerItems'
import
{
Button
,
Step
,
StepLabel
,
Stepper
}
from
'@material-ui/core'
import
{
withStyles
,
WithStyles
}
from
'@material-ui/core/styles'
import
{
KeyboardArrowLeft
as
KeyboardArrowLeftIcon
,
KeyboardArrowRight
as
KeyboardArrowRightIcon
}
from
'@material-ui/icons'
}
from
'@mui/icons-material'
import
{
Box
,
Button
,
Step
,
StepLabel
,
Stepper
}
from
'@mui/material'
import
{
useTheme
}
from
'@mui/material/styles'
import
{
connected
,
ConnectedProps
}
from
'./connect'
import
CreditLinesInfo
from
'./CreditLinesInfo'
import
s
tyles
from
'./styles'
import
useS
tyles
from
'./styles'
import
UserForm
from
'./UserForm'
type
ExtendedProps
=
WithStyles
<
typeof
styles
>
&
RouteComponentProps
&
ConnectedProps
type
ExtendedProps
=
RouteComponentProps
&
ConnectedProps
interface
Props
extends
ExtendedProps
{}
const
Simulation
=
(
props
:
Props
)
=>
{
const
{
classes
,
customer
,
simulationData
,
...
routerProps
}
=
props
const
{
customer
,
simulationData
,
...
routerProps
}
=
props
const
styles
=
useStyles
(
useTheme
())
const
{
history
}
=
routerProps
// const theme = useTheme()
const
[
activeStep
,
setActiveStep
]
=
useState
(
0
)
...
...
@@ -74,14 +75,14 @@ const Simulation = (props: Props) => {
},
[
activeStep
,
subproduct
,
customer
])
return
(
<
div
className=
{
class
es
.
pageContent
}
>
<
div
className=
{
classes
.
stepContentContainer
}
>
{
renderStep
(
activeStep
)
}
</
div
>
<
div
className=
{
class
es
.
stepperContainer
}
>
<
Button
size=
"large"
onClick=
{
handleBack
}
disabled=
{
activeStep
===
0
}
className=
{
class
es
.
stepperBtn
}
>
<
Box
sx=
{
styl
es
.
pageContent
}
>
<
Box
sx=
{
styles
.
stepContentContainer
}
>
{
renderStep
(
activeStep
)
}
</
Box
>
<
Box
sx=
{
styl
es
.
stepperContainer
}
>
<
Button
size=
"large"
onClick=
{
handleBack
}
disabled=
{
activeStep
===
0
}
sx=
{
styl
es
.
stepperBtn
}
>
<
KeyboardArrowLeftIcon
/>
Anterior
</
Button
>
<
Stepper
activeStep=
{
activeStep
}
className=
{
class
es
.
stepper
}
>
<
Stepper
activeStep=
{
activeStep
}
sx=
{
styl
es
.
stepper
}
>
<
Step
>
<
StepLabel
>
Informações linha de crédito
</
StepLabel
>
</
Step
>
...
...
@@ -89,7 +90,7 @@ const Simulation = (props: Props) => {
<
StepLabel
>
Dados pessoais
</
StepLabel
>
</
Step
>
</
Stepper
>
<
Button
size=
"large"
onClick=
{
handleNext
}
disabled=
{
!
canGoForward
}
className=
{
class
es
.
stepperBtn
}
>
<
Button
size=
"large"
onClick=
{
handleNext
}
disabled=
{
!
canGoForward
}
sx=
{
styl
es
.
stepperBtn
}
>
{
activeStep
===
steps
-
1
?
(
'Finalizar'
)
:
(
...
...
@@ -104,7 +105,7 @@ const Simulation = (props: Props) => {
steps={steps}
position="static"
activeStep={activeStep}
className={class
es.stepper}
sx={styl
es.stepper}
nextButton={
<Button size="small" onClick={handleNext} disabled={!canGoForward || activeStep === steps}>
Próximo
...
...
@@ -118,9 +119,9 @@ const Simulation = (props: Props) => {
</Button>
}
/> */
}
</
div
>
</
div
>
</
Box
>
</
Box
>
)
}
export
default
connected
(
withStyles
(
styles
)(
Simulation
)
)
export
default
connected
(
Simulation
)
cli/web/cliente/src/views/SimulationCreditLines/pages/Simulation/UserForm/FirstAccessDialog/CreatePassword/CreatePassword.tsx
View file @
e63508b1
import
React
from
'react'
import
TextFieldWithIcon
from
'@agiliza/components/atoms/TextFieldWithIcon'
import
{
withStyles
,
WithStyles
}
from
'@material-ui/core/styles'
import
{
Box
}
from
'@mui/material'
import
{
useTheme
}
from
'@mui/material/styles'
import
s
tyles
from
'./styles'
import
useS
tyles
from
'./styles'
type
ExtendedProps
=
WithStyles
<
typeof
styles
>
interface
Props
extends
ExtendedProps
{
interface
Props
{
password
:
string
confirmPassword
:
string
onChange
(
type
:
'password'
|
'confirmPassword'
):
(
value
:
string
)
=>
void
}
const
CreatePassword
=
(
props
:
Props
)
=>
{
const
{
classes
,
password
,
confirmPassword
,
onChange
}
=
props
const
styles
=
useStyles
(
useTheme
())
const
{
password
,
confirmPassword
,
onChange
}
=
props
return
(
<
div
className=
{
class
es
.
dialogContent
}
>
<
Box
sx=
{
styl
es
.
dialogContent
}
>
<
TextFieldWithIcon
label=
"Senha"
value=
{
password
}
onChange=
{
(
evt
)
=>
onChange
(
'password'
)(
evt
.
target
.
value
)
}
type=
"password"
/>
<
TextFieldWithIcon
label=
"Confirmar senha"
...
...
@@ -24,8 +24,8 @@ const CreatePassword = (props: Props) => {
onChange=
{
(
evt
)
=>
onChange
(
'confirmPassword'
)(
evt
.
target
.
value
)
}
type=
"password"
/>
</
div
>
</
Box
>
)
}
export
default
withStyles
(
styles
)(
CreatePassword
)
export
default
CreatePassword
cli/web/cliente/src/views/SimulationCreditLines/pages/Simulation/UserForm/FirstAccessDialog/CreatePassword/styles.ts
View file @
e63508b1
import
{
Theme
}
from
'@material-ui/core/styles
'
import
{
createStyles
}
from
'@material-ui/styles
'
import
{
createSxStyles
}
from
'@agiliza/theme
'
import
{
Theme
}
from
'@mui/material
'
import
sharedStyles
from
'../styles'
// eslint-disable-next-line
export
default
(
theme
:
Theme
)
=>
createStyles
({
createS
xS
tyles
({
...
sharedStyles
(
theme
),
title
:
{
marginBottom
:
theme
.
spacing
(
2
)
},
})
cli/web/cliente/src/views/SimulationCreditLines/pages/Simulation/UserForm/FirstAccessDialog/FirstAccessDialog.tsx
View file @
e63508b1
...
...
@@ -5,6 +5,10 @@ import FirstAccessTemplate, { initState } from '@agiliza/components/templates/Fi
import
{
useFormState
}
from
'@agiliza/utils/hooks/state'
import
{
values
}
from
'@agiliza/utils/method'
import
{
isValidCPF
}
from
'@agiliza/utils/validators'
import
{
KeyboardArrowLeft
as
KeyboardArrowLeftIcon
,
KeyboardArrowRight
as
KeyboardArrowRightIcon
}
from
'@mui/icons-material'
import
{
Button
,
Dialog
,
...
...
@@ -13,27 +17,24 @@ import {
DialogProps
,
DialogTitle
,
MobileStepper
}
from
'@material-ui/core'
import
{
withStyles
,
WithStyles
}
from
'@material-ui/core/styles'
import
{
KeyboardArrowLeft
as
KeyboardArrowLeftIcon
,
KeyboardArrowRight
as
KeyboardArrowRightIcon
}
from
'@material-ui/icons'
}
from
'@mui/material'
import
{
useTheme
}
from
'@mui/material/styles'
import
{
connected
,
ConnectedProps
}
from
'./connect'
import
CreatePassword
from
'./CreatePassword'
import
s
tyles
from
'./styles'
import
useS
tyles
from
'./styles'
import
VerifyCode
from
'./VerifyCode'
import
VerifyCPF
from
'./VerifyCPF'
type
ExtendedProps
=
Pick
<
DialogProps
,
'open'
>
&
WithStyles
<
typeof
styles
>
&
ConnectedProps
type
ExtendedProps
=
Pick
<
DialogProps
,
'open'
>
&
ConnectedProps
interface
Props
extends
ExtendedProps
{
onClose
:
()
=>
void
}
const
FirstAccessDialog
=
(
props
:
Props
)
=>
{
const
{
classes
,
open
,
onClose
,
context
,
fetching
,
sendingCode
}
=
props
const
{
open
,
onClose
,
context
,
fetching
,
sendingCode
}
=
props
const
styles
=
useStyles
(
useTheme
())
const
{
state
,
actions
}
=
useFormState
(
'firstAccessForm'
,
initState
)
const
[
code
,
setCode
]
=
useState
(
''
)
...
...
@@ -126,7 +127,7 @@ const FirstAccessDialog = (props: Props) => {
}
return
(
<
Dialog
onClose=
{
onClose
}
aria
-
labelledby=
"simple-dialog-title"
open=
{
open
}
PaperProps=
{
{
className
:
class
es
.
dialog
}
}
>
<
Dialog
onClose=
{
onClose
}
aria
-
labelledby=
"simple-dialog-title"
open=
{
open
}
PaperProps=
{
{
sx
:
styl
es
.
dialog
}
}
>
<
DialogTitle
>
Primeiro acesso
</
DialogTitle
>
<
DialogContent
>
{
renderStep
(
activeStep
)
}
</
DialogContent
>
<
DialogActions
>
...
...
@@ -135,7 +136,7 @@ const FirstAccessDialog = (props: Props) => {
steps=
{
steps
}
position=
"static"
activeStep=
{
activeStep
}
className=
{
class
es
.
stepper
}
sx=
{
styl
es
.
stepper
}
nextButton=
{
<
ButtonWithProgress
fetching=
{
fetching
||
sendingCode
}
...
...
@@ -166,4 +167,4 @@ const FirstAccessDialog = (props: Props) => {
)
}
export
default
connected
(
withStyles
(
styles
)(
FirstAccessDialog
)
)
export
default
connected
(
FirstAccessDialog
)
cli/web/cliente/src/views/SimulationCreditLines/pages/Simulation/UserForm/FirstAccessDialog/VerifyCPF/VerifyCPF.tsx
View file @
e63508b1
import
React
from
'react'
import
{
maskCPFCNPJ
}
from
'@agiliza/utils/masks'
import
{
TextField
,
Typography
}
from
'@material-ui/core
'
import
{
withStyles
,
WithStyles
}
from
'@material-ui/core
/styles'
import
{
Box
,
TextField
,
Typography
}
from
'@mui/material
'
import
{
useTheme
}
from
'@mui/material
/styles'
import
s
tyles
from
'./styles'
import
useS
tyles
from
'./styles'
type
ExtendedProps
=
WithStyles
<
typeof
styles
>
interface
Props
extends
ExtendedProps
{
interface
Props
{
cpf
:
string
onChange
:
(
value
:
string
)
=>
void
}
const
VerifyCPF
=
(
props
:
Props
)
=>
{
const
{
classes
,
cpf
,
onChange
}
=
props
const
{
cpf
,
onChange
}
=
props
const
styles
=
useStyles
(
useTheme
())
return
(
<
div
className=
{
class
es
.
dialogContent
}
>
<
Typography
className=
{
class
es
.
title
}
>
Informe o seu CPF
</
Typography
>
<
Box
sx=
{
styl
es
.
dialogContent
}
>
<
Typography
sx=
{
styl
es
.
title
}
>
Informe o seu CPF
</
Typography
>
<
TextField
variant=
"outlined"
// label="CPF"
...
...
@@ -25,8 +24,8 @@ const VerifyCPF = (props: Props) => {
onChange=
{
(
evt
)
=>
onChange
(
evt
.
target
.
value
)
}
inputProps=
{
{
maxLength
:
14
}
}
/>
</
div
>
</
Box
>
)
}
export
default
withStyles
(
styles
)(
VerifyCPF
)
export
default
VerifyCPF
cli/web/cliente/src/views/SimulationCreditLines/pages/Simulation/UserForm/FirstAccessDialog/VerifyCPF/styles.ts
View file @
e63508b1
import
{
Theme
}
from
'@material-ui/core/styles
'
import
{
createStyles
}
from
'@material-ui/styles
'
import
{
createSxStyles
}
from
'@agiliza/theme
'
import
{
Theme
}
from
'@mui/material
'
import
sharedStyles
from
'../styles'
// eslint-disable-next-line
export
default
(
theme
:
Theme
)
=>
createStyles
({
createS
xS
tyles
({
...
sharedStyles
(
theme
),
title
:
{
marginBottom
:
theme
.
spacing
(
2
)
},
})
cli/web/cliente/src/views/SimulationCreditLines/pages/Simulation/UserForm/FirstAccessDialog/VerifyCode/VerifyCode.tsx
View file @
e63508b1
import
React
from
'react'
import
{
extractNumbers
}
from
'@agiliza/utils/method'
import
{
B
utton
,
TextField
,
Typography
}
from
'@material-ui/core
'
import
{
withStyles
,
WithStyles
}
from
'@material-ui/core
/styles'
import
{
B
ox
,
Button
,
TextField
,
Typography
}
from
'@mui/material
'
import
{
useTheme
}
from
'@mui/material
/styles'
import
s
tyles
from
'./styles'
import
useS
tyles
from
'./styles'
type
ExtendedProps
=
WithStyles
<
typeof
styles
>
interface
Props
extends
ExtendedProps
{
interface
Props
{
code
:
string
onChange
:
(
value
:
string
)
=>
void
onResendCode
:
()
=>
void
}
const
VerifyCode
=
(
props
:
Props
)
=>
{
const
{
classes
,
code
,
onChange
}
=
props
const
{
code
,
onChange
}
=
props
const
styles
=
useStyles
(
useTheme
())
return
(
<
div
className=
{
class
es
.
dialogContent
}
>
<
Typography
className=
{
class
es
.
title
}
>
Foi enviado um código de verificação por email.
</
Typography
>
<
Box
sx=
{
styl
es
.
dialogContent
}
>
<
Typography
sx=
{
styl
es
.
title
}
>
Foi enviado um código de verificação por email.
</
Typography
>
<
TextField
variant=
"outlined"
value=
{
code
}
onChange=
{
(
evt
)
=>
onChange
(
extractNumbers
(
evt
.
target
.
value
))
}
inputProps=
{
{
maxLength
:
14
}
}
/>
<
div
style=
{
{
display
:
'flex'
,
width
:
'100%'
,
justifyContent
:
'flex-end'
}
}
onClick=
{
props
.
onResendCode
}
>
<
Button
>
Re-enviar código
</
Button
>
</
div
>
</
div
>
</
Box
>
)
}
export
default
withStyles
(
styles
)(
VerifyCode
)
export
default
VerifyCode
cli/web/cliente/src/views/SimulationCreditLines/pages/Simulation/UserForm/FirstAccessDialog/VerifyCode/styles.ts
View file @
e63508b1
import
{
Theme
}
from
'@material-ui/core/styles
'
import
{
createStyles
}
from
'@material-ui/styles
'
import
{
createSxStyles
}
from
'@agiliza/theme
'
import
{
Theme
}
from
'@mui/material
'
import
sharedStyles
from
'../styles'
// eslint-disable-next-line
export
default
(
theme
:
Theme
)
=>
createStyles
({
createS
xS
tyles
({
...
sharedStyles
(
theme
),
title
:
{
marginBottom
:
theme
.
spacing
(
2
)
},
})
cli/web/cliente/src/views/SimulationCreditLines/pages/Simulation/UserForm/FirstAccessDialog/styles.ts
View file @
e63508b1
import
{
Theme
}
from
'@material-ui/core/styles
'
import
{
createStyles
}
from
'@material-ui/styles
'
import
{
createSxStyles
}
from
'@agiliza/theme
'
import
{
Theme
}
from
'@mui/material
'
import
sharedStyles
from
'../styles'
// eslint-disable-next-line
export
default
(
theme
:
Theme
)
=>
createStyles
({
...
sharedStyles
(
theme
)
,
createS
xS
tyles
({
...
sharedStyles
,
gridContainer
:
{
marginBottom
:
theme
.
spacing
(
1
)
},
dialog
:
{
height
:
'60%'
,
width
:
'65%'
},
gridHeaderText
:
{
fontWeight
:
'bold'
},
...
...
cli/web/cliente/src/views/SimulationCreditLines/pages/Simulation/UserForm/UserForm.tsx
View file @
e63508b1
...
...
@@ -4,12 +4,12 @@ import ButtonWithProgress from '@agiliza/components/atoms/ButtonWithProgress'
import
LoginTemplate
from
'@agiliza/components/templates/Login'
import
{
formatCPF
}
from
'@agiliza/utils/formatters'
import
{
extractNumbers
}
from
'@agiliza/utils/method'
import
{
B
utton
,
TextFieldProps
,
Typography
}
from
'@material-ui/core
'
import
{
withStyles
,
WithStyles
}
from
'@material-ui/core
/styles'
import
{
B
ox
,
Button
,
TextFieldProps
,
Typography
}
from
'@mui/material
'
import
{
useTheme
}
from
'@mui/material
/styles'
import
{
connected
,
ConnectedProps
}
from
'./connect'
import
FirstAccessDialog
from
'./FirstAccessDialog'
import
st
yles
from
'./styles'
import
useS
yles
from
'./styles'
// interface UserFormFieldProps extends Pick<TextFieldProps, 'label' | 'value' | 'onChange' | 'error' | 'helperText' | 'inputProps'> {}
...
...
@@ -25,15 +25,16 @@ interface State {
// email: (vl) => (isValidEmail(vl) ? validState(vl) : invalidState(vl, '')),
// }
type
ExtendedProps
=
WithStyles
<
typeof
styles
>
&
ConnectedProps
type
ExtendedProps
=
ConnectedProps
interface
Props
extends
ExtendedProps
{}
const
UserForm
=
(
props
:
Props
)
=>
{
const
{
classes
,
fetching
,
customer
}
=
props
const
{
fetching
,
customer
}
=
props
const
[
state
,
setState
]
=
useState
<
State
>
({
username
:
''
,
password
:
''
})
const
{
username
,
password
}
=
state
const
[
open
,
setOpen
]
=
useState
(
false
)
const
styles
=
useSyles
(
useTheme
())
// const { errorState, validState: isValidState, actions } = useErrorValidator({ username: '', password: '' })
...
...
@@ -49,12 +50,12 @@ const UserForm = (props: Props) => {
}
return
(
<
div
className=
{
class
es
.
contentContainer
}
>
<
div
className=
{
class
es
.
content
}
>
<
Box
sx=
{
styl
es
.
contentContainer
}
>
<
Box
sx=
{
styl
es
.
content
}
>
<
Typography
>
Identifique-se
</
Typography
>
<
LoginTemplate
username=
{
formatCPF
(
username
)
}
password=
{
password
}
onChange=
{
handleChange
}
/>
<
ButtonWithProgress
className=
{
class
es
.
btn
}
sx=
{
styl
es
.
btn
}
fetching=
{
fetching
}
disabled=
{
!
username
||
!!
customer
}
color=
"secondary"
...
...
@@ -67,7 +68,7 @@ const UserForm = (props: Props) => {
>
{
!
customer
?
'Identificar'
:
'Identificado'
}
</
ButtonWithProgress
>
<
Button
variant=
"contained"
className=
{
class
es
.
btn
}
color=
"secondary"
onClick=
{
()
=>
setOpen
(
true
)
}
disabled=
{
!!
customer
}
>
<
Button
variant=
"contained"
sx=
{
styl
es
.
btn
}
color=
"secondary"
onClick=
{
()
=>
setOpen
(
true
)
}
disabled=
{
!!
customer
}
>
Primeiro aceeso
</
Button
>
{
/* <UserFormField label="Nome" value={name} onChange={handleChange('name')} {...getErrorProps(errorState.name)} />
...
...
@@ -79,10 +80,10 @@ const UserForm = (props: Props) => {
{...getErrorProps(errorState.phoneNumber)}
/>
<UserFormField label="Email" value={email} onChange={handleChange('email')} {...getErrorProps(errorState.email)} /> */
}
</
div
>
</
Box
>
<
FirstAccessDialog
open=
{
open
}
onClose=
{
()
=>
setOpen
(
false
)
}
/>
</
div
>
</
Box
>
)
}
export
default
connected
(
withStyles
(
styles
)(
UserForm
)
)
export
default
connected
(
UserForm
)
cli/web/cliente/src/views/SimulationCreditLines/pages/Simulation/UserForm/styles.ts
View file @
e63508b1
import
{
Theme
}
from
'@material-ui/core/styles
'
import
{
createStyles
}
from
'@material-ui/styles
'
import
{
createSxStyles
}
from
'@agiliza/theme
'
import
{
Theme
}
from
'@mui/material
'
import
sharedStyles
from
'../styles'
// eslint-disable-next-line
export
default
(
theme
:
Theme
)
=>
createStyles
({
createS
xS
tyles
({
...
sharedStyles
(
theme
),
content
:
{
...
sharedStyles
(
theme
).
content
,
width
:
'15%'
},
gridContainer
:
{},
...
...
cli/web/cliente/src/views/SimulationCreditLines/pages/Simulation/styles.ts
View file @
e63508b1
import
{
Theme
}
from
'@material-ui/core/styles
'
import
{
createStyles
}
from
'@material-ui/styles
'
import
{
createSxStyles
}
from
'@agiliza/theme
'
import
{
Theme
}
from
'@mui/material
'
import
sharedStyles
from
'../shared-styles'
// eslint-disable-next-line
export
default
(
theme
:
Theme
)
=>
createStyles
({
const
styles
=
(
theme
:
Theme
)
=>
createSxStyles
({
...
sharedStyles
(
theme
),
contentContainer
:
{
display
:
'flex'
,
justifyContent
:
'center'
,
width
:
'100%'
},
content
:
{
display
:
'flex'
,
flexDirection
:
'column'
,
alignItems
:
'center'
,
justifyContent
:
'center'
,
width
:
'35%'
},
...
...
@@ -14,3 +13,5 @@ export default (theme: Theme) =>
stepper
:
{
flexGrow
:
1
},
stepperBtn
:
{
height
:
'100%'
},
})
export
default
styles
cli/web/cliente/src/views/SimulationCreditLines/pages/router.tsx
View file @
e63508b1
...
...
@@ -2,10 +2,10 @@ import React, { lazy, Suspense } from 'react'
import
{
Redirect
,
Route
,
RouteComponentProps
,
Switch
}
from
'react-router'
import
{
PATHS
}
from
'@agiliza/views/Main/DrawerItems'
import
{
CircularProgress
}
from
'@m
aterial-ui/core
'
import
{
withStyles
,
WithStyles
}
from
'@material-ui/core
/styles'
import
{
CircularProgress
}
from
'@m
ui/material
'
import
{
useTheme
}
from
'@mui/material
/styles'
import
s
tyles
from
'./shared-styles'
import
useS
tyles
from
'./shared-styles'
const
CreditLinesList
=
lazy
(()
=>
import
(
'./CreditLinesList'
))
const
Simulation
=
lazy
(()
=>
import
(
'./Simulation'
))
...
...
@@ -25,15 +25,16 @@ export interface FinishSimulationRouteState {
proposalId
:
boolean
}
type
ExtendedProps
=
WithStyles
<
typeof
styles
>
&
RouteComponentProps
type
ExtendedProps
=
RouteComponentProps
interface
Props
extends
ExtendedProps
{}
const
CreditLinesRouter
=
(
props
:
Props
)
=>
{
const
{
classes
,
match
}
=
props
const
{
match
}
=
props
const
styles
=
useStyles
(
useTheme
())
return
(
<
div
className=
{
class
es
.
pageContent
}
>
<
Suspense
fallback=
{
<
CircularProgress
className=
{
class
es
.
circularProgress
}
/>
}
>
<
div
style=
{
styl
es
.
pageContent
}
>
<
Suspense
fallback=
{
<
CircularProgress
sx=
{
styl
es
.
circularProgress
}
/>
}
>
<
Switch
>
<
Route
exact
path=
{
CREDIT_LINES_PATHS
.
creditLinesList
}
render=
{
(
rProps
)
=>
<
CreditLinesList
{
...
rProps
}
/>
}
/>
<
Route
...
...
@@ -61,4 +62,4 @@ const CreditLinesRouter = (props: Props) => {
)
}
export
default
withStyles
(
styles
)(
CreditLinesRouter
)
export
default
CreditLinesRouter
cli/web/cliente/src/views/SimulationCreditLines/pages/shared-styles.ts
View file @
e63508b1
import
{
createSxStyles
}
from
'@agiliza/theme'
import
sharedStyles
from
'@agiliza/views/shared-styles'
import
{
Theme
}
from
'@material-ui/core/styles'
import
{
createStyles
}
from
'@material-ui/styles'
import
{
Theme
}
from
'@mui/material'
// eslint-disable-next-line
export
default
(
theme
:
Theme
)
=>
createStyles
({
const
styles
=
(
theme
:
Theme
)
=>
createSxStyles
({
...
sharedStyles
(
theme
),
title
:
{
marginBottom
:
theme
.
spacing
(
2
)
},
})
export
default
styles
cli/web/cliente/src/views/shared-styles.ts
View file @
e63508b1
import
{
Theme
}
from
'@material-ui/cor
e'
import
{
createStyles
}
from
'@material-ui/core/styles
'
import
{
createSxStyles
}
from
'@agiliza/them
e'
import
{
Theme
}
from
'@mui/material
'
// import sharedStyles from '../../shared-styles'
export
default
(
theme
:
Theme
)
=>
{
const
display
=
'flex'
return
createStyles
({
const
display
=
'flex'
const
styles
=
(
theme
:
Theme
)
=>
{
return
createSxStyles
({
pageContent
:
{
height
:
`calc(100vh -
${
theme
.
mixins
.
toolbar
.
minHeight
}
px)`
,
padding
:
theme
.
spacing
(
2
),
height
:
`calc(100vh -
${
theme
?.
mixins
?.
toolbar
?.
minHeight
||
0
}
px
)
`,
padding: theme
?
.spacing(2),
display: 'flex',
flexDirection: 'column',
overflowY: 'hidden',
...
...
@@ -30,7 +31,7 @@ export default (theme: Theme) => {
inputContainer: { display, flexWrap: 'wrap' },
form: { display, flexWrap: 'wrap', alignItems: 'center' },
formContent: {
marginRight
:
theme
.
spacing
(
3
),
marginRight: theme
?
.spacing(3),
flexWrap: 'wrap',
display,
flexDirection: 'column',
...
...
@@ -38,3 +39,5 @@ export default (theme: Theme) => {
},
})
}
export default styles
cli/web/cliente/webpack.config.js
View file @
e63508b1
...
...
@@ -88,7 +88,7 @@ const resolve = {
'@agiliza/views'
:
pathResolve
(
'src/views'
),
'@agiliza/utils'
:
pathResolve
(
'src/utils'
),
'@agiliza/public'
:
pathResolve
(
'public'
),
'@m
aterial-ui/styles'
:
path
.
resolve
(
'.'
,
'node_modules'
,
'@material-
ui/styles'
),
'@m
ui/styles'
:
path
.
resolve
(
'.'
,
'node_modules'
,
'@m
ui/styles'
),
},
// Modified paths, modify tsconfig.json "paths"
extensions
:
[
'.ts'
,
'.tsx'
,
'.js'
],
}
...
...
cli/web/cliente/yarn.lock
View file @
e63508b1
This source diff could not be displayed because it is too large. You can
view the blob
instead.
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