Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
web-et-numerique
PAMN_Plateforme des acteurs de la mediation numerique
RAM_Client
Commits
509129bc
Commit
509129bc
authored
May 21, 2021
by
Antonin COQUET
Committed by
Hugo SUBTIL
May 21, 2021
Browse files
feat(structure-form): add remote accompaniment step
parent
c54587c3
Changes
5
Hide whitespace changes
Inline
Side-by-side
src/app/form/form.component.html
View file @
509129bc
...
...
@@ -770,6 +770,16 @@
</p>
</div>
</div>
<div
*ngIf=
"currentPage == pageTypeEnum.structureRemoteAccompaniment"
class=
"page"
>
<div
class=
"title"
>
<h3>
Proposez vous un accompagnement à distance ?
</h3>
</div>
<app-radio-form
[selectedOption]=
"getStructureControl('remoteAccompaniment').value"
(selectedEvent)=
"onRadioBtnChange('remoteAccompaniment', $event)"
>
</app-radio-form>
</div>
<div
*ngIf=
"currentPage == pageTypeEnum.structureWorkshop"
class=
"page"
>
<div
class=
"title"
>
<h3>
Quel(s) atelier(s) au numérique proposez-vous ?
</h3>
...
...
src/app/form/form.component.ts
View file @
509129bc
...
...
@@ -48,7 +48,7 @@ export class FormComponent implements OnInit {
// Page and progress var
public
currentPage
=
0
;
// Change this value to start on a different page for dev testing
public
progressStatus
=
0
;
public
nbPagesForm
=
2
3
;
public
nbPagesForm
=
2
4
;
public
isPageValid
:
boolean
;
public
pagesValidation
=
[];
...
...
@@ -248,7 +248,7 @@ export class FormComponent implements OnInit {
}
private
createStructureForm
(
structure
):
FormGroup
{
const
form
=
new
FormGroup
({
return
new
FormGroup
({
_id
:
new
FormControl
(
structure
.
_id
),
coord
:
new
FormControl
(
structure
.
coord
),
structureType
:
new
FormControl
(
structure
.
structureType
,
Validators
.
required
),
...
...
@@ -280,6 +280,7 @@ export class FormComponent implements OnInit {
accessModality
:
this
.
loadArrayForCheckbox
(
structure
.
accessModality
,
true
),
publicsAccompaniment
:
this
.
loadArrayForCheckbox
(
structure
.
publicsAccompaniment
,
false
),
proceduresAccompaniment
:
this
.
loadArrayForCheckbox
(
structure
.
proceduresAccompaniment
,
false
),
remoteAccompaniment
:
new
FormControl
(
structure
.
remoteAccompaniment
,
Validators
.
required
),
otherDescription
:
new
FormControl
(
structure
.
otherDescription
),
equipmentsAndServices
:
this
.
loadArrayForCheckbox
(
structure
.
equipmentsAndServices
,
false
),
publics
:
this
.
loadArrayForCheckbox
(
structure
.
publics
,
true
),
...
...
@@ -310,7 +311,6 @@ export class FormComponent implements OnInit {
]),
freeWorkShop
:
new
FormControl
(
structure
.
freeWorkShop
,
[
Validators
.
required
]),
});
return
form
;
}
private
showCollapse
(
s
:
Structure
):
void
{
...
...
@@ -544,6 +544,10 @@ export class FormComponent implements OnInit {
valid
:
this
.
getStructureControl
(
'
otherDescription
'
).
value
,
name
:
'
Autres démarches proposés
'
,
};
this
.
pagesValidation
[
PageTypeEnum
.
structureRemoteAccompaniment
]
=
{
valid
:
this
.
getStructureControl
(
'
remoteAccompaniment
'
).
valid
,
name
:
'
Accompagnement à distance
'
,
};
this
.
pagesValidation
[
PageTypeEnum
.
structureWorkshop
]
=
{
valid
:
this
.
getStructureControl
(
'
accessRight
'
).
valid
&&
...
...
@@ -750,7 +754,10 @@ export class FormComponent implements OnInit {
}
// Check if "other" isn't check to hide "other description" page
if
(
this
.
currentPage
===
PageTypeEnum
.
structureWorkshop
&&
!
this
.
isInArray
(
'
autres
'
,
'
proceduresAccompaniment
'
))
{
if
(
this
.
currentPage
===
PageTypeEnum
.
structureRemoteAccompaniment
&&
!
this
.
isInArray
(
'
autres
'
,
'
proceduresAccompaniment
'
)
)
{
this
.
currentPage
--
;
// page 14 skip and go to page 13
this
.
progressStatus
-=
100
/
this
.
nbPagesForm
;
}
...
...
src/app/form/pageType.enum.ts
View file @
509129bc
export
enum
PageTypeEnum
{
summary
=
0
,
info
=
1
,
accountInfo
=
2
,
accountCredentials
=
3
,
structureNameAndAddress
=
4
,
structurePhone
=
5
,
structureType
=
6
,
structureAccessModality
=
7
,
structureHours
=
8
,
structurePmr
=
9
,
structureWebAndSocialNetwork
=
10
,
structurePublicTarget
=
11
,
structureAccompaniment
=
12
,
structureOtherAccompaniment
=
13
,
structureWorkshop
=
14
,
structureWorkshopPrice
=
15
,
structureWifi
=
16
,
structureEquipments
=
17
,
structureLabels
=
18
,
structureOtherServices
=
19
,
structureDescription
=
20
,
structureCovidInfo
=
21
,
cgu
=
22
,
summary
,
info
,
accountInfo
,
accountCredentials
,
structureNameAndAddress
,
structurePhone
,
structureType
,
structureAccessModality
,
structureHours
,
structurePmr
,
structureWebAndSocialNetwork
,
structurePublicTarget
,
structureAccompaniment
,
structureOtherAccompaniment
,
structureRemoteAccompaniment
,
structureWorkshop
,
structureWorkshopPrice
,
structureWifi
,
structureEquipments
,
structureLabels
,
structureOtherServices
,
structureDescription
,
structureCovidInfo
,
cgu
,
}
src/app/models/structure.model.ts
View file @
509129bc
...
...
@@ -25,6 +25,7 @@ export class Structure {
public
pmrAccess
:
boolean
=
null
;
public
publicsAccompaniment
:
string
[]
=
[];
public
proceduresAccompaniment
:
string
[]
=
[];
public
remoteAccompaniment
:
boolean
=
null
;
public
accessModality
:
string
[]
=
[];
public
labelsQualifications
:
string
[]
=
[];
public
publics
:
string
[]
=
[];
...
...
src/app/structure-list/components/structure-details/structure-details.component.html
View file @
509129bc
...
...
@@ -167,7 +167,7 @@
</div>
<!-- Accueil -->
<div
*ngIf=
"structure.accessModality.length > 0 || structure.hours.hasData()"
*ngIf=
"structure.accessModality.length > 0 || structure.hours.hasData()
|| structure.remoteAccompaniment
"
fxLayout=
"column"
class=
"structure-details-block"
fxLayoutAlign=
"baseline baseline"
...
...
@@ -230,6 +230,9 @@
<h3
class=
"subtitle"
>
Précisions sur les horaires
</h3>
<p>
{{ structure.exceptionalClosures }}
</p>
</div>
<div
*ngIf=
"structure.remoteAccompaniment"
class=
"bold-info"
>
<h3>
Cette structure propose un accompagnement à distance.
</h3>
</div>
</div>
<!-- Démarches en ligne -->
<div
...
...
Write
Preview
Supports
Markdown
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