-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Admin prehledy mazani #938
Conversation
u mazani patrol chyba foreign key na UserGroupROle
nazvoslovi komponent
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ten předposlední 24d5fc5 je vlastně to původní mazání skupin bez odstraňování uživatelů
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Správně se ten commit poslední commit a27325a "Odstraňování uživatelů bez role u mazání skupin+družin" a tam je to mazání uživatelů pokud nemají žádnou roli(ale už by to prý nemělo být potřeba)
@@ -57,7 +60,7 @@ public function render(): void | |||
* @throws DataGridColumnStatusException | |||
* @throws DataGridException | |||
*/ | |||
public function createComponentPatrolsGrid(string $name): DataGrid | |||
public function createComponentGroupsGrid(string $name): DataGrid |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nechal bych pojmenování Patrol a Troop, ať to odpovídá našim db objektům
Stejně mám pocit, že tam je o jedno zanoření komponent navíc ( pochází to z modulu Uživatelé) - url je ve tvaru srsloc/admin/users/?usersGrid-usersGrid-sort%5Bunit%5D=ASC&do=usersGrid-usersGrid-sort |
<a href="{plink Users:groups}" class="btn btn-secondary btn-sm btn-block"> | ||
<span class="fa fa-2x fa-users"></span><br>{_admin.users.menu.groups} | ||
<a href="{plink Users:troops}" class="btn btn-secondary btn-sm btn-block"> | ||
<span class="fa fa-2x fa-users"></span><br>{_admin.users.menu.troops} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
v lang souboru to je?
$this->userGroupRoleRepository->remove($usersRole); | ||
$u = $usersRole->getUser(); | ||
// $r = $u->getRoles(); | ||
if ($u->getRolesText() == '') { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
tohle není moc hezké, co getRoles() empty?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
pozor, že se tu míchají 2 typy rolí - skupinové a uživatelské. Smazat by se měl jen uživatel, který nemá ani jednu (není ve skupině, ani se nepřihlásil přes skautIS)
$this->userGroupRoleRepository->remove($usersRole); | ||
$u = $usersRole->getUser(); | ||
|
||
if ($u->getRolesText() == '') { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
viz mazání družiny
modul Uživatelé zatím ani nemáme, vše je v AdminModule, tohle myslím vzniká tím, že máme komponentu usersGrid a ten datagrid si v ní vytvoří ještě vlastní komponentu |
V lang to je , jestli nevadí že, to teď bude ukazovat oddíly?
|
To bych změnil na skupiny. Jinak groups jsem někde použil ve smyslu, že se pod tím schovají troops i patrols. |
Skupinová role se maže správně, ale nechápu, proč se potom v cyklu testuje Jinak diskuzi můžeme mít rovnou u těch komentářů v kódu, pak je lépe vidět, na co se odpovídá. |
Otevřel jsem znovu to mazání skupin a družin. Takhle by to teď prý mělo stačit i bez toho odstraňování uživatelů. (Ale tuhle úpravu mám taky, maže jen uživatele bez rolí - v dalším commitu po odeslání pull requestu)