ranjith-dev #1604
@@ -182,6 +182,11 @@ class CncMonitorDataResource extends Resource
|
||||
->alignCenter()
|
||||
->numeric()
|
||||
->sortable(),
|
||||
Tables\Columns\TextColumn::make('axis_load_z')
|
||||
->label('Axis Load Z')
|
||||
->alignCenter()
|
||||
->numeric()
|
||||
->sortable(),
|
||||
Tables\Columns\TextColumn::make('coolant_motor_on')
|
||||
->label('Coolant Motor On')
|
||||
->alignCenter()
|
||||
@@ -206,11 +211,6 @@ class CncMonitorDataResource extends Resource
|
||||
->label('Insert Life Used PCT')
|
||||
->alignCenter()
|
||||
->sortable(),
|
||||
Tables\Columns\TextColumn::make('axis_load_z')
|
||||
->label('Axis Load Z')
|
||||
->alignCenter()
|
||||
->numeric()
|
||||
->sortable(),
|
||||
Tables\Columns\TextColumn::make('tool_no')
|
||||
->label('Tool No')
|
||||
->alignCenter()
|
||||
|
||||
@@ -133,6 +133,7 @@ class StickerDetailResource extends Resource
|
||||
->prepend('MRP Dual', 'mrp_dual')
|
||||
->prepend('To Serial Number Dual', 'to_serial_number')
|
||||
->prepend('CRI Image Alignment', 'cri_image_alignment')
|
||||
->prepend('Brand Plant Name', 'brand_plant_name')
|
||||
->toArray()
|
||||
),
|
||||
Forms\Components\TextInput::make('string_value')
|
||||
|
||||
@@ -1098,6 +1098,7 @@ class StickerPdfService
|
||||
if ($row->design_element_type == 'Text') {
|
||||
|
||||
$textValue = $row->string_value ?? '';
|
||||
$configuredTextValue = $textValue;
|
||||
|
||||
if ($row->element_type == 'Dynamic' && isset($dynamicValueMap[$row->id]) &&
|
||||
!in_array($row->characteristics_type, [
|
||||
@@ -1282,6 +1283,32 @@ class StickerPdfService
|
||||
$textValue = $cName->name;
|
||||
}
|
||||
}
|
||||
if ($row->characteristics_type == 'brand_plant_name') {
|
||||
|
||||
$column = 'zmm_brand';
|
||||
|
||||
$textValue = $itemCharacteristic?->{$column} != null
|
||||
? $itemCharacteristic->{$column}
|
||||
: '';
|
||||
if($textValue == 'TORMAC'){
|
||||
$cName = Company::where('name', 'TORMAC')->first();
|
||||
$pName = Plant::where('company_id', $cName->id)->first();
|
||||
$textValue = $pName->name;
|
||||
}
|
||||
else if($textValue == 'CRI'){
|
||||
$textValue = $configuredTextValue ?? 'CRI';
|
||||
}
|
||||
else if($textValue == 'GENVIK'){
|
||||
$cName = Company::where('name', 'GENVIK')->first();
|
||||
$pName = Plant::where('company_id', $cName->id)->first();
|
||||
$textValue = $pName->name;
|
||||
}
|
||||
else if($textValue == 'ZIRANTEC'){
|
||||
$cName = Company::where('name', 'ZIRANTEC')->first();
|
||||
$pName = Plant::where('company_id', $cName->id)->first();
|
||||
$textValue = $pName->name;
|
||||
}
|
||||
}
|
||||
if ($row->characteristics_type == 'tollfree') {
|
||||
|
||||
$column = 'zmm_brand';
|
||||
@@ -1748,11 +1775,16 @@ class StickerPdfService
|
||||
// );
|
||||
$alignment = strtolower($element['string_align'] ?? '');
|
||||
|
||||
$pdf->SetFont($element['font'], '', $element['size']);
|
||||
// $pdf->SetFont($element['font'], '', $element['size']);
|
||||
|
||||
$font = $element['font'] ?? 'helvetica';
|
||||
// $font = $element['font'] ?? 'helvetica';
|
||||
// $fontSize = (float) ($element['size'] ?? 10);
|
||||
|
||||
$font = 'dejavusans';
|
||||
$fontSize = (float) ($element['size'] ?? 10);
|
||||
|
||||
$pdf->SetFont($font, '', $fontSize);
|
||||
|
||||
// if (
|
||||
// ($element['characteristics_type'] ?? '') == 'feed_address'
|
||||
// && mb_strlen((string) $textValue) > 61
|
||||
|
||||
Reference in New Issue
Block a user