Skip to content

Commit

Permalink
Merge pull request #12 from ConductionNL/dev-wilco
Browse files Browse the repository at this point in the history
Working claims and contracts pages and a lot of translations and updates for general page
  • Loading branch information
ginokok1996 authored Oct 22, 2020
2 parents 1c7f253 + 2cda535 commit e5babb1
Show file tree
Hide file tree
Showing 11 changed files with 769 additions and 10 deletions.
Binary file modified api/helm/id-vault-0.1.0.tgz
Binary file not shown.
6 changes: 3 additions & 3 deletions api/helm/index.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@ entries:
id-vault:
- apiVersion: v1
appVersion: V1.0
created: "2020-10-22T13:17:59.9926366Z"
created: "2020-10-22T14:00:02.0855736Z"
description: Naast deze JSON rest API is er ook een [graphql](/graphql) interface
beschikbaar.
digest: 5bb1598948dab1828d4e3ded2425fa54dcfc305f8080f91b42b332e304b3434c
digest: 06334dcb85c7880859551d2a551e8aa8f1883d2500143efe9bc5772dc9cceb7d
home: www.id-vault.com
icon: www.id-vault.com
name: id-vault
urls:
- id-vault-0.1.0.tgz
version: 0.1.0
generated: "2020-10-22T13:17:59.9782147Z"
generated: "2020-10-22T14:00:02.0687661Z"
8 changes: 4 additions & 4 deletions api/public/schema/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2391,12 +2391,12 @@ definitions:
description: 'The moment this request was created'
type: string
format: date-time
example: '2020-10-22 13:18:44'
example: '2020-10-22 14:01:25'
dateModified:
description: 'The moment this request last Modified'
type: string
format: date-time
example: '2020-10-22 13:18:44'
example: '2020-10-22 14:01:25'
required: []
AuditTrail-write:
properties:
Expand Down Expand Up @@ -2444,12 +2444,12 @@ definitions:
description: 'The moment this request was created'
type: string
format: date-time
example: '2020-10-22 13:18:44'
example: '2020-10-22 14:01:25'
dateModified:
description: 'The moment this request last Modified'
type: string
format: date-time
example: '2020-10-22 13:18:44'
example: '2020-10-22 14:01:25'
required: []
ChangeLog-write:
properties:
Expand Down
36 changes: 34 additions & 2 deletions api/src/Controller/DashboardController.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@
use Symfony\Component\Routing\Annotation\Route;

/**
* The Procces test handles any calls that have not been picked up by another test, and wel try to handle the slug based against the wrc.
* Description.
*
* Class ProcessController
* Class DashboardController
*
* @Route("/dashboard")
*/
Expand All @@ -36,6 +36,38 @@ public function generalAction(Session $session, Request $request, CommonGroundSe
return $variables;
}

/**
* @Route("/security")
* @Template
*/
public function securityAction(Session $session, Request $request, CommonGroundService $commonGroundService, ApplicationService $applicationService, ParameterBagInterface $params, string $slug = 'home')
{
$variables = [];

return $variables;
}

/**
* @Route("/claims")
* @Template
*/
public function claimsAction(Session $session, Request $request, CommonGroundService $commonGroundService, ApplicationService $applicationService, ParameterBagInterface $params, string $slug = 'home')
{
$variables = [];
$variables['claims'] = $commonGroundService->getResourceList('https://dev.zuid-drecht.nl/api/v1/wac/claims')['hydra:member']; //['component' => 'wac', 'type' => 'claims'], ['person' => $this->getUser()->getPerson(), 'order[dateCreated]' => 'desc']

return $variables;
}

/**
* @Route("/contracts")
* @Template
*/
public function contractsAction(Session $session, Request $request, CommonGroundService $commonGroundService, ApplicationService $applicationService, ParameterBagInterface $params, string $slug = 'home')
{
$variables = [];
$variables['contracts'] = $commonGroundService->getResourceList('https://dev.zuid-drecht.nl/api/v1/wac/contracts')['hydra:member']; //['component' => 'wac', 'type' => 'contracts'], ['person' => $this->getUser()->getPerson(), 'order[dateCreated]' => 'desc']

return $variables;
}
}
56 changes: 56 additions & 0 deletions api/templates/dashboard/claims.html.twig
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
{% extends 'dashboard/dashboard.html.twig' %}

{% block pageContent %}
<div class="container-md">
<div class="row">
<div class="col-12 col-md-3">

{% set activeItem = 'claims' %}
{% include 'dashboard/sidenavbar.html.twig' %}

</div>

<div class="col-12 col-md-9">

<!-- Card -->
<div class="card card-bleed shadow-light-lg mb-6">
<div class="card-header">

<!-- Heading -->
<h4 class="mb-0">
{{ 'claims'|trans|capitalize }}
</h4>

</div>
<div class="card-body" style="padding-top: 0px">

{% if claims is defined and claims is not empty %}
<table class="table table-hover">
<thead>
<tr>
<th scope="col">{{ 'property'|trans|capitalize }}</th>
<th scope="col">{{ 'value'|trans|capitalize }}</th>
</tr>
</thead>
<tbody>
{% for claim in claims %}
<tr>
<td>{{ claim.property }}</td>
<td>{% for dataItem in claim.data %}{{ dataItem }}<br>{% endfor %}</td>
</tr>
{% endfor %}
</tbody>
</table>
{% else %}
<aside class="hint">
<h4 class="hint__title">{{ 'no claims available'|trans|capitalize }}</h4>
</aside>
{% endif %}

</div>
</div>

</div>
</div> <!-- / .row -->
</div> <!-- / .container -->
{% endblock %}
57 changes: 57 additions & 0 deletions api/templates/dashboard/contracts.html.twig
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
{% extends 'dashboard/dashboard.html.twig' %}

{% block pageContent %}
<div class="container-md">
<div class="row">
<div class="col-12 col-md-3">

{% set activeItem = 'contracts' %}
{% include 'dashboard/sidenavbar.html.twig' %}

</div>

<div class="col-12 col-md-9">

<!-- Card -->
<div class="card card-bleed shadow-light-lg mb-6">
<div class="card-header">

<!-- Heading -->
<h4 class="mb-0">
{{ 'contracts'|trans|capitalize }}
</h4>

</div>
<div class="card-body" style="padding-top: 0px">
{% if contracts is defined and contracts is not empty %}
<table class="table table-hover">
<thead>
<tr>
<th scope="col">{{ 'application'|trans|capitalize }}</th>
<th scope="col">{{ 'goal'|trans|capitalize }}</th>
<th scope="col">{{ 'scope'|trans|capitalize }}</th>
</tr>
</thead>
<tbody>
{% for contract in contracts %}
<tr>
<td>{{ contract.application }}</td>
<td>{{ contract.goal }}</td>
<td>{% for scopeItem in contract.scope %}{{ scopeItem }}<br>{% endfor %}</td>
</tr>
{% endfor %}
</tbody>
</table>
{% else %}
<aside class="hint">
<h4 class="hint__title">no contracts available (niet vertaald)</h4>
</aside>
{% endif %}

</div>
</div>

</div>
</div> <!-- / .row -->
</div> <!-- / .container -->
{% endblock %}
41 changes: 41 additions & 0 deletions api/templates/dashboard/dashboard.html.twig
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
{% extends 'base.html.twig' %}

{% block content %}
<!-- HEADER
================================================== -->
<header class="bg-dark pt-9 pb-11 d-none d-md-block">
<div class="container-md">
<div class="row align-items-center">
<div class="col">

<!-- Heading -->
<h1 class="font-weight-bold text-white mb-2">
{{ 'account settings'|trans|capitalize }}
</h1>

<!-- Text -->
<p class="font-size-lg text-white-75 mb-0">
{{ 'settings for'|trans|capitalize }} Wilco Louwerse
</p>

</div>
<div class="col-auto">

<!-- Button -->
<button class="btn btn-sm btn-gray-300-20">
{{ 'logout'|trans|capitalize }}
</button>

</div>
</div> <!-- / .row -->
</div> <!-- / .container -->
</header>

<!-- MAIN
================================================== -->
<main class="pb-8 pb-md-11 mt-md-n6">
{% block pageContent %}

{% endblock %}
</main>
{% endblock %}
104 changes: 104 additions & 0 deletions api/templates/dashboard/general.html.twig
Original file line number Diff line number Diff line change
@@ -0,0 +1,104 @@
{% extends 'dashboard/dashboard.html.twig' %}

{% block pageContent %}
<div class="container-md">
<div class="row">
<div class="col-12 col-md-3">

{% set activeItem = 'general' %}
{% include 'dashboard/sidenavbar.html.twig' %}

</div>

<div class="col-12 col-md-9">

<!-- Card -->
<div class="card card-bleed shadow-light-lg mb-6">
<div class="card-header">

<!-- Heading -->
<h4 class="mb-0">
{{ 'basic information'|trans|capitalize }}
</h4>

</div>
<div class="card-body">

<!-- Form -->
<form>
<div class="row">
<div class="col-12 col-md-6">

<!-- Name -->
<div class="form-group">
<label for="name">{{ 'name'|trans|capitalize }}</label>
<input class="form-control" id="name" type="text" placeholder="{{ 'full name'|trans|capitalize }}">
</div>

</div>
<div class="col-12 col-md-6">

<!-- Email -->
<div class="form-group">
<label for="email">{{ 'email'|trans|capitalize }}</label>
<input class="form-control" id="email" type="email" placeholder="{{ '[email protected]'|trans|capitalize }}">
</div>

</div>
<div class="col-12 col-md-auto">

<!-- Button -->
<button class="btn btn-block btn-primary" type="submit">
{{ 'save changes'|trans|capitalize }}
</button>

</div>
</div>
</form>

</div>
</div>

<!-- Card -->
<div class="card card-bleed shadow-light-lg mb-6">
<div class="card-header">

<!-- Heading -->
<h4 class="mb-0">
{{ 'become a developer'|trans|capitalize }}
</h4>

</div>

<div class="card-body">

<!-- Form -->
<form>
<div class="row">
<div class="col-12 col-md-12">

<!-- Name -->
<div class="form-group">
<label for="name">input1</label>
<input class="form-control" id="name" type="text" placeholder="Some input">
</div>

</div>
<div class="col-12 col-md-auto">

<!-- Button -->
<button class="btn btn-block btn-primary" type="submit">
{{ 'submit'|trans|capitalize }}
</button>

</div>
</div>
</form>

</div>
</div>

</div>
</div> <!-- / .row -->
</div> <!-- / .container -->
{% endblock %}
Loading

0 comments on commit e5babb1

Please sign in to comment.