[DEV] correct edit
This commit is contained in:
parent
d1caff5cbd
commit
c4100a7db4
@ -49,6 +49,12 @@ def add(_app, _name_api):
|
|||||||
@doc.description("Display a listing of the resource.")
|
@doc.description("Display a listing of the resource.")
|
||||||
@doc.produces(content_type='application/json')
|
@doc.produces(content_type='application/json')
|
||||||
async def list(request):
|
async def list(request):
|
||||||
|
if "select" in request.args:
|
||||||
|
if request.args["select"] == "*":
|
||||||
|
list_values = data_global_elements.get_interface(_name_api).gets_where(select=[["!=", "id", None]], order_by=["name"])
|
||||||
|
else:
|
||||||
|
list_values = data_global_elements.get_interface(_name_api).gets_where(select=[["!=", "id", None]], order_by=["name"], filter=request.args["select"])
|
||||||
|
return response.json(list_values)
|
||||||
return response.json(data_global_elements.get_interface(_name_api).gets())
|
return response.json(data_global_elements.get_interface(_name_api).gets())
|
||||||
|
|
||||||
@elem_blueprint.post('/' + _name_api, strict_slashes=True)
|
@elem_blueprint.post('/' + _name_api, strict_slashes=True)
|
||||||
|
@ -106,6 +106,14 @@ export class VideoEditComponent implements OnInit {
|
|||||||
}).catch(function(response2) {
|
}).catch(function(response2) {
|
||||||
console.log("get response22 : " + JSON.stringify(response2, null, 2));
|
console.log("get response22 : " + JSON.stringify(response2, null, 2));
|
||||||
});
|
});
|
||||||
|
this.groupService.getOrder()
|
||||||
|
.then(function(response3) {
|
||||||
|
for(let iii= 0; iii < response3.length; iii++) {
|
||||||
|
self.listGroup.push({value: response3[iii].id, label: response3[iii].name});
|
||||||
|
}
|
||||||
|
}).catch(function(response3) {
|
||||||
|
console.log("get response3 : " + JSON.stringify(response3, null, 2));
|
||||||
|
});
|
||||||
this.videoService.get(this.id_video)
|
this.videoService.get(this.id_video)
|
||||||
.then(function(response) {
|
.then(function(response) {
|
||||||
console.log("get response of video : " + JSON.stringify(response, null, 2));
|
console.log("get response of video : " + JSON.stringify(response, null, 2));
|
||||||
@ -147,9 +155,10 @@ export class VideoEditComponent implements OnInit {
|
|||||||
this.type_id = _value;
|
this.type_id = _value;
|
||||||
this.group_id = null;
|
this.group_id = null;
|
||||||
this.saison_id = null;
|
this.saison_id = null;
|
||||||
this.listGroup = [{value: undefined, label: '---'}];
|
//this.listGroup = [{value: undefined, label: '---'}];
|
||||||
this.listSaison = [{value: undefined, label: '---'}];
|
this.listSaison = [{value: undefined, label: '---'}];
|
||||||
let self = this;
|
let self = this;
|
||||||
|
/*
|
||||||
if (this.type_id != undefined) {
|
if (this.type_id != undefined) {
|
||||||
self.typeService.getSubGroup(this.type_id, ["id", "name"])
|
self.typeService.getSubGroup(this.type_id, ["id", "name"])
|
||||||
.then(function(response2) {
|
.then(function(response2) {
|
||||||
@ -160,6 +169,7 @@ export class VideoEditComponent implements OnInit {
|
|||||||
console.log("get response22 : " + JSON.stringify(response2, null, 2));
|
console.log("get response22 : " + JSON.stringify(response2, null, 2));
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
}
|
}
|
||||||
|
|
||||||
onChangeUnivers(_value:any):void {
|
onChangeUnivers(_value:any):void {
|
||||||
|
@ -13,6 +13,9 @@ export class GroupService {
|
|||||||
get(_id:number):any {
|
get(_id:number):any {
|
||||||
return this.http.get_specific("group", _id);
|
return this.http.get_specific("group", _id);
|
||||||
};
|
};
|
||||||
|
getOrder(_id:number):any {
|
||||||
|
return this.http.get_specific("group", _id, "", ["name","id"]);
|
||||||
|
};
|
||||||
|
|
||||||
getVideoAll(_id:number):any {
|
getVideoAll(_id:number):any {
|
||||||
return this.http.get_specific("group", _id, "video_all");
|
return this.http.get_specific("group", _id, "video_all");
|
||||||
|
Loading…
Reference in New Issue
Block a user