A free open source IT asset/license management system
adds methods to L6009_A, L7162_A, L7162_B, L7163_A
Godfrey M18d15562b281
diff --git a/app/Models/Labels/Sheets/Avery/L6009_A.php b/app/Models/Labels/Sheets/Avery/L6009_A.phpindex b7643c4268..0bcb568ec0 100644--- a/app/Models/Labels/Sheets/Avery/L6009_A.php+++ b/app/Models/Labels/Sheets/Avery/L6009_A.php@@ -22,6 +22,46 @@ class L6009_A extends L6009private const FIELD_MARGIN = 0.20;+ public function getBarcodeMargin()+ {+ return self::BARCODE_MARGIN;+ }++ public function getTagSize()+ {+ return self::TAG_SIZE;+ }++ public function getTitleSize()+ {+ return self::TITLE_SIZE;+ }++ public function getTitleMargin()+ {+ return self::TITLE_MARGIN;+ }++ public function getLabelSize()+ {+ return self::LABEL_SIZE;+ }++ public function getLabelMargin()+ {+ return self::LABEL_MARGIN;+ }++ public function getFieldSize()+ {+ return self::FIELD_SIZE;+ }++ public function getFieldMargin()+ {+ return self::FIELD_MARGIN;+ }+public function getUnit(){return 'mm';@@ -77,6 +117,32 @@ class L6009_A extends L6009return false;}+ protected function getContentEditorConfig(): array+ {+ return [+ 'barcode_margin' => $this->getBarcodeMargin(),+ 'tag_font_size' => $this->getTagSize(),+ 'title_font_size' => $this->getTitleSize(),+ 'title_margin' => $this->getTitleMargin(),+ 'field_label_font_size' => $this->getLabelSize(),+ 'field_label_margin' => $this->getLabelMargin(),+ 'field_value_font_size' => $this->getFieldSize(),+ 'field_value_margin' => $this->getFieldMargin(),+ ];+ }++ protected function getSupportsEditorConfig(): array+ {+ return [+ 'asset_tag' => $this->getSupportAssetTag(),+ 'barcode_1d' => $this->getSupport1DBarcode(),+ 'barcode_2d' => $this->getSupport2DBarcode(),+ 'fields' => $this->getSupportFields(),+ 'logo' => $this->getSupportLogo(),+ 'title' => $this->getSupportTitle(),+ ];+ }+public function preparePDF($pdf) {}public function write($pdf, $record)diff --git a/app/Models/Labels/Sheets/Avery/L7162_A.php b/app/Models/Labels/Sheets/Avery/L7162_A.phpindex de7dad4b9d..1da99ba13f 100644--- a/app/Models/Labels/Sheets/Avery/L7162_A.php+++ b/app/Models/Labels/Sheets/Avery/L7162_A.php@@ -20,6 +20,46 @@ class L7162_A extends L7162private const FIELD_MARGIN = 0.30;+ public function getBarcodeMargin()+ {+ return self::BARCODE_MARGIN;+ }++ public function getTagSize()+ {+ return self::TAG_SIZE;+ }++ public function getTitleSize()+ {+ return self::TITLE_SIZE;+ }++ public function getTitleMargin()+ {+ return self::TITLE_MARGIN;+ }++ public function getLabelSize()+ {+ return self::LABEL_SIZE;+ }++ public function getLabelMargin()+ {+ return self::LABEL_MARGIN;+ }++ public function getFieldSize()+ {+ return self::FIELD_SIZE;+ }++ public function getFieldMargin()+ {+ return self::FIELD_MARGIN;+ }+public function getUnit(){return 'mm';@@ -75,6 +115,32 @@ class L7162_A extends L7162return true;}+ protected function getContentEditorConfig(): array+ {+ return [+ 'barcode_margin' => $this->getBarcodeMargin(),+ 'tag_font_size' => $this->getTagSize(),+ 'title_font_size' => $this->getTitleSize(),+ 'title_margin' => $this->getTitleMargin(),+ 'field_label_font_size' => $this->getLabelSize(),+ 'field_label_margin' => $this->getLabelMargin(),+ 'field_value_font_size' => $this->getFieldSize(),+ 'field_value_margin' => $this->getFieldMargin(),+ ];+ }++ protected function getSupportsEditorConfig(): array+ {+ return [+ 'asset_tag' => $this->getSupportAssetTag(),+ 'barcode_1d' => $this->getSupport1DBarcode(),+ 'barcode_2d' => $this->getSupport2DBarcode(),+ 'fields' => $this->getSupportFields(),+ 'logo' => $this->getSupportLogo(),+ 'title' => $this->getSupportTitle(),+ ];+ }+public function preparePDF($pdf) {}public function write($pdf, $record)diff --git a/app/Models/Labels/Sheets/Avery/L7162_B.php b/app/Models/Labels/Sheets/Avery/L7162_B.phpindex e51c7f806f..c0b8bda3ad 100644--- a/app/Models/Labels/Sheets/Avery/L7162_B.php+++ b/app/Models/Labels/Sheets/Avery/L7162_B.php@@ -26,6 +26,56 @@ class L7162_B extends L7162private const FIELD_MARGIN = 0.30;+ public function getBarcodeSize()+ {+ return self::BARCODE_SIZE;+ }++ public function getBarcodeMargin()+ {+ return self::BARCODE_MARGIN;+ }++ public function getTagSize()+ {+ return self::TAG_SIZE;+ }++ public function getLogoMaxWidth()+ {+ return self::LOGO_MAX_WIDTH;+ }++ public function getTitleSize()+ {+ return self::TITLE_SIZE;+ }++ public function getTitleMargin()+ {+ return self::TITLE_MARGIN;+ }++ public function getLabelSize()+ {+ return self::LABEL_SIZE;+ }++ public function getLabelMargin()+ {+ return self::LABEL_MARGIN;+ }++ public function getFieldSize()+ {+ return self::FIELD_SIZE;+ }++ public function getFieldMargin()+ {+ return self::FIELD_MARGIN;+ }+public function getUnit(){return 'mm';@@ -81,6 +131,34 @@ class L7162_B extends L7162return true;}+ protected function getContentEditorConfig(): array+ {+ return [+ 'barcode_size' => $this->getBarcodeSize(),+ 'barcode_margin' => $this->getBarcodeMargin(),+ 'tag_font_size' => $this->getTagSize(),+ 'logo_max_width' => $this->getLogoMaxWidth(),+ 'title_font_size' => $this->getTitleSize(),+ 'title_margin' => $this->getTitleMargin(),+ 'field_label_font_size' => $this->getLabelSize(),+ 'field_label_margin' => $this->getLabelMargin(),+ 'field_value_font_size' => $this->getFieldSize(),+ 'field_value_margin' => $this->getFieldMargin(),+ ];+ }++ protected function getSupportsEditorConfig(): array+ {+ return [+ 'asset_tag' => $this->getSupportAssetTag(),+ 'barcode_1d' => $this->getSupport1DBarcode(),+ 'barcode_2d' => $this->getSupport2DBarcode(),+ 'fields' => $this->getSupportFields(),+ 'logo' => $this->getSupportLogo(),+ 'title' => $this->getSupportTitle(),+ ];+ }+public function preparePDF($pdf) {}public function write($pdf, $record)diff --git a/app/Models/Labels/Sheets/Avery/L7163_A.php b/app/Models/Labels/Sheets/Avery/L7163_A.phpindex 5e3cd5eea3..4e48de7111 100644--- a/app/Models/Labels/Sheets/Avery/L7163_A.php+++ b/app/Models/Labels/Sheets/Avery/L7163_A.php@@ -22,6 +22,46 @@ class L7163_A extends L7163private const FIELD_MARGIN = 0.20;+ public function getBarcodeMargin()+ {+ return self::BARCODE_MARGIN;+ }++ public function getTagSize()+ {+ return self::TAG_SIZE;+ }++ public function getTitleSize()+ {+ return self::TITLE_SIZE;+ }++ public function getTitleMargin()+ {+ return self::TITLE_MARGIN;+ }++ public function getLabelSize()+ {+ return self::LABEL_SIZE;+ }++ public function getLabelMargin()+ {+ return self::LABEL_MARGIN;+ }++ public function getFieldSize()+ {+ return self::FIELD_SIZE;+ }++ public function getFieldMargin()+ {+ return self::FIELD_MARGIN;+ }+public function getUnit(){return 'mm';@@ -77,6 +117,32 @@ class L7163_A extends L7163return true;}+ protected function getContentEditorConfig(): array+ {+ return [+ 'barcode_margin' => $this->getBarcodeMargin(),+ 'tag_font_size' => $this->getTagSize(),+ 'title_font_size' => $this->getTitleSize(),+ 'title_margin' => $this->getTitleMargin(),+ 'field_label_font_size' => $this->getLabelSize(),+ 'field_label_margin' => $this->getLabelMargin(),+ 'field_value_font_size' => $this->getFieldSize(),+ 'field_value_margin' => $this->getFieldMargin(),+ ];+ }++ protected function getSupportsEditorConfig(): array+ {+ return [+ 'asset_tag' => $this->getSupportAssetTag(),+ 'barcode_1d' => $this->getSupport1DBarcode(),+ 'barcode_2d' => $this->getSupport2DBarcode(),+ 'fields' => $this->getSupportFields(),+ 'logo' => $this->getSupportLogo(),+ 'title' => $this->getSupportTitle(),+ ];+ }+public function preparePDF($pdf) {}public function write($pdf, $record)diff --git a/routes/web.php b/routes/web.phpindex 4eea1244bc..fce14adec2 100644--- a/routes/web.php+++ b/routes/web.php@@ -570,7 +570,7 @@ Route::group(['prefix' => 'reports', 'middleware' => ['auth']], function () {->name('report-templates.destroy');});Route::get('/debug/label', function () {- $label = new \App\Models\Labels\Sheets\Avery\L4736_A();+ $label = new \App\Models\Labels\Sheets\Avery\L7163_A();dd($label->toEditorConfig());});