Display applications
This commit is contained in:
parent
1ee9a0110b
commit
6efbeb0fa2
|
|
@ -80,6 +80,11 @@ class OrganizationController extends AbstractController
|
||||||
$applications = $this->organizationsService->getApplicationsWithAccessStatus($organization);
|
$applications = $this->organizationsService->getApplicationsWithAccessStatus($organization);
|
||||||
|
|
||||||
$actions = $organization->getActions()->toArray();
|
$actions = $organization->getActions()->toArray();
|
||||||
|
usort($actions, static function($a, $b) {
|
||||||
|
return $b->getDate() <=> $a->getDate();
|
||||||
|
});
|
||||||
|
//get the last 10 activities
|
||||||
|
$actions = array_slice($actions, 0, 10);
|
||||||
$activities = array_map(static function($activity) use ($actionService) {
|
$activities = array_map(static function($activity) use ($actionService) {
|
||||||
return [
|
return [
|
||||||
'date' => $activity->getDate(), // or however you access the date
|
'date' => $activity->getDate(), // or however you access the date
|
||||||
|
|
|
||||||
|
|
@ -39,6 +39,9 @@ class Apps
|
||||||
#[ORM\ManyToMany(targetEntity: organizations::class, inversedBy: 'apps')]
|
#[ORM\ManyToMany(targetEntity: organizations::class, inversedBy: 'apps')]
|
||||||
private Collection $organization;
|
private Collection $organization;
|
||||||
|
|
||||||
|
#[ORM\Column(length: 255, nullable: true)]
|
||||||
|
private ?string $descriptionSmall = null;
|
||||||
|
|
||||||
public function __construct()
|
public function __construct()
|
||||||
{
|
{
|
||||||
$this->organization = new ArrayCollection();
|
$this->organization = new ArrayCollection();
|
||||||
|
|
@ -144,4 +147,16 @@ class Apps
|
||||||
|
|
||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function getDescriptionSmall(): ?string
|
||||||
|
{
|
||||||
|
return $this->descriptionSmall;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function setDescriptionSmall(?string $descriptionSmall): static
|
||||||
|
{
|
||||||
|
$this->descriptionSmall = $descriptionSmall;
|
||||||
|
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,19 @@
|
||||||
|
{% block body %}
|
||||||
|
|
||||||
|
<div class="card">
|
||||||
|
<div class="card-header">
|
||||||
|
<div class="card-title">
|
||||||
|
<h3><img width=10% src="{{ asset(application.application.logoUrl) }}" alt="Logo application">
|
||||||
|
{{ application.application.name }}</h3>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="card-body">
|
||||||
|
<p class="card-text">{{ application.application.descriptionSmall }}</p>
|
||||||
|
<a href="http://{{application.application.subDomain}}.solutions-easy.moi" class="btn btn-primary">Y accéder</a>
|
||||||
|
{% if application.has_access %}
|
||||||
|
<a href="#" class="btn btn-secondary">Gérer l'application</a>
|
||||||
|
{% endif %}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{% endblock %}
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
|
|
||||||
<div class="card border-0">
|
<div class="card border-0">
|
||||||
<div class="card-header d-flex justify-content-between align-items-center">
|
<div class="card-header d-flex justify-content-between align-items-center border-0">
|
||||||
<h3>{{ title }}</h3>
|
<h3>{{ title }}</h3>
|
||||||
</div>
|
</div>
|
||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,7 @@
|
||||||
{# <a href="{{ path('user_deactivate', {'id': user.id}) }}" class="btn btn-danger">Désactiver</a> #}
|
{# <a href="{{ path('user_deactivate', {'id': user.id}) }}" class="btn btn-danger">Désactiver</a> #}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
{# USER ROW#}
|
{# USER ROW #}
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-9">
|
<div class="col-9">
|
||||||
<div class="row mb-4">
|
<div class="row mb-4">
|
||||||
|
|
@ -32,6 +32,16 @@
|
||||||
title: 'Mes utilisateurs',
|
title: 'Mes utilisateurs',
|
||||||
} %}
|
} %}
|
||||||
</div>
|
</div>
|
||||||
|
{# APPLICATION ROW #}
|
||||||
|
<div class="row ">
|
||||||
|
{% for application in applications %}
|
||||||
|
<div class="col-6 mb-3">
|
||||||
|
{% include 'applications/appSmall.html.twig' with {
|
||||||
|
application: application
|
||||||
|
} %}
|
||||||
|
</div>
|
||||||
|
{% endfor %}
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="col-3 m-auto">
|
<div class="col-3 m-auto">
|
||||||
|
|
@ -43,11 +53,9 @@
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{# APPLICATION ROW#}
|
|
||||||
<div class="row">
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue