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
dad
Cines Vitamui
Commits
608301e4
Commit
608301e4
authored
Jan 20, 2022
by
zikas96
Browse files
Merge branch 'feat/migration-z' into clean-refacto
parents
1883c06f
02927b9f
Changes
54
Hide whitespace changes
Inline
Side-by-side
ui/ui-frontend/projects/pastis/src/app/main/main.component.html
View file @
608301e4
...
...
@@ -14,7 +14,6 @@
<pastis-edit-profile
*ngIf=
"fileService.currentTreeLoaded"
></pastis-edit-profile>
</mat-sidenav>
<mat-sidenav-content>
<div
class=
"pastis-entete-bandeau"
></div>
<div>
<pastis-file-tree-metadata
(addNode)=
"addNode($event)"
(duplicateNode)=
"duplicateNode($event)"
...
...
@@ -22,8 +21,6 @@
(insertItem)=
"insertionItem($event)"
(removeNode)=
"removeNode($event)"
>
</pastis-file-tree-metadata>
<!--Check font.scss-->
</div>
<div
class=
"pastis-toaster-font"
toastContainer
></div>
...
...
ui/ui-frontend/projects/pastis/src/app/main/main.component.scss
View file @
608301e4
...
...
@@ -2,9 +2,7 @@
@import
"../../assets/css/mixins"
;
@import
"../../assets/css/layout"
;
.pastis-side-nav
{
box-shadow
:
20px
20px
80px
rgba
(
168
,
153
,
153
,
0
.5
);
}
.pastis-btn-show-profile
{
position
:
absolute
;
...
...
@@ -27,6 +25,10 @@
color
:
#FFFFFF
;
}
.pastis-side-nav
{
box-shadow
:
20px
20px
80px
rgba
(
168
,
153
,
153
,
0
.5
);
}
.mat-sidenav
{
width
:
100%
!
important
;
height
:
100%
;
...
...
@@ -36,7 +38,7 @@
}
.pastis-toaster-font
{
.pastis-toaster-font
{
font-family
:
Roboto
;
font-family
:
Mulish
;
font-style
:
normal
;
font-weight
:
normal
;
font-size
:
15px
;
...
...
ui/ui-frontend/projects/pastis/src/app/notice/notice.component.html
deleted
100644 → 0
View file @
1883c06f
<mat-sidenav-container
[autosize]=
"true"
[hasBackdrop]=
"false"
>
<mat-sidenav-content>
<pastis-title-breadcrumb
(selected)=
"navigate($event)"
*ngIf=
"!isStandalone"
[data]=
"breadcrumbDataTop"
class=
"breadcrumbTop"
>
</pastis-title-breadcrumb>
<div
class=
"pastis-metadata-option-container"
>
<!-- Top left panel container -->
<div
class=
"pastis-metadata-option-entete-1"
>
<h5>
<i
class=
"vitamui-icon vitamui-icon-dossier-physique"
></i>
<ng-container
*ngIf=
"this.profileService.profileMode==='PUA'"
>
{{'PROFILE.EDIT_PROFILE.FILE_TREE_METADATA.PUA' | translate}}
</ng-container>
<ng-container
*ngIf=
"this.profileService.profileMode==='PA'"
>
{{'PROFILE.EDIT_PROFILE.FILE_TREE_METADATA.PA' | translate}}
</ng-container>
</h5>
</div>
<!--Top right panel container-->
<div
class=
"pastis-metadata-option-entete-2"
>
<!--Button save-->
<div
[matTooltipShowDelay]=
"0"
class=
"panel-buttons"
matTooltip=
"Enregistrer le profil"
matTooltipClass=
"pastis-tooltip-class"
placement=
"top"
>
<pastis-user-action-save-profile></pastis-user-action-save-profile>
</div>
<!--Button setting-->
<div
[matTooltipShowDelay]=
"0"
class=
"panel-buttons"
matTooltip=
"Paramètres"
matTooltipClass=
"pastis-tooltip-class"
placement=
"top"
>
<pastis-user-action-download-doc
(click)=
"openChoicePopup()"
></pastis-user-action-download-doc>
<div
class=
"vitamui-pastis-choice-language"
>
<pastis-popup-metadata-language
(click)=
"changeSedaLanguage()"
*ngIf=
"languagePopup"
[docPath]=
"docPath"
></pastis-popup-metadata-language>
</div>
</div>
</div>
</div>
<!--Check font.scss-->
<div
class=
"pastis-notice-container"
>
<div
class=
"pastis-notice-container-title"
>
{{'NOTICE.ONGLET_NOTICE_TITLE' | translate}}
Notice
</div>
<div>
<div
class=
"pastis-notice-container-id"
>
<div
class=
"pastis-notice-id-label"
><p
class=
"text caption bold"
style=
"color:var(--vitamui-primary)"
>
{{'NOTICE.ONGLET_NOTICE_TYPE' |
translate}}
</p>
</div>
<div
class=
"pastis-notice-id-value"
><p
class=
"text text-medium bold"
>
{{profileService.profileMode === "PUA" ? 'Profil d\'unité archivistique' :
'Profil d\'archivage'}}
</p>
</div>
</div>
<div
class=
"pastis-notice-container-id"
>
<div
class=
"pastis-notice-id-label"
><p
class=
"text caption bold"
style=
"color:var(--vitamui-primary)"
>
{{'NOTICE.ONGLET_NOTICE_ID' |
translate}}
</p>
</div>
<div
class=
"pastis-notice-id-value"
><p
class=
"text medium bold"
>
{{ (notice.Identifier.length != 0) ? notice.Identifier : '-- --'}}
</p></div>
</div>
</div>
<div
class=
"pastis-notice-container-intitule"
>
<vitamui-common-input
[(ngModel)]=
"notice.Name"
[placeholder]=
"'NOTICE.ONGLET_NOTICE_INTITULE' |translate"
></vitamui-common-input>
</div>
<div
class=
"pastis-notice-container-description"
>
<vitamui-common-textarea
(change)=
"changeNotice()"
*ngIf=
"notice"
[(ngModel)]=
"notice.Description"
[placeholder]=
"'NOTICE.ONGLET_NOTICE_DESCRIPTION' |translate"
>
</vitamui-common-textarea>
</div>
<div
*ngIf=
"profileService.profileMode==='PUA'"
class=
"pastis-notice-footer"
>
<vitamui-common-slide-toggle
[checked]=
"false"
[disabled]=
"false"
style=
"margin-top: 10px;"
></vitamui-common-slide-toggle>
<div
class=
"pastis-notice-container-chart"
>
<div
class=
"pastis-notice-chart"
>
{{'NOTICE.NOTICE_CHART_UN' | translate}}
</div>
<div
class=
"pastis-notice-chart"
>
{{'NOTICE.NOTICE_CHART_DEUX' | translate}}
</div>
</div>
<div
class=
"pastis-notice-container-info"
>
<i
class=
"vitamui-icon vitamui-icon-info-circle"
></i>
</div>
</div>
</div>
</mat-sidenav-content>
</mat-sidenav-container>
ui/ui-frontend/projects/pastis/src/app/notice/notice.component.scss
deleted
100644 → 0
View file @
1883c06f
mat-icon
{
color
:
#65B2E4
;
}
.pastis-edit-profile-header-name
{
width
:
400px
;
}
.pastis-metadata-option-container
{
position
:
relative
;
width
:
80%
;
top
:
20px
;
height
:
116px
;
}
.pastis-notice-container
{
position
:
relative
;
width
:
80%
;
margin-left
:
80px
;
margin-top
:
60px
;
background
:
#FFFFFF
;
border-radius
:
5px
;
height
:
450px
;
}
.pastis-notice-container-title
{
/* Title */
width
:
373px
;
height
:
26px
;
left
:
40px
;
top
:
40px
;
padding-top
:
40px
;
padding-left
:
40px
;
/* H6 - Roboto Medium */
font-family
:
Roboto
;
font-style
:
normal
;
font-weight
:
500
;
font-size
:
20px
;
line-height
:
23px
;
display
:
flex
;
align-items
:
center
;
/* Black -- Hight */
color
:
#474D4A
;
}
.pastis-notice-container-id
{
margin-left
:
40px
;
margin-top
:
14px
;
padding-left
:
10px
;
padding-top
:
5px
;
left
:
0%
;
right
:
0%
;
top
:
0%
;
bottom
:
0%
;
border-radius
:
3px
;
width
:
200px
;
height
:
50px
;
display
:
inline-block
;
}
.pastis-notice-id-label
{
font-family
:
Roboto
;
font-style
:
normal
;
font-weight
:
500
;
font-size
:
13px
;
line-height
:
146
.48%
;
/* or 19px */
}
.pastis-notice-id-value
{
left
:
7%
;
right
:
12%
;
top
:
14%
;
bottom
:
12
.53%
;
font-family
:
Roboto
;
font-style
:
normal
;
font-weight
:
normal
;
font-size
:
14px
;
line-height
:
20px
;
/* or 143% */
color
:
#474D4A
;
}
.pastis-notice-description
{
width
:
361
.2px
;
height
:
103px
;
left
:
66
.25px
;
top
:
246px
;
font-family
:
Roboto
;
font-style
:
normal
;
font-weight
:
normal
;
font-size
:
13px
;
line-height
:
20px
;
/* or 154% */
color
:
var
(
--
vitamui-primary
);
}
.pastis-notice-container-intitule
{
position
:
relative
;
top
:
20px
;
left
:
40px
;
}
.pastis-notice-intitule-key
{
font-family
:
Roboto
;
font-style
:
normal
;
font-weight
:
normal
;
font-size
:
13px
;
line-height
:
15px
;
display
:
flex
;
align-items
:
center
;
color
:
var
(
--
vitamui-primary
);
}
.pastis-notice-intitule
{
font-family
:
Roboto
;
font-style
:
normal
;
font-weight
:
normal
;
font-size
:
13px
;
line-height
:
15px
;
display
:
flex
;
align-items
:
center
;
}
.pastis-notice-container-description
{
position
:
relative
;
top
:
20px
;
width
:
420px
;
left
:
40px
;
}
.pastis-notice-description-label
{
@extend
.pastis-notice-intitule
;
line-height
:
20px
;
}
.pastis-notice-description-value
{
@extend
.pastis-notice-intitule
;
border
:
none
;
resize
:
none
;
width
:
361
.2px
;
height
:
103px
;
font-size
:
15px
;
line-height
:
20px
;
color
:
#474D4A
;
}
.pastis-notice-footer
{
margin-top
:
27px
;
margin-left
:
40px
;
padding-left
:
10px
;
padding-top
:
5px
;
display
:
inline-flex
;
}
.pastis-notice-container-info
{
width
:
30px
;
height
:
40px
;
margin-top
:
5px
;
}
.pastis-notice-chart
{
width
:
275px
;
height
:
19px
;
padding-left
:
5px
;
font-family
:
Roboto
;
font-style
:
normal
;
font-weight
:
500
;
font-size
:
14px
;
line-height
:
146
.48%
;
color
:
#474D4A
;
}
.pastis-notice-container-chart
{
width
:
285px
;
height
:
40px
;
}
.vitamui-pastis-choice-language
{
position
:
absolute
;
left
:
15%
;
width
:
250px
;
height
:
150px
;
overflow
:
visible
;
z-index
:
999
;
}
ui/ui-frontend/projects/pastis/src/app/notice/notice.component.spec.ts
deleted
100644 → 0
View file @
1883c06f
/*
Copyright © CINES - Centre Informatique National pour l'Enseignement Supérieur (2020)
[dad@cines.fr]
This software is a computer program whose purpose is to provide
a web application to create, edit, import and export archive
profiles based on the french SEDA standard
(https://redirect.francearchives.fr/seda/).
This software is governed by the CeCILL-C license under French law and
abiding by the rules of distribution of free software. You can use,
modify and/ or redistribute the software under the terms of the CeCILL-C
license as circulated by CEA, CNRS and INRIA at the following URL
"http://www.cecill.info".
As a counterpart to the access to the source code and rights to copy,
modify and redistribute granted by the license, users are provided only
with a limited warranty and the software's author, the holder of the
economic rights, and the successive licensors have only limited
liability.
In this respect, the user's attention is drawn to the risks associated
with loading, using, modifying and/or developing or reproducing the
software by the user in light of its specific status of free software,
that may mean that it is complicated to manipulate, and that also
therefore means that it is reserved for developers and experienced
professionals having in-depth computer knowledge. Users are therefore
encouraged to load and test the software's suitability as regards their
requirements in conditions enabling the security of their systems and/or
data to be ensured and, more generally, to use and operate it in the
same conditions as regards security.
The fact that you are presently reading this means that you have had
knowledge of the CeCILL-C license and that you accept its terms.
*/
import
{
ComponentFixture
,
TestBed
}
from
'
@angular/core/testing
'
;
import
{
NoticeComponent
}
from
'
./notice.component
'
;
describe
(
'
NoticeComponent
'
,
()
=>
{
let
component
:
NoticeComponent
;
let
fixture
:
ComponentFixture
<
NoticeComponent
>
;
beforeEach
(
async
()
=>
{
await
TestBed
.
configureTestingModule
({
declarations
:
[
NoticeComponent
]
})
.
compileComponents
();
});
beforeEach
(()
=>
{
fixture
=
TestBed
.
createComponent
(
NoticeComponent
);
component
=
fixture
.
componentInstance
;
fixture
.
detectChanges
();
});
it
(
'
should create
'
,
()
=>
{
expect
(
component
).
toBeTruthy
();
});
});
ui/ui-frontend/projects/pastis/src/app/notice/notice.component.ts
deleted
100644 → 0
View file @
1883c06f
/*
Copyright © CINES - Centre Informatique National pour l'Enseignement Supérieur (2020)
[dad@cines.fr]
This software is a computer program whose purpose is to provide
a web application to create, edit, import and export archive
profiles based on the french SEDA standard
(https://redirect.francearchives.fr/seda/).
This software is governed by the CeCILL-C license under French law and
abiding by the rules of distribution of free software. You can use,
modify and/ or redistribute the software under the terms of the CeCILL-C
license as circulated by CEA, CNRS and INRIA at the following URL
"http://www.cecill.info".
As a counterpart to the access to the source code and rights to copy,
modify and redistribute granted by the license, users are provided only
with a limited warranty and the software's author, the holder of the
economic rights, and the successive licensors have only limited
liability.
In this respect, the user's attention is drawn to the risks associated
with loading, using, modifying and/or developing or reproducing the
software by the user in light of its specific status of free software,
that may mean that it is complicated to manipulate, and that also
therefore means that it is reserved for developers and experienced
professionals having in-depth computer knowledge. Users are therefore
encouraged to load and test the software's suitability as regards their
requirements in conditions enabling the security of their systems and/or
data to be ensured and, more generally, to use and operate it in the
same conditions as regards security.
The fact that you are presently reading this means that you have had
knowledge of the CeCILL-C license and that you accept its terms.
*/
import
{
Component
,
OnDestroy
,
OnInit
}
from
'
@angular/core
'
;
import
{
Router
,
ActivatedRoute
}
from
'
@angular/router
'
;
import
{
Subscription
}
from
'
rxjs
'
;
import
{
ToggleSidenavService
}
from
'
../core/services/toggle-sidenav.service
'
;
import
{
FormBuilder
,
FormControl
,
FormGroup
}
from
'
@angular/forms
'
;
import
{
ProfileService
}
from
'
../core/services/profile.service
'
;
import
{
PastisPopupMetadataLanguageService
}
from
'
../shared/pastis-popup-metadata-language/pastis-popup-metadata-language.service
'
;
import
{
FileService
}
from
'
../core/services/file.service
'
;
import
{
BreadcrumbDataTop
}
from
'
../models/breadcrumb
'
;
import
{
StartupService
}
from
'
ui-frontend-common
'
;
import
{
environment
}
from
'
../../environments/environment
'
;
import
{
ProfileDescription
}
from
'
../models/profile-description.model
'
;
@
Component
({
selector
:
'
pastis-notice
'
,
templateUrl
:
'
./notice.component.html
'
,
styleUrls
:
[
'
./notice.component.scss
'
]
})
export
class
NoticeComponent
implements
OnInit
,
OnDestroy
{
tabLabels
:
string
[]
=
[];
keys
:
string
[]
=
[];
notice
:
ProfileDescription
;
noticeSub
:
Subscription
;
opened
:
boolean
;
openedSub
:
Subscription
;
events
:
string
[]
=
[];
newComponent
:
boolean
;
options
:
FormGroup
;
hideRequiredControl
=
new
FormControl
(
false
);
floatLabelControl
=
new
FormControl
(
'
auto
'
);
docPath
:
string
;
sedaLanguage
:
boolean
;
languagePopup
:
boolean
;
breadcrumbDataTop
:
Array
<
BreadcrumbDataTop
>
;
profileModeLabel
:
string
;
isStandalone
:
boolean
=
environment
.
standalone
;
constructor
(
private
route
:
ActivatedRoute
,
private
sideNavService
:
ToggleSidenavService
,
private
fb
:
FormBuilder
,
private
router
:
Router
,
private
startupService
:
StartupService
,
public
profileService
:
ProfileService
,
private
fileService
:
FileService
,
private
metadataLanguageService
:
PastisPopupMetadataLanguageService
)
{
this
.
options
=
this
.
fb
.
group
({
hideRequired
:
this
.
hideRequiredControl
,
floatLabel
:
this
.
floatLabelControl
,
});
this
.
newComponent
=
(
this
.
route
.
snapshot
.
url
[
0
].
path
===
"
new
"
);
if
(
this
.
newComponent
){
this
.
noticeSub
=
this
.
fileService
.
notice
.
subscribe
(
(
value
:
any
)
=>
{
console
.
log
(
value
)
this
.
notice
=
value
;
},
(
error
)
=>
{
console
.
log
(
error
)
}
);
}
else
{
this
.
noticeSub
=
this
.
fileService
.
notice
.
subscribe
(
(
value
:
any
)
=>
{
if
(
value
&&
this
.
profileService
.
profileMode
===
'
PUA
'
){
this
.
notice
=
value
;
}
/* else {
const notice: ProfileDescription = {
description: '',
id: '',
name: '',
status: '',
identifier: '',
creationDate: '',
lastUpdate: '',
activationDate: '',
deactivationDate: '',
controlSchema: '',
tenant: 0,
version: 0,
fields: [],
}
this.notice = notice;
}*/
},
(
error
)
=>
{
console
.
log
(
error
)
}
);
}
}
ngOnInit
()
{
this
.
languagePopup
=
false
;
this
.
docPath
=
this
.
isStandalone
?
'
assets/doc/Standalone - Documentation APP - PASTIS.pdf
'
:
'
assets/doc/VITAM UI - Documentation APP - PASTIS.pdf
'
;
this
.
profileModeLabel
=
this
.
profileService
.
profileMode
===
'
PUA
'
?
"
PROFILE.EDIT_PROFILE.BREADCRUMB.PUA
"
:
"
PROFILE.EDIT_PROFILE.BREADCRUMB.PA
"
;
this
.
breadcrumbDataTop
=
[{
label
:
"
PROFILE.EDIT_PROFILE.BREADCRUMB.PORTAIL
"
,
url
:
this
.
startupService
.
getPortalUrl
(),
external
:
true
},{
label
:
"
PROFILE.EDIT_PROFILE.BREADCRUMB.CREER_ET_GERER_PROFIL
"
,
url
:
'
/
'
},
{
label
:
this
.
profileModeLabel
}];
this
.
openedSub
=
this
.
sideNavService
.
isOpened
.
subscribe
((
status
)
=>
{
this
.
opened
=
status
;
},
(
error
)
=>
{
console
.
log
(
error
);
});
this
.
keys
.
push
(
'
Profile d
\'
unité archivistique
'
,
'
Nom du PUA
'
);
this
.
tabLabels
.
push
(
'
NOTICE
'
,
'
UNITÉ D
\'
ARCHIVES
'
);
}
goBack
(){
this
.
router
.
navigate
([
'
/
'
],{
skipLocationChange
:
false
});
}
navigate
(
d
:
BreadcrumbDataTop
){
if
(
d
.
external
){
window
.
location
.
assign
(
d
.
url
);
}
else
{
this
.
router
.
navigate
([
d
.
url
],{
skipLocationChange
:
false
});
}
}
changeNotice
(){
this
.
fileService
.
notice
.
next
(
this
.
notice
);
}
changeSedaLanguage
(){
this
.
metadataLanguageService
.
sedaLanguage
.
subscribe
(
(
value
:
boolean
)
=>
{
this
.
sedaLanguage
=
value
;
},
(
error
)
=>
{
console
.
log
(
error
)
}
);
}
openChoicePopup
(){
this
.
languagePopup
=
!
this
.
languagePopup
;
}
ngOnDestroy
():
void
{
this
.
openedSub
.
unsubscribe
();
this
.
noticeSub
.
unsubscribe
();
}
}
ui/ui-frontend/projects/pastis/src/app/notice/notice.service.spec.ts
deleted
100644 → 0
View file @
1883c06f
/*
Copyright © CINES - Centre Informatique National pour l'Enseignement Supérieur (2020)
[dad@cines.fr]
This software is a computer program whose purpose is to provide
a web application to create, edit, import and export archive
profiles based on the french SEDA standard
(https://redirect.francearchives.fr/seda/).