-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
6728982
commit 4ca3f86
Showing
6 changed files
with
45 additions
and
52 deletions.
There are no files selected for viewing
Validating CODEOWNERS rules …
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,9 @@ | ||
# https://docs.github.com/en/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/about-code-owners | ||
|
||
# * @Projecte-UrbanTree/coordinacio @Projecte-UrbanTree/correctors-ortografics | ||
# * @Projecte-UrbanTree/coordinacio @Projecte-UrbanTree/correctors-ortoStats | ||
* @Projecte-UrbanTree/alumnat | ||
/.git* @Projecte-UrbanTree/coordinacio @Projecte-UrbanTree/professorat | ||
/.vscode @Projecte-UrbanTree/coordinacio @Projecte-UrbanTree/testers-de-qualitat | ||
|
||
/public/assets/ @Projecte-UrbanTree/coordinacio @Projecte-UrbanTree/especialistes-multimedia | ||
*.md @Projecte-UrbanTree/coordinacio @Projecte-UrbanTree/correctors-ortografics | ||
*.md @Projecte-UrbanTree/coordinacio @Projecte-UrbanTree/correctors-ortoStats |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
<?php | ||
|
||
namespace App\Controllers\Admin; | ||
|
||
use App\Core\View; | ||
use App\Models\Contract; | ||
use App\Models\TreeType; | ||
|
||
class StatsController | ||
{ | ||
public function index($queryParams = []) | ||
{ | ||
// Obtenim les dades del model correcte | ||
$totalContracts = Contract::count(); | ||
$contractsName = Contract::findAll(); | ||
|
||
|
||
// Comprova si $Stats és null i assegura't que sigui un array | ||
|
||
|
||
|
||
// Renderitzem la vista amb les dades | ||
View::render([ | ||
'view' => 'Admin/Stats', | ||
'title' => 'Stats', | ||
'layout' => 'Admin/AdminLayout', | ||
'data' => ['totalContracts' => $totalContracts, 'nomsContractes' => $contractsName], | ||
]); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -24,9 +24,9 @@ | |
Seleccionar Contrato | ||
</button> | ||
<div id="dropdown-menu" class="absolute bg-white border rounded shadow-lg mt-2 w-48 hidden"> | ||
<?php | ||
<?php | ||
// Generem els items del desplegable amb PHP | ||
foreach ($nomsContractes as $contracte): | ||
foreach ($nomsContractes as $contracte): | ||
?> | ||
<div class="dropdown-item text-left px-4 py-2 w-full hover:bg-gray-100 cursor-pointer"> | ||
<?php echo htmlspecialchars($contracte->name); ?> | ||
|
@@ -42,16 +42,16 @@ | |
<div class="col" id="app3"></div> | ||
</div> | ||
</div> | ||
</body> | ||
|
||
<!-- Incloure el fitxer JavaScript --> | ||
<script src="app/src/public/assets/js/app.js"></script> | ||
|
||
<script> | ||
// Inicialitzar el codi de dropdown quan es carregui la pàgina | ||
document.addEventListener('DOMContentLoaded', function () { | ||
initDropdown('menuButton', 'dropdown-menu', '.dropdown-item'); | ||
}); | ||
</script> | ||
</body> | ||
|
||
</html> | ||
<script> | ||
const menuButton = document.getElementById('menuButton'); | ||
|
@@ -69,11 +69,11 @@ function toggleDropdown() { | |
<script> | ||
window.Promise || | ||
document.write( | ||
'<script src="https://cdn.jsdelivr.net/npm/promise-polyfill@8/dist/polyfill.min.js"><\/script>' | ||
'<script src="https://cdn.jsdelivr.net/npm/promise-polyfill@8/dist/polyfill.min.js"><\/script>' | ||
); | ||
window.Promise || | ||
document.write( | ||
'<script src="https://cdn.jsdelivr.net/npm/[email protected]/classList.min.js"><\/script>' | ||
'<script src="https://cdn.jsdelivr.net/npm/[email protected]/classList.min.js"><\/script>' | ||
); | ||
window.Promise || | ||
document.write( | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters