fix tabulator name field for orgs
This commit is contained in:
parent
0c758a9370
commit
8892cb3a7f
|
|
@ -1,7 +1,7 @@
|
|||
import {Controller} from '@hotwired/stimulus'
|
||||
// Important: include a build with Ajax + pagination (TabulatorFull is simplest)
|
||||
import {TabulatorFull as Tabulator} from 'tabulator-tables';
|
||||
import {eyeIconLink, TABULATOR_FR_LANG} from "../js/global.js";
|
||||
import {capitalizeFirstLetter, eyeIconLink, TABULATOR_FR_LANG} from "../js/global.js";
|
||||
import { Modal } from "bootstrap";
|
||||
|
||||
export default class extends Controller {
|
||||
|
|
@ -197,6 +197,7 @@ export default class extends Controller {
|
|||
if (this.currentOrgId) {
|
||||
formData.append('_method', 'PUT');
|
||||
}
|
||||
formData.set('name', capitalizeFirstLetter(formData.get('name')));
|
||||
|
||||
try {
|
||||
const response = await fetch(url, {
|
||||
|
|
|
|||
|
|
@ -107,7 +107,7 @@ class OrganizationController extends AbstractController
|
|||
}
|
||||
|
||||
$organization->setProjectPrefix($this->organizationsService->generateUniqueProjectPrefix());
|
||||
|
||||
$organization->setName(ucFirst($organization->getName()));
|
||||
$this->entityManager->persist($organization);
|
||||
$this->entityManager->flush();
|
||||
|
||||
|
|
@ -165,6 +165,7 @@ class OrganizationController extends AbstractController
|
|||
if ($logoFile) {
|
||||
$this->organizationsService->handleLogo($organization, $logoFile);
|
||||
}
|
||||
$organization->setName(ucFirst($organization->getName()));
|
||||
$this->entityManager->persist($organization);
|
||||
$this->entityManager->flush();
|
||||
$this->actionService->createAction("Edit Organization", $actingUser, $organization, $organization->getName());
|
||||
|
|
|
|||
|
|
@ -39,7 +39,7 @@ class OrganizationsRepository extends ServiceEntityRepository
|
|||
// 2. Filters
|
||||
if (!empty($filters['name'])) {
|
||||
$qb->andWhere('o.name LIKE :name')
|
||||
->setParameter('name', '%' . strtolower($filters['name']) . '%');
|
||||
->setParameter('name', '%' . ucfirst($filters['name']) . '%');
|
||||
}
|
||||
if (!empty($filters['email'])) {
|
||||
$qb->andWhere('o.email LIKE :email')
|
||||
|
|
|
|||
Loading…
Reference in New Issue