From f6df685694d5307df241001cb9c20df1aa32cedb Mon Sep 17 00:00:00 2001 From: Edouard DUPIN Date: Tue, 14 Apr 2020 14:00:04 +0200 Subject: [PATCH] [DEBUG] correct GUI display error --- front/src/app/scene/group/group.html | 4 ++-- front/src/app/scene/saison/saison.html | 4 ++-- front/src/app/scene/type/type.html | 2 +- front/src/app/service/group.ts | 3 ++- front/src/app/service/saison.ts | 6 ++++-- front/src/app/service/type.ts | 13 ++++++++++++- front/src/environments/environment.ts | 4 ++-- 7 files changed, 25 insertions(+), 11 deletions(-) diff --git a/front/src/app/scene/group/group.html b/front/src/app/scene/group/group.html index 829b908..8c9dd89 100644 --- a/front/src/app/scene/group/group.html +++ b/front/src/app/scene/group/group.html @@ -17,8 +17,8 @@
Videos:
-
- +
+
diff --git a/front/src/app/scene/saison/saison.html b/front/src/app/scene/saison/saison.html index 6bf21fa..b51f217 100644 --- a/front/src/app/scene/saison/saison.html +++ b/front/src/app/scene/saison/saison.html @@ -12,8 +12,8 @@ {{description}}
-
- +
+
diff --git a/front/src/app/scene/type/type.html b/front/src/app/scene/type/type.html index f0b0298..dabd696 100644 --- a/front/src/app/scene/type/type.html +++ b/front/src/app/scene/type/type.html @@ -15,7 +15,7 @@
-
+
diff --git a/front/src/app/service/group.ts b/front/src/app/service/group.ts index c173526..c5f15f0 100644 --- a/front/src/app/service/group.ts +++ b/front/src/app/service/group.ts @@ -77,7 +77,8 @@ export class GroupService { return new Promise((resolve, reject) => { self.bdd.getVideo() .then(function(response) { - let data = response.gets_where([["==", "serie_id", _id], ["==", "saison_id", null]], ["id"], ["episode", "name"]) + //let data = response.gets_where([["==", "serie_id", _id], ["==", "saison_id", null]], ["id"], ["episode", "name"]) + let data = response.gets_where([["==", "serie_id", _id], ["==", "saison_id", null]], undefined, ["episode", "name"]) resolve(data); }).catch(function(response) { reject(response); diff --git a/front/src/app/service/saison.ts b/front/src/app/service/saison.ts index 3b917a9..62c65da 100644 --- a/front/src/app/service/saison.ts +++ b/front/src/app/service/saison.ts @@ -43,7 +43,8 @@ export class SaisonService { return new Promise((resolve, reject) => { self.bdd.getVideo() .then(function(response) { - let data = response.gets_where([["==", "saison_id", _id]], ["id"], ["episode", "name"]) + //let data = response.gets_where([["==", "saison_id", _id]], ["id", "name", "episode"], ["episode", "name"]) + let data = response.gets_where([["==", "saison_id", _id]], undefined, ["episode", "name"]) resolve(data); }).catch(function(response) { reject(response); @@ -58,7 +59,8 @@ export class SaisonService { return new Promise((resolve, reject) => { self.bdd.getVideo() .then(function(response) { - let data = response.gets_where([["==", "saison_id", _id]], ["id"], ["episode", "name"]) + //let data = response.gets_where([["==", "saison_id", _id]], ["id", "name", "episode"], ["episode", "name"]) + let data = response.gets_where([["==", "saison_id", _id]], undefined, ["episode", "name"]) resolve(data.length); }).catch(function(response) { reject(response); diff --git a/front/src/app/service/type.ts b/front/src/app/service/type.ts index c7ca53b..54b5487 100644 --- a/front/src/app/service/type.ts +++ b/front/src/app/service/type.ts @@ -74,8 +74,19 @@ export class TypeService { return new Promise((resolve, reject) => { self.bdd.getVideo() .then(function(response) { - let data = response.gets_where([["==", "type_id", _id], ["==", "serie_id", null], ["==", "univers_id", null]], ["id"], ["name"]); + if (_select.length == 0) { + let data = response.gets_where([["==", "type_id", _id], ["==", "serie_id", null], ["==", "univers_id", null]], undefined, ["name"]); + resolve(data); + return; + } + if (_select[0] == "*") { + let data = response.gets_where([["==", "type_id", _id], ["==", "serie_id", null], ["==", "univers_id", null]], undefined, ["name"]); + resolve(data); + return; + } + let data = response.gets_where([["==", "type_id", _id], ["==", "serie_id", null], ["==", "univers_id", null]], _select, ["name"]); resolve(data); + return; }).catch(function(response) { reject(response); }); diff --git a/front/src/environments/environment.ts b/front/src/environments/environment.ts index aeaf1dc..4c6c957 100644 --- a/front/src/environments/environment.ts +++ b/front/src/environments/environment.ts @@ -6,8 +6,8 @@ export const environment = { production: false, // URL of development API - apiUrl: 'http://localhost:15080', - //apiUrl: 'http://192.168.1.157/karideo/api', + //apiUrl: 'http://localhost:15080', + apiUrl: 'http://192.168.1.156/karideo/api', frontBaseUrl: '', //apiMode: "QUERRY" apiMode: "REWRITE",