Skip to content

Commit

Permalink
Added default value to cookie and parameter traits.
Browse files Browse the repository at this point in the history
  • Loading branch information
laurentmuller committed Jan 27, 2025
1 parent 0f285cb commit 5d8fc94
Show file tree
Hide file tree
Showing 31 changed files with 287 additions and 234 deletions.
117 changes: 98 additions & 19 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions public/css/table.css
Original file line number Diff line number Diff line change
Expand Up @@ -100,18 +100,18 @@ tr.text-body-secondary td .text-danger {
}

/* loading message */
.loading-message {
.alert-loading-message {
width: 50%;
}

@media (max-width: 992px) {
.loading-message {
.alert-loading-message {
width: 70%;
}
}

@media (max-width: 768px) {
.loading-message {
.alert-loading-message {
width: 100%;
}
}
Expand Down
2 changes: 1 addition & 1 deletion public/js/application/bootstrap_table.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ function customViewFormatter(data) {
Object.keys(row).forEach(function (key) {
html = html.replaceAll(`%${key}%`, row[key] || undefinedText);
});
// functions
// apply format functions
let match = regex.exec(html);
while (match !== null) {
let value = undefinedText;
Expand Down
6 changes: 4 additions & 2 deletions public/js/extensions/bootstrap-table-extensions.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,9 @@
*/
function loadingTemplate(message) {
'use strict';
return `<div class="alert bg-body-secondary border border-secondary-subtle text-center loading-message" role="alert"><i class="fa-solid fa-spinner fa-spin me-2"></i>${message}</div>`;
return `<div class="alert alert-light alert-loading-message text-center" role="alert">
<i class="fa-solid fa-spinner fa-spin me-2"></i>${message}
</div>`
}

/**
Expand Down Expand Up @@ -159,7 +161,7 @@ $(function () {
}
},

// update UI on post page load
// update UI on post page's load
onPostBody: function (content) {
const isData = content.length !== 0;
if (isData) {
Expand Down
13 changes: 6 additions & 7 deletions src/Controller/CalculationArchiveController.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,6 @@
#[IsGranted(RoleInterface::ROLE_ADMIN)]
class CalculationArchiveController extends AbstractController
{
/**
* @throws \DateException
*/
#[GetPost(path: '/archive', name: 'archive')]
public function invoke(Request $request, CalculationArchiveService $service): Response
{
Expand Down Expand Up @@ -72,8 +69,6 @@ public function invoke(Request $request, CalculationArchiveService $service): Re

/**
* @return FormInterface<mixed>
*
* @throws \DateException
*/
private function createQueryForm(CalculationArchiveService $service, CalculationArchiveQuery $query): FormInterface
{
Expand All @@ -90,15 +85,19 @@ private function createQueryForm(CalculationArchiveService $service, Calculation
'multiple' => true,
'expanded' => true,
'group_by' => fn (): null => null,
'query_builder' => static fn (CalculationStateRepository $repository): QueryBuilder => $repository->getEditableQueryBuilder(),
'query_builder' => static fn (
CalculationStateRepository $repository
): QueryBuilder => $repository->getEditableQueryBuilder(),
])
->labelClass('checkbox-inline checkbox-switch')
->add(CalculationStateListType::class);

$helper->field('target')
->updateOptions([
'group_by' => fn (): null => null,
'query_builder' => static fn (CalculationStateRepository $repository): QueryBuilder => $repository->getNotEditableQueryBuilder(),
'query_builder' => static fn (
CalculationStateRepository $repository
): QueryBuilder => $repository->getNotEditableQueryBuilder(),
])
->add(CalculationStateListType::class);

Expand Down
Loading

0 comments on commit 5d8fc94

Please sign in to comment.