Lager-Artikel vollstaendig aus der DB anzeigen
This commit is contained in:
1 parent
2bdbec7766
commit
9917462350
3 files changed
+7
-11
No files matched your search
@@ -237,12 +237,12 @@ function auth_render_lager_table(string $title, array $rows, array $columns, str
|
||||
return implode('', $html);
|
||||
}
|
||||
|
||||
function auth_render_lager_content(array $lagerProducts, array $lagerBundles): string
|
||||
function auth_render_lager_content(array $lagerProducts, array $lagerArtikel): string
|
||||
{
|
||||
return '<div data-lager-content="true">'
|
||||
. '<section class="sg-card-list-page" aria-label="Lager">'
|
||||
. auth_render_lager_table('Produkte', $lagerProducts, ['Produktname', 'Anzahl im Lager'], 'products')
|
||||
. auth_render_lager_table('Artikel', $lagerBundles, ['Artikel-Name'], 'bundles')
|
||||
. auth_render_lager_table('Artikel', $lagerArtikel, ['Artikel-Name'], 'articles')
|
||||
. '</section>'
|
||||
. '<div class="sg-card-list-page-drawer-backdrop" aria-hidden="true" data-lager-drawer-backdrop="true" data-open="false"></div>'
|
||||
. '<aside class="sg-card-list-page-drawer" aria-label="Lager-Details" aria-hidden="true" data-lager-drawer="true" data-open="false">'
|
||||
@@ -252,7 +252,7 @@ function auth_render_lager_content(array $lagerProducts, array $lagerBundles): s
|
||||
. '</div>';
|
||||
}
|
||||
|
||||
function render_auth_home_page(array $user, array $otcProducts = [], array $bestellungenTable = [], array $lagerProducts = [], array $lagerBundles = []): void
|
||||
function render_auth_home_page(array $user, array $otcProducts = [], array $bestellungenTable = [], array $lagerProducts = [], array $lagerArtikel = []): void
|
||||
{
|
||||
$otcProductRows = '';
|
||||
foreach ($otcProducts as $product) {
|
||||
@@ -281,7 +281,7 @@ function render_auth_home_page(array $user, array $otcProducts = [], array $best
|
||||
JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES
|
||||
);
|
||||
$bestellungenContent = auth_render_bestellungen_content($bestellungenTable);
|
||||
$lagerContent = auth_render_lager_content($lagerProducts, $lagerBundles);
|
||||
$lagerContent = auth_render_lager_content($lagerProducts, $lagerArtikel);
|
||||
$moduleContentCards = json_encode(
|
||||
[
|
||||
'Bestellungen' => $bestellungenContent,
|
||||
|
||||
Reference in new issue
Block a user