Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Maarch
MaarchCourrier
Commits
a31edf45
Commit
a31edf45
authored
Oct 20, 2021
by
Hamza HRAMCHI
Browse files
FIX #18428 TIME 0:20 chnage uri to url + display m2m email
parent
5481bda9
Changes
5
Expand all
Hide whitespace changes
Inline
Side-by-side
dist/index.html
View file @
a31edf45
...
...
@@ -15,6 +15,6 @@
<img
src=
"assets/spinner.gif"
/>
</div>
</app-root>
<script
src=
"runtime-es2015.4ac42fef445445e6f3d0.js"
type=
"module"
></script><script
src=
"runtime-es5.4ac42fef445445e6f3d0.js"
nomodule
defer
></script><script
src=
"polyfills-es5.8c2a86db22bc37211976.js"
nomodule
defer
></script><script
src=
"polyfills-es2015.f8f86766446f4344eec7.js"
type=
"module"
></script><script
src=
"scripts.3f995a62571f9f668311.js"
defer
></script><script
src=
"main-es2015.
dc35e0550e41e621c2e3
.js"
type=
"module"
></script><script
src=
"main-es5.
dc35e0550e41e621c2e3
.js"
nomodule
defer
></script></body>
<script
src=
"runtime-es2015.4ac42fef445445e6f3d0.js"
type=
"module"
></script><script
src=
"runtime-es5.4ac42fef445445e6f3d0.js"
nomodule
defer
></script><script
src=
"polyfills-es5.8c2a86db22bc37211976.js"
nomodule
defer
></script><script
src=
"polyfills-es2015.f8f86766446f4344eec7.js"
type=
"module"
></script><script
src=
"scripts.3f995a62571f9f668311.js"
defer
></script><script
src=
"main-es2015.
65def4c6e35150a25546
.js"
type=
"module"
></script><script
src=
"main-es5.
65def4c6e35150a25546
.js"
nomodule
defer
></script></body>
</html>
\ No newline at end of file
dist/main-es2015.
dc35e0550e41e621c2e3
.js
→
dist/main-es2015.
65def4c6e35150a25546
.js
View file @
a31edf45
This diff is collapsed.
Click to expand it.
dist/main-es5.
dc35e0550e41e621c2e3
.js
→
dist/main-es5.
65def4c6e35150a25546
.js
View file @
a31edf45
This diff is collapsed.
Click to expand it.
src/frontend/app/administration/contact/page/form/contacts-form.component.html
View file @
a31edf45
...
...
@@ -104,7 +104,7 @@
*ngIf=
"(field.unit === unit.id && unit.id !== 'address') || (field.unit === unit.id && unit.id === 'address' && !addressBANMode)"
>
<p
mat-line
class=
"contact-content"
*ngIf=
"field.display"
>
<ng-container
*ngIf=
"field.type === 'string' && field.id !== 'ur
i
' && field.id !== 'externalId_m2m' && field.id != 'addressCountry'"
>
*ngIf=
"field.type === 'string' && field.id !== 'ur
l
' && field.id !== 'externalId_m2m' && field.id != 'addressCountry'"
>
<mat-form-field>
<input
matInput
[formControl]=
"field.control"
[placeholder]=
"field.label"
(blur)=
"checkCompany(field);checkFilling();"
(ngModelChange)=
"toUpperCase(field, $event)"
[required]=
"field.required"
>
...
...
@@ -184,7 +184,7 @@
<mat-error
*ngIf=
"field.control.status!=='VALID' && field.control.touched"
>
{{getErrorMsg(field.control.errors)}}
</mat-error>
</ng-container>
<ng-container
*ngIf=
"field.id === 'ur
i
'"
>
<ng-container
*ngIf=
"field.id === 'ur
l
'"
>
<mat-form-field
*ngIf=
"annuaryEnabled"
>
<input
type=
"text"
#autoCompleteInputCommunicationMean
[placeholder]=
"'lang.searchCommunicationMean' | translate"
matInput
...
...
src/frontend/app/administration/contact/page/form/contacts-form.component.ts
View file @
a31edf45
...
...
@@ -253,7 +253,7 @@ export class ContactsFormComponent implements OnInit {
values
:
[]
},
{
id
:
'
ur
i
'
,
id
:
'
ur
l
'
,
unit
:
'
maarch2maarch
'
,
label
:
this
.
translate
.
instant
(
'
lang.communicationMean
'
),
desc
:
`
${
this
.
translate
.
instant
(
'
lang.communicationMeanDesc
'
)}
(
${
this
.
translate
.
instant
(
'
lang.see
'
)}
<a href="
${
this
.
maarch2maarchUrl
}
" target="_blank">MAARCH2MAARCH</a>)`
,
...
...
@@ -264,6 +264,18 @@ export class ContactsFormComponent implements OnInit {
filling
:
false
,
values
:
[]
},
{
id
:
'
externalId_m2m
'
,
unit
:
'
maarch2maarch
'
,
label
:
this
.
translate
.
instant
(
'
lang.IdMaarch2Maarch
'
),
desc
:
`
${
this
.
translate
.
instant
(
'
lang.m2mContactInfo
'
)}
(
${
this
.
translate
.
instant
(
'
lang.see
'
)}
<a href="
${
this
.
maarch2maarchUrl
}
" target="_blank">MAARCH2MAARCH</a>)`
,
type
:
'
string
'
,
control
:
new
FormControl
(),
required
:
false
,
display
:
false
,
filling
:
false
,
values
:
[]
},
{
id
:
'
login
'
,
unit
:
'
maarch2maarch
'
,
...
...
@@ -300,18 +312,6 @@ export class ContactsFormComponent implements OnInit {
filling
:
false
,
values
:
[]
},
{
id
:
'
externalId_m2m
'
,
unit
:
'
maarch2maarch
'
,
label
:
this
.
translate
.
instant
(
'
lang.IdMaarch2Maarch
'
),
desc
:
`
${
this
.
translate
.
instant
(
'
lang.m2mContactInfo
'
)}
(
${
this
.
translate
.
instant
(
'
lang.see
'
)}
<a href="
${
this
.
maarch2maarchUrl
}
" target="_blank">MAARCH2MAARCH</a>)`
,
type
:
'
string
'
,
control
:
new
FormControl
(),
required
:
false
,
display
:
false
,
filling
:
false
,
values
:
[]
}
];
addressBANInfo
:
string
=
''
;
...
...
@@ -754,7 +754,7 @@ export class ContactsFormComponent implements OnInit {
value
:
item
.
control
.
value
}));
const
communicationMeans
=
{
ur
i
:
m2mData
.
find
((
item
:
any
)
=>
item
.
id
===
'
ur
i
'
).
value
,
ur
l
:
m2mData
.
find
((
item
:
any
)
=>
item
.
id
===
'
ur
l
'
).
value
,
externalId_m2m
:
m2mData
.
find
((
item
:
any
)
=>
item
.
id
===
'
externalId_m2m
'
).
value
,
login
:
m2mData
.
find
((
item
:
any
)
=>
item
.
id
===
'
login
'
).
value
,
password
:
m2mData
.
find
((
item
:
any
)
=>
item
.
id
===
'
password
'
).
value
,
...
...
@@ -850,14 +850,20 @@ export class ContactsFormComponent implements OnInit {
setCommunicationMeans
(
communicationMeans
:
any
)
{
let
indexField
=
-
1
;
Object
.
keys
(
communicationMeans
).
forEach
(
element
=>
{
element
=
element
===
'
email
'
?
'
email_m2m
'
:
element
;
indexField
=
this
.
contactForm
.
map
(
field
=>
field
.
id
).
indexOf
(
element
);
if
(
!
this
.
isEmptyValue
(
communicationMeans
[
element
])
&&
indexField
>
-
1
&&
[
'
uri
'
,
'
login
'
].
indexOf
(
element
)
>
-
1
)
{
this
.
contactForm
[
indexField
].
control
.
setValue
(
communicationMeans
[
element
]);
if
(
!
this
.
isEmptyValue
(
communicationMeans
[
element
===
'
email_m2m
'
?
'
email
'
:
element
])
&&
indexField
>
-
1
&&
[
'
url
'
,
'
login
'
,
'
email_m2m
'
].
indexOf
(
element
)
>
-
1
)
{
if
(
element
===
'
email_m2m
'
)
{
this
.
contactForm
[
indexField
].
control
.
setValue
(
communicationMeans
[
'
email
'
]);
}
else
{
this
.
contactForm
[
indexField
].
control
.
setValue
(
communicationMeans
[
element
]);
}
this
.
contactForm
[
indexField
].
display
=
true
;
}
});
}
canDelete
(
field
:
any
)
{
if
(
field
.
id
===
'
company
'
)
{
const
lastname
=
this
.
contactForm
.
filter
(
contact
=>
contact
.
id
===
'
lastname
'
)[
0
];
...
...
@@ -897,7 +903,7 @@ export class ContactsFormComponent implements OnInit {
removeField
(
field
:
any
)
{
field
.
display
=
!
field
.
display
;
field
.
control
.
reset
();
if
((
field
.
id
===
'
externalId_m2m
'
||
field
.
id
===
'
ur
i
'
)
&&
!
field
.
display
)
{
if
((
field
.
id
===
'
externalId_m2m
'
||
field
.
id
===
'
ur
l
'
)
&&
!
field
.
display
)
{
const
indexFieldAnnuaryId
=
this
.
contactForm
.
map
(
item
=>
item
.
id
).
indexOf
(
'
externalId_m2m_annuary_id
'
);
if
(
indexFieldAnnuaryId
>
-
1
)
{
this
.
contactForm
.
splice
(
indexFieldAnnuaryId
,
1
);
...
...
@@ -909,7 +915,7 @@ export class ContactsFormComponent implements OnInit {
initAutocompleteCommunicationMeans
()
{
this
.
communicationMeanInfo
=
this
.
translate
.
instant
(
'
lang.autocompleteInfo
'
);
this
.
communicationMeanResult
=
[];
const
indexFieldCommunicationMeans
=
this
.
contactForm
.
map
(
field
=>
field
.
id
).
indexOf
(
'
ur
i
'
);
const
indexFieldCommunicationMeans
=
this
.
contactForm
.
map
(
field
=>
field
.
id
).
indexOf
(
'
ur
l
'
);
this
.
contactForm
[
indexFieldCommunicationMeans
].
control
.
valueChanges
.
pipe
(
debounceTime
(
300
),
...
...
@@ -936,7 +942,7 @@ export class ContactsFormComponent implements OnInit {
}
selectCommunicationMean
(
ev
:
any
)
{
const
indexFieldCommunicationMeans
=
this
.
contactForm
.
map
(
field
=>
field
.
id
).
indexOf
(
'
ur
i
'
);
const
indexFieldCommunicationMeans
=
this
.
contactForm
.
map
(
field
=>
field
.
id
).
indexOf
(
'
ur
l
'
);
this
.
contactForm
[
indexFieldCommunicationMeans
].
control
.
setValue
(
ev
.
option
.
value
.
communicationValue
);
const
indexFieldExternalId
=
this
.
contactForm
.
map
(
field
=>
field
.
id
).
indexOf
(
'
externalId_m2m
'
);
...
...
@@ -950,7 +956,7 @@ export class ContactsFormComponent implements OnInit {
initAutocompleteExternalIdM2M
()
{
this
.
externalId_m2mInfo
=
this
.
translate
.
instant
(
'
lang.autocompleteInfo
'
);
this
.
externalId_m2mResult
=
[];
const
indexFieldCommunicationMeans
=
this
.
contactForm
.
map
(
field
=>
field
.
id
).
indexOf
(
'
ur
i
'
);
const
indexFieldCommunicationMeans
=
this
.
contactForm
.
map
(
field
=>
field
.
id
).
indexOf
(
'
ur
l
'
);
const
indexFieldExternalId
=
this
.
contactForm
.
map
(
field
=>
field
.
id
).
indexOf
(
'
externalId_m2m
'
);
this
.
contactForm
[
indexFieldExternalId
].
control
.
valueChanges
.
pipe
(
...
...
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