diff --git a/WD7UVN_SzTGUI_2023242.Client.JS/wwwroot/noncrud/WhoUsesService/WhoUsesService.html b/WD7UVN_SzTGUI_2023242.Client.JS/wwwroot/noncrud/WhoUsesService/WhoUsesService.html index 7d20689..40e4322 100644 --- a/WD7UVN_SzTGUI_2023242.Client.JS/wwwroot/noncrud/WhoUsesService/WhoUsesService.html +++ b/WD7UVN_SzTGUI_2023242.Client.JS/wwwroot/noncrud/WhoUsesService/WhoUsesService.html @@ -3,7 +3,7 @@ services - + diff --git a/WD7UVN_SzTGUI_2023242.Client.JS/wwwroot/noncrud/WhoUsesService/script.js b/WD7UVN_SzTGUI_2023242.Client.JS/wwwroot/noncrud/WhoUsesService/script.js new file mode 100644 index 0000000..5478daa --- /dev/null +++ b/WD7UVN_SzTGUI_2023242.Client.JS/wwwroot/noncrud/WhoUsesService/script.js @@ -0,0 +1,54 @@ +let services = []; +getServices(); + +async function getServices() +{ + await fetch('https://localhost:5001/api/Service') + .then(x => x.json()) + .then(y => { + services = y; + console.log(services); + display(); + }); +} + +function display() +{ + document.getElementById('resultarea').innerHTML = ''; + + services.forEach(t => { + document.getElementById('resultarea').innerHTML += + '' + + t.id + + '' + + t.name + + '' + + '' + + ''; + }); +} + +async function runQuery(id) +{ + let results = [] + + await fetch('https://localhost:5001/api/WhoUsesService?id=' + id) + .then(x => x.json()) + .then(y => { + results = y; + console.log(results); + }); + + document.getElementById('resultarea').innerHTML = ''; + + results.forEach(t => { + document.getElementById('resultarea').innerHTML += + '

Query results

' + + '' + + '' + + '' + + '' + + ''; + }); + +} \ No newline at end of file diff --git a/WD7UVN_SzTGUI_2023242.Client.JS/wwwroot/noncrud/index.html b/WD7UVN_SzTGUI_2023242.Client.JS/wwwroot/noncrud/index.html index 08e23a4..f26719e 100644 --- a/WD7UVN_SzTGUI_2023242.Client.JS/wwwroot/noncrud/index.html +++ b/WD7UVN_SzTGUI_2023242.Client.JS/wwwroot/noncrud/index.html @@ -7,14 +7,14 @@

Tables

- Get clients using a service + Get clients using a service
- Get subordinates of employee + Get subordinates of employee
- Get responsible leader for service + Get responsible leader for service
- Get employees working on a service + Get employees working on a service
- Get members of a team + Get members of a team diff --git a/WD7UVN_SzTGUI_2023242.Client.JS/wwwroot/services/services.html b/WD7UVN_SzTGUI_2023242.Client.JS/wwwroot/services/services.html index 18b0c1c..d616324 100644 --- a/WD7UVN_SzTGUI_2023242.Client.JS/wwwroot/services/services.html +++ b/WD7UVN_SzTGUI_2023242.Client.JS/wwwroot/services/services.html @@ -62,8 +62,10 @@ + + +
IDClient
Port
-