Commit eb980bf0 authored by antoine masson's avatar antoine masson
Browse files

v1.01

-Fix bug in survey poc
- New translation 
parent 81fa2bf7
......@@ -528,7 +528,8 @@ exports.getSurveykey = async (req, res) => {
exports.getSurveyInfo= async (req, res) => {
try {
const survey = await Survey.findById(req.userData.survey_id );
const survey = await Survey.findById(req.userData.survey_id);
const poc = await survey.poc
let surveygeneral = survey.general;
let languages = []
......@@ -542,8 +543,7 @@ exports.getSurveyInfo= async (req, res) => {
// const opt = await GlobalOptions.findById(0,{poc:1});
// poc = opt.poc;
// }
const info = {poc:survey.poc,languages:languages,externalurl:surveygeneral.externalurl}
const info = {poc:poc,languages:languages,externalurl:surveygeneral.externalurl}
await res.status(201).json({payload:info,message:"info",status:"OK"});
} catch (err) {
res.status(400).json({ message: err,status:"Error"});
......
[
{
"type": "String",
"field": "REFUSE",
"description": "Refuse btn",
"createdAt": "2021-02-09T19:16:11.618Z",
"updatedAt": "2021-02-09T19:16:11.618Z",
"id": "603412d38566fdbbefc1d57a"
},
{
"type": "String",
"field": "WELCOME",
"description": "Welcome text",
"createdAt": "2021-01-20T21:56:23.148Z",
"updatedAt": "2021-01-20T21:56:23.148Z",
"id": "603412d38566fdbbefc1d576"
"id": "606f6cce3d75f44a63fe1f0e"
},
{
"type": "String",
"field": "PREVIOUS",
"description": "Previous Btn",
"createdAt": "2021-02-09T19:16:21.393Z",
"updatedAt": "2021-02-09T19:16:21.393Z",
"id": "603412d38566fdbbefc1d57b"
"field": "REFUSE",
"description": "Refuse btn",
"createdAt": "2021-02-09T19:16:11.618Z",
"updatedAt": "2021-02-09T19:16:11.618Z",
"id": "606f6cce3d75f44a63fe1f0d"
},
{
"type": "String",
......@@ -29,23 +21,23 @@
"description": "Next Btn",
"createdAt": "2021-01-20T21:56:17.093Z",
"updatedAt": "2021-01-20T21:56:17.093Z",
"id": "603412d38566fdbbefc1d577"
"id": "606f6cce3d75f44a63fe1f10"
},
{
"type": "String",
"field": "AGREEMENT",
"description": "Text that user should accept on the welcome page",
"createdAt": "2021-02-09T19:15:48.034Z",
"updatedAt": "2021-02-09T19:15:48.034Z",
"id": "603412d38566fdbbefc1d578"
"field": "PREVIOUS",
"description": "Previous Btn",
"createdAt": "2021-02-09T19:16:21.393Z",
"updatedAt": "2021-02-09T19:16:21.393Z",
"id": "606f6cce3d75f44a63fe1f0f"
},
{
"type": "String",
"field": "USEMIN",
"description": "Validation Text : Please use at least",
"createdAt": "2021-02-14T12:39:26.095Z",
"updatedAt": "2021-02-14T12:39:26.095Z",
"id": "603412d38566fdbbefc1d57f"
"field": "AGREE",
"description": "AGREE btn",
"createdAt": "2021-02-09T19:16:03.364Z",
"updatedAt": "2021-02-09T19:16:03.364Z",
"id": "606f6cce3d75f44a63fe1f14"
},
{
"type": "String",
......@@ -53,15 +45,23 @@
"description": "PersoneOfContact Text",
"createdAt": "2021-02-09T19:16:43.101Z",
"updatedAt": "2021-02-09T19:16:43.101Z",
"id": "603412d38566fdbbefc1d57d"
"id": "606f6cce3d75f44a63fe1f13"
},
{
"type": "String",
"field": "AGREE",
"description": "AGREE btn",
"createdAt": "2021-02-09T19:16:03.364Z",
"updatedAt": "2021-02-09T19:16:03.364Z",
"id": "603412d38566fdbbefc1d579"
"field": "USEMIN",
"description": "Validation Text : Please use at least",
"createdAt": "2021-02-14T12:39:26.095Z",
"updatedAt": "2021-02-14T12:39:26.095Z",
"id": "606f6cce3d75f44a63fe1f12"
},
{
"type": "String",
"field": "AGREEMENT",
"description": "Text that user should accept on the welcome page",
"createdAt": "2021-02-09T19:15:48.034Z",
"updatedAt": "2021-02-09T19:15:48.034Z",
"id": "606f6cce3d75f44a63fe1f11"
},
{
"type": "String",
......@@ -69,7 +69,7 @@
"description": "Agreement text title",
"createdAt": "2021-02-09T19:17:15.957Z",
"updatedAt": "2021-02-09T19:17:15.957Z",
"id": "603412d38566fdbbefc1d57c"
"id": "606f6cce3d75f44a63fe1f15"
},
{
"type": "String",
......@@ -77,7 +77,7 @@
"description": "Validation Text : You need to select one value",
"createdAt": "2021-02-14T12:38:30.004Z",
"updatedAt": "2021-02-14T12:38:30.004Z",
"id": "603412d38566fdbbefc1d57e"
"id": "606f6cce3d75f44a63fe1f16"
},
{
"type": "String",
......@@ -85,15 +85,7 @@
"description": "Validation Text : Please use maximum",
"createdAt": "2021-02-14T12:39:11.596Z",
"updatedAt": "2021-02-14T12:39:11.596Z",
"id": "603412d38566fdbbefc1d580"
},
{
"type": "String",
"field": "CHARACTERS",
"description": "Word characters",
"createdAt": "2021-02-14T12:39:47.817Z",
"updatedAt": "2021-02-14T12:39:47.817Z",
"id": "603412d38566fdbbefc1d581"
"id": "606f6cce3d75f44a63fe1f17"
},
{
"type": "String",
......@@ -101,7 +93,15 @@
"description": "Validation Text Allowed maximum is",
"createdAt": "2021-02-14T12:40:31.860Z",
"updatedAt": "2021-02-14T12:40:31.860Z",
"id": "603412d38566fdbbefc1d582"
"id": "606f6cce3d75f44a63fe1f19"
},
{
"type": "String",
"field": "CHARACTERS",
"description": "Word characters",
"createdAt": "2021-02-14T12:39:47.817Z",
"updatedAt": "2021-02-14T12:39:47.817Z",
"id": "606f6cce3d75f44a63fe1f18"
},
{
"type": "String",
......@@ -109,7 +109,7 @@
"description": "Validation text : Mandatory field",
"createdAt": "2021-02-14T12:41:14.347Z",
"updatedAt": "2021-02-14T12:41:14.347Z",
"id": "603412d38566fdbbefc1d583"
"id": "606f6cce3d75f44a63fe1f1a"
},
{
"type": "String",
......@@ -117,7 +117,7 @@
"description": "Validation text : Allowed miniumum is",
"createdAt": "2021-02-14T12:40:47.527Z",
"updatedAt": "2021-02-14T12:40:47.527Z",
"id": "603412d38566fdbbefc1d584"
"id": "606f6cce3d75f44a63fe1f1b"
},
{
"type": "String",
......@@ -125,7 +125,7 @@
"description": "Validation text : You need to sort all the boxes",
"createdAt": "2021-02-17T15:19:24.085Z",
"updatedAt": "2021-02-17T15:19:24.085Z",
"id": "603412d38566fdbbefc1d585"
"id": "606f6cce3d75f44a63fe1f1c"
},
{
"type": "String",
......@@ -133,15 +133,7 @@
"description": "Text display on top of the alternative when user needs to movee them",
"createdAt": "2021-02-25T20:55:58.906Z",
"updatedAt": "2021-02-25T20:55:58.906Z",
"id": "60380edef9db7d8a25a45b1f"
},
{
"type": "String",
"field": "RESTART",
"description": "Restart btn",
"createdAt": "2021-02-28T20:25:57.348Z",
"updatedAt": "2021-02-28T20:25:57.348Z",
"id": "603bfc556fbde221723a7e8b"
"id": "606f6cce3d75f44a63fe1f1d"
},
{
"type": "String",
......@@ -149,15 +141,15 @@
"description": "Rational Survey : Intro to Alternatives",
"createdAt": "2021-02-28T20:28:02.986Z",
"updatedAt": "2021-02-28T20:28:02.986Z",
"id": "603bfcd26fbde221723a7e8c"
"id": "606f6cce3d75f44a63fe1f1f"
},
{
"type": "String",
"field": "ALTERNATIVES",
"description": "Rational Survey : Alternatives ",
"createdAt": "2021-02-28T20:28:21.306Z",
"updatedAt": "2021-02-28T20:28:21.306Z",
"id": "603bfce56fbde221723a7e8d"
"field": "RESTART",
"description": "Restart btn",
"createdAt": "2021-02-28T20:25:57.348Z",
"updatedAt": "2021-02-28T20:25:57.348Z",
"id": "606f6cce3d75f44a63fe1f1e"
},
{
"type": "String",
......@@ -165,7 +157,7 @@
"description": "Rational Survey : Sort Alternatives",
"createdAt": "2021-02-28T20:28:38.606Z",
"updatedAt": "2021-02-28T20:28:38.606Z",
"id": "603bfcf66fbde221723a7e8e"
"id": "606f6cce3d75f44a63fe1f21"
},
{
"type": "String",
......@@ -173,7 +165,15 @@
"description": "Rational Survey : Intro to Objectives",
"createdAt": "2021-02-28T20:29:00.286Z",
"updatedAt": "2021-02-28T20:29:00.286Z",
"id": "603bfd0c6fbde221723a7e8f"
"id": "606f6cce3d75f44a63fe1f22"
},
{
"type": "String",
"field": "ALTERNATIVES",
"description": "Rational Survey : Alternatives ",
"createdAt": "2021-02-28T20:28:21.306Z",
"updatedAt": "2021-02-28T20:28:21.306Z",
"id": "606f6cce3d75f44a63fe1f20"
},
{
"type": "String",
......@@ -181,7 +181,15 @@
"description": "Text display at the end of learning loop step when matching",
"createdAt": "2021-03-15T13:12:36.546Z",
"updatedAt": "2021-03-15T13:12:36.546Z",
"id": "604f5d448b7394a616b9082a"
"id": "606f6cce3d75f44a63fe1f23"
},
{
"type": "String",
"field": "RTRADEOFF",
"description": "Restart Tradeoff Btn",
"createdAt": "2021-03-15T13:20:09.169Z",
"updatedAt": "2021-03-15T13:20:09.169Z",
"id": "606f6cce3d75f44a63fe1f26"
},
{
"type": "String",
......@@ -189,7 +197,7 @@
"description": " Text display at the end of learning loop step when no matching ",
"createdAt": "2021-03-15T13:19:31.563Z",
"updatedAt": "2021-03-15T13:19:31.563Z",
"id": "604f5ee38b7394a616b9082b"
"id": "606f6cce3d75f44a63fe1f24"
},
{
"type": "String",
......@@ -197,15 +205,15 @@
"description": "Restart Swing Btn",
"createdAt": "2021-03-15T13:19:55.921Z",
"updatedAt": "2021-03-15T13:19:55.921Z",
"id": "604f5efb8b7394a616b9082c"
"id": "606f6cce3d75f44a63fe1f25"
},
{
"type": "String",
"field": "RTRADEOFF",
"description": "Restart Tradeoff Btn",
"createdAt": "2021-03-15T13:20:09.169Z",
"updatedAt": "2021-03-15T13:20:09.169Z",
"id": "604f5f098b7394a616b9082d"
"field": "ERRHIGHER",
"description": "Text Cannot be higher than a upper element",
"createdAt": "2021-03-15T13:22:37.140Z",
"updatedAt": "2021-03-15T13:22:37.140Z",
"id": "606f6cce3d75f44a63fe1f28"
},
{
"type": "String",
......@@ -213,15 +221,15 @@
"description": "Text You need to choose a value",
"createdAt": "2021-03-15T13:21:40.986Z",
"updatedAt": "2021-03-15T13:21:40.986Z",
"id": "604f5f648b7394a616b9082e"
"id": "606f6cce3d75f44a63fe1f27"
},
{
"type": "String",
"field": "ERRHIGHER",
"description": "Text Cannot be higher than a upper element",
"createdAt": "2021-03-15T13:22:37.140Z",
"updatedAt": "2021-03-15T13:22:37.140Z",
"id": "604f5f9d8b7394a616b9082f"
"field": "READOBJ",
"description": "Text Read this objective",
"createdAt": "2021-03-15T13:43:17.504Z",
"updatedAt": "2021-03-15T13:43:17.504Z",
"id": "606f6cce3d75f44a63fe1f2a"
},
{
"type": "String",
......@@ -229,31 +237,23 @@
"description": "Text Cannot be lower than a lower element",
"createdAt": "2021-03-15T13:22:53.517Z",
"updatedAt": "2021-03-15T13:22:53.517Z",
"id": "604f5fad8b7394a616b90830"
},
{
"type": "String",
"field": "READOBJ",
"description": "Text Read this objective",
"createdAt": "2021-03-15T13:43:17.504Z",
"updatedAt": "2021-03-15T13:43:17.504Z",
"id": "604f64755e3fa1c6500b61b0"
"id": "606f6cce3d75f44a63fe1f29"
},
{
"type": "String",
"field": "READALT",
"description": "Text Read this alternative",
"createdAt": "2021-03-15T13:43:28.912Z",
"updatedAt": "2021-03-16T19:13:46.816Z",
"id": "604f64805e3fa1c6500b61b1"
"updatedAt": "2021-03-15T13:43:28.912Z",
"id": "606f6cce3d75f44a63fe1f2b"
},
{
"type": "String",
"field": "NOMATCHSELECT",
"description": "Rational : Text display when not match but user wants continue",
"createdAt": "2021-03-15T20:58:28.046Z",
"updatedAt": "2021-03-18T20:07:46.583Z",
"id": "604fca745e3fa1c6500b61de"
"updatedAt": "2021-03-15T20:58:28.046Z",
"id": "606f6cce3d75f44a63fe1f2c"
},
{
"type": "String",
......@@ -261,15 +261,7 @@
"description": "Btn txt for continuing with swing (in case of non-matching)",
"createdAt": "2021-03-15T20:58:51.671Z",
"updatedAt": "2021-03-15T20:58:51.671Z",
"id": "604fca8b5e3fa1c6500b61df"
},
{
"type": "String",
"field": "CTRADEOFF",
"description": "Btn txt for continuing with tradeoff (in case of non-matching)",
"createdAt": "2021-03-15T20:59:14.529Z",
"updatedAt": "2021-03-15T20:59:14.529Z",
"id": "604fcaa25e3fa1c6500b61e0"
"id": "606f6cce3d75f44a63fe1f2d"
},
{
"type": "String",
......@@ -277,15 +269,15 @@
"description": "Btn txt for continuing with None (in case of non-matching)",
"createdAt": "2021-03-15T20:59:38.611Z",
"updatedAt": "2021-03-15T20:59:38.611Z",
"id": "604fcaba5e3fa1c6500b61e1"
"id": "606f6cce3d75f44a63fe1f2f"
},
{
"type": "html",
"field": "SWINGTEXT",
"description": "Presentation of Swing method",
"createdAt": "2021-03-15T21:01:30.130Z",
"updatedAt": "2021-03-15T21:01:30.130Z",
"id": "604fcb2a5e3fa1c6500b61e2"
"type": "String",
"field": "CTRADEOFF",
"description": "Btn txt for continuing with tradeoff (in case of non-matching)",
"createdAt": "2021-03-15T20:59:14.529Z",
"updatedAt": "2021-03-15T20:59:14.529Z",
"id": "606f6cce3d75f44a63fe1f2e"
},
{
"type": "html",
......@@ -293,23 +285,15 @@
"description": "Presentation of Tradeoff method",
"createdAt": "2021-03-15T21:01:45.544Z",
"updatedAt": "2021-03-15T21:01:45.544Z",
"id": "604fcb395e3fa1c6500b61e3"
},
{
"type": "String",
"field": "OBJCAT",
"description": "Rational Title : Objective Category",
"createdAt": "2021-03-16T19:12:53.222Z",
"updatedAt": "2021-03-16T19:13:37.004Z",
"id": "605103355e3fa1c6500b6213"
"id": "606f6cce3d75f44a63fe1f31"
},
{
"type": "String",
"field": "OBJROOT",
"description": "Rational Title : Objective root",
"createdAt": "2021-03-16T19:13:06.924Z",
"updatedAt": "2021-03-16T19:13:32.187Z",
"id": "605103425e3fa1c6500b6214"
"updatedAt": "2021-03-16T19:13:06.924Z",
"id": "606f6cce3d75f44a63fe1f33"
},
{
"type": "String",
......@@ -317,15 +301,15 @@
"description": "Rational title : Conclusion",
"createdAt": "2021-03-16T19:13:26.310Z",
"updatedAt": "2021-03-16T19:13:26.310Z",
"id": "605103565e3fa1c6500b6215"
"id": "606f6cce3d75f44a63fe1f34"
},
{
"type": "String",
"field": "CLICKITEMSEQ",
"description": "Text on top of items when reading by clicking seq",
"createdAt": "2021-03-16T19:14:26.713Z",
"updatedAt": "2021-03-16T19:15:14.022Z",
"id": "605103925e3fa1c6500b6216"
"type": "html",
"field": "SWINGTEXT",
"description": "Presentation of Swing method",
"createdAt": "2021-03-15T21:01:30.130Z",
"updatedAt": "2021-03-15T21:01:30.130Z",
"id": "606f6cce3d75f44a63fe1f30"
},
{
"type": "String",
......@@ -333,7 +317,23 @@
"description": "Text on top of items when sort by clicking seq",
"createdAt": "2021-03-16T19:14:56.238Z",
"updatedAt": "2021-03-16T19:14:56.238Z",
"id": "605103b05e3fa1c6500b6217"
"id": "606f6cce3d75f44a63fe1f36"
},
{
"type": "String",
"field": "OBJCAT",
"description": "Rational Title : Objective Category",
"createdAt": "2021-03-16T19:12:53.222Z",
"updatedAt": "2021-03-16T19:12:53.222Z",
"id": "606f6cce3d75f44a63fe1f32"
},
{
"type": "String",
"field": "CLICKITEMSEQ",
"description": "Text on top of items when reading by clicking seq",
"createdAt": "2021-03-16T19:14:26.713Z",
"updatedAt": "2021-03-16T19:14:26.713Z",
"id": "606f6cce3d75f44a63fe1f35"
},
{
"type": "String",
......@@ -341,7 +341,7 @@
"description": "Rational : text on swing when click to sort",
"createdAt": "2021-03-16T19:15:35.734Z",
"updatedAt": "2021-03-16T19:15:35.734Z",
"id": "605103d75e3fa1c6500b6218"
"id": "606f6cce3d75f44a63fe1f37"
},
{
"type": "String",
......@@ -349,7 +349,7 @@
"description": "Rational : text on swing when user need to move sliders",
"createdAt": "2021-03-16T19:16:08.904Z",
"updatedAt": "2021-03-16T19:16:08.904Z",
"id": "605103f85e3fa1c6500b6219"
"id": "606f6cce3d75f44a63fe1f38"
},
{
"type": "String",
......@@ -357,7 +357,7 @@
"description": "Rational : text on tradeoff when need to select best",
"createdAt": "2021-03-16T19:17:30.246Z",
"updatedAt": "2021-03-16T19:17:30.246Z",
"id": "6051044a5e3fa1c6500b621a"
"id": "606f6cce3d75f44a63fe1f39"
},
{
"type": "String",
......@@ -365,7 +365,7 @@
"description": "Rational : text on tradeoff when need to move slider",
"createdAt": "2021-03-16T19:17:43.875Z",
"updatedAt": "2021-03-16T19:17:43.875Z",
"id": "605104575e3fa1c6500b621b"
"id": "606f6cce3d75f44a63fe1f3a"
},
{
"type": "String",
......@@ -373,15 +373,15 @@
"description": "Btn txt for equivalent",
"createdAt": "2021-03-16T19:27:17.864Z",
"updatedAt": "2021-03-16T19:27:17.864Z",
"id": "605106955e3fa1c6500b624b"
"id": "606f6cce3d75f44a63fe1f3b"
},
{
"type": "String",
"field": "NOMATCHCONTINUE",
"description": "Rational : Text display when swing and tradeoff not match but continue ",
"createdAt": "2021-03-18T20:07:24.198Z",
"updatedAt": "2021-03-18T20:07:24.198Z",
"id": "6053b2fcfe227d253226a971"
"type": "html",
"field": "RATIONAL_CONCLUSION_NOMATCH",
"description": "Text on bottom of alternatives analysis on rational conclusion when no matching",
"createdAt": "2021-03-25T21:50:12.745Z",
"updatedAt": "2021-03-25T21:50:12.745Z",
"id": "606f6cce3d75f44a63fe1f3f"
},
{
"type": "html",
......@@ -389,7 +389,7 @@
"description": "Text on top of objectives analysis on rational conclusion",
"createdAt": "2021-03-25T21:49:19.303Z",
"updatedAt": "2021-03-25T21:49:19.303Z",
"id": "605d055f0383356fef7c795b"
"id": "606f6cce3d75f44a63fe1f3d"
},
{
"type": "html",
......@@ -397,15 +397,15 @@
"description": "Text on bottom of alternatives analysis on rational conclusion when matching",
"createdAt": "2021-03-25T21:50:00.030Z",
"updatedAt": "2021-03-25T21:50:00.030Z",
"id": "605d05880383356fef7c795c"
"id": "606f6cce3d75f44a63fe1f3e"
},
{
"type": "html",
"field": "RATIONAL_CONCLUSION_NOMATCH",
"description": "Text on bottom of alternatives analysis on rational conclusion when no matching",
"createdAt": "2021-03-25T21:50:12.745Z",
"updatedAt": "2021-03-25T21:50:12.745Z",
"id": "605d05940383356fef7c795d"
"type": "String",
"field": "NOMATCHCONTINUE",
"description": "Rational : Text display when swing and tradeoff not match but continue ",
"createdAt": "2021-03-18T20:07:24.198Z",
"updatedAt": "2021-03-18T20:07:24.198Z",
"id": "606f6cce3d75f44a63fe1f3c"
},
{
"type": "String",
......@@ -413,14 +413,14 @@
"description": "Text displayed when redirect to an external URL",
"createdAt": "2021-03-26T21:44:32.682Z",
"updatedAt": "2021-03-26T21:44:32.682Z",
"id": "605e55c052816f12906632fa"
"id": "606f6cce3d75f44a63fe1f40"
},
{
"type": "String",
"type": "html",
"field": "ALTRANKING",
"description": "Text on top of alternative ranking on rational conclusion ",
"createdAt": "2021-04-08T16:10:29.001Z",
"updatedAt": "2021-04-08T16:10:29.001Z",
"id": "606f2af4d9374232a4a27276"
"updatedAt": "2021-04-08T20:51:35.880Z",
"id": "606f6cce3d75f44a63fe1f41"
}
]
\ No newline at end of file
[
{
"language": "ENGLISH",
"flag": "gb",
"language": "FRENCH",
"flag": "fr",
"fields": [
{
"_id": "6068bf8d56f5cd8a7af23d8a",
"_id": "60380f10f9db7d8a25a45b39",
"field": "NEXT",
"text": "next",
"id": "6068bf8d56f5cd8a7af23d8a"
"text": "suivant",
"id": "60380f10f9db7d8a25a45b39"
},
{
"_id": "6068bf8d56f5cd8a7af23d8b",
"_id": "60380f10f9db7d8a25a45b3a",
"field": "WELCOME",
"text": "welcome",
"id": "6068bf8d56f5cd8a7af23d8b"
"text": "bienvenue",
"id": "60380f10f9db7d8a25a45b3a"
},
{
"_id": "6068bf8d56f5cd8a7af23d8c",
"_id": "60380f10f9db7d8a25a45b3b",