Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
synergy-components
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
community
synergy-components
Commits
15ed4996
Commit
15ed4996
authored
Dec 24, 2025
by
Samir Sadyhov
🤔
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
запуск маршрутов - добавлена проверка на пустые значения + доработки
parent
7665e654
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
48 additions
and
6 deletions
+48
-6
constructor/scripts/openDocument/startRegistryRoute.js
constructor/scripts/openDocument/startRegistryRoute.js
+48
-6
No files found.
constructor/scripts/openDocument/startRegistryRoute.js
View file @
15ed4996
...
...
@@ -31,6 +31,28 @@ const parseRouteData = data => {
return
JSON
.
stringify
(
result
);
};
const
checkErrors
=
route
=>
{
const
errors
=
[];
const
checkBlock
=
block
=>
{
if
(
block
?.
showOnSave
!==
"
true
"
)
return
;
block
.
items
?.
forEach
(
item
=>
{
item
.
users
?.
forEach
(
proc
=>
{
if
(
!
proc
.
userID
)
{
errors
.
push
({
errorMessage
:
'
Не выбран ответственный
'
,
itemID
:
proc
.
itemID
});
}
});
});
};
checkBlock
(
route
.
before
);
checkBlock
(
route
.
after
);
return
errors
.
length
?
errors
:
null
;
};
const
routeNames
=
{
"
ASSIGNMENT_ITEM
"
:
"
Работа
"
,
"
AGREEMENT_ITEM
"
:
"
Согласование
"
,
...
...
@@ -39,6 +61,7 @@ const routeNames = {
"
SEND_DOCUMENT
"
:
"
Отправка документа
"
,
"
BLOCKING_PROCESS
"
:
"
Блокирующий процесс
"
,
"
COMMON_PROCESS_BY_FORM
"
:
"
Работа по форме
"
,
"
REGISTRATION_ITEM
"
:
"
Регистрация
"
}
const
getRouteName
=
routeType
=>
routeNames
[
routeType
]
||
routeType
;
...
...
@@ -76,6 +99,7 @@ const createUserParamBlock = (label, routeUserItem, itemContainer, panelType) =>
routeUserItem
.
userID
=
selectUser
.
personID
;
routeUserItem
.
userName
=
selectUser
.
personName
;
itemContainer
.
find
(
'
[item-role="route_user_name"]
'
).
text
(
userNames
);
itemContainer
.
removeClass
(
'
uk-form-danger
'
);
});
});
...
...
@@ -133,7 +157,8 @@ this.StartRegistryRoute = class {
showMessage
(
i18n
.
tr
(
'
Функционал в разработке
'
),
'
info
'
);
}
showHidePanelSettings
(){
showHidePanelSettings
(
value
){
this
.
panelSettingsIsShow
=
value
;
if
(
this
.
panelSettingsIsShow
)
{
this
.
routeContent
.
addClass
(
'
panel_settings_visible
'
);
this
.
panelSettings
.
addClass
(
'
panel_settings_visible
'
);
...
...
@@ -162,8 +187,7 @@ this.StartRegistryRoute = class {
}
renderSettings
(
item
,
itemContainer
,
panelType
){
this
.
panelSettingsIsShow
=
true
;
this
.
showHidePanelSettings
();
this
.
showHidePanelSettings
(
true
);
this
.
panelSettings
.
empty
();
...
...
@@ -215,6 +239,9 @@ this.StartRegistryRoute = class {
const
numItem
=
$
(
el
).
find
(
'
[item-role="route_index"]
'
);
numItem
.
text
(
i
+
1
);
});
this
.
showHidePanelSettings
(
false
);
this
.
panelSettings
.
empty
();
}
});
...
...
@@ -310,8 +337,7 @@ this.StartRegistryRoute = class {
showHideSettingsButton
.
on
(
'
click
'
,
e
=>
{
e
.
preventDefault
();
this
.
panelSettingsIsShow
=
!
this
.
panelSettingsIsShow
;
this
.
showHidePanelSettings
();
this
.
showHidePanelSettings
(
!
this
.
panelSettingsIsShow
);
});
closeButton
.
on
(
'
click
'
,
e
=>
{
...
...
@@ -321,7 +347,23 @@ this.StartRegistryRoute = class {
buttonStartRoute
.
on
(
'
click
'
,
e
=>
{
e
.
preventDefault
();
const
errors
=
checkErrors
(
this
.
registryRoute
);
if
(
errors
)
{
const
errMessage
=
[];
errors
.
forEach
(
err
=>
{
$
(
`.route_item_container[itemid="
${
err
.
itemID
}
"]`
).
addClass
(
'
uk-form-danger
'
);
errMessage
.
push
(
err
.
errorMessage
);
})
UIkit
.
notification
.
closeAll
();
showMessage
(
errMessage
.
join
(
'
\n
'
),
'
error
'
);
}
else
{
this
.
startRoute
();
}
});
subHeader
.
append
(
addItemButton
,
showHideSettingsButton
)
...
...
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