Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
yotta
/
pictogram
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
60
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
10947b80
authored
Dec 18, 2017
by
Sebastián Collado Montañez
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
#393
legend fixed
parent
9c7a5da6
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
7 deletions
sails/src/api/models/Student.js
sails/src/api/models/Student.js
View file @
10947b80
...
...
@@ -572,17 +572,12 @@ module.exports = {
},
/*
* Updates legend in student pictos
* legend is not updated for categories
* Updates legend in all student pictos for one id_grid
*/
update_legend
:
function
(
id_grid
,
legend_value
,
cb
)
{
var
query
=
'UPDATE stu_picto'
+
' SET attributes = json_set(attributes, \'$.legend\',\''
+
legend_value
+
'\')'
+
' WHERE id_grid='
+
id_grid
+
' AND '
+
' (json_extract(attributes, \'$.id_cat\') LIKE \'null\' AND '
+
' json_extract(attributes, \'$.coord_y\') = 0 OR '
+
' json_extract(attributes, \'$.id_cat\') NOT LIKE \'null\' AND '
+
' json_extract(attributes, \'$.coord_y\') >= 0);'
' WHERE id_grid='
+
id_grid
+
';'
;
StuPicto
.
query
(
query
,
function
(
err
,
result
)
{
...
...
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