Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
simcaq-node
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
simcaq
simcaq-node
Commits
e0ebfbe9
Commit
e0ebfbe9
authored
4 years ago
by
jpp18
Browse files
Options
Downloads
Patches
Plain Diff
Adds licentiate degree route
parent
a6253bcd
No related branches found
No related tags found
1 merge request
!309
Merge new updates into master
Pipeline
#23994
passed
4 years ago
Stage: test
Changes
3
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
src/libs/convert/licentiateDegree.js
+30
-0
30 additions, 0 deletions
src/libs/convert/licentiateDegree.js
src/libs/middlewares/id2str.js
+3
-1
3 additions, 1 deletion
src/libs/middlewares/id2str.js
src/libs/routes/teacher.js
+21
-0
21 additions, 0 deletions
src/libs/routes/teacher.js
with
54 additions
and
1 deletion
src/libs/convert/licentiateDegree.js
0 → 100644
+
30
−
0
View file @
e0ebfbe9
/*
Copyright (C) 2016 Centro de Computacao Cientifica e Software Livre
Departamento de Informatica - Universidade Federal do Parana - C3SL/UFPR
This file is part of simcaq-node.
simcaq-node is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
simcaq-node is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with simcaq-node. If not, see <https://www.gnu.org/licenses/>.
*/
module
.
exports
=
function
licentiateDegree
(
id
)
{
switch
(
id
)
{
case
1
:
return
'
Sem ensino superior
'
;
case
2
:
return
'
Superior com bacharelado ou tecnólogo
'
;
case
3
:
return
'
Superior com licenciatura ou complementação pedagógica
'
;
}
};
This diff is collapsed.
Click to expand it.
src/libs/middlewares/id2str.js
+
3
−
1
View file @
e0ebfbe9
...
...
@@ -88,6 +88,7 @@ const discipline = require(`${libs}/convert/discipline`);
const
finishUniversity
=
require
(
`
${
libs
}
/convert/finishUniversity`
);
const
initialTraining
=
require
(
`
${
libs
}
/convert/initialTraining`
);
const
posTraining
=
require
(
`
${
libs
}
/convert/posTraining`
);
const
licentiateDegree
=
require
(
`
${
libs
}
/convert/licentiateDegree`
);
const
ids
=
{
gender_id
:
gender
,
...
...
@@ -167,7 +168,8 @@ const ids = {
discipline
:
discipline
,
finish_id
:
finishUniversity
,
initial_training_id
:
initialTraining
,
pos_training_id
:
posTraining
pos_training_id
:
posTraining
,
licentiate_degree_id
:
licentiateDegree
};
function
transform
(
removeId
=
false
)
{
...
...
This diff is collapsed.
Click to expand it.
src/libs/routes/teacher.js
+
21
−
0
View file @
e0ebfbe9
...
...
@@ -204,6 +204,17 @@ teacherApp.get('/pos_training', (req, res, next) => {
next
();
},
response
(
'
pos_training
'
));
teacherApp
.
get
(
'
/licentiate_degree
'
,
(
req
,
res
,
next
)
=>
{
req
.
result
=
[];
for
(
let
i
=
1
;
i
<=
3
;
++
i
)
{
req
.
result
.
push
({
id
:
i
,
name
:
id2str
.
licentiateDegree
(
i
)
});
}
next
();
},
response
(
'
licentiate_degree
'
));
rqf
.
addField
({
name
:
'
filter
'
,
field
:
false
,
...
...
@@ -474,6 +485,16 @@ rqf.addField({
type
:
'
integer
'
,
field
:
'
formacao_pos_docente
'
}
}).
addValue
({
name
:
'
licentiate_degree
'
,
table
:
'
docente
'
,
tableField
:
'
formacao_licenciatura_docente
'
,
resultField
:
'
licentiate_degree_id
'
,
where
:
{
relation
:
'
=
'
,
type
:
'
integer
'
,
field
:
'
formacao_licenciatura_docente
'
}
});
teacherApp
.
get
(
'
/
'
,
rqf
.
parse
(),
(
req
,
res
,
next
)
=>
{
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment