Update Qrcodes
This commit is contained in:
parent
c4d1ad1426
commit
91e57adef0
|
|
@ -539,26 +539,29 @@ public function removeProjectEquipment(Request $request)
|
||||||
}
|
}
|
||||||
public function EditEquipment(Request $request)
|
public function EditEquipment(Request $request)
|
||||||
{
|
{
|
||||||
dd($request);
|
|
||||||
|
|
||||||
// Localiza o equipment pelo numberProject
|
// Localiza o equipment pelo numberProject
|
||||||
$equipment = Equipment::find($request->equipmentId);
|
$dataEquipment = Equipment::where('equipment_tag', $request->tag)->first();
|
||||||
|
|
||||||
|
$receiveEquipmentWorkHistori = EquipmentWorkHistory::where('equipment_id', $dataEquipment->equipment_id)
|
||||||
|
->where('company_projects_id', $dataEquipment->company_projects_id)
|
||||||
|
->first();
|
||||||
|
|
||||||
// Atualiza os campos
|
// Atualiza os campos
|
||||||
$equipment->equipment_tag = $request->tag;
|
$dataEquipment->equipment_tag = $request->tag;
|
||||||
$equipment->equipment_description = $request->equipmentDescription;
|
$dataEquipment->equipment_description = $request->equipmentDescription;
|
||||||
$equipment->equipment_serial_number = $request->serialNumberEquipment;
|
$dataEquipment->equipment_serial_number = $request->serialNumberEquipment;
|
||||||
$equipment->equipment_brand = $request->equipmentBrand;
|
$dataEquipment->equipment_brand = $request->equipmentBrand;
|
||||||
$equipment->equipment_model = $request->equipmentModel;
|
$dataEquipment->equipment_model = $request->equipmentModel;
|
||||||
|
|
||||||
$equipment->save();
|
$dataEquipment->save();
|
||||||
|
|
||||||
if ($request->input('attributes')) {
|
if ($request->input('attributes')) {
|
||||||
foreach ($request->input('attributes') as $key => $value) {
|
foreach ($request->input('attributes') as $key => $value) {
|
||||||
// Verifica se o valor é null e a chave é um número (correspondendo aos general_attributes_equipment_id)
|
// Verifica se o valor é null e a chave é um número (correspondendo aos general_attributes_equipment_id)
|
||||||
if ($value == null && is_numeric($key)) {
|
if ($value == null && is_numeric($key)) {
|
||||||
// Procura o registro relevante em SpecificAttributesEquipmentType
|
// Procura o registro relevante em SpecificAttributesEquipmentType
|
||||||
$specificAttributes = SpecificAttributesEquipmentType::where('equipment_id', $request->equipmentId)
|
$specificAttributes = SpecificAttributesEquipmentType::where('equipment_id', $dataEquipment->equipment_id)
|
||||||
->where('general_attributes_equipment_id', $key)
|
->where('general_attributes_equipment_id', $key)
|
||||||
->first();
|
->first();
|
||||||
|
|
||||||
|
|
@ -571,7 +574,7 @@ public function EditEquipment (Request $request)
|
||||||
elseif ($value !== null && is_numeric($key)) {
|
elseif ($value !== null && is_numeric($key)) {
|
||||||
|
|
||||||
// Procura o registro relevante em SpecificAttributesEquipmentType
|
// Procura o registro relevante em SpecificAttributesEquipmentType
|
||||||
$specificAttributes = SpecificAttributesEquipmentType::where('equipment_id', $request->equipmentId)
|
$specificAttributes = SpecificAttributesEquipmentType::where('equipment_id', $dataEquipment->equipment_id)
|
||||||
->where('general_attributes_equipment_id', $key)
|
->where('general_attributes_equipment_id', $key)
|
||||||
->first();
|
->first();
|
||||||
|
|
||||||
|
|
@ -584,8 +587,8 @@ public function EditEquipment (Request $request)
|
||||||
else {
|
else {
|
||||||
// Cria um novo registro em SpecificAttributesEquipmentType
|
// Cria um novo registro em SpecificAttributesEquipmentType
|
||||||
$specificAttributes = new SpecificAttributesEquipmentType();
|
$specificAttributes = new SpecificAttributesEquipmentType();
|
||||||
$specificAttributes->equipment_id = $request->equipmentId;
|
$specificAttributes->equipment_id = $dataEquipment->equipment_id;
|
||||||
$specificAttributes->equipment_type_id = $equipment->equipment_type_id;
|
$specificAttributes->equipment_type_id = $dataEquipment->equipment_type_id;
|
||||||
$specificAttributes->general_attributes_equipment_id = $key;
|
$specificAttributes->general_attributes_equipment_id = $key;
|
||||||
$specificAttributes->specific_attributes_value = $value;
|
$specificAttributes->specific_attributes_value = $value;
|
||||||
$specificAttributes->save();
|
$specificAttributes->save();
|
||||||
|
|
@ -595,57 +598,67 @@ public function EditEquipment (Request $request)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// dd($request);
|
||||||
// Se não selecionar nenhuma tarefas ele devolve um erro , pois e necessario pelo menos uma
|
// Se não selecionar nenhuma tarefas ele devolve um erro , pois e necessario pelo menos uma
|
||||||
if (!in_array('on', $request->input('ordemTasks'))) {
|
// if (!in_array('on', $request->input('ordemTasks'))) {
|
||||||
return redirect()->back()->with('danger', 'É necessário selecionar pelo menos uma tarefa, Para o Equipamento : ' . $equipment->equipment_tag);
|
// return redirect()->back()->with('danger', 'É necessário selecionar pelo menos uma tarefa, Para o Equipamento : ' . $equipment->equipment_tag);
|
||||||
}
|
// }
|
||||||
$executionOrder = 1;
|
// $executionOrder = 1;
|
||||||
|
|
||||||
foreach ($request->input('ordemTasks') as $key => $value) {
|
|
||||||
$orderEquipmentTask = OrderEquipmentTasks::where('equipment_id', $request->equipmentId)
|
|
||||||
->where('elemental_tasks_id', $key)
|
|
||||||
->first();
|
|
||||||
|
|
||||||
if ($value == "on") {
|
|
||||||
if (!$orderEquipmentTask) {
|
|
||||||
$orderEquipmentTask = new OrderEquipmentTasks();
|
|
||||||
$orderEquipmentTask->equipment_id = $request->equipmentId;
|
|
||||||
$orderEquipmentTask->elemental_tasks_id = $key;
|
|
||||||
}
|
|
||||||
$orderEquipmentTask->execution_order = $executionOrder;
|
|
||||||
$orderEquipmentTask->save();
|
|
||||||
|
|
||||||
$executionOrder++;
|
|
||||||
} elseif ($value == "off" && $orderEquipmentTask) {
|
|
||||||
$orderEquipmentTask->delete();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
$executionOrder = 1; // Reinicia a contagem de ordem de execução
|
// foreach ($request->input('ordemTasks') as $key => $value) {
|
||||||
$remainingOrderEquipmentTasks = OrderEquipmentTasks::where('equipment_id', $request->equipmentId)
|
// $orderEquipmentTask = OrderEquipmentTasks::where('equipment_id', $request->equipmentId)
|
||||||
->orderBy('execution_order', 'asc')
|
// ->where('elemental_tasks_id', $key)
|
||||||
->get();
|
// ->first();
|
||||||
|
|
||||||
foreach ($remainingOrderEquipmentTasks as $orderEquipmentTask) {
|
// if ($value == "on") {
|
||||||
$orderEquipmentTask->execution_order = $executionOrder;
|
// if (!$orderEquipmentTask) {
|
||||||
$orderEquipmentTask->save();
|
// if ($receiveEquipmentWorkHistori && $receiveEquipmentWorkHistori <> null) {
|
||||||
$executionOrder++;
|
// $orderEquipmentTask = new OrderEquipmentTasks();
|
||||||
}
|
// $orderEquipmentTask->equipment_id = $request->equipmentId;
|
||||||
|
// $orderEquipmentTask->elemental_tasks_id = $key;
|
||||||
|
// }
|
||||||
|
|
||||||
$orderTasks = OrderEquipmentTasks::where('equipment_id', $request->equipmentId)
|
// }
|
||||||
->orderBy('execution_order', 'asc')
|
// //Nal precisa mais indicar a ordem das tarefas pois ela agora nao vao ser feitas por ordem necessariamente
|
||||||
->get();
|
// $orderEquipmentTask->execution_order = null;
|
||||||
|
// $orderEquipmentTask->save();
|
||||||
|
|
||||||
$taskExecutionOrders = [];
|
// $executionOrder++;
|
||||||
foreach ($orderTasks as $task) {
|
// } elseif ($value == "off" && $orderEquipmentTask) {
|
||||||
$taskExecutionOrders[$task->elemental_tasks_id] = $task->execution_order;
|
// $orderEquipmentTask->delete();
|
||||||
}
|
// }
|
||||||
|
// }
|
||||||
|
|
||||||
|
|
||||||
|
// // $executionOrder = 1; // Reinicia a contagem de ordem de execução
|
||||||
|
// $remainingOrderEquipmentTasks = OrderEquipmentTasks::where('equipment_id', $request->equipmentId)
|
||||||
|
// ->orderBy('execution_order', 'asc')
|
||||||
|
// ->get();
|
||||||
|
|
||||||
|
// foreach ($remainingOrderEquipmentTasks as $orderEquipmentTask) {
|
||||||
|
// $orderEquipmentTask->execution_order = null;
|
||||||
|
// $orderEquipmentTask->save();
|
||||||
|
// $executionOrder++;
|
||||||
|
// }
|
||||||
|
|
||||||
|
// $orderTasks = OrderEquipmentTasks::where('equipment_id', $request->equipmentId)
|
||||||
|
// ->orderBy('execution_order', 'asc')
|
||||||
|
// ->get();
|
||||||
|
|
||||||
|
// $taskExecutionOrders = [];
|
||||||
|
// foreach ($orderTasks as $task) {
|
||||||
|
// $taskExecutionOrders[$task->elemental_tasks_id] = $task->execution_order;
|
||||||
|
// }
|
||||||
|
|
||||||
// Retorna uma resposta
|
// Retorna uma resposta
|
||||||
return redirect()->route('articulated_2', ['id' => $request->numberProject])
|
// return redirect()->route('articulated_2', ['id' => $request->numberProject])
|
||||||
->with('success', 'Equipamento ' . $equipment->equipment_tag . ' Editado com Sucesso!!!')
|
// ->with('success', 'Equipamento ' . $dataEquipment->equipment_tag . ' Editado com Sucesso!!!');
|
||||||
->with('taskExecutionOrders', $taskExecutionOrders);
|
// ->with('taskExecutionOrders', $taskExecutionOrders);
|
||||||
|
|
||||||
|
// return back()->with('success', 'Ação concluída com sucesso!')
|
||||||
|
return back();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public function showJson($id)
|
public function showJson($id)
|
||||||
|
|
|
||||||
|
|
@ -2,6 +2,8 @@
|
||||||
|
|
||||||
namespace App\Http\Controllers;
|
namespace App\Http\Controllers;
|
||||||
|
|
||||||
|
use App\Models\EquipmentWorkHistory;
|
||||||
|
use App\Models\QrcodesAssociatedEquipment;
|
||||||
use Illuminate\Http\Request;
|
use Illuminate\Http\Request;
|
||||||
use Illuminate\Support\Facades\DB;
|
use Illuminate\Support\Facades\DB;
|
||||||
|
|
||||||
|
|
@ -19,48 +21,170 @@
|
||||||
|
|
||||||
use Mpdf\Mpdf;
|
use Mpdf\Mpdf;
|
||||||
|
|
||||||
|
use Endroid\QrCode\QrCode;
|
||||||
|
use Endroid\QrCode\Writer\PngWriter;
|
||||||
|
|
||||||
|
|
||||||
class PreparedProjectController extends Controller
|
class PreparedProjectController extends Controller
|
||||||
{
|
{
|
||||||
// public function showDetailsEquipmentForQrCode($equipmentId,$projectId){
|
// public function showAllEquipmentsInProjectForQrCode($projectId)
|
||||||
// // dd($equipmentId);
|
// {
|
||||||
// $detailsEquipment = Equipment::find($equipmentId);
|
// $equipments = Equipment::where('company_projects_id', $projectId)->get();
|
||||||
// $userLogoPath = Auth::user()->user_logo ? asset('user_logos/' . Auth::user()->user_logo) : asset('user_logos/logoISPT4.0.jpg');
|
// $userLogoPath = Auth::user()->user_logo ? asset('user_logos/' . Auth::user()->user_logo) : asset('user_logos/logoISPT4.0.jpg');
|
||||||
|
|
||||||
// // dd($detailsEquipment);
|
// $equipmentData = [];
|
||||||
// $pdf = PDF::loadView('projectsClients.showDetailsEquipmentForQrCodePdf',[
|
// foreach ($equipments as $equipment) {
|
||||||
// 'detailsEquipment' => $detailsEquipment,
|
|
||||||
// 'userLogoPath' => $userLogoPath
|
|
||||||
// ])->setPaper('a4');
|
|
||||||
|
|
||||||
// return $pdf->stream('teste.pdf');
|
// // Gera o QR Code para cada equipamento
|
||||||
|
// $qrCode = new QrCode($equipment->equipment_tag);
|
||||||
|
// $writer = new PngWriter();
|
||||||
|
// $qrCodeImage = 'data:image/png;base64,' . base64_encode($writer->write($qrCode)->getString());
|
||||||
|
|
||||||
|
// // Busca equipamentos associados para cada equipamento
|
||||||
|
// $associatedEquipments = QrcodesAssociatedEquipment::where('equipment_id', $equipment->equipment_id)->get();
|
||||||
|
// $associatedArray = [];
|
||||||
|
// foreach ($associatedEquipments as $associatedEquipment) {
|
||||||
|
// $associatedArray[$associatedEquipment->id] = $associatedEquipment->component_tag;
|
||||||
// }
|
// }
|
||||||
|
|
||||||
|
// // Adiciona os dados necessários para cada equipamento em um array
|
||||||
|
// $equipmentData[] = [
|
||||||
|
// 'detailsEquipment' => $equipment,
|
||||||
|
// 'userLogoPath' => $userLogoPath,
|
||||||
|
// 'qrCodeImage' => $qrCodeImage,
|
||||||
|
// 'associatedArray' => $associatedArray
|
||||||
|
// ];
|
||||||
|
// }
|
||||||
|
|
||||||
|
// // Passa todos os dados dos equipamentos para a view
|
||||||
|
// $html = view('projectsClients.showAllEquipmentsForQrCodePdf', [
|
||||||
|
// 'equipmentData' => $equipmentData,
|
||||||
|
// 'userLogoPath' => $userLogoPath,
|
||||||
|
// ])->render();
|
||||||
|
|
||||||
|
// // Define a orientação da folha como horizontal (Landscape)
|
||||||
|
// $mpdf = new \Mpdf\Mpdf([
|
||||||
|
// 'mode' => 'utf-8',
|
||||||
|
// 'format' => 'A4-L' // Define o formato como A4 e orientação como Landscape (horizontal)
|
||||||
|
// ]);
|
||||||
|
// $mpdf->WriteHTML($html);
|
||||||
|
// $mpdf->Output('equipamentos_projeto_' . $projectId . '.pdf', 'I');
|
||||||
|
// }
|
||||||
|
|
||||||
|
public function showAllEquipmentsInProjectForQrCode($projectId)
|
||||||
|
{
|
||||||
|
$equipments = Equipment::where('company_projects_id', $projectId)->get();
|
||||||
|
$userLogoPath = Auth::user()->user_logo ? asset('user_logos/' . Auth::user()->user_logo) : asset('user_logos/logoISPT4.0.jpg');
|
||||||
|
|
||||||
|
$equipmentData = [];
|
||||||
|
foreach ($equipments as $equipment) {
|
||||||
|
$qrCode = new QrCode($equipment->equipment_tag);
|
||||||
|
$writer = new PngWriter();
|
||||||
|
$qrCodeImage = 'data:image/png;base64,' . base64_encode($writer->write($qrCode)->getString());
|
||||||
|
|
||||||
|
$associatedEquipments = QrcodesAssociatedEquipment::where('equipment_id', $equipment->equipment_id)->get();
|
||||||
|
$associatedArray = [];
|
||||||
|
foreach ($associatedEquipments as $associatedEquipment) {
|
||||||
|
$associatedArray[$associatedEquipment->id] = $associatedEquipment->component_tag;
|
||||||
|
}
|
||||||
|
|
||||||
|
$equipmentData[] = [
|
||||||
|
'equipment' => $equipment,
|
||||||
|
'qrCodeImage' => $qrCodeImage,
|
||||||
|
'associatedArray' => $associatedArray
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
||||||
|
// dd($equipmentData);
|
||||||
|
|
||||||
|
$html = view('projectsClients.showAllEquipmentsInProjectQrCodePdf', [
|
||||||
|
'equipmentData' => $equipmentData,
|
||||||
|
'userLogoPath' => $userLogoPath
|
||||||
|
])->render();
|
||||||
|
|
||||||
|
$mpdf = new \Mpdf\Mpdf([
|
||||||
|
'mode' => 'utf-8',
|
||||||
|
'format' => 'A4'
|
||||||
|
]);
|
||||||
|
$mpdf->WriteHTML($html);
|
||||||
|
$mpdf->Output('equipamentos_projeto_' . $projectId . '.pdf', 'I');
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
public function showDetailsEquipmentForQrCode($equipmentId, $projectId)
|
public function showDetailsEquipmentForQrCode($equipmentId, $projectId)
|
||||||
{
|
{
|
||||||
$detailsEquipment = Equipment::find($equipmentId);
|
$detailsEquipment = Equipment::find($equipmentId);
|
||||||
// Determina o caminho do logo do usuário ou um padrão.
|
|
||||||
$userLogoPath = Auth::user()->user_logo ? asset('user_logos/' . Auth::user()->user_logo) : asset('user_logos/logoISPT4.0.jpg');
|
// Gera o QR Code
|
||||||
|
$qrCode = new QrCode($detailsEquipment->equipment_tag);
|
||||||
|
$writer = new PngWriter();
|
||||||
|
|
||||||
|
// Converte o QR Code para base64 para incorporar na página
|
||||||
|
$qrCodeImage = 'data:image/png;base64,' . base64_encode($writer->write($qrCode)->getString());
|
||||||
|
|
||||||
|
// $userLogoPath = Auth::user()->user_logo ? asset('user_logos/' . Auth::user()->user_logo) : asset('user_logos/logoISPT4.0.jpg');
|
||||||
|
|
||||||
|
$associatedEquipments = QrcodesAssociatedEquipment::where('equipment_id', $detailsEquipment->equipment_id)->get();
|
||||||
|
|
||||||
|
$associatedArray = [];
|
||||||
|
foreach ($associatedEquipments as $associatedEquipment) {
|
||||||
|
$associatedArray[$associatedEquipment->id] = $associatedEquipment->component_tag;
|
||||||
|
}
|
||||||
|
|
||||||
$html = view('projectsClients.showDetailsEquipmentForQrCodePdf', [
|
$html = view('projectsClients.showDetailsEquipmentForQrCodePdf', [
|
||||||
'detailsEquipment' => $detailsEquipment,
|
'detailsEquipment' => $detailsEquipment,
|
||||||
'userLogoPath' => $userLogoPath])->render();
|
// 'userLogoPath' => $userLogoPath,
|
||||||
// Cria uma instância do mPDF
|
'qrCodeImage' => $qrCodeImage,
|
||||||
$mpdf = new Mpdf();
|
'associatedArray' => $associatedArray
|
||||||
// Escreve o HTML para o mPDF
|
])->render();
|
||||||
|
|
||||||
|
// Define a orientação da folha como horizontal (Landscape)
|
||||||
|
$mpdf = new \Mpdf\Mpdf([
|
||||||
|
'mode' => 'utf-8',
|
||||||
|
'format' => 'A4' // Define o formato como A4 e orientação como Landscape (horizontal)
|
||||||
|
]);
|
||||||
$mpdf->WriteHTML($html);
|
$mpdf->WriteHTML($html);
|
||||||
// Gera o PDF no navegador
|
|
||||||
$mpdf->Output('nome_do_arquivo.pdf', 'I');
|
$mpdf->Output('nome_do_arquivo.pdf', 'I');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public function PreparedProject($ProjectId)
|
public function PreparedProject($ProjectId)
|
||||||
{
|
{
|
||||||
|
|
||||||
$numberProject = CompanyProject::find($ProjectId);
|
$numberProject = CompanyProject::find($ProjectId);
|
||||||
|
|
||||||
$equipmentsProjects = Equipment::all()->where('company_projects_id', $ProjectId);
|
|
||||||
|
|
||||||
$equipmentsTypes = EquipmentType::all();
|
$equipmentsTypes = EquipmentType::all();
|
||||||
|
|
||||||
|
// Carrega todos os equipamentos para um dado projeto
|
||||||
|
$equipmentsProjects = Equipment::where('company_projects_id', $ProjectId)->get();
|
||||||
|
|
||||||
|
// Carrega as relações aninhadas
|
||||||
|
$equipmentsProjects->load('equipmentWorkHistory.equipmentAssociationAmbit.ambitsEquipment');
|
||||||
|
|
||||||
|
// Adiciona o 'ambits_description' a cada equipamento
|
||||||
|
foreach ($equipmentsProjects as $equipment) {
|
||||||
|
// Obtém o primeiro EquipmentWorkHistory (se existir)
|
||||||
|
$equipmentWorkHistory = $equipment->equipmentWorkHistory->first();
|
||||||
|
|
||||||
|
// Se existe um EquipmentWorkHistory, tenta obter o 'ambits_description'
|
||||||
|
if ($equipmentWorkHistory) {
|
||||||
|
// Tenta obter o EquipmentAssociationAmbit e o AmbitsEquipment relacionados
|
||||||
|
$equipmentAssociationAmbit = $equipmentWorkHistory->equipmentAssociationAmbit;
|
||||||
|
if ($equipmentAssociationAmbit) {
|
||||||
|
$ambitsEquipment = $equipmentAssociationAmbit->ambitsEquipment;
|
||||||
|
if ($ambitsEquipment) {
|
||||||
|
// Se existir um AmbitsEquipment, define o 'ambits_description'
|
||||||
|
$equipment->ambits_description = $ambitsEquipment->ambits_description;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Se alguma das relações não existir, define 'ambits_description' como null
|
||||||
|
if (!isset($equipment->ambits_description)) {
|
||||||
|
$equipment->ambits_description = null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
//Retorna todas as Fabricas Unit, com base na Instalação
|
//Retorna todas as Fabricas Unit, com base na Instalação
|
||||||
$checkUnits = DB::table('units')
|
$checkUnits = DB::table('units')
|
||||||
->join('plants', 'units.plant_id', '=', 'plants.plant_id')
|
->join('plants', 'units.plant_id', '=', 'plants.plant_id')
|
||||||
|
|
@ -71,7 +195,6 @@ public function PreparedProject($ProjectId)
|
||||||
|
|
||||||
// dd($equipmentsProjects);
|
// dd($equipmentsProjects);
|
||||||
return view('projectsClients/preparedProject')
|
return view('projectsClients/preparedProject')
|
||||||
// ->with('equipmentsProjects', $equipmentsProjects)
|
|
||||||
->with('equipmentsTypes', $equipmentsTypes)
|
->with('equipmentsTypes', $equipmentsTypes)
|
||||||
->with('units', $checkUnits)
|
->with('units', $checkUnits)
|
||||||
->with('numberProject', $numberProject)
|
->with('numberProject', $numberProject)
|
||||||
|
|
|
||||||
|
|
@ -297,17 +297,32 @@ public function projectDetails_11($projectID, $equipmentID)
|
||||||
->first();
|
->first();
|
||||||
|
|
||||||
$attributes = SpecificAttributesEquipmentType::where('equipment_id', $equipmentID)->get(); // recebe todos os atributos espesificos do equipamento
|
$attributes = SpecificAttributesEquipmentType::where('equipment_id', $equipmentID)->get(); // recebe todos os atributos espesificos do equipamento
|
||||||
$OrdemTasks = OrderEquipmentTasks::where('equipmentWorkHistorys_id', $receiveEquipmentWorkHistorys->equipmentWorkHistorys_id)->get(); // Todas as tarefas que o equipamento vai realizar :
|
$DetailsTasks = OrderEquipmentTasks::where('equipmentWorkHistorys_id', $receiveEquipmentWorkHistorys->equipmentWorkHistorys_id)->get(); // Todas as tarefas que o equipamento vai realizar :
|
||||||
$OrdemTasksIds = $OrdemTasks->pluck('elemental_tasks_id')->all(); // Array de IDs
|
// $OrdemTasks = $DetailsTasks->pluck('elemental_tasks_id')->all(); // Array de IDs
|
||||||
|
$OrdemTasks = $DetailsTasks->pluck('execution_order', 'elemental_tasks_id')->all();
|
||||||
|
|
||||||
|
// Ajuste para definir 'on' para cada tarefa
|
||||||
|
$OrdemTasks = $DetailsTasks->mapWithKeys(function ($task) {
|
||||||
|
return [$task->elemental_tasks_id => 'on'];
|
||||||
|
})->all();
|
||||||
|
|
||||||
return view('projectsClients.articulated_2_ShowEquipment', compact('dataEquipment', 'OrdemTasks', 'OrdemTasksIds','detailsEquipmentWorkHistory'));
|
$specificAttributes = SpecificAttributesEquipmentType::where('equipment_id', $dataEquipment->equipment_id)->get();
|
||||||
|
|
||||||
|
$specificAttributesArray = [];
|
||||||
|
|
||||||
|
foreach ($specificAttributes as $attribute) {
|
||||||
|
$specificAttributesArray[$attribute->general_attributes_equipment_id] = $attribute->specific_attributes_value;
|
||||||
}
|
}
|
||||||
|
// dd($OrdemTasks);
|
||||||
|
|
||||||
|
return view('projectsClients.articulated_2_ShowEquipment', compact('dataEquipment', 'OrdemTasks', 'DetailsTasks', 'detailsEquipmentWorkHistory','specificAttributesArray'));
|
||||||
|
}
|
||||||
|
|
||||||
//Funcao que recebe a Acoes do dataTables do portifolio.
|
//Funcao que recebe a Acoes do dataTables do portifolio.
|
||||||
public function articulated_22($equipmentID)
|
public function articulated_22($equipmentID)
|
||||||
{
|
{
|
||||||
|
//Nao esta recebendo os selects
|
||||||
|
|
||||||
|
|
||||||
// $dataEquipment = Equipment::find($equipmentID);
|
// $dataEquipment = Equipment::find($equipmentID);
|
||||||
// $detailsEquipmentWorkHistory = EquipmentWorkHistory::where('equipment_id',$equipmentID)->first();
|
// $detailsEquipmentWorkHistory = EquipmentWorkHistory::where('equipment_id',$equipmentID)->first();
|
||||||
|
|
@ -336,7 +351,15 @@ public function articulated_22($equipmentID)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return view('projectsClients.testRoute', compact('dataEquipment', 'receiveAlldetailsEquipmentWorkHistory'));
|
$specificAttributes = SpecificAttributesEquipmentType::where('equipment_id', $dataEquipment->equipment_id)->get();
|
||||||
|
|
||||||
|
$specificAttributesArray = [];
|
||||||
|
|
||||||
|
foreach ($specificAttributes as $attribute) {
|
||||||
|
$specificAttributesArray[$attribute->general_attributes_equipment_id] = $attribute->specific_attributes_value;
|
||||||
|
}
|
||||||
|
|
||||||
|
return view('projectsClients.testRoute', compact('dataEquipment', 'receiveAlldetailsEquipmentWorkHistory','specificAttributesArray'));
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -7,6 +7,7 @@
|
||||||
"require": {
|
"require": {
|
||||||
"php": "^8.1",
|
"php": "^8.1",
|
||||||
"barryvdh/laravel-dompdf": "^2.0",
|
"barryvdh/laravel-dompdf": "^2.0",
|
||||||
|
"endroid/qr-code": "^5.0",
|
||||||
"guzzlehttp/guzzle": "^7.5",
|
"guzzlehttp/guzzle": "^7.5",
|
||||||
"laravel/fortify": "^1.17",
|
"laravel/fortify": "^1.17",
|
||||||
"laravel/framework": "^10.8",
|
"laravel/framework": "^10.8",
|
||||||
|
|
|
||||||
77
composer.lock
generated
77
composer.lock
generated
|
|
@ -4,7 +4,7 @@
|
||||||
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
|
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
|
||||||
"This file is @generated automatically"
|
"This file is @generated automatically"
|
||||||
],
|
],
|
||||||
"content-hash": "64083e5824273dda380cfc7b6f6c0897",
|
"content-hash": "c3621371ed5b5bd7d608e988583189cb",
|
||||||
"packages": [
|
"packages": [
|
||||||
{
|
{
|
||||||
"name": "bacon/bacon-qr-code",
|
"name": "bacon/bacon-qr-code",
|
||||||
|
|
@ -675,6 +675,81 @@
|
||||||
],
|
],
|
||||||
"time": "2023-01-14T14:17:03+00:00"
|
"time": "2023-01-14T14:17:03+00:00"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"name": "endroid/qr-code",
|
||||||
|
"version": "5.0.4",
|
||||||
|
"source": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "https://github.com/endroid/qr-code.git",
|
||||||
|
"reference": "0efd071a3640af323e23c94122fe92cfd5199833"
|
||||||
|
},
|
||||||
|
"dist": {
|
||||||
|
"type": "zip",
|
||||||
|
"url": "https://api.github.com/repos/endroid/qr-code/zipball/0efd071a3640af323e23c94122fe92cfd5199833",
|
||||||
|
"reference": "0efd071a3640af323e23c94122fe92cfd5199833",
|
||||||
|
"shasum": ""
|
||||||
|
},
|
||||||
|
"require": {
|
||||||
|
"bacon/bacon-qr-code": "^2.0.5",
|
||||||
|
"php": "^8.1"
|
||||||
|
},
|
||||||
|
"conflict": {
|
||||||
|
"khanamiryan/qrcode-detector-decoder": "^1.0.6"
|
||||||
|
},
|
||||||
|
"require-dev": {
|
||||||
|
"endroid/quality": "dev-main",
|
||||||
|
"ext-gd": "*",
|
||||||
|
"khanamiryan/qrcode-detector-decoder": "^1.0.4||^2.0.2",
|
||||||
|
"setasign/fpdf": "^1.8.2"
|
||||||
|
},
|
||||||
|
"suggest": {
|
||||||
|
"ext-gd": "Enables you to write PNG images",
|
||||||
|
"khanamiryan/qrcode-detector-decoder": "Enables you to use the image validator",
|
||||||
|
"roave/security-advisories": "Makes sure package versions with known security issues are not installed",
|
||||||
|
"setasign/fpdf": "Enables you to use the PDF writer"
|
||||||
|
},
|
||||||
|
"type": "library",
|
||||||
|
"extra": {
|
||||||
|
"branch-alias": {
|
||||||
|
"dev-main": "5.x-dev"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"autoload": {
|
||||||
|
"psr-4": {
|
||||||
|
"Endroid\\QrCode\\": "src/"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"notification-url": "https://packagist.org/downloads/",
|
||||||
|
"license": [
|
||||||
|
"MIT"
|
||||||
|
],
|
||||||
|
"authors": [
|
||||||
|
{
|
||||||
|
"name": "Jeroen van den Enden",
|
||||||
|
"email": "info@endroid.nl"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"description": "Endroid QR Code",
|
||||||
|
"homepage": "https://github.com/endroid/qr-code",
|
||||||
|
"keywords": [
|
||||||
|
"code",
|
||||||
|
"endroid",
|
||||||
|
"php",
|
||||||
|
"qr",
|
||||||
|
"qrcode"
|
||||||
|
],
|
||||||
|
"support": {
|
||||||
|
"issues": "https://github.com/endroid/qr-code/issues",
|
||||||
|
"source": "https://github.com/endroid/qr-code/tree/5.0.4"
|
||||||
|
},
|
||||||
|
"funding": [
|
||||||
|
{
|
||||||
|
"url": "https://github.com/endroid",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"time": "2023-12-24T13:47:07+00:00"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"name": "ezyang/htmlpurifier",
|
"name": "ezyang/htmlpurifier",
|
||||||
"version": "v4.16.0",
|
"version": "v4.16.0",
|
||||||
|
|
|
||||||
BIN
public/user_logos/1707839809.jpg
Normal file
BIN
public/user_logos/1707839809.jpg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 12 KiB |
|
|
@ -5,6 +5,13 @@
|
||||||
<meta charset="UTF-8">
|
<meta charset="UTF-8">
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
<title>Email</title>
|
<title>Email</title>
|
||||||
|
|
||||||
|
<style>
|
||||||
|
.logo-img{
|
||||||
|
width: 2cm;
|
||||||
|
height: 2cm;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
|
|
@ -17,7 +24,10 @@
|
||||||
<p>Agradecemos a sua atenção e ficamos ao dispor para qualquer esclarecimento.</p>
|
<p>Agradecemos a sua atenção e ficamos ao dispor para qualquer esclarecimento.</p>
|
||||||
<p>Com os melhores cumprimentos,</p>
|
<p>Com os melhores cumprimentos,</p>
|
||||||
<p> Ispt4.0</p>
|
<p> Ispt4.0</p>
|
||||||
<img src="{{ asset('img/ispt/4.0/logo4.0.jpg')}}" alt="">
|
<img class="" src="{{ public_path('/img/ispt/4.0/isptLogoVertical.png') }}"
|
||||||
|
alt="Imagem ISPT 4.0"">
|
||||||
|
|
||||||
|
{{-- <img src="{{ asset('img/ispt/4.0/logo4.0.jpg')}}" alt="Imagem ISPT 4.0"> --}}
|
||||||
</body>
|
</body>
|
||||||
|
|
||||||
</html>
|
</html>
|
||||||
|
|
|
||||||
|
|
@ -17,7 +17,7 @@
|
||||||
value="{{ json_encode($receiveElementalTasks) }}">
|
value="{{ json_encode($receiveElementalTasks) }}">
|
||||||
<input type="hidden" name="receiveAllFurtherTasks" value="{{ $receiveAllFurtherTasks }}">
|
<input type="hidden" name="receiveAllFurtherTasks" value="{{ $receiveAllFurtherTasks }}">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<p>Nome Posto de Trabalho : </p>
|
<p class="mt-1 mr-1">Nome Posto de Trabalho : </p>
|
||||||
<input class="form-control col-sm-6" type="text" name="nameWorkstation"
|
<input class="form-control col-sm-6" type="text" name="nameWorkstation"
|
||||||
value="{{ $workstation->nomenclature_workstation }}">
|
value="{{ $workstation->nomenclature_workstation }}">
|
||||||
<input type="hidden" name="idWorkStation" value="{{ $workstation->id_workstations }}">
|
<input type="hidden" name="idWorkStation" value="{{ $workstation->id_workstations }}">
|
||||||
|
|
@ -52,7 +52,6 @@
|
||||||
@endif
|
@endif
|
||||||
|
|
||||||
<div class="col-sm">
|
<div class="col-sm">
|
||||||
<div class="row">
|
|
||||||
@if (count($receiveElementalTasks['3']) > 0)
|
@if (count($receiveElementalTasks['3']) > 0)
|
||||||
<div class="col-sm">
|
<div class="col-sm">
|
||||||
<div class="card card-primary collapsed-card">
|
<div class="card card-primary collapsed-card">
|
||||||
|
|
@ -183,7 +182,6 @@
|
||||||
</div>
|
</div>
|
||||||
@endif
|
@endif
|
||||||
|
|
||||||
</div>{{-- ./row --}}
|
|
||||||
|
|
||||||
</div> {{-- ./col-sm-6 --}}
|
</div> {{-- ./col-sm-6 --}}
|
||||||
</div> {{-- ./row --}}
|
</div> {{-- ./row --}}
|
||||||
|
|
|
||||||
File diff suppressed because it is too large
Load Diff
|
|
@ -1,6 +1,7 @@
|
||||||
@extends('Templates/templateAdmin')
|
@extends('Templates/templateAdmin')
|
||||||
|
|
||||||
@section('Main-content')
|
@section('Main-content')
|
||||||
|
|
||||||
<!-- Content Header (Page header) -->
|
<!-- Content Header (Page header) -->
|
||||||
<section class="content-header">
|
<section class="content-header">
|
||||||
<div class="container-fluid">
|
<div class="container-fluid">
|
||||||
|
|
@ -91,20 +92,19 @@
|
||||||
|
|
||||||
<!-- Card box criar instalção -->
|
<!-- Card box criar instalção -->
|
||||||
<form>
|
<form>
|
||||||
<div class="row">
|
<div class="row mb-4">
|
||||||
<div class="col-sm-6" id="BotaoDetalhesObra">
|
<div class="col-sm-6 mb-2" id="BotaoDetalhesObra">
|
||||||
<a href="#" type="button" class="btn btn-block bg-primary btn-lg">Detalhes
|
<a href="#" type="button" class="btn btn-block bg-primary btn-lg">Detalhes
|
||||||
da Obra</a>
|
da Obra</a>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-sm-6" id="BotaoArticulado">
|
<div class="col-sm-6 mb-2" id="BotaoArticulado">
|
||||||
<a href="#" type="button" class="btn btn-block bg-primary btn-lg">Articulado</a>
|
<a href="#" type="button" class="btn btn-block bg-primary btn-lg">Articulado</a>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-sm-6" id="BotaoPostosDeTrabalho">
|
<div class="col-sm-6 mb-2" id="BotaoPostosDeTrabalho">
|
||||||
<a href="#" type="button" class="btn btn-block bg-primary btn-lg">Postos de
|
<a href="#" type="button" class="btn btn-block bg-primary btn-lg">Postos de
|
||||||
Trabalho</a>
|
Trabalho</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<br><br>
|
|
||||||
|
|
||||||
<div class="card card-primary" id="CardDetalhesObra">
|
<div class="card card-primary" id="CardDetalhesObra">
|
||||||
<div class="card-header">
|
<div class="card-header">
|
||||||
|
|
@ -116,9 +116,6 @@
|
||||||
<!-- /.card-header -->
|
<!-- /.card-header -->
|
||||||
|
|
||||||
<div class="card-body p-0">
|
<div class="card-body p-0">
|
||||||
{{-- Nao tem motivos para funcionar nestas sutiacao, MAS FUNCIONA SEM ELE NAO APARECE OS QRCODES !!!! --}}
|
|
||||||
|
|
||||||
|
|
||||||
<table class="table table-striped text-center">
|
<table class="table table-striped text-center">
|
||||||
<tbody>
|
<tbody>
|
||||||
<tr>
|
<tr>
|
||||||
|
|
@ -154,14 +151,6 @@
|
||||||
</div>
|
</div>
|
||||||
<!-- /.card-body -->
|
<!-- /.card-body -->
|
||||||
|
|
||||||
{{-- <div class="card-footer">
|
|
||||||
<div class="float-right">
|
|
||||||
<button type="button" class="btn btn-test" data-toggle="modal"
|
|
||||||
data-target="#ModalTransferForArticulated">
|
|
||||||
Editar
|
|
||||||
</button>
|
|
||||||
</div>
|
|
||||||
</div> --}}
|
|
||||||
<div class="card-footer">
|
<div class="card-footer">
|
||||||
<div class="float-right">
|
<div class="float-right">
|
||||||
<button type="button" class="btn btn-primary" data-toggle="modal"
|
<button type="button" class="btn btn-primary" data-toggle="modal"
|
||||||
|
|
@ -175,39 +164,9 @@
|
||||||
</form>
|
</form>
|
||||||
<!-- /.Card box criar instalção -->
|
<!-- /.Card box criar instalção -->
|
||||||
|
|
||||||
<a style="margin: 10px" data-bs-toggle="modal" data-bs-target="#exampleModal"
|
{{-- Onde Inicialmente estava o botao alterar para execussao --}}
|
||||||
class="btn btn-primary float-right">Alterar para Execussao</a>
|
|
||||||
|
|
||||||
|
|
||||||
<!-- Modal -->
|
|
||||||
<div class="modal fade" id="exampleModal" tabindex="-1" aria-labelledby="exampleModalLabel"
|
|
||||||
aria-hidden="true">
|
|
||||||
<div class="modal-dialog">
|
|
||||||
<div class="modal-content">
|
|
||||||
<div class="modal-header">
|
|
||||||
<h3 class="modal-title fs-5" id="exampleModalLabel">Confirmação de alteração para
|
|
||||||
execução</h3>
|
|
||||||
</div>
|
|
||||||
<form
|
|
||||||
action="{{ route('changeStateProject', ['projectId' => $numberProject->company_projects_id]) }}">
|
|
||||||
@csrf
|
|
||||||
<div class="modal-body">
|
|
||||||
<p>
|
|
||||||
A inicialização está planeada para {{ $numberProject->date_started }} Ao
|
|
||||||
prosseguir, irá alterar o estado para execução imediata. Confirma a operação?
|
|
||||||
</p>
|
|
||||||
</div>
|
|
||||||
<div class="modal-footer">
|
|
||||||
<button type="button" class="btn btn-secondary"
|
|
||||||
data-bs-dismiss="modal">Close</button>
|
|
||||||
<button type="submit" class="btn btn-primary">Alterar</button>
|
|
||||||
</div>
|
|
||||||
</form>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<!-- Card box criar equipamentos -->
|
<!-- Card box criar equipamentos -->
|
||||||
<form>
|
<form>
|
||||||
<!-- Articulado -->
|
<!-- Articulado -->
|
||||||
|
|
@ -230,7 +189,9 @@ class="btn btn-primary float-right">Alterar para Execussao</a>
|
||||||
<div class="table-responsive">
|
<div class="table-responsive">
|
||||||
<div class="row text-center">
|
<div class="row text-center">
|
||||||
|
|
||||||
<div class="form-group col-sm">
|
{{-- Para colocar os filtros a Funcionar, deve primeiro alterar a tabela para Yajra --}}
|
||||||
|
|
||||||
|
{{-- <div class="form-group col-sm">
|
||||||
<label>Tipo de Equipamento </label>
|
<label>Tipo de Equipamento </label>
|
||||||
<select id="tipo_valvulasList" name="equipmentTypeId"
|
<select id="tipo_valvulasList" name="equipmentTypeId"
|
||||||
class="form-control">
|
class="form-control">
|
||||||
|
|
@ -263,7 +224,7 @@ class="form-control">
|
||||||
<option value="#" hidden>Mostrar Todos</option>
|
<option value="#" hidden>Mostrar Todos</option>
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div> --}}
|
||||||
|
|
||||||
{{-- <div class="col-sm-3">
|
{{-- <div class="col-sm-3">
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
|
|
@ -311,18 +272,17 @@ class="form-control">
|
||||||
<td>{{ $equipment->equipment_tag }}</td>
|
<td>{{ $equipment->equipment_tag }}</td>
|
||||||
<td>{{ $equipment->equipment_type_id }}</td>
|
<td>{{ $equipment->equipment_type_id }}</td>
|
||||||
<td>{{ $equipment->unit->unit_name }}</td>
|
<td>{{ $equipment->unit->unit_name }}</td>
|
||||||
<td><a
|
<td>{{ $equipment->ambits_description }}</td>
|
||||||
href="{{ route('showDetailsEquipmentForQrCode', ['equipmentId' => $equipment->equipment_id, 'projectId' => $numberProject]) }}"><i
|
<td>
|
||||||
|
<a href="{{ route('showDetailsEquipmentForQrCode', ['equipmentId' => $equipment->equipment_id, 'projectId' => $numberProject]) }}"><i
|
||||||
class="fa-solid fa-file-pdf fa-2x"></i></a>
|
class="fa-solid fa-file-pdf fa-2x"></i></a>
|
||||||
</td>
|
</td>
|
||||||
{{-- <td>{{ $equipment->equipmentAssociationAmbit->ambitsEquipment->ambits_description }} --}}
|
|
||||||
</td>
|
|
||||||
{{-- <td><a href="#" data-toggle="modal"
|
{{-- <td><a href="#" data-toggle="modal"
|
||||||
data-target="#yourModalId-{{ $equipment->equipment_id }}"
|
data-target="#yourModalId-{{ $equipment->equipment_id }}"
|
||||||
data-equipment-id=""><i class="fa-solid fa-eye"
|
data-equipment-id=""><i class="fa-solid fa-eye"
|
||||||
style="color:rgb(62, 62, 62)"></i></a></td> --}}
|
style="color:rgb(62, 62, 62)"></i></a></td> --}}
|
||||||
|
|
||||||
<!--@livewire('preparadas.show-qrcode-and-detalls-equipment', ['equipment' => $equipment], key($equipment->equipment_id)) -->
|
|
||||||
</tr>
|
</tr>
|
||||||
{{-- Por algum motivo se tirar esta modal, ele nao encontra o qrcode do componente ?????????????? WHY????????? --}}
|
{{-- Por algum motivo se tirar esta modal, ele nao encontra o qrcode do componente ?????????????? WHY????????? --}}
|
||||||
<div class="modal fade"
|
<div class="modal fade"
|
||||||
|
|
@ -348,8 +308,7 @@ class="fa-solid fa-file-pdf fa-2x"></i></a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-footer">
|
<div class="modal-footer">
|
||||||
<button type="button"
|
<button type="button" class="btn btn-secondary"
|
||||||
class="btn btn-secondary"
|
|
||||||
data-dismiss="modal">Fechar</button>
|
data-dismiss="modal">Fechar</button>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
@ -420,10 +379,10 @@ function printCard() {
|
||||||
|
|
||||||
<div class="card-footer">
|
<div class="card-footer">
|
||||||
<!-- Botao para criar os Multiplos Qrcodes nas Folhas -->
|
<!-- Botao para criar os Multiplos Qrcodes nas Folhas -->
|
||||||
<!-- <div class="float-left">
|
<div class="float-left">
|
||||||
<button class="btn btn-outline-secondary " onclick="printCard()">Imprimir Códigos
|
<a href="{{ route('showAllEquipmentsInProjectForQrCode', ['projectId' => $numberProject->company_projects_id])}}" class="btn btn-outline-primary"> Imprimir Códigos QR</a>
|
||||||
QR</button>
|
</div>
|
||||||
</div> -->
|
|
||||||
<div class="float-right">
|
<div class="float-right">
|
||||||
<button type="button" class="btn btn-primary" data-toggle="modal"
|
<button type="button" class="btn btn-primary" data-toggle="modal"
|
||||||
data-target="#ModalTransferForArticulated">
|
data-target="#ModalTransferForArticulated">
|
||||||
|
|
@ -446,6 +405,7 @@ function printCard() {
|
||||||
|
|
||||||
<form>
|
<form>
|
||||||
<div class="card card-primary" id="CardPostosDeTrabalhoObra">
|
<div class="card card-primary" id="CardPostosDeTrabalhoObra">
|
||||||
|
|
||||||
<div class="card-header">
|
<div class="card-header">
|
||||||
<h3 class="card-title">Postos de Trabalho</h3>
|
<h3 class="card-title">Postos de Trabalho</h3>
|
||||||
|
|
||||||
|
|
@ -708,8 +668,41 @@ class="checkboxChoseTasksOficesCV"
|
||||||
<!-- /.card -->
|
<!-- /.card -->
|
||||||
</div>
|
</div>
|
||||||
<!-- /.card-body -->
|
<!-- /.card-body -->
|
||||||
|
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
<a style="margin: 10px" data-bs-toggle="modal" data-bs-target="#exampleModal"
|
||||||
|
class="btn btn-primary float-right">Alterar para Execussao</a>
|
||||||
|
|
||||||
|
<!-- Modal -->
|
||||||
|
<div class="modal fade" id="exampleModal" tabindex="-1" aria-labelledby="exampleModalLabel"
|
||||||
|
aria-hidden="true">
|
||||||
|
<div class="modal-dialog">
|
||||||
|
<div class="modal-content">
|
||||||
|
<div class="modal-header">
|
||||||
|
<h3 class="modal-title fs-5" id="exampleModalLabel">Confirmação de alteração para
|
||||||
|
execução</h3>
|
||||||
|
</div>
|
||||||
|
<form
|
||||||
|
action="{{ route('changeStateProject', ['projectId' => $numberProject->company_projects_id]) }}">
|
||||||
|
@csrf
|
||||||
|
<div class="modal-body">
|
||||||
|
<p>
|
||||||
|
A inicialização está planeada para {{ $numberProject->date_started }} Ao
|
||||||
|
prosseguir, irá alterar o estado para execução imediata. Confirma a operação?
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
<div class="modal-footer">
|
||||||
|
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal">Close</button>
|
||||||
|
<button type="submit" class="btn btn-primary">Alterar</button>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,182 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
|
||||||
|
<head>
|
||||||
|
<meta charset="UTF-8">
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
|
<meta http-equiv="X-UA-Compatible" content="ie=edge">
|
||||||
|
<title>Document</title>
|
||||||
|
|
||||||
|
<style>
|
||||||
|
.page-break {
|
||||||
|
page-break-before: always;
|
||||||
|
}
|
||||||
|
|
||||||
|
.box-pai {
|
||||||
|
width: 50%;
|
||||||
|
margin: 2mm;
|
||||||
|
float: left;
|
||||||
|
width: 65mm;
|
||||||
|
height: 95mm;
|
||||||
|
border: 3px solid #09255C;
|
||||||
|
}
|
||||||
|
|
||||||
|
.row {
|
||||||
|
background-color: #09255C;
|
||||||
|
height: 11mm;
|
||||||
|
}
|
||||||
|
|
||||||
|
.col {
|
||||||
|
width: 32.50%;
|
||||||
|
float: left;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
.col2 {
|
||||||
|
width: 35%;
|
||||||
|
float: left;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
.col2-img {
|
||||||
|
width: 40%;
|
||||||
|
float: left;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
.col-1 {
|
||||||
|
margin-top: 2mm;
|
||||||
|
color: aqua;
|
||||||
|
padding-left: 2mm;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
.col-2 {
|
||||||
|
color: aqua;
|
||||||
|
margin-left: 10mm;
|
||||||
|
padding-left: 6mm;
|
||||||
|
}
|
||||||
|
|
||||||
|
.col-1-img {
|
||||||
|
margin-top: 2mm;
|
||||||
|
margin-right: 20mm;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
.col-2-img {
|
||||||
|
margin-left: 11mm;
|
||||||
|
padding-left: 10mm;
|
||||||
|
}
|
||||||
|
|
||||||
|
.col-center {
|
||||||
|
padding-top: 4mm;
|
||||||
|
color: #fff;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
.circle {
|
||||||
|
margin-top: 1mm;
|
||||||
|
width: 8mm;
|
||||||
|
height: 8mm;
|
||||||
|
/* border: 1px solid blue; */
|
||||||
|
background-color: #fff;
|
||||||
|
border-radius: 50%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.img-logo {
|
||||||
|
margin-top: 0.5mm;
|
||||||
|
padding-left: 11mm;
|
||||||
|
width: 10mm;
|
||||||
|
height: 10mm;
|
||||||
|
}
|
||||||
|
|
||||||
|
.qr-code {
|
||||||
|
margin-top: 1mm;
|
||||||
|
margin-left: 13mm;
|
||||||
|
width: 40mm;
|
||||||
|
height: 40mm;
|
||||||
|
}
|
||||||
|
|
||||||
|
.title-tag {
|
||||||
|
margin-left: 20mm;
|
||||||
|
font-size: 5mm;
|
||||||
|
}
|
||||||
|
|
||||||
|
.type-tag {
|
||||||
|
margin-left: 25mm;
|
||||||
|
}
|
||||||
|
|
||||||
|
.img-company {
|
||||||
|
margin-top: 4mm;
|
||||||
|
padding-left: 3mm;
|
||||||
|
width: 15mm;
|
||||||
|
height: 15mm;
|
||||||
|
}
|
||||||
|
|
||||||
|
.img-istp {
|
||||||
|
margin-top: 4mm;
|
||||||
|
width: 15mm;
|
||||||
|
height: 15mm;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body>
|
||||||
|
|
||||||
|
@php $globalCounter = 0; @endphp
|
||||||
|
|
||||||
|
@foreach ($equipmentData as $data)
|
||||||
|
@foreach ($data['associatedArray'] as $id => $componentTag)
|
||||||
|
@php
|
||||||
|
$parts = explode('@', $componentTag);
|
||||||
|
$tagName = $parts[0];
|
||||||
|
$tagType = $parts[1] ?? ''; // Use '??' para evitar erros se '@' não estiver presente
|
||||||
|
@endphp
|
||||||
|
|
||||||
|
<div class="box-pai">
|
||||||
|
<div class="row">
|
||||||
|
<div class="col">
|
||||||
|
<div class="circle"></div>
|
||||||
|
</div>
|
||||||
|
<div class="col col-center">
|
||||||
|
ISPT 4.0
|
||||||
|
</div>
|
||||||
|
<div class="col">
|
||||||
|
<img class="img-logo"
|
||||||
|
src="{{ public_path('/img/ispt/4.0/Ispt4.0_Símbolo_Fundo_Azul-Marinho@2x-100.jpg') }}"
|
||||||
|
alt="Logo Esquerdo">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="box-principal">
|
||||||
|
{{-- <img class="qr-code" src="{{ $qrCodeImage }}" alt="QR Code"> --}}
|
||||||
|
<img class="qr-code" src="{{ $data['qrCodeImage'] }}" alt="QR Code">
|
||||||
|
|
||||||
|
<div class="title-tag"><b>Tag :</b> {{ $tagName }}</div>
|
||||||
|
<div class="type-tag">{{ $tagType }}</div>
|
||||||
|
|
||||||
|
<div class="col2 col-1">{{ $data['equipment']->equipmentType->equipment_type_name }}</div>
|
||||||
|
<div class="col2 col-2">{{ $data['equipment']->unit->unit_name }}</div>
|
||||||
|
|
||||||
|
<div class="col2-img col-1-img">
|
||||||
|
<img class="img-company" src="{{ public_path('/img/ispt/4.0/galpLogo1.png') }}"
|
||||||
|
alt="Logo Esquerdo">
|
||||||
|
</div>
|
||||||
|
<div class="col2-img col-2-img">
|
||||||
|
<img class="img-istp" src="{{ public_path('/img/ispt/4.0/isptLogoVertical.png') }}"
|
||||||
|
alt="Logo Esquerdo">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
@php $globalCounter++; @endphp
|
||||||
|
|
||||||
|
@if ($globalCounter % 4 == 0)
|
||||||
|
<div class="page-break"></div>
|
||||||
|
@endif
|
||||||
|
@endforeach
|
||||||
|
@endforeach
|
||||||
|
|
||||||
|
</body>
|
||||||
|
|
||||||
|
</html>
|
||||||
|
|
@ -8,7 +8,14 @@
|
||||||
<title>Document</title>
|
<title>Document</title>
|
||||||
|
|
||||||
<style>
|
<style>
|
||||||
|
.page-break {
|
||||||
|
page-break-before: always;
|
||||||
|
}
|
||||||
|
|
||||||
.box-pai {
|
.box-pai {
|
||||||
|
width: 50%;
|
||||||
|
margin: 2mm;
|
||||||
|
float: left;
|
||||||
width: 65mm;
|
width: 65mm;
|
||||||
height: 95mm;
|
height: 95mm;
|
||||||
border: 3px solid #09255C;
|
border: 3px solid #09255C;
|
||||||
|
|
@ -25,6 +32,42 @@
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.col2 {
|
||||||
|
width: 35%;
|
||||||
|
float: left;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
.col2-img {
|
||||||
|
width: 40%;
|
||||||
|
float: left;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
.col-1 {
|
||||||
|
margin-top: 2mm;
|
||||||
|
color: aqua;
|
||||||
|
padding-left: 2mm;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
.col-2 {
|
||||||
|
color: aqua;
|
||||||
|
margin-left: 10mm;
|
||||||
|
padding-left: 6mm;
|
||||||
|
}
|
||||||
|
|
||||||
|
.col-1-img {
|
||||||
|
margin-top: 2mm;
|
||||||
|
margin-right: 20mm;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
.col-2-img {
|
||||||
|
margin-left: 11mm;
|
||||||
|
padding-left: 10mm;
|
||||||
|
}
|
||||||
|
|
||||||
.col-center {
|
.col-center {
|
||||||
padding-top: 4mm;
|
padding-top: 4mm;
|
||||||
color: #fff;
|
color: #fff;
|
||||||
|
|
@ -32,25 +75,68 @@
|
||||||
|
|
||||||
|
|
||||||
.circle {
|
.circle {
|
||||||
width: 10mm;
|
margin-top: 1mm;
|
||||||
height: 10mm;
|
width: 8mm;
|
||||||
|
height: 8mm;
|
||||||
/* border: 1px solid blue; */
|
/* border: 1px solid blue; */
|
||||||
background-color: #fff;
|
background-color: #fff;
|
||||||
border-radius: 50%;
|
border-radius: 50%;
|
||||||
}
|
}
|
||||||
|
|
||||||
.img-logo {
|
.img-logo {
|
||||||
|
margin-top: 0.5mm;
|
||||||
padding-left: 11mm;
|
padding-left: 11mm;
|
||||||
width: 10mm;
|
width: 10mm;
|
||||||
height: 10mm;
|
height: 10mm;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.qr-code {
|
||||||
|
margin-top: 1mm;
|
||||||
|
margin-left: 13mm;
|
||||||
|
width: 40mm;
|
||||||
|
height: 40mm;
|
||||||
|
}
|
||||||
|
|
||||||
|
.title-tag {
|
||||||
|
margin-left: 20mm;
|
||||||
|
font-size: 5mm;
|
||||||
|
}
|
||||||
|
|
||||||
|
.type-tag {
|
||||||
|
margin-left: 25mm;
|
||||||
|
}
|
||||||
|
|
||||||
|
.img-company {
|
||||||
|
margin-top: 4mm;
|
||||||
|
padding-left: 3mm;
|
||||||
|
width: 15mm;
|
||||||
|
height: 15mm;
|
||||||
|
}
|
||||||
|
|
||||||
|
.img-istp {
|
||||||
|
margin-top: 4mm;
|
||||||
|
width: 15mm;
|
||||||
|
height: 15mm;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
|
|
||||||
|
@php $contador = 0; @endphp
|
||||||
|
@foreach ($associatedArray as $id => $componentTag)
|
||||||
|
<!-- Como cada pagina A4 so tem espaco para 4 cartoes, quando chega no 4 a pagina quebra para a proxima-->
|
||||||
|
@if ($contador % 4 == 0 && $contador != 0)
|
||||||
|
<div class="page-break"></div>
|
||||||
|
@endif
|
||||||
|
|
||||||
|
@php
|
||||||
|
$parts = explode('@', $componentTag);
|
||||||
|
$tagName = $parts[0]; // a parte antes do '@'
|
||||||
|
$tagType = $parts[1]; // a parte depois do '@'
|
||||||
|
@endphp
|
||||||
|
|
||||||
<div class="box-pai">
|
<div class="box-pai">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col">
|
<div class="col">
|
||||||
|
|
@ -65,8 +151,25 @@
|
||||||
alt="Logo Esquerdo">
|
alt="Logo Esquerdo">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
<div class="box-principal">
|
||||||
|
<img class="qr-code" src="{{ $qrCodeImage }}" alt="QR Code">
|
||||||
|
<div class="title-tag"><b>Tag :</b> {{ $tagName }}</div>
|
||||||
|
<div class="type-tag">{{$tagType}}</div>
|
||||||
|
|
||||||
|
<div class="col2 col-1">{{ $detailsEquipment->equipmentType->equipment_type_name }}</div>
|
||||||
|
<div class="col2 col-2">{{ $detailsEquipment->unit->unit_name }}</div>
|
||||||
|
|
||||||
|
<div class="col2-img col-1-img">
|
||||||
|
<img class="img-company" src="{{ public_path('/img/ispt/4.0/galpLogo1.png') }}" alt="Logo Esquerdo">
|
||||||
|
</div>
|
||||||
|
<div class="col2-img col-2-img">
|
||||||
|
<img class="img-istp" src="{{ public_path('/img/ispt/4.0/isptLogoVertical.png') }}"
|
||||||
|
alt="Logo Esquerdo">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
@php $contador++; @endphp
|
||||||
|
@endforeach
|
||||||
</body>
|
</body>
|
||||||
|
|
||||||
</html>
|
</html>
|
||||||
|
|
|
||||||
|
|
@ -141,6 +141,7 @@ class="form-control card_inputs" id="equipmentModel"
|
||||||
data-toggle="tooltip" title="Dimensão"></i>
|
data-toggle="tooltip" title="Dimensão"></i>
|
||||||
</span>
|
</span>
|
||||||
<input type="text" name="attributes[8]"
|
<input type="text" name="attributes[8]"
|
||||||
|
value="{{ $specificAttributesArray[8] ?? '' }}"
|
||||||
class="form-control card_inputs" id="dimension"
|
class="form-control card_inputs" id="dimension"
|
||||||
placeholder="Dimensão"
|
placeholder="Dimensão"
|
||||||
aria-label="Serial Number Equipment"
|
aria-label="Serial Number Equipment"
|
||||||
|
|
@ -157,6 +158,7 @@ class="form-control card_inputs" id="dimension"
|
||||||
title="Rating"></i>
|
title="Rating"></i>
|
||||||
</span>
|
</span>
|
||||||
<input type="text" name="attributes[17]"
|
<input type="text" name="attributes[17]"
|
||||||
|
value="{{ $specificAttributesArray[17] ?? '' }}"
|
||||||
class="form-control card_inputs" id="rating"
|
class="form-control card_inputs" id="rating"
|
||||||
placeholder="Rating..."
|
placeholder="Rating..."
|
||||||
aria-label="Serial Number Equipment"
|
aria-label="Serial Number Equipment"
|
||||||
|
|
@ -173,6 +175,7 @@ class="form-control card_inputs" id="rating"
|
||||||
title="Dim certa"></i>
|
title="Dim certa"></i>
|
||||||
</span>
|
</span>
|
||||||
<input type="text" name="attributes[10]"
|
<input type="text" name="attributes[10]"
|
||||||
|
value="{{ $specificAttributesArray[10] ?? '' }}"
|
||||||
class="form-control card_inputs" id="dim_certa"
|
class="form-control card_inputs" id="dim_certa"
|
||||||
placeholder="Dim certa..."
|
placeholder="Dim certa..."
|
||||||
aria-label="Serial Number Equipment"
|
aria-label="Serial Number Equipment"
|
||||||
|
|
@ -192,6 +195,7 @@ class="form-control card_inputs" id="dim_certa"
|
||||||
data-toggle="tooltip" title="Main Equipment"></i>
|
data-toggle="tooltip" title="Main Equipment"></i>
|
||||||
</span>
|
</span>
|
||||||
<input type="text" name="attributes[18]"
|
<input type="text" name="attributes[18]"
|
||||||
|
value="{{ $specificAttributesArray[18] ?? '' }}"
|
||||||
class="form-control card_inputs" id="main_equipment"
|
class="form-control card_inputs" id="main_equipment"
|
||||||
placeholder="Main Equipment" aria-label="Main Equipment"
|
placeholder="Main Equipment" aria-label="Main Equipment"
|
||||||
aria-describedby="form-main_equipment" readonly>
|
aria-describedby="form-main_equipment" readonly>
|
||||||
|
|
@ -206,6 +210,7 @@ class="form-control card_inputs" id="main_equipment"
|
||||||
title="P&ID"></i>
|
title="P&ID"></i>
|
||||||
</span>
|
</span>
|
||||||
<input type="text" name="attributes[11]"
|
<input type="text" name="attributes[11]"
|
||||||
|
value="{{ $specificAttributesArray[11] ?? '' }}"
|
||||||
class="form-control card_inputs" id="p&id"
|
class="form-control card_inputs" id="p&id"
|
||||||
placeholder="P&ID" aria-label="P & id"
|
placeholder="P&ID" aria-label="P & id"
|
||||||
aria-describedby="form-p&id" readonly>
|
aria-describedby="form-p&id" readonly>
|
||||||
|
|
@ -219,6 +224,7 @@ class="form-control card_inputs" id="p&id"
|
||||||
data-toggle="tooltip" title="Número Sap"></i>
|
data-toggle="tooltip" title="Número Sap"></i>
|
||||||
</span>
|
</span>
|
||||||
<input type="text" name="attributes[12]"
|
<input type="text" name="attributes[12]"
|
||||||
|
value="{{ $specificAttributesArray[12] ?? '' }}"
|
||||||
class="form-control card_inputs" id="sap_number"
|
class="form-control card_inputs" id="sap_number"
|
||||||
placeholder="Nº SAP" aria-label="Numero Sap"
|
placeholder="Nº SAP" aria-label="Numero Sap"
|
||||||
aria-describedby="form-sap_number" readonly>
|
aria-describedby="form-sap_number" readonly>
|
||||||
|
|
@ -237,6 +243,7 @@ class="form-control card_inputs" id="sap_number"
|
||||||
data-toggle="tooltip" title="SP(Bar)"></i>
|
data-toggle="tooltip" title="SP(Bar)"></i>
|
||||||
</span>
|
</span>
|
||||||
<input type="text" name="attributes[19]"
|
<input type="text" name="attributes[19]"
|
||||||
|
value="{{ $specificAttributesArray[19] ?? '' }}"
|
||||||
class="form-control card_inputs" id="SP_(Bar)_Cold"
|
class="form-control card_inputs" id="SP_(Bar)_Cold"
|
||||||
placeholder="SP (Bar) Cold" aria-label="SP (Bar) Cold"
|
placeholder="SP (Bar) Cold" aria-label="SP (Bar) Cold"
|
||||||
aria-describedby="form-SP_(Bar)_Cold" readonly>
|
aria-describedby="form-SP_(Bar)_Cold" readonly>
|
||||||
|
|
@ -250,6 +257,7 @@ class="form-control card_inputs" id="SP_(Bar)_Cold"
|
||||||
data-toggle="tooltip" title="Back_Presure_(Bar)"></i>
|
data-toggle="tooltip" title="Back_Presure_(Bar)"></i>
|
||||||
</span>
|
</span>
|
||||||
<input type="text" name="attributes[20]"
|
<input type="text" name="attributes[20]"
|
||||||
|
value="{{ $specificAttributesArray[20] ?? '' }}"
|
||||||
class="form-control card_inputs" id="Back_Presure_(Bar)"
|
class="form-control card_inputs" id="Back_Presure_(Bar)"
|
||||||
placeholder="Back Presure (Bar)"
|
placeholder="Back Presure (Bar)"
|
||||||
aria-label="Back Presure (Bar)"
|
aria-label="Back Presure (Bar)"
|
||||||
|
|
@ -265,6 +273,7 @@ class="form-control card_inputs" id="Back_Presure_(Bar)"
|
||||||
</span>
|
</span>
|
||||||
|
|
||||||
<input type="text" name="attributes[21]"
|
<input type="text" name="attributes[21]"
|
||||||
|
value="{{ $specificAttributesArray[21] ?? '' }}"
|
||||||
class="form-control card_inputs" id="material"
|
class="form-control card_inputs" id="material"
|
||||||
placeholder="Material" aria-label="Material"
|
placeholder="Material" aria-label="Material"
|
||||||
aria-describedby="form-material" readonly>
|
aria-describedby="form-material" readonly>
|
||||||
|
|
@ -283,10 +292,10 @@ class="form-control card_inputs" id="material"
|
||||||
data-toggle="tooltip" title="Fabricante"></i>
|
data-toggle="tooltip" title="Fabricante"></i>
|
||||||
</span>
|
</span>
|
||||||
<input type="text" name="attributes[22]"
|
<input type="text" name="attributes[22]"
|
||||||
|
value="{{ $specificAttributesArray[22] ?? '' }}"
|
||||||
class="form-control card_inputs" id="manufacturer"
|
class="form-control card_inputs" id="manufacturer"
|
||||||
placeholder="Fabricante" aria-label="Fabricante"
|
placeholder="Fabricante" aria-label="Fabricante"
|
||||||
aria-describedby="form-manufacturer" readonly>
|
aria-describedby="form-manufacturer" readonly>
|
||||||
{{-- <label>Fabricante</label> --}}
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group col-sm-6">
|
<div class="form-group col-sm-6">
|
||||||
|
|
@ -296,10 +305,10 @@ class="form-control card_inputs" id="manufacturer"
|
||||||
data-toggle="tooltip" title="Isolamento"></i>
|
data-toggle="tooltip" title="Isolamento"></i>
|
||||||
</span>
|
</span>
|
||||||
<input type="text" name="attributes[13]"
|
<input type="text" name="attributes[13]"
|
||||||
|
value="{{ $specificAttributesArray[13] ?? '' }}"
|
||||||
class="form-control card_inputs" id="isolation"
|
class="form-control card_inputs" id="isolation"
|
||||||
placeholder="Isolamento" aria-label="Isolamento"
|
placeholder="Isolamento" aria-label="Isolamento"
|
||||||
aria-describedby="form-isolation" readonly>
|
aria-describedby="form-isolation" readonly>
|
||||||
{{-- <label>Isolamento</label> --}}
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -314,6 +323,7 @@ class="form-control card_inputs" id="isolation"
|
||||||
data-toggle="tooltip" title="Andaime"></i>
|
data-toggle="tooltip" title="Andaime"></i>
|
||||||
</span>
|
</span>
|
||||||
<input type="text" name="attributes[23]"
|
<input type="text" name="attributes[23]"
|
||||||
|
value="{{ $specificAttributesArray[23] ?? '' }}"
|
||||||
class="form-control card_inputs" id="Scaffold"
|
class="form-control card_inputs" id="Scaffold"
|
||||||
placeholder="Andaime" aria-label="Scaffold"
|
placeholder="Andaime" aria-label="Scaffold"
|
||||||
aria-describedby="form-isolation" readonly value='Nao'>
|
aria-describedby="form-isolation" readonly value='Nao'>
|
||||||
|
|
@ -329,10 +339,10 @@ class="form-control card_inputs" id="Scaffold"
|
||||||
</span>
|
</span>
|
||||||
|
|
||||||
<input type="text" name="attributes[24]"
|
<input type="text" name="attributes[24]"
|
||||||
|
value="{{ $specificAttributesArray[24] ?? '' }}"
|
||||||
class="form-control card_inputs" id="Crane"
|
class="form-control card_inputs" id="Crane"
|
||||||
placeholder="Grua" aria-label="Crane"
|
placeholder="Grua" aria-label="Crane"
|
||||||
aria-describedby="form-isolation" readonly value='Nao'>
|
aria-describedby="form-isolation" readonly value='Nao'>
|
||||||
{{-- <label>Grua?</label> --}}
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -452,6 +462,7 @@ class="form-control card_inputs" id="equipmentModel"
|
||||||
data-toggle="tooltip" title="Dimensão"></i>
|
data-toggle="tooltip" title="Dimensão"></i>
|
||||||
</span>
|
</span>
|
||||||
<input type="text" name="attributes[8]"
|
<input type="text" name="attributes[8]"
|
||||||
|
value="{{ $specificAttributesArray[8] ?? '' }}"
|
||||||
class="form-control card_inputs" id="dimension"
|
class="form-control card_inputs" id="dimension"
|
||||||
placeholder="Dimensão"
|
placeholder="Dimensão"
|
||||||
aria-label="Serial Number Equipment"
|
aria-label="Serial Number Equipment"
|
||||||
|
|
@ -468,6 +479,7 @@ class="form-control card_inputs" id="dimension"
|
||||||
title="Rating"></i>
|
title="Rating"></i>
|
||||||
</span>
|
</span>
|
||||||
<input type="text" name="attributes[17]"
|
<input type="text" name="attributes[17]"
|
||||||
|
value="{{ $specificAttributesArray[17] ?? '' }}"
|
||||||
class="form-control card_inputs" id="rating"
|
class="form-control card_inputs" id="rating"
|
||||||
placeholder="Rating..."
|
placeholder="Rating..."
|
||||||
aria-label="Serial Number Equipment"
|
aria-label="Serial Number Equipment"
|
||||||
|
|
@ -484,6 +496,7 @@ class="form-control card_inputs" id="rating"
|
||||||
title="Dim certa"></i>
|
title="Dim certa"></i>
|
||||||
</span>
|
</span>
|
||||||
<input type="text" name="attributes[10]"
|
<input type="text" name="attributes[10]"
|
||||||
|
value="{{ $specificAttributesArray[10] ?? '' }}"
|
||||||
class="form-control card_inputs" id="dim_certa"
|
class="form-control card_inputs" id="dim_certa"
|
||||||
placeholder="Dim certa..."
|
placeholder="Dim certa..."
|
||||||
aria-label="Serial Number Equipment"
|
aria-label="Serial Number Equipment"
|
||||||
|
|
@ -503,6 +516,7 @@ class="form-control card_inputs" id="dim_certa"
|
||||||
data-toggle="tooltip" title="Main Equipment"></i>
|
data-toggle="tooltip" title="Main Equipment"></i>
|
||||||
</span>
|
</span>
|
||||||
<input type="text" name="attributes[18]"
|
<input type="text" name="attributes[18]"
|
||||||
|
value="{{ $specificAttributesArray[18] ?? '' }}"
|
||||||
class="form-control card_inputs" id="main_equipment"
|
class="form-control card_inputs" id="main_equipment"
|
||||||
placeholder="Main Equipment"
|
placeholder="Main Equipment"
|
||||||
aria-label="Main Equipment"
|
aria-label="Main Equipment"
|
||||||
|
|
@ -518,6 +532,7 @@ class="form-control card_inputs" id="main_equipment"
|
||||||
title="P&ID"></i>
|
title="P&ID"></i>
|
||||||
</span>
|
</span>
|
||||||
<input type="text" name="attributes[11]"
|
<input type="text" name="attributes[11]"
|
||||||
|
value="{{ $specificAttributesArray[11] ?? '' }}"
|
||||||
class="form-control card_inputs" id="p&id"
|
class="form-control card_inputs" id="p&id"
|
||||||
placeholder="P&ID" aria-label="P & id"
|
placeholder="P&ID" aria-label="P & id"
|
||||||
aria-describedby="form-p&id">
|
aria-describedby="form-p&id">
|
||||||
|
|
@ -531,6 +546,7 @@ class="form-control card_inputs" id="p&id"
|
||||||
data-toggle="tooltip" title="Número Sap"></i>
|
data-toggle="tooltip" title="Número Sap"></i>
|
||||||
</span>
|
</span>
|
||||||
<input type="text" name="attributes[12]"
|
<input type="text" name="attributes[12]"
|
||||||
|
value="{{ $specificAttributesArray[12] ?? '' }}"
|
||||||
class="form-control card_inputs" id="sap_number"
|
class="form-control card_inputs" id="sap_number"
|
||||||
placeholder="Nº SAP" aria-label="Numero Sap"
|
placeholder="Nº SAP" aria-label="Numero Sap"
|
||||||
aria-describedby="form-sap_number">
|
aria-describedby="form-sap_number">
|
||||||
|
|
@ -549,6 +565,7 @@ class="form-control card_inputs" id="sap_number"
|
||||||
data-toggle="tooltip" title="SP(Bar)"></i>
|
data-toggle="tooltip" title="SP(Bar)"></i>
|
||||||
</span>
|
</span>
|
||||||
<input type="text" name="attributes[19]"
|
<input type="text" name="attributes[19]"
|
||||||
|
value="{{ $specificAttributesArray[19] ?? '' }}"
|
||||||
class="form-control card_inputs" id="SP_(Bar)_Cold"
|
class="form-control card_inputs" id="SP_(Bar)_Cold"
|
||||||
placeholder="SP (Bar) Cold" aria-label="SP (Bar) Cold"
|
placeholder="SP (Bar) Cold" aria-label="SP (Bar) Cold"
|
||||||
aria-describedby="form-SP_(Bar)_Cold">
|
aria-describedby="form-SP_(Bar)_Cold">
|
||||||
|
|
@ -564,6 +581,7 @@ class="form-control card_inputs" id="SP_(Bar)_Cold"
|
||||||
title="Back_Presure_(Bar)"></i>
|
title="Back_Presure_(Bar)"></i>
|
||||||
</span>
|
</span>
|
||||||
<input type="text" name="attributes[20]"
|
<input type="text" name="attributes[20]"
|
||||||
|
value="{{ $specificAttributesArray[20] ?? '' }}"
|
||||||
class="form-control card_inputs"
|
class="form-control card_inputs"
|
||||||
id="Back_Presure_(Bar)"
|
id="Back_Presure_(Bar)"
|
||||||
placeholder="Back Presure (Bar)"
|
placeholder="Back Presure (Bar)"
|
||||||
|
|
@ -581,6 +599,7 @@ class="form-control card_inputs"
|
||||||
</span>
|
</span>
|
||||||
|
|
||||||
<input type="text" name="attributes[21]"
|
<input type="text" name="attributes[21]"
|
||||||
|
value="{{ $specificAttributesArray[21] ?? '' }}"
|
||||||
class="form-control card_inputs" id="material"
|
class="form-control card_inputs" id="material"
|
||||||
placeholder="Material" aria-label="Material"
|
placeholder="Material" aria-label="Material"
|
||||||
aria-describedby="form-material">
|
aria-describedby="form-material">
|
||||||
|
|
@ -600,6 +619,7 @@ class="form-control card_inputs" id="material"
|
||||||
title="Fabricante"></i>
|
title="Fabricante"></i>
|
||||||
</span>
|
</span>
|
||||||
<input type="text" name="attributes[22]"
|
<input type="text" name="attributes[22]"
|
||||||
|
value="{{ $specificAttributesArray[22] ?? '' }}"
|
||||||
class="form-control card_inputs" id="manufacturer"
|
class="form-control card_inputs" id="manufacturer"
|
||||||
placeholder="Fabricante" aria-label="Fabricante"
|
placeholder="Fabricante" aria-label="Fabricante"
|
||||||
aria-describedby="form-manufacturer">
|
aria-describedby="form-manufacturer">
|
||||||
|
|
@ -613,6 +633,7 @@ class="form-control card_inputs" id="manufacturer"
|
||||||
data-toggle="tooltip" title="Isolamento"></i>
|
data-toggle="tooltip" title="Isolamento"></i>
|
||||||
</span>
|
</span>
|
||||||
<input type="text" name="attributes[13]"
|
<input type="text" name="attributes[13]"
|
||||||
|
value="{{ $specificAttributesArray[13] ?? '' }}"
|
||||||
class="form-control card_inputs" id="isolation"
|
class="form-control card_inputs" id="isolation"
|
||||||
placeholder="Isolamento" aria-label="Isolamento"
|
placeholder="Isolamento" aria-label="Isolamento"
|
||||||
aria-describedby="form-isolation">
|
aria-describedby="form-isolation">
|
||||||
|
|
@ -631,10 +652,10 @@ class="form-control card_inputs" id="isolation"
|
||||||
<i class="fa-solid fa-stairs"
|
<i class="fa-solid fa-stairs"
|
||||||
style="color: #00B0EA;"></i>
|
style="color: #00B0EA;"></i>
|
||||||
</span>
|
</span>
|
||||||
<select class="form-control card_inputs" name="scaffold">
|
|
||||||
|
|
||||||
<option value="Sim">Sim</option>
|
<select class="form-control card_inputs" name="attributes[23]">
|
||||||
<option value="Nao" selected>Nao</option>
|
<option value="yes" {{ isset($specificAttributesArray[23]) && $specificAttributesArray[23] == 'yes' ? 'selected' : '' }}>Sim</option>
|
||||||
|
<option value="no" {{ !isset($specificAttributesArray[23]) || $specificAttributesArray[23] == 'no' ? 'selected' : '' }}>Nao</option>
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -645,9 +666,9 @@ class="form-control card_inputs" id="isolation"
|
||||||
<i class="fa-solid fa-truck-arrow-right"
|
<i class="fa-solid fa-truck-arrow-right"
|
||||||
style="color: #00B0EA;"></i>
|
style="color: #00B0EA;"></i>
|
||||||
</span>
|
</span>
|
||||||
<select class="form-control card_inputs" name="crane">
|
<select class="form-control card_inputs" name="attributes[24]">
|
||||||
<option value="Sim">Sim</option>
|
<option value="yes" {{ isset($specificAttributesArray[24]) && $specificAttributesArray[24] == 'yes' ? 'selected' : '' }}>Sim</option>
|
||||||
<option value="Nao" selected>Nao</option>
|
<option value="no" {{ !isset($specificAttributesArray[24]) || $specificAttributesArray[24] == 'no' ? 'selected' : '' }}>Nao</option>
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -746,7 +767,6 @@ class="form-control card_inputs" id="isolation"
|
||||||
class="form-control inputsIspt" id="equipmentTag"
|
class="form-control inputsIspt" id="equipmentTag"
|
||||||
placeholder="Tag..." aria-label="Tag Equipment"
|
placeholder="Tag..." aria-label="Tag Equipment"
|
||||||
aria-describedby="form-tagEquipment" readonly>
|
aria-describedby="form-tagEquipment" readonly>
|
||||||
{{-- <label>Tag </label> --}}
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group col-sm-6">
|
<div class="form-group col-sm-6">
|
||||||
|
|
@ -762,7 +782,6 @@ class="form-control card_inputs" id="equipmentDescription"
|
||||||
placeholder="Descrição Equipamento..."
|
placeholder="Descrição Equipamento..."
|
||||||
aria-label="Tag Equipment"
|
aria-label="Tag Equipment"
|
||||||
aria-describedby="form-equipmentDescription" readonly>
|
aria-describedby="form-equipmentDescription" readonly>
|
||||||
{{-- <label>Descrição Equipamento </label> --}}
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -783,7 +802,6 @@ class="form-control card_inputs"
|
||||||
id="equipmentSerialNumber" placeholder="Número de série"
|
id="equipmentSerialNumber" placeholder="Número de série"
|
||||||
aria-label="Serial Number Equipment"
|
aria-label="Serial Number Equipment"
|
||||||
aria-describedby="form-serialNumberEquipment" readonly>
|
aria-describedby="form-serialNumberEquipment" readonly>
|
||||||
{{-- <label>Número de série </label> --}}
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group col-sm-4">
|
<div class="form-group col-sm-4">
|
||||||
|
|
@ -799,7 +817,6 @@ class="form-control card_inputs"
|
||||||
id="equipmentBrand" placeholder="Marca"
|
id="equipmentBrand" placeholder="Marca"
|
||||||
aria-label="Marca Equipamento"
|
aria-label="Marca Equipamento"
|
||||||
aria-describedby="form-equipmentBrand" readonly>
|
aria-describedby="form-equipmentBrand" readonly>
|
||||||
{{-- <label>Marca</label> --}}
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group col-sm-4">
|
<div class="form-group col-sm-4">
|
||||||
|
|
@ -814,7 +831,6 @@ class="form-control card_inputs"
|
||||||
id="equipmentModel" placeholder="Modelo"
|
id="equipmentModel" placeholder="Modelo"
|
||||||
aria-label="Modelo Equipamento"
|
aria-label="Modelo Equipamento"
|
||||||
aria-describedby="form-equipmentModel" readonly>
|
aria-describedby="form-equipmentModel" readonly>
|
||||||
{{-- <label>Modelo</label> --}}
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -829,10 +845,10 @@ class="form-control card_inputs"
|
||||||
<i class="fa-solid fa-ruler " style="color: #00B0EA;"></i>
|
<i class="fa-solid fa-ruler " style="color: #00B0EA;"></i>
|
||||||
</span>
|
</span>
|
||||||
<input type="text" name="attributes[8]"
|
<input type="text" name="attributes[8]"
|
||||||
|
value="{{ $specificAttributesArray[8] ?? '' }}"
|
||||||
class="form-control card_inputs" id="dimension"
|
class="form-control card_inputs" id="dimension"
|
||||||
placeholder="Dimensão" aria-label="Dimensao Equipamento"
|
placeholder="Dimensão" aria-label="Dimensao Equipamento"
|
||||||
aria-describedby="form-dimension" readonly>
|
aria-describedby="form-dimension" readonly>
|
||||||
{{-- <label>Dimensão</label> --}}
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group col-sm-4">
|
<div class="form-group col-sm-4">
|
||||||
|
|
@ -843,10 +859,10 @@ class="form-control card_inputs" id="dimension"
|
||||||
style="color: #00B0EA;"></i>
|
style="color: #00B0EA;"></i>
|
||||||
</span>
|
</span>
|
||||||
<input type="text" name="attributes[17]"
|
<input type="text" name="attributes[17]"
|
||||||
|
value="{{ $specificAttributesArray[17] ?? '' }}"
|
||||||
class="form-control card_inputs" id="rating"
|
class="form-control card_inputs" id="rating"
|
||||||
placeholder="Rating..." aria-label="Rating Equipamento"
|
placeholder="Rating..." aria-label="Rating Equipamento"
|
||||||
aria-describedby="form-rating" readonly>
|
aria-describedby="form-rating" readonly>
|
||||||
{{-- <label>Rating</label> --}}
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group col-sm-4">
|
<div class="form-group col-sm-4">
|
||||||
|
|
@ -857,11 +873,11 @@ class="form-control card_inputs" id="rating"
|
||||||
style="color: #00B0EA;"></i>
|
style="color: #00B0EA;"></i>
|
||||||
</span>
|
</span>
|
||||||
<input type="text" name="attributes[10]"
|
<input type="text" name="attributes[10]"
|
||||||
|
value="{{ $specificAttributesArray[10] ?? '' }}"
|
||||||
class="form-control card_inputs" id="dim_certa"
|
class="form-control card_inputs" id="dim_certa"
|
||||||
placeholder="Dim certa..."
|
placeholder="Dim certa..."
|
||||||
aria-label="Dim certa Equipamento"
|
aria-label="Dim certa Equipamento"
|
||||||
aria-describedby="form-dim_certa" readonly>
|
aria-describedby="form-dim_certa" readonly>
|
||||||
{{-- <label>Dim certa</label> --}}
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -877,10 +893,10 @@ class="form-control card_inputs" id="dim_certa"
|
||||||
style="color: #00B0EA;"></i>
|
style="color: #00B0EA;"></i>
|
||||||
</span>
|
</span>
|
||||||
<input type="text" name="attributes[18]"
|
<input type="text" name="attributes[18]"
|
||||||
|
value="{{ $specificAttributesArray[18] ?? '' }}"
|
||||||
class="form-control card_inputs" id="main_equipment"
|
class="form-control card_inputs" id="main_equipment"
|
||||||
placeholder="Main Equipment" aria-label="Main Equipment"
|
placeholder="Main Equipment" aria-label="Main Equipment"
|
||||||
aria-describedby="form-main_equipment" readonly>
|
aria-describedby="form-main_equipment" readonly>
|
||||||
{{-- <label>Main Equipment</label> --}}
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group col-sm-4">
|
<div class="form-group col-sm-4">
|
||||||
|
|
@ -891,10 +907,10 @@ class="form-control card_inputs" id="main_equipment"
|
||||||
style="color: #00B0EA;"></i>
|
style="color: #00B0EA;"></i>
|
||||||
</span>
|
</span>
|
||||||
<input type="text" name="attributes[11]"
|
<input type="text" name="attributes[11]"
|
||||||
|
value="{{ $specificAttributesArray[11] ?? '' }}"
|
||||||
class="form-control card_inputs" id="P_idEquipment"
|
class="form-control card_inputs" id="P_idEquipment"
|
||||||
placeholder="P&ID" aria-label="P&ID"
|
placeholder="P&ID" aria-label="P&ID"
|
||||||
aria-describedby="form-P_IidEquipment" readonly>
|
aria-describedby="form-P_IidEquipment" readonly>
|
||||||
{{-- <label>P&ID</label> --}}
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group col-sm-4">
|
<div class="form-group col-sm-4">
|
||||||
|
|
@ -905,10 +921,10 @@ class="form-control card_inputs" id="P_idEquipment"
|
||||||
style="color: #00B0EA;"></i>
|
style="color: #00B0EA;"></i>
|
||||||
</span>
|
</span>
|
||||||
<input type="text" name="attributes[12]"
|
<input type="text" name="attributes[12]"
|
||||||
|
value="{{ $specificAttributesArray[12] ?? '' }}"
|
||||||
class="form-control card_inputs" id="NumberSapEquipment"
|
class="form-control card_inputs" id="NumberSapEquipment"
|
||||||
placeholder="Nº SAP" aria-label="Numero SAP Equipamento"
|
placeholder="Nº SAP" aria-label="Numero SAP Equipamento"
|
||||||
aria-describedby="form-NumberSapEquipment" readonly>
|
aria-describedby="form-NumberSapEquipment" readonly>
|
||||||
{{-- <label>Nº SAP</label> --}}
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -924,10 +940,10 @@ class="form-control card_inputs" id="NumberSapEquipment"
|
||||||
style="color: #00B0EA;"></i>
|
style="color: #00B0EA;"></i>
|
||||||
</span>
|
</span>
|
||||||
<input type="text" name="attributes[21]"
|
<input type="text" name="attributes[21]"
|
||||||
|
value="{{ $specificAttributesArray[21] ?? '' }}"
|
||||||
class="form-control card_inputs" id="materialEquipment"
|
class="form-control card_inputs" id="materialEquipment"
|
||||||
placeholder="Material" aria-label="Material Equipamento"
|
placeholder="Material" aria-label="Material Equipamento"
|
||||||
aria-describedby="form-materialEquipment" readonly>
|
aria-describedby="form-materialEquipment" readonly>
|
||||||
{{-- <label>Material</label> --}}
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group col-sm-4">
|
<div class="form-group col-sm-4">
|
||||||
|
|
@ -938,11 +954,11 @@ class="form-control card_inputs" id="materialEquipment"
|
||||||
style="color: #00B0EA;"></i>
|
style="color: #00B0EA;"></i>
|
||||||
</span>
|
</span>
|
||||||
<input type="text" name="attributes[22]"
|
<input type="text" name="attributes[22]"
|
||||||
|
value="{{ $specificAttributesArray[22] ?? '' }}"
|
||||||
class="form-control card_inputs"
|
class="form-control card_inputs"
|
||||||
id="manufacturerEquipment" placeholder="Fabricante"
|
id="manufacturerEquipment" placeholder="Fabricante"
|
||||||
aria-label="Fabricante Equipamento"
|
aria-label="Fabricante Equipamento"
|
||||||
aria-describedby="form-manufacturerEquipment" readonly>
|
aria-describedby="form-manufacturerEquipment" readonly>
|
||||||
{{-- <label>Fabricante</label> --}}
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group col-sm-4">
|
<div class="form-group col-sm-4">
|
||||||
|
|
@ -952,17 +968,17 @@ class="form-control card_inputs"
|
||||||
<i class="fa-solid fa-lock" style="color: #00B0EA;"></i>
|
<i class="fa-solid fa-lock" style="color: #00B0EA;"></i>
|
||||||
</span>
|
</span>
|
||||||
<input type="text" name="attributes[13]"
|
<input type="text" name="attributes[13]"
|
||||||
|
value="{{ $specificAttributesArray[13] ?? '' }}"
|
||||||
class="form-control card_inputs" id="isolationEquipment"
|
class="form-control card_inputs" id="isolationEquipment"
|
||||||
placeholder="Isolamento"
|
placeholder="Isolamento"
|
||||||
aria-label="Isolamento Equipamento"
|
aria-label="Isolamento Equipamento"
|
||||||
aria-describedby="form-isolationEquipment" readonly>
|
aria-describedby="form-isolationEquipment" readonly>
|
||||||
{{-- <label>Isolamento</label> --}}
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{{-- ./row --}}
|
{{-- ./row --}}
|
||||||
|
|
||||||
{{-- 2 Selects per line :psv_scaffold, psv_crane --}}
|
{{-- 2 Selects per line : scaffold, crane --}}
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="form-group col-sm-6">
|
<div class="form-group col-sm-6">
|
||||||
<div class="input-group-prepend">
|
<div class="input-group-prepend">
|
||||||
|
|
@ -971,7 +987,8 @@ class="form-control card_inputs" id="isolationEquipment"
|
||||||
<i class="fa-solid fa-stairs" style="color: #00B0EA;"></i>
|
<i class="fa-solid fa-stairs" style="color: #00B0EA;"></i>
|
||||||
</span>
|
</span>
|
||||||
|
|
||||||
<input type="text" name="scaffold"
|
<input type="text" name="attributes[23]"
|
||||||
|
value="{{ $specificAttributesArray[23] ?? '' }}"
|
||||||
class="form-control card_inputs" id="scaffold"
|
class="form-control card_inputs" id="scaffold"
|
||||||
placeholder="Andaime" aria-label="scaffold Equipamento"
|
placeholder="Andaime" aria-label="scaffold Equipamento"
|
||||||
aria-describedby="form-scaffold" value="Sim" readonly>
|
aria-describedby="form-scaffold" value="Sim" readonly>
|
||||||
|
|
@ -985,12 +1002,11 @@ class="form-control card_inputs" id="scaffold"
|
||||||
style="color: #00B0EA;"></i>
|
style="color: #00B0EA;"></i>
|
||||||
</span>
|
</span>
|
||||||
|
|
||||||
<input type="text" name="crane"
|
<input type="text" name="attributes[24]"
|
||||||
|
value="{{ $specificAttributesArray[24] ?? '' }}"
|
||||||
class="form-control card_inputs" id="crane"
|
class="form-control card_inputs" id="crane"
|
||||||
placeholder="Grua" aria-label="scaffold Equipamento"
|
placeholder="Grua" aria-label="scaffold Equipamento"
|
||||||
aria-describedby="form-scaffold" value="Sim" readonly>
|
aria-describedby="form-scaffold" value="Sim" readonly>
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -1000,6 +1016,7 @@ class="form-control card_inputs" id="crane"
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{{-- Editar --}}
|
{{-- Editar --}}
|
||||||
<div class="tab-pane fade pt-1" id="edit-equipment">
|
<div class="tab-pane fade pt-1" id="edit-equipment">
|
||||||
<div id="isv_card" class="card card-primary specificAttributes-div">
|
<div id="isv_card" class="card card-primary specificAttributes-div">
|
||||||
|
|
@ -1107,10 +1124,10 @@ class="form-control card_inputs"
|
||||||
<i class="fa-solid fa-ruler " style="color: #00B0EA;"></i>
|
<i class="fa-solid fa-ruler " style="color: #00B0EA;"></i>
|
||||||
</span>
|
</span>
|
||||||
<input type="text" name="attributes[8]"
|
<input type="text" name="attributes[8]"
|
||||||
|
value="{{ $specificAttributesArray[8] ?? '' }}"
|
||||||
class="form-control card_inputs" id="dimension"
|
class="form-control card_inputs" id="dimension"
|
||||||
placeholder="Dimensão" aria-label="Dimensao Equipamento"
|
placeholder="Dimensão" aria-label="Dimensao Equipamento"
|
||||||
aria-describedby="form-dimension">
|
aria-describedby="form-dimension">
|
||||||
{{-- <label>Dimensão</label> --}}
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group col-sm-4">
|
<div class="form-group col-sm-4">
|
||||||
|
|
@ -1121,6 +1138,7 @@ class="form-control card_inputs" id="dimension"
|
||||||
style="color: #00B0EA;"></i>
|
style="color: #00B0EA;"></i>
|
||||||
</span>
|
</span>
|
||||||
<input type="text" name="attributes[17]"
|
<input type="text" name="attributes[17]"
|
||||||
|
value="{{ $specificAttributesArray[17] ?? '' }}"
|
||||||
class="form-control card_inputs" id="rating"
|
class="form-control card_inputs" id="rating"
|
||||||
placeholder="Rating..." aria-label="Rating Equipamento"
|
placeholder="Rating..." aria-label="Rating Equipamento"
|
||||||
aria-describedby="form-rating">
|
aria-describedby="form-rating">
|
||||||
|
|
@ -1135,6 +1153,7 @@ class="form-control card_inputs" id="rating"
|
||||||
style="color: #00B0EA;"></i>
|
style="color: #00B0EA;"></i>
|
||||||
</span>
|
</span>
|
||||||
<input type="text" name="attributes[10]"
|
<input type="text" name="attributes[10]"
|
||||||
|
value="{{ $specificAttributesArray[10] ?? '' }}"
|
||||||
class="form-control card_inputs" id="dim_certa"
|
class="form-control card_inputs" id="dim_certa"
|
||||||
placeholder="Dim certa..."
|
placeholder="Dim certa..."
|
||||||
aria-label="Dim certa Equipamento"
|
aria-label="Dim certa Equipamento"
|
||||||
|
|
@ -1155,10 +1174,10 @@ class="form-control card_inputs" id="dim_certa"
|
||||||
style="color: #00B0EA;"></i>
|
style="color: #00B0EA;"></i>
|
||||||
</span>
|
</span>
|
||||||
<input type="text" name="attributes[18]"
|
<input type="text" name="attributes[18]"
|
||||||
|
value="{{ $specificAttributesArray[18] ?? '' }}"
|
||||||
class="form-control card_inputs" id="main_equipment"
|
class="form-control card_inputs" id="main_equipment"
|
||||||
placeholder="Main Equipment" aria-label="Main Equipment"
|
placeholder="Main Equipment" aria-label="Main Equipment"
|
||||||
aria-describedby="form-main_equipment">
|
aria-describedby="form-main_equipment">
|
||||||
{{-- <label>Main Equipment</label> --}}
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group col-sm-4">
|
<div class="form-group col-sm-4">
|
||||||
|
|
@ -1169,10 +1188,10 @@ class="form-control card_inputs" id="main_equipment"
|
||||||
style="color: #00B0EA;"></i>
|
style="color: #00B0EA;"></i>
|
||||||
</span>
|
</span>
|
||||||
<input type="text" name="attributes[11]"
|
<input type="text" name="attributes[11]"
|
||||||
|
value="{{ $specificAttributesArray[11] ?? '' }}"
|
||||||
class="form-control card_inputs" id="P_idEquipment"
|
class="form-control card_inputs" id="P_idEquipment"
|
||||||
placeholder="P&ID" aria-label="P&ID"
|
placeholder="P&ID" aria-label="P&ID"
|
||||||
aria-describedby="form-P_IidEquipment">
|
aria-describedby="form-P_IidEquipment">
|
||||||
{{-- <label>P&ID</label> --}}
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group col-sm-4">
|
<div class="form-group col-sm-4">
|
||||||
|
|
@ -1183,10 +1202,10 @@ class="form-control card_inputs" id="P_idEquipment"
|
||||||
style="color: #00B0EA;"></i>
|
style="color: #00B0EA;"></i>
|
||||||
</span>
|
</span>
|
||||||
<input type="text" name="attributes[12]"
|
<input type="text" name="attributes[12]"
|
||||||
|
value="{{ $specificAttributesArray[12] ?? '' }}"
|
||||||
class="form-control card_inputs" id="NumberSapEquipment"
|
class="form-control card_inputs" id="NumberSapEquipment"
|
||||||
placeholder="Nº SAP" aria-label="Numero SAP Equipamento"
|
placeholder="Nº SAP" aria-label="Numero SAP Equipamento"
|
||||||
aria-describedby="form-NumberSapEquipment">
|
aria-describedby="form-NumberSapEquipment">
|
||||||
{{-- <label>Nº SAP</label> --}}
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -1202,10 +1221,10 @@ class="form-control card_inputs" id="NumberSapEquipment"
|
||||||
style="color: #00B0EA;"></i>
|
style="color: #00B0EA;"></i>
|
||||||
</span>
|
</span>
|
||||||
<input type="text" name="attributes[21]"
|
<input type="text" name="attributes[21]"
|
||||||
|
value="{{ $specificAttributesArray[21] ?? '' }}"
|
||||||
class="form-control card_inputs" id="materialEquipment"
|
class="form-control card_inputs" id="materialEquipment"
|
||||||
placeholder="Material" aria-label="Material Equipamento"
|
placeholder="Material" aria-label="Material Equipamento"
|
||||||
aria-describedby="form-materialEquipment">
|
aria-describedby="form-materialEquipment">
|
||||||
{{-- <label>Material</label> --}}
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group col-sm-4">
|
<div class="form-group col-sm-4">
|
||||||
|
|
@ -1217,11 +1236,11 @@ class="form-control card_inputs" id="materialEquipment"
|
||||||
style="color: #00B0EA;"></i>
|
style="color: #00B0EA;"></i>
|
||||||
</span>
|
</span>
|
||||||
<input type="text" name="attributes[22]"
|
<input type="text" name="attributes[22]"
|
||||||
|
value="{{ $specificAttributesArray[22] ?? '' }}"
|
||||||
class="form-control card_inputs"
|
class="form-control card_inputs"
|
||||||
id="manufacturerEquipment" placeholder="Fabricante"
|
id="manufacturerEquipment" placeholder="Fabricante"
|
||||||
aria-label="Fabricante Equipamento"
|
aria-label="Fabricante Equipamento"
|
||||||
aria-describedby="form-manufacturerEquipment">
|
aria-describedby="form-manufacturerEquipment">
|
||||||
{{-- <label>Fabricante</label> --}}
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group col-sm-4">
|
<div class="form-group col-sm-4">
|
||||||
|
|
@ -1231,11 +1250,11 @@ class="form-control card_inputs"
|
||||||
<i class="fa-solid fa-lock" style="color: #00B0EA;"></i>
|
<i class="fa-solid fa-lock" style="color: #00B0EA;"></i>
|
||||||
</span>
|
</span>
|
||||||
<input type="text" name="attributes[13]"
|
<input type="text" name="attributes[13]"
|
||||||
|
value="{{ $specificAttributesArray[13] ?? '' }}"
|
||||||
class="form-control card_inputs" id="isolationEquipment"
|
class="form-control card_inputs" id="isolationEquipment"
|
||||||
placeholder="Isolamento"
|
placeholder="Isolamento"
|
||||||
aria-label="Isolamento Equipamento"
|
aria-label="Isolamento Equipamento"
|
||||||
aria-describedby="form-isolationEquipment">
|
aria-describedby="form-isolationEquipment">
|
||||||
{{-- <label>Isolamento</label> --}}
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -1250,11 +1269,11 @@ class="form-control card_inputs" id="isolationEquipment"
|
||||||
<i class="fa-solid fa-stairs"
|
<i class="fa-solid fa-stairs"
|
||||||
style="color: #00B0EA;"></i>
|
style="color: #00B0EA;"></i>
|
||||||
</span>
|
</span>
|
||||||
<select class="form-control card_inputs" name="scaffold">
|
<select class="form-control card_inputs" name="attributes[23]">
|
||||||
|
<option value="yes" {{ isset($specificAttributesArray[23]) && $specificAttributesArray[23] == 'yes' ? 'selected' : '' }}>Sim</option>
|
||||||
<option value="Sim">Sim</option>
|
<option value="no" {{ !isset($specificAttributesArray[23]) || $specificAttributesArray[23] == 'no' ? 'selected' : '' }}>Nao</option>
|
||||||
<option value="Nao" selected>Nao</option>
|
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group col-sm-6">
|
<div class="form-group col-sm-6">
|
||||||
|
|
@ -1264,9 +1283,9 @@ class="form-control card_inputs" id="isolationEquipment"
|
||||||
<i class="fa-solid fa-truck-arrow-right"
|
<i class="fa-solid fa-truck-arrow-right"
|
||||||
style="color: #00B0EA;"></i>
|
style="color: #00B0EA;"></i>
|
||||||
</span>
|
</span>
|
||||||
<select class="form-control card_inputs" name="crane">
|
<select class="form-control card_inputs" name="attributes[24]">
|
||||||
<option value="Sim">Sim</option>
|
<option value="yes" {{ isset($specificAttributesArray[24]) && $specificAttributesArray[24] == 'yes' ? 'selected' : '' }}>Sim</option>
|
||||||
<option value="Nao" selected>Nao</option>
|
<option value="no" {{ !isset($specificAttributesArray[24]) || $specificAttributesArray[24] == 'no' ? 'selected' : '' }}>Nao</option>
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -1279,6 +1298,7 @@ class="form-control card_inputs" id="isolationEquipment"
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{{-- Historico --}}
|
{{-- Historico --}}
|
||||||
<div class="tab-pane fade pt-1" id="history-equipment">
|
<div class="tab-pane fade pt-1" id="history-equipment">
|
||||||
@foreach ($receiveAlldetailsEquipmentWorkHistory as $detailsEquipmentWorkHistory)
|
@foreach ($receiveAlldetailsEquipmentWorkHistory as $detailsEquipmentWorkHistory)
|
||||||
|
|
@ -1332,7 +1352,6 @@ class="form-control card_inputs" id="isolationEquipment"
|
||||||
@endif
|
@endif
|
||||||
|
|
||||||
{{-- CV --}}
|
{{-- CV --}}
|
||||||
{{-- Ainda falta fazer alteracoes para boa formatacao e visualizacao --}}
|
|
||||||
@if ($dataEquipment->equipment_type_id == 1)
|
@if ($dataEquipment->equipment_type_id == 1)
|
||||||
{{-- Visualizar --}}
|
{{-- Visualizar --}}
|
||||||
<div class="tab-pane fade show active " id="show-Equipment">
|
<div class="tab-pane fade show active " id="show-Equipment">
|
||||||
|
|
@ -1437,6 +1456,7 @@ class="form-control card_inputs"
|
||||||
style="color: #00B0EA;"></i>
|
style="color: #00B0EA;"></i>
|
||||||
</span>
|
</span>
|
||||||
<input type="text" name="attributes[8]"
|
<input type="text" name="attributes[8]"
|
||||||
|
value="{{ $specificAttributesArray[8] ?? '' }}"
|
||||||
class="form-control card_inputs" id="dimension"
|
class="form-control card_inputs" id="dimension"
|
||||||
placeholder="Dimensão" aria-label="Dimensao Equipamento"
|
placeholder="Dimensão" aria-label="Dimensao Equipamento"
|
||||||
aria-describedby="form-dimension" readonly>
|
aria-describedby="form-dimension" readonly>
|
||||||
|
|
@ -1451,10 +1471,10 @@ class="form-control card_inputs" id="dimension"
|
||||||
style="color: #00B0EA;"></i>
|
style="color: #00B0EA;"></i>
|
||||||
</span>
|
</span>
|
||||||
<input type="text" name="attributes[17]"
|
<input type="text" name="attributes[17]"
|
||||||
|
value="{{ $specificAttributesArray[17] ?? '' }}"
|
||||||
class="form-control card_inputs" id="rating"
|
class="form-control card_inputs" id="rating"
|
||||||
placeholder="Rating..." aria-label="Rating Equipamento"
|
placeholder="Rating..." aria-label="Rating Equipamento"
|
||||||
aria-describedby="form-rating" readonly>
|
aria-describedby="form-rating" readonly>
|
||||||
{{-- <label>Rating</label> --}}
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
@ -1466,11 +1486,11 @@ class="form-control card_inputs" id="rating"
|
||||||
style="color: #00B0EA;"></i>
|
style="color: #00B0EA;"></i>
|
||||||
</span>
|
</span>
|
||||||
<input type="text" name="attributes[10]"
|
<input type="text" name="attributes[10]"
|
||||||
|
value="{{ $specificAttributesArray[10] ?? '' }}"
|
||||||
class="form-control card_inputs" id="dim_certa"
|
class="form-control card_inputs" id="dim_certa"
|
||||||
placeholder="Dim certa..."
|
placeholder="Dim certa..."
|
||||||
aria-label="Dim certa Equipamento"
|
aria-label="Dim certa Equipamento"
|
||||||
aria-describedby="form-dim_certa" readonly>
|
aria-describedby="form-dim_certa" readonly>
|
||||||
{{-- <label>Dim certa</label> --}}
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -1485,10 +1505,10 @@ class="form-control card_inputs" id="dim_certa"
|
||||||
style="color: #00B0EA;"></i>
|
style="color: #00B0EA;"></i>
|
||||||
</span>
|
</span>
|
||||||
<input type="text" name="attributes[18]"
|
<input type="text" name="attributes[18]"
|
||||||
|
value="{{ $specificAttributesArray[18] ?? '' }}"
|
||||||
class="form-control card_inputs" id="main_equipment"
|
class="form-control card_inputs" id="main_equipment"
|
||||||
placeholder="Main Equipment" aria-label="Main Equipment"
|
placeholder="Main Equipment" aria-label="Main Equipment"
|
||||||
aria-describedby="form-main_equipment" readonly>
|
aria-describedby="form-main_equipment" readonly>
|
||||||
{{-- <label>Main Equipment</label> --}}
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group col-sm-4">
|
<div class="form-group col-sm-4">
|
||||||
|
|
@ -1499,10 +1519,10 @@ class="form-control card_inputs" id="main_equipment"
|
||||||
style="color: #00B0EA;"></i>
|
style="color: #00B0EA;"></i>
|
||||||
</span>
|
</span>
|
||||||
<input type="text" name="attributes[11]"
|
<input type="text" name="attributes[11]"
|
||||||
|
value="{{ $specificAttributesArray[11] ?? '' }}"
|
||||||
class="form-control card_inputs" id="p&id"
|
class="form-control card_inputs" id="p&id"
|
||||||
placeholder="P&ID" aria-label="P&ID"
|
placeholder="P&ID" aria-label="P&ID"
|
||||||
aria-describedby="form-P_IidEquipment" readonly>
|
aria-describedby="form-P_IidEquipment" readonly>
|
||||||
{{-- <label>P&ID</label> --}}
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group col-sm-4">
|
<div class="form-group col-sm-4">
|
||||||
|
|
@ -1513,10 +1533,10 @@ class="form-control card_inputs" id="p&id"
|
||||||
style="color: #00B0EA;"></i>
|
style="color: #00B0EA;"></i>
|
||||||
</span>
|
</span>
|
||||||
<input type="text" name="attributes[12]"
|
<input type="text" name="attributes[12]"
|
||||||
|
value="{{ $specificAttributesArray[12] ?? '' }}"
|
||||||
class="form-control card_inputs" id="sap_number"
|
class="form-control card_inputs" id="sap_number"
|
||||||
placeholder="Nº SAP" aria-label="Numero SAP Equipamento"
|
placeholder="Nº SAP" aria-label="Numero SAP Equipamento"
|
||||||
aria-describedby="form-NumberSapEquipment" readonly>
|
aria-describedby="form-NumberSapEquipment" readonly>
|
||||||
{{-- <label>Nº SAP</label> --}}
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -1531,10 +1551,10 @@ class="form-control card_inputs" id="sap_number"
|
||||||
style="color: #00B0EA;"></i>
|
style="color: #00B0EA;"></i>
|
||||||
</span>
|
</span>
|
||||||
<input type="text" name="attributes[21]"
|
<input type="text" name="attributes[21]"
|
||||||
|
value="{{ $specificAttributesArray[21] ?? '' }}"
|
||||||
class="form-control card_inputs" id="material"
|
class="form-control card_inputs" id="material"
|
||||||
placeholder="Material" aria-label="Material Equipamento"
|
placeholder="Material" aria-label="Material Equipamento"
|
||||||
aria-describedby="form-materialEquipment" readonly>
|
aria-describedby="form-materialEquipment" readonly>
|
||||||
{{-- <label>Material</label> --}}
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group col-sm-4">
|
<div class="form-group col-sm-4">
|
||||||
|
|
@ -1546,11 +1566,11 @@ class="form-control card_inputs" id="material"
|
||||||
style="color: #00B0EA;"></i>
|
style="color: #00B0EA;"></i>
|
||||||
</span>
|
</span>
|
||||||
<input type="text" name="attributes[22]"
|
<input type="text" name="attributes[22]"
|
||||||
|
value="{{ $specificAttributesArray[22] ?? '' }}"
|
||||||
class="form-control card_inputs"
|
class="form-control card_inputs"
|
||||||
id="manufacturerEquipment" placeholder="Fabricante"
|
id="manufacturerEquipment" placeholder="Fabricante"
|
||||||
aria-label="Fabricante Equipamento"
|
aria-label="Fabricante Equipamento"
|
||||||
aria-describedby="form-manufacturerEquipment" readonly>
|
aria-describedby="form-manufacturerEquipment" readonly>
|
||||||
{{-- <label>Fabricante</label> --}}
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group col-sm-4">
|
<div class="form-group col-sm-4">
|
||||||
|
|
@ -1560,11 +1580,11 @@ class="form-control card_inputs"
|
||||||
<i class="fa-solid fa-lock" style="color: #00B0EA;"></i>
|
<i class="fa-solid fa-lock" style="color: #00B0EA;"></i>
|
||||||
</span>
|
</span>
|
||||||
<input type="text" name="attributes[13]"
|
<input type="text" name="attributes[13]"
|
||||||
|
value="{{ $specificAttributesArray[13] ?? '' }}"
|
||||||
class="form-control card_inputs" id="isolation"
|
class="form-control card_inputs" id="isolation"
|
||||||
placeholder="Isolamento"
|
placeholder="Isolamento"
|
||||||
aria-label="Isolamento Equipamento"
|
aria-label="Isolamento Equipamento"
|
||||||
aria-describedby="form-isolationEquipment" readonly>
|
aria-describedby="form-isolationEquipment" readonly>
|
||||||
{{-- <label>Isolamento</label> --}}
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -1580,12 +1600,12 @@ class="form-control card_inputs" id="isolation"
|
||||||
style="color: #00B0EA;"></i>
|
style="color: #00B0EA;"></i>
|
||||||
</span>
|
</span>
|
||||||
<input type="text" name="attributes[25]"
|
<input type="text" name="attributes[25]"
|
||||||
|
value="{{ $specificAttributesArray[25] ?? '' }}"
|
||||||
class="form-control card_inputs"
|
class="form-control card_inputs"
|
||||||
id="actuatorManufacturer"
|
id="actuatorManufacturer"
|
||||||
placeholder="Fabricante do atuador"
|
placeholder="Fabricante do atuador"
|
||||||
aria-label="Fabricante do Atuador"
|
aria-label="Fabricante do Atuador"
|
||||||
aria-describedby="form-actuatorManufacturer" readonly>
|
aria-describedby="form-actuatorManufacturer" readonly>
|
||||||
{{-- <label>Fabricante do atuador</label> --}}
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group col-sm-4">
|
<div class="form-group col-sm-4">
|
||||||
|
|
@ -1596,11 +1616,11 @@ class="form-control card_inputs"
|
||||||
style="color: #00B0EA;"></i>
|
style="color: #00B0EA;"></i>
|
||||||
</span>
|
</span>
|
||||||
<input type="text" name="attributes[26]"
|
<input type="text" name="attributes[26]"
|
||||||
|
value="{{ $specificAttributesArray[26] ?? '' }}"
|
||||||
class="form-control card_inputs" id="ActuatorModel"
|
class="form-control card_inputs" id="ActuatorModel"
|
||||||
placeholder="Modelo do atuador"
|
placeholder="Modelo do atuador"
|
||||||
aria-label="Modelo do atuador"
|
aria-label="Modelo do atuador"
|
||||||
aria-describedby="form-ActuatorModel" readonly>
|
aria-describedby="form-ActuatorModel" readonly>
|
||||||
{{-- <label>Modelo do atuador</label> --}}
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group col-sm-4">
|
<div class="form-group col-sm-4">
|
||||||
|
|
@ -1612,12 +1632,12 @@ class="form-control card_inputs" id="ActuatorModel"
|
||||||
style="color: #00B0EA;"></i>
|
style="color: #00B0EA;"></i>
|
||||||
</span>
|
</span>
|
||||||
<input type="text" name="attributes[27]"
|
<input type="text" name="attributes[27]"
|
||||||
|
value="{{ $specificAttributesArray[27] ?? '' }}"
|
||||||
class="form-control card_inputs"
|
class="form-control card_inputs"
|
||||||
id="actuatorSerialNumber"
|
id="actuatorSerialNumber"
|
||||||
placeholder="N.º de série do atuador"
|
placeholder="N.º de série do atuador"
|
||||||
aria-label="Numero de série do atuado"
|
aria-label="Numero de série do atuado"
|
||||||
aria-describedby="form-actuatorSerialNumber" readonly>
|
aria-describedby="form-actuatorSerialNumber" readonly>
|
||||||
{{-- <label>N.º de série do atuador</label> --}}
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -1633,12 +1653,12 @@ class="form-control card_inputs"
|
||||||
style="color: #00B0EA;"></i>
|
style="color: #00B0EA;"></i>
|
||||||
</span>
|
</span>
|
||||||
<input type="text" name="attributes[28]"
|
<input type="text" name="attributes[28]"
|
||||||
|
value="{{ $specificAttributesArray[28] ?? '' }}"
|
||||||
class="form-control card_inputs"
|
class="form-control card_inputs"
|
||||||
id="PositionerManufacturer"
|
id="PositionerManufacturer"
|
||||||
placeholder="Fabricante do posicionador"
|
placeholder="Fabricante do posicionador"
|
||||||
aria-label="Fabricante do posicionador"
|
aria-label="Fabricante do posicionador"
|
||||||
aria-describedby="form-PositionerManufacturer" readonly>
|
aria-describedby="form-PositionerManufacturer" readonly>
|
||||||
{{-- <label>Fabricante do posicionador</label> --}}
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group col-sm-6">
|
<div class="form-group col-sm-6">
|
||||||
|
|
@ -1650,12 +1670,12 @@ class="form-control card_inputs"
|
||||||
style="color: #00B0EA;"></i>
|
style="color: #00B0EA;"></i>
|
||||||
</span>
|
</span>
|
||||||
<input type="text" name="attributes[29]"
|
<input type="text" name="attributes[29]"
|
||||||
|
value="{{ $specificAttributesArray[29] ?? '' }}"
|
||||||
class="form-control card_inputs"
|
class="form-control card_inputs"
|
||||||
id="PositionerSerialNumber"
|
id="PositionerSerialNumber"
|
||||||
placeholder="N.º de série do posicionador"
|
placeholder="N.º de série do posicionador"
|
||||||
aria-label="Numero de série do posicionador"
|
aria-label="Numero de série do posicionador"
|
||||||
aria-describedby="form-PositionerSerialNumber" readonly>
|
aria-describedby="form-PositionerSerialNumber" readonly>
|
||||||
{{-- <label>N.º de série do posicionador</label> --}}
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -1670,7 +1690,8 @@ class="form-control card_inputs"
|
||||||
style="color: #00B0EA;"></i>
|
style="color: #00B0EA;"></i>
|
||||||
</span>
|
</span>
|
||||||
|
|
||||||
<input type="text" name="scaffold"
|
<input type="text" name="attributes[23]"
|
||||||
|
value="{{ $specificAttributesArray[23] ?? '' }}"
|
||||||
class="form-control card_inputs" id="scaffold"
|
class="form-control card_inputs" id="scaffold"
|
||||||
placeholder="Andaime" aria-label="scaffold Equipamento"
|
placeholder="Andaime" aria-label="scaffold Equipamento"
|
||||||
aria-describedby="form-scaffold" value="Sim"
|
aria-describedby="form-scaffold" value="Sim"
|
||||||
|
|
@ -1685,13 +1706,12 @@ class="form-control card_inputs" id="scaffold"
|
||||||
style="color: #00B0EA;"></i>
|
style="color: #00B0EA;"></i>
|
||||||
</span>
|
</span>
|
||||||
|
|
||||||
<input type="text" name="crane"
|
<input type="text" name="attributes[24]"
|
||||||
|
value="{{ $specificAttributesArray[24] ?? '' }}"
|
||||||
class="form-control card_inputs" id="crane"
|
class="form-control card_inputs" id="crane"
|
||||||
placeholder="Grua" aria-label="scaffold Equipamento"
|
placeholder="Grua" aria-label="scaffold Equipamento"
|
||||||
aria-describedby="form-scaffold" value="Sim"
|
aria-describedby="form-scaffold" value="Sim"
|
||||||
readonly>
|
readonly>
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -1704,7 +1724,7 @@ class="form-control card_inputs" id="crane"
|
||||||
<div class="tab-pane fade pt-1" id="edit-equipment">
|
<div class="tab-pane fade pt-1" id="edit-equipment">
|
||||||
<div id="cv_card" class="card card-info specificAttributes-div">
|
<div id="cv_card" class="card card-info specificAttributes-div">
|
||||||
<div class="card-header">
|
<div class="card-header">
|
||||||
<h3 class="card-title">CV</h3>
|
<h3 class="card-title">CV - Editar</h3>
|
||||||
</div>
|
</div>
|
||||||
<form action="{{ route('editEquipment') }}" method="post">
|
<form action="{{ route('editEquipment') }}" method="post">
|
||||||
@csrf
|
@csrf
|
||||||
|
|
@ -1805,6 +1825,7 @@ class="form-control card_inputs"
|
||||||
style="color: #00B0EA;"></i>
|
style="color: #00B0EA;"></i>
|
||||||
</span>
|
</span>
|
||||||
<input type="text" name="attributes[8]"
|
<input type="text" name="attributes[8]"
|
||||||
|
value="{{ $specificAttributesArray[8] ?? '' }}"
|
||||||
class="form-control card_inputs" id="dimension"
|
class="form-control card_inputs" id="dimension"
|
||||||
placeholder="Dimensão"
|
placeholder="Dimensão"
|
||||||
aria-label="Dimensao Equipamento"
|
aria-label="Dimensao Equipamento"
|
||||||
|
|
@ -1820,11 +1841,11 @@ class="form-control card_inputs" id="dimension"
|
||||||
style="color: #00B0EA;"></i>
|
style="color: #00B0EA;"></i>
|
||||||
</span>
|
</span>
|
||||||
<input type="text" name="attributes[17]"
|
<input type="text" name="attributes[17]"
|
||||||
|
value="{{ $specificAttributesArray[17] ?? '' }}"
|
||||||
class="form-control card_inputs" id="rating"
|
class="form-control card_inputs" id="rating"
|
||||||
placeholder="Rating..."
|
placeholder="Rating..."
|
||||||
aria-label="Rating Equipamento"
|
aria-label="Rating Equipamento"
|
||||||
aria-describedby="form-rating">
|
aria-describedby="form-rating">
|
||||||
{{-- <label>Rating</label> --}}
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
@ -1836,11 +1857,11 @@ class="form-control card_inputs" id="rating"
|
||||||
style="color: #00B0EA;"></i>
|
style="color: #00B0EA;"></i>
|
||||||
</span>
|
</span>
|
||||||
<input type="text" name="attributes[10]"
|
<input type="text" name="attributes[10]"
|
||||||
|
value="{{ $specificAttributesArray[10] ?? '' }}"
|
||||||
class="form-control card_inputs" id="dim_certa"
|
class="form-control card_inputs" id="dim_certa"
|
||||||
placeholder="Dim certa..."
|
placeholder="Dim certa..."
|
||||||
aria-label="Dim certa Equipamento"
|
aria-label="Dim certa Equipamento"
|
||||||
aria-describedby="form-dim_certa">
|
aria-describedby="form-dim_certa">
|
||||||
{{-- <label>Dim certa</label> --}}
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -1855,11 +1876,11 @@ class="form-control card_inputs" id="dim_certa"
|
||||||
style="color: #00B0EA;"></i>
|
style="color: #00B0EA;"></i>
|
||||||
</span>
|
</span>
|
||||||
<input type="text" name="attributes[18]"
|
<input type="text" name="attributes[18]"
|
||||||
|
value="{{ $specificAttributesArray[10] ?? '' }}"
|
||||||
class="form-control card_inputs" id="main_equipment"
|
class="form-control card_inputs" id="main_equipment"
|
||||||
placeholder="Main Equipment"
|
placeholder="Main Equipment"
|
||||||
aria-label="Main Equipment"
|
aria-label="Main Equipment"
|
||||||
aria-describedby="form-main_equipment">
|
aria-describedby="form-main_equipment">
|
||||||
{{-- <label>Main Equipment</label> --}}
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group col-sm-4">
|
<div class="form-group col-sm-4">
|
||||||
|
|
@ -1870,10 +1891,10 @@ class="form-control card_inputs" id="main_equipment"
|
||||||
style="color: #00B0EA;"></i>
|
style="color: #00B0EA;"></i>
|
||||||
</span>
|
</span>
|
||||||
<input type="text" name="attributes[11]"
|
<input type="text" name="attributes[11]"
|
||||||
|
value="{{ $specificAttributesArray[11] ?? '' }}"
|
||||||
class="form-control card_inputs" id="p&id"
|
class="form-control card_inputs" id="p&id"
|
||||||
placeholder="P&ID" aria-label="P&ID"
|
placeholder="P&ID" aria-label="P&ID"
|
||||||
aria-describedby="form-P_IidEquipment">
|
aria-describedby="form-P_IidEquipment">
|
||||||
{{-- <label>P&ID</label> --}}
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group col-sm-4">
|
<div class="form-group col-sm-4">
|
||||||
|
|
@ -1885,11 +1906,11 @@ class="form-control card_inputs" id="p&id"
|
||||||
style="color: #00B0EA;"></i>
|
style="color: #00B0EA;"></i>
|
||||||
</span>
|
</span>
|
||||||
<input type="text" name="attributes[12]"
|
<input type="text" name="attributes[12]"
|
||||||
|
value="{{ $specificAttributesArray[12] ?? '' }}"
|
||||||
class="form-control card_inputs" id="sap_number"
|
class="form-control card_inputs" id="sap_number"
|
||||||
placeholder="Nº SAP"
|
placeholder="Nº SAP"
|
||||||
aria-label="Numero SAP Equipamento"
|
aria-label="Numero SAP Equipamento"
|
||||||
aria-describedby="form-NumberSapEquipment">
|
aria-describedby="form-NumberSapEquipment">
|
||||||
{{-- <label>Nº SAP</label> --}}
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -1905,11 +1926,11 @@ class="form-control card_inputs" id="sap_number"
|
||||||
style="color: #00B0EA;"></i>
|
style="color: #00B0EA;"></i>
|
||||||
</span>
|
</span>
|
||||||
<input type="text" name="attributes[21]"
|
<input type="text" name="attributes[21]"
|
||||||
|
value="{{ $specificAttributesArray[21] ?? '' }}"
|
||||||
class="form-control card_inputs" id="material"
|
class="form-control card_inputs" id="material"
|
||||||
placeholder="Material"
|
placeholder="Material"
|
||||||
aria-label="Material Equipamento"
|
aria-label="Material Equipamento"
|
||||||
aria-describedby="form-materialEquipment">
|
aria-describedby="form-materialEquipment">
|
||||||
{{-- <label>Material</label> --}}
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group col-sm-4">
|
<div class="form-group col-sm-4">
|
||||||
|
|
@ -1921,11 +1942,11 @@ class="form-control card_inputs" id="material"
|
||||||
style="color: #00B0EA;"></i>
|
style="color: #00B0EA;"></i>
|
||||||
</span>
|
</span>
|
||||||
<input type="text" name="attributes[22]"
|
<input type="text" name="attributes[22]"
|
||||||
|
value="{{ $specificAttributesArray[22] ?? '' }}"
|
||||||
class="form-control card_inputs"
|
class="form-control card_inputs"
|
||||||
id="manufacturerEquipment" placeholder="Fabricante"
|
id="manufacturerEquipment" placeholder="Fabricante"
|
||||||
aria-label="Fabricante Equipamento"
|
aria-label="Fabricante Equipamento"
|
||||||
aria-describedby="form-manufacturerEquipment">
|
aria-describedby="form-manufacturerEquipment">
|
||||||
{{-- <label>Fabricante</label> --}}
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group col-sm-4">
|
<div class="form-group col-sm-4">
|
||||||
|
|
@ -1937,11 +1958,11 @@ class="form-control card_inputs"
|
||||||
style="color: #00B0EA;"></i>
|
style="color: #00B0EA;"></i>
|
||||||
</span>
|
</span>
|
||||||
<input type="text" name="attributes[13]"
|
<input type="text" name="attributes[13]"
|
||||||
|
value="{{ $specificAttributesArray[13] ?? '' }}"
|
||||||
class="form-control card_inputs" id="isolation"
|
class="form-control card_inputs" id="isolation"
|
||||||
placeholder="Isolamento"
|
placeholder="Isolamento"
|
||||||
aria-label="Isolamento Equipamento"
|
aria-label="Isolamento Equipamento"
|
||||||
aria-describedby="form-isolationEquipment">
|
aria-describedby="form-isolationEquipment">
|
||||||
{{-- <label>Isolamento</label> --}}
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -1957,12 +1978,12 @@ class="form-control card_inputs" id="isolation"
|
||||||
style="color: #00B0EA;"></i>
|
style="color: #00B0EA;"></i>
|
||||||
</span>
|
</span>
|
||||||
<input type="text" name="attributes[25]"
|
<input type="text" name="attributes[25]"
|
||||||
|
value="{{ $specificAttributesArray[25] ?? '' }}"
|
||||||
class="form-control card_inputs"
|
class="form-control card_inputs"
|
||||||
id="actuatorManufacturer"
|
id="actuatorManufacturer"
|
||||||
placeholder="Fabricante do atuador"
|
placeholder="Fabricante do atuador"
|
||||||
aria-label="Fabricante do Atuador"
|
aria-label="Fabricante do Atuador"
|
||||||
aria-describedby="form-actuatorManufacturer">
|
aria-describedby="form-actuatorManufacturer">
|
||||||
{{-- <label>Fabricante do atuador</label> --}}
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group col-sm-4">
|
<div class="form-group col-sm-4">
|
||||||
|
|
@ -1973,11 +1994,11 @@ class="form-control card_inputs"
|
||||||
style="color: #00B0EA;"></i>
|
style="color: #00B0EA;"></i>
|
||||||
</span>
|
</span>
|
||||||
<input type="text" name="attributes[26]"
|
<input type="text" name="attributes[26]"
|
||||||
|
value="{{ $specificAttributesArray[26] ?? '' }}"
|
||||||
class="form-control card_inputs" id="ActuatorModel"
|
class="form-control card_inputs" id="ActuatorModel"
|
||||||
placeholder="Modelo do atuador"
|
placeholder="Modelo do atuador"
|
||||||
aria-label="Modelo do atuador"
|
aria-label="Modelo do atuador"
|
||||||
aria-describedby="form-ActuatorModel">
|
aria-describedby="form-ActuatorModel">
|
||||||
{{-- <label>Modelo do atuador</label> --}}
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group col-sm-4">
|
<div class="form-group col-sm-4">
|
||||||
|
|
@ -1989,12 +2010,12 @@ class="form-control card_inputs" id="ActuatorModel"
|
||||||
style="color: #00B0EA;"></i>
|
style="color: #00B0EA;"></i>
|
||||||
</span>
|
</span>
|
||||||
<input type="text" name="attributes[27]"
|
<input type="text" name="attributes[27]"
|
||||||
|
value="{{ $specificAttributesArray[27] ?? '' }}"
|
||||||
class="form-control card_inputs"
|
class="form-control card_inputs"
|
||||||
id="actuatorSerialNumber"
|
id="actuatorSerialNumber"
|
||||||
placeholder="N.º de série do atuador"
|
placeholder="N.º de série do atuador"
|
||||||
aria-label="Numero de série do atuado"
|
aria-label="Numero de série do atuado"
|
||||||
aria-describedby="form-actuatorSerialNumber">
|
aria-describedby="form-actuatorSerialNumber">
|
||||||
{{-- <label>N.º de série do atuador</label> --}}
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -2011,12 +2032,12 @@ class="form-control card_inputs"
|
||||||
style="color: #00B0EA;"></i>
|
style="color: #00B0EA;"></i>
|
||||||
</span>
|
</span>
|
||||||
<input type="text" name="attributes[28]"
|
<input type="text" name="attributes[28]"
|
||||||
|
value="{{ $specificAttributesArray[28] ?? '' }}"
|
||||||
class="form-control card_inputs"
|
class="form-control card_inputs"
|
||||||
id="PositionerManufacturer"
|
id="PositionerManufacturer"
|
||||||
placeholder="Fabricante do posicionador"
|
placeholder="Fabricante do posicionador"
|
||||||
aria-label="Fabricante do posicionador"
|
aria-label="Fabricante do posicionador"
|
||||||
aria-describedby="form-PositionerManufacturer">
|
aria-describedby="form-PositionerManufacturer">
|
||||||
{{-- <label>Fabricante do posicionador</label> --}}
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group col-sm-6">
|
<div class="form-group col-sm-6">
|
||||||
|
|
@ -2029,12 +2050,12 @@ class="form-control card_inputs"
|
||||||
style="color: #00B0EA;"></i>
|
style="color: #00B0EA;"></i>
|
||||||
</span>
|
</span>
|
||||||
<input type="text" name="attributes[29]"
|
<input type="text" name="attributes[29]"
|
||||||
|
value="{{ $specificAttributesArray[29] ?? '' }}"
|
||||||
class="form-control card_inputs"
|
class="form-control card_inputs"
|
||||||
id="PositionerSerialNumber"
|
id="PositionerSerialNumber"
|
||||||
placeholder="N.º de série do posicionador"
|
placeholder="N.º de série do posicionador"
|
||||||
aria-label="Numero de série do posicionador"
|
aria-label="Numero de série do posicionador"
|
||||||
aria-describedby="form-PositionerSerialNumber">
|
aria-describedby="form-PositionerSerialNumber">
|
||||||
{{-- <label>N.º de série do posicionador</label> --}}
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -2048,11 +2069,9 @@ class="form-control card_inputs"
|
||||||
<i class="fa-solid fa-stairs"
|
<i class="fa-solid fa-stairs"
|
||||||
style="color: #00B0EA;"></i>
|
style="color: #00B0EA;"></i>
|
||||||
</span>
|
</span>
|
||||||
<select class="form-control card_inputs"
|
<select class="form-control card_inputs" name="attributes[23]">
|
||||||
name="scaffold">
|
<option value="yes" {{ isset($specificAttributesArray[23]) && $specificAttributesArray[23] == 'yes' ? 'selected' : '' }}>Sim</option>
|
||||||
|
<option value="no" {{ !isset($specificAttributesArray[23]) || $specificAttributesArray[23] == 'no' ? 'selected' : '' }}>Nao</option>
|
||||||
<option value="Sim">Sim</option>
|
|
||||||
<option value="Nao" selected>Nao</option>
|
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -2063,14 +2082,15 @@ class="form-control card_inputs"
|
||||||
<i class="fa-solid fa-truck-arrow-right"
|
<i class="fa-solid fa-truck-arrow-right"
|
||||||
style="color: #00B0EA;"></i>
|
style="color: #00B0EA;"></i>
|
||||||
</span>
|
</span>
|
||||||
<select class="form-control card_inputs" name="crane">
|
<select class="form-control card_inputs" name="attributes[24]">
|
||||||
<option value="Sim">Sim</option>
|
<option value="yes" {{ isset($specificAttributesArray[24]) && $specificAttributesArray[24] == 'yes' ? 'selected' : '' }}>Sim</option>
|
||||||
<option value="Nao" selected>Nao</option>
|
<option value="no" {{ !isset($specificAttributesArray[24]) || $specificAttributesArray[24] == 'no' ? 'selected' : '' }}>Nao</option>
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{{-- ./row --}}
|
{{-- ./row --}}
|
||||||
|
<button class="btn btn-danger float-right" type="submit">Atualizar</button>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -158,15 +158,16 @@ class="fas fa-minus"></i>
|
||||||
<input type="hidden" name="numberProject" value="{{ $numberProject }}">
|
<input type="hidden" name="numberProject" value="{{ $numberProject }}">
|
||||||
<div style="display: flex; justify-content: space-between;">
|
<div style="display: flex; justify-content: space-between;">
|
||||||
<div style="display: flex; align-items: center;">
|
<div style="display: flex; align-items: center;">
|
||||||
<label for="inputName" style="margin-right: 10px;">
|
<label class="mt-3" for="inputName" style="margin-right: 10px;">
|
||||||
Qtd. de Postos pretendidos :
|
Qtd. de Postos pretendidos :
|
||||||
</label>
|
</label>
|
||||||
<input class="form-control" name="numberWorkstations" type="number"
|
<input class="form-control mt-3 mr-2" name="numberWorkstations" type="number"
|
||||||
id="numberPosts">
|
id="numberPosts">
|
||||||
|
<button class="btn btn-success mb-2 " type="submit" value="Guardar"
|
||||||
|
type="button" style="align-self: flex-end;">Criar</button>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<button class="btn btn-success" type="submit" value="Guardar"
|
|
||||||
type="button" style="align-self: flex-end;">Criar</button>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
|
|
@ -226,11 +227,11 @@ class="fas fa-minus"></i>
|
||||||
</div>
|
</div>
|
||||||
<!-- ./Card card-primary -->
|
<!-- ./Card card-primary -->
|
||||||
<a href="{{ route('articulated_2', ['id' => $numberProject]) }}"
|
<a href="{{ route('articulated_2', ['id' => $numberProject]) }}"
|
||||||
class="btn btn-primary previous float-left">Anterior</a>
|
class="btn btn-primary previous float-left mb-3">Articulado</a>
|
||||||
|
|
||||||
<form action="{{ route('finishCreatingProject', ['numberProject' => $numberProject]) }}">
|
<form action="{{ route('finishCreatingProject', ['numberProject' => $numberProject]) }}">
|
||||||
@csrf
|
@csrf
|
||||||
<input type="submit" class="btn btn-success previous float-right" value="Concluir">
|
<input type="submit" class="btn btn-success previous float-right mb-3" value="Concluir">
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -49,6 +49,7 @@
|
||||||
|
|
||||||
Route::get('showDetailsEquipmentForQrCode/{equipmentId}/{projectId}', [PreparedProjectController::class, 'showDetailsEquipmentForQrCode'])->name('showDetailsEquipmentForQrCode');
|
Route::get('showDetailsEquipmentForQrCode/{equipmentId}/{projectId}', [PreparedProjectController::class, 'showDetailsEquipmentForQrCode'])->name('showDetailsEquipmentForQrCode');
|
||||||
|
|
||||||
|
Route::get('showAllEquipmentsInProjectForQrCode/{projectId}' , [PreparedProjectController::class,'showAllEquipmentsInProjectForQrCode'])->name('showAllEquipmentsInProjectForQrCode');
|
||||||
|
|
||||||
|
|
||||||
Route::get('testRelatorio', [ProjectoDatacontroller::class, 'testRelatorio'])->name('testRelatorio');
|
Route::get('testRelatorio', [ProjectoDatacontroller::class, 'testRelatorio'])->name('testRelatorio');
|
||||||
|
|
|
||||||
55
vendor/composer/autoload_classmap.php
vendored
55
vendor/composer/autoload_classmap.php
vendored
|
|
@ -544,6 +544,61 @@
|
||||||
'Egulias\\EmailValidator\\Warning\\QuotedString' => $vendorDir . '/egulias/email-validator/src/Warning/QuotedString.php',
|
'Egulias\\EmailValidator\\Warning\\QuotedString' => $vendorDir . '/egulias/email-validator/src/Warning/QuotedString.php',
|
||||||
'Egulias\\EmailValidator\\Warning\\TLD' => $vendorDir . '/egulias/email-validator/src/Warning/TLD.php',
|
'Egulias\\EmailValidator\\Warning\\TLD' => $vendorDir . '/egulias/email-validator/src/Warning/TLD.php',
|
||||||
'Egulias\\EmailValidator\\Warning\\Warning' => $vendorDir . '/egulias/email-validator/src/Warning/Warning.php',
|
'Egulias\\EmailValidator\\Warning\\Warning' => $vendorDir . '/egulias/email-validator/src/Warning/Warning.php',
|
||||||
|
'Endroid\\QrCode\\Bacon\\ErrorCorrectionLevelConverter' => $vendorDir . '/endroid/qr-code/src/Bacon/ErrorCorrectionLevelConverter.php',
|
||||||
|
'Endroid\\QrCode\\Bacon\\MatrixFactory' => $vendorDir . '/endroid/qr-code/src/Bacon/MatrixFactory.php',
|
||||||
|
'Endroid\\QrCode\\Builder\\Builder' => $vendorDir . '/endroid/qr-code/src/Builder/Builder.php',
|
||||||
|
'Endroid\\QrCode\\Builder\\BuilderInterface' => $vendorDir . '/endroid/qr-code/src/Builder/BuilderInterface.php',
|
||||||
|
'Endroid\\QrCode\\Builder\\BuilderRegistry' => $vendorDir . '/endroid/qr-code/src/Builder/BuilderRegistry.php',
|
||||||
|
'Endroid\\QrCode\\Builder\\BuilderRegistryInterface' => $vendorDir . '/endroid/qr-code/src/Builder/BuilderRegistryInterface.php',
|
||||||
|
'Endroid\\QrCode\\Color\\Color' => $vendorDir . '/endroid/qr-code/src/Color/Color.php',
|
||||||
|
'Endroid\\QrCode\\Color\\ColorInterface' => $vendorDir . '/endroid/qr-code/src/Color/ColorInterface.php',
|
||||||
|
'Endroid\\QrCode\\Encoding\\Encoding' => $vendorDir . '/endroid/qr-code/src/Encoding/Encoding.php',
|
||||||
|
'Endroid\\QrCode\\Encoding\\EncodingInterface' => $vendorDir . '/endroid/qr-code/src/Encoding/EncodingInterface.php',
|
||||||
|
'Endroid\\QrCode\\ErrorCorrectionLevel' => $vendorDir . '/endroid/qr-code/src/ErrorCorrectionLevel.php',
|
||||||
|
'Endroid\\QrCode\\Exception\\ValidationException' => $vendorDir . '/endroid/qr-code/src/Exception/ValidationException.php',
|
||||||
|
'Endroid\\QrCode\\ImageData\\LabelImageData' => $vendorDir . '/endroid/qr-code/src/ImageData/LabelImageData.php',
|
||||||
|
'Endroid\\QrCode\\ImageData\\LogoImageData' => $vendorDir . '/endroid/qr-code/src/ImageData/LogoImageData.php',
|
||||||
|
'Endroid\\QrCode\\Label\\Font\\Font' => $vendorDir . '/endroid/qr-code/src/Label/Font/Font.php',
|
||||||
|
'Endroid\\QrCode\\Label\\Font\\FontInterface' => $vendorDir . '/endroid/qr-code/src/Label/Font/FontInterface.php',
|
||||||
|
'Endroid\\QrCode\\Label\\Font\\NotoSans' => $vendorDir . '/endroid/qr-code/src/Label/Font/NotoSans.php',
|
||||||
|
'Endroid\\QrCode\\Label\\Font\\OpenSans' => $vendorDir . '/endroid/qr-code/src/Label/Font/OpenSans.php',
|
||||||
|
'Endroid\\QrCode\\Label\\Label' => $vendorDir . '/endroid/qr-code/src/Label/Label.php',
|
||||||
|
'Endroid\\QrCode\\Label\\LabelAlignment' => $vendorDir . '/endroid/qr-code/src/Label/LabelAlignment.php',
|
||||||
|
'Endroid\\QrCode\\Label\\LabelInterface' => $vendorDir . '/endroid/qr-code/src/Label/LabelInterface.php',
|
||||||
|
'Endroid\\QrCode\\Label\\Margin\\Margin' => $vendorDir . '/endroid/qr-code/src/Label/Margin/Margin.php',
|
||||||
|
'Endroid\\QrCode\\Label\\Margin\\MarginInterface' => $vendorDir . '/endroid/qr-code/src/Label/Margin/MarginInterface.php',
|
||||||
|
'Endroid\\QrCode\\Logo\\Logo' => $vendorDir . '/endroid/qr-code/src/Logo/Logo.php',
|
||||||
|
'Endroid\\QrCode\\Logo\\LogoInterface' => $vendorDir . '/endroid/qr-code/src/Logo/LogoInterface.php',
|
||||||
|
'Endroid\\QrCode\\Matrix\\Matrix' => $vendorDir . '/endroid/qr-code/src/Matrix/Matrix.php',
|
||||||
|
'Endroid\\QrCode\\Matrix\\MatrixFactoryInterface' => $vendorDir . '/endroid/qr-code/src/Matrix/MatrixFactoryInterface.php',
|
||||||
|
'Endroid\\QrCode\\Matrix\\MatrixInterface' => $vendorDir . '/endroid/qr-code/src/Matrix/MatrixInterface.php',
|
||||||
|
'Endroid\\QrCode\\QrCode' => $vendorDir . '/endroid/qr-code/src/QrCode.php',
|
||||||
|
'Endroid\\QrCode\\QrCodeInterface' => $vendorDir . '/endroid/qr-code/src/QrCodeInterface.php',
|
||||||
|
'Endroid\\QrCode\\RoundBlockSizeMode' => $vendorDir . '/endroid/qr-code/src/RoundBlockSizeMode.php',
|
||||||
|
'Endroid\\QrCode\\Writer\\AbstractGdWriter' => $vendorDir . '/endroid/qr-code/src/Writer/AbstractGdWriter.php',
|
||||||
|
'Endroid\\QrCode\\Writer\\BinaryWriter' => $vendorDir . '/endroid/qr-code/src/Writer/BinaryWriter.php',
|
||||||
|
'Endroid\\QrCode\\Writer\\ConsoleWriter' => $vendorDir . '/endroid/qr-code/src/Writer/ConsoleWriter.php',
|
||||||
|
'Endroid\\QrCode\\Writer\\DebugWriter' => $vendorDir . '/endroid/qr-code/src/Writer/DebugWriter.php',
|
||||||
|
'Endroid\\QrCode\\Writer\\EpsWriter' => $vendorDir . '/endroid/qr-code/src/Writer/EpsWriter.php',
|
||||||
|
'Endroid\\QrCode\\Writer\\GifWriter' => $vendorDir . '/endroid/qr-code/src/Writer/GifWriter.php',
|
||||||
|
'Endroid\\QrCode\\Writer\\PdfWriter' => $vendorDir . '/endroid/qr-code/src/Writer/PdfWriter.php',
|
||||||
|
'Endroid\\QrCode\\Writer\\PngWriter' => $vendorDir . '/endroid/qr-code/src/Writer/PngWriter.php',
|
||||||
|
'Endroid\\QrCode\\Writer\\Result\\AbstractResult' => $vendorDir . '/endroid/qr-code/src/Writer/Result/AbstractResult.php',
|
||||||
|
'Endroid\\QrCode\\Writer\\Result\\BinaryResult' => $vendorDir . '/endroid/qr-code/src/Writer/Result/BinaryResult.php',
|
||||||
|
'Endroid\\QrCode\\Writer\\Result\\ConsoleResult' => $vendorDir . '/endroid/qr-code/src/Writer/Result/ConsoleResult.php',
|
||||||
|
'Endroid\\QrCode\\Writer\\Result\\DebugResult' => $vendorDir . '/endroid/qr-code/src/Writer/Result/DebugResult.php',
|
||||||
|
'Endroid\\QrCode\\Writer\\Result\\EpsResult' => $vendorDir . '/endroid/qr-code/src/Writer/Result/EpsResult.php',
|
||||||
|
'Endroid\\QrCode\\Writer\\Result\\GdResult' => $vendorDir . '/endroid/qr-code/src/Writer/Result/GdResult.php',
|
||||||
|
'Endroid\\QrCode\\Writer\\Result\\GifResult' => $vendorDir . '/endroid/qr-code/src/Writer/Result/GifResult.php',
|
||||||
|
'Endroid\\QrCode\\Writer\\Result\\PdfResult' => $vendorDir . '/endroid/qr-code/src/Writer/Result/PdfResult.php',
|
||||||
|
'Endroid\\QrCode\\Writer\\Result\\PngResult' => $vendorDir . '/endroid/qr-code/src/Writer/Result/PngResult.php',
|
||||||
|
'Endroid\\QrCode\\Writer\\Result\\ResultInterface' => $vendorDir . '/endroid/qr-code/src/Writer/Result/ResultInterface.php',
|
||||||
|
'Endroid\\QrCode\\Writer\\Result\\SvgResult' => $vendorDir . '/endroid/qr-code/src/Writer/Result/SvgResult.php',
|
||||||
|
'Endroid\\QrCode\\Writer\\Result\\WebPResult' => $vendorDir . '/endroid/qr-code/src/Writer/Result/WebPResult.php',
|
||||||
|
'Endroid\\QrCode\\Writer\\SvgWriter' => $vendorDir . '/endroid/qr-code/src/Writer/SvgWriter.php',
|
||||||
|
'Endroid\\QrCode\\Writer\\ValidatingWriterInterface' => $vendorDir . '/endroid/qr-code/src/Writer/ValidatingWriterInterface.php',
|
||||||
|
'Endroid\\QrCode\\Writer\\WebPWriter' => $vendorDir . '/endroid/qr-code/src/Writer/WebPWriter.php',
|
||||||
|
'Endroid\\QrCode\\Writer\\WriterInterface' => $vendorDir . '/endroid/qr-code/src/Writer/WriterInterface.php',
|
||||||
'Faker\\Calculator\\Ean' => $vendorDir . '/fakerphp/faker/src/Faker/Calculator/Ean.php',
|
'Faker\\Calculator\\Ean' => $vendorDir . '/fakerphp/faker/src/Faker/Calculator/Ean.php',
|
||||||
'Faker\\Calculator\\Iban' => $vendorDir . '/fakerphp/faker/src/Faker/Calculator/Iban.php',
|
'Faker\\Calculator\\Iban' => $vendorDir . '/fakerphp/faker/src/Faker/Calculator/Iban.php',
|
||||||
'Faker\\Calculator\\Inn' => $vendorDir . '/fakerphp/faker/src/Faker/Calculator/Inn.php',
|
'Faker\\Calculator\\Inn' => $vendorDir . '/fakerphp/faker/src/Faker/Calculator/Inn.php',
|
||||||
|
|
|
||||||
1
vendor/composer/autoload_psr4.php
vendored
1
vendor/composer/autoload_psr4.php
vendored
|
|
@ -93,6 +93,7 @@
|
||||||
'Fruitcake\\Cors\\' => array($vendorDir . '/fruitcake/php-cors/src'),
|
'Fruitcake\\Cors\\' => array($vendorDir . '/fruitcake/php-cors/src'),
|
||||||
'FontLib\\' => array($vendorDir . '/phenx/php-font-lib/src/FontLib'),
|
'FontLib\\' => array($vendorDir . '/phenx/php-font-lib/src/FontLib'),
|
||||||
'Faker\\' => array($vendorDir . '/fakerphp/faker/src/Faker'),
|
'Faker\\' => array($vendorDir . '/fakerphp/faker/src/Faker'),
|
||||||
|
'Endroid\\QrCode\\' => array($vendorDir . '/endroid/qr-code/src'),
|
||||||
'Egulias\\EmailValidator\\' => array($vendorDir . '/egulias/email-validator/src'),
|
'Egulias\\EmailValidator\\' => array($vendorDir . '/egulias/email-validator/src'),
|
||||||
'Dotenv\\' => array($vendorDir . '/vlucas/phpdotenv/src'),
|
'Dotenv\\' => array($vendorDir . '/vlucas/phpdotenv/src'),
|
||||||
'Dompdf\\' => array($vendorDir . '/dompdf/dompdf/src'),
|
'Dompdf\\' => array($vendorDir . '/dompdf/dompdf/src'),
|
||||||
|
|
|
||||||
60
vendor/composer/autoload_static.php
vendored
60
vendor/composer/autoload_static.php
vendored
|
|
@ -175,6 +175,7 @@ class ComposerStaticInit4de2290df2a8c5142f72130885c7079d
|
||||||
),
|
),
|
||||||
'E' =>
|
'E' =>
|
||||||
array (
|
array (
|
||||||
|
'Endroid\\QrCode\\' => 15,
|
||||||
'Egulias\\EmailValidator\\' => 23,
|
'Egulias\\EmailValidator\\' => 23,
|
||||||
),
|
),
|
||||||
'D' =>
|
'D' =>
|
||||||
|
|
@ -561,6 +562,10 @@ class ComposerStaticInit4de2290df2a8c5142f72130885c7079d
|
||||||
array (
|
array (
|
||||||
0 => __DIR__ . '/..' . '/fakerphp/faker/src/Faker',
|
0 => __DIR__ . '/..' . '/fakerphp/faker/src/Faker',
|
||||||
),
|
),
|
||||||
|
'Endroid\\QrCode\\' =>
|
||||||
|
array (
|
||||||
|
0 => __DIR__ . '/..' . '/endroid/qr-code/src',
|
||||||
|
),
|
||||||
'Egulias\\EmailValidator\\' =>
|
'Egulias\\EmailValidator\\' =>
|
||||||
array (
|
array (
|
||||||
0 => __DIR__ . '/..' . '/egulias/email-validator/src',
|
0 => __DIR__ . '/..' . '/egulias/email-validator/src',
|
||||||
|
|
@ -1190,6 +1195,61 @@ class ComposerStaticInit4de2290df2a8c5142f72130885c7079d
|
||||||
'Egulias\\EmailValidator\\Warning\\QuotedString' => __DIR__ . '/..' . '/egulias/email-validator/src/Warning/QuotedString.php',
|
'Egulias\\EmailValidator\\Warning\\QuotedString' => __DIR__ . '/..' . '/egulias/email-validator/src/Warning/QuotedString.php',
|
||||||
'Egulias\\EmailValidator\\Warning\\TLD' => __DIR__ . '/..' . '/egulias/email-validator/src/Warning/TLD.php',
|
'Egulias\\EmailValidator\\Warning\\TLD' => __DIR__ . '/..' . '/egulias/email-validator/src/Warning/TLD.php',
|
||||||
'Egulias\\EmailValidator\\Warning\\Warning' => __DIR__ . '/..' . '/egulias/email-validator/src/Warning/Warning.php',
|
'Egulias\\EmailValidator\\Warning\\Warning' => __DIR__ . '/..' . '/egulias/email-validator/src/Warning/Warning.php',
|
||||||
|
'Endroid\\QrCode\\Bacon\\ErrorCorrectionLevelConverter' => __DIR__ . '/..' . '/endroid/qr-code/src/Bacon/ErrorCorrectionLevelConverter.php',
|
||||||
|
'Endroid\\QrCode\\Bacon\\MatrixFactory' => __DIR__ . '/..' . '/endroid/qr-code/src/Bacon/MatrixFactory.php',
|
||||||
|
'Endroid\\QrCode\\Builder\\Builder' => __DIR__ . '/..' . '/endroid/qr-code/src/Builder/Builder.php',
|
||||||
|
'Endroid\\QrCode\\Builder\\BuilderInterface' => __DIR__ . '/..' . '/endroid/qr-code/src/Builder/BuilderInterface.php',
|
||||||
|
'Endroid\\QrCode\\Builder\\BuilderRegistry' => __DIR__ . '/..' . '/endroid/qr-code/src/Builder/BuilderRegistry.php',
|
||||||
|
'Endroid\\QrCode\\Builder\\BuilderRegistryInterface' => __DIR__ . '/..' . '/endroid/qr-code/src/Builder/BuilderRegistryInterface.php',
|
||||||
|
'Endroid\\QrCode\\Color\\Color' => __DIR__ . '/..' . '/endroid/qr-code/src/Color/Color.php',
|
||||||
|
'Endroid\\QrCode\\Color\\ColorInterface' => __DIR__ . '/..' . '/endroid/qr-code/src/Color/ColorInterface.php',
|
||||||
|
'Endroid\\QrCode\\Encoding\\Encoding' => __DIR__ . '/..' . '/endroid/qr-code/src/Encoding/Encoding.php',
|
||||||
|
'Endroid\\QrCode\\Encoding\\EncodingInterface' => __DIR__ . '/..' . '/endroid/qr-code/src/Encoding/EncodingInterface.php',
|
||||||
|
'Endroid\\QrCode\\ErrorCorrectionLevel' => __DIR__ . '/..' . '/endroid/qr-code/src/ErrorCorrectionLevel.php',
|
||||||
|
'Endroid\\QrCode\\Exception\\ValidationException' => __DIR__ . '/..' . '/endroid/qr-code/src/Exception/ValidationException.php',
|
||||||
|
'Endroid\\QrCode\\ImageData\\LabelImageData' => __DIR__ . '/..' . '/endroid/qr-code/src/ImageData/LabelImageData.php',
|
||||||
|
'Endroid\\QrCode\\ImageData\\LogoImageData' => __DIR__ . '/..' . '/endroid/qr-code/src/ImageData/LogoImageData.php',
|
||||||
|
'Endroid\\QrCode\\Label\\Font\\Font' => __DIR__ . '/..' . '/endroid/qr-code/src/Label/Font/Font.php',
|
||||||
|
'Endroid\\QrCode\\Label\\Font\\FontInterface' => __DIR__ . '/..' . '/endroid/qr-code/src/Label/Font/FontInterface.php',
|
||||||
|
'Endroid\\QrCode\\Label\\Font\\NotoSans' => __DIR__ . '/..' . '/endroid/qr-code/src/Label/Font/NotoSans.php',
|
||||||
|
'Endroid\\QrCode\\Label\\Font\\OpenSans' => __DIR__ . '/..' . '/endroid/qr-code/src/Label/Font/OpenSans.php',
|
||||||
|
'Endroid\\QrCode\\Label\\Label' => __DIR__ . '/..' . '/endroid/qr-code/src/Label/Label.php',
|
||||||
|
'Endroid\\QrCode\\Label\\LabelAlignment' => __DIR__ . '/..' . '/endroid/qr-code/src/Label/LabelAlignment.php',
|
||||||
|
'Endroid\\QrCode\\Label\\LabelInterface' => __DIR__ . '/..' . '/endroid/qr-code/src/Label/LabelInterface.php',
|
||||||
|
'Endroid\\QrCode\\Label\\Margin\\Margin' => __DIR__ . '/..' . '/endroid/qr-code/src/Label/Margin/Margin.php',
|
||||||
|
'Endroid\\QrCode\\Label\\Margin\\MarginInterface' => __DIR__ . '/..' . '/endroid/qr-code/src/Label/Margin/MarginInterface.php',
|
||||||
|
'Endroid\\QrCode\\Logo\\Logo' => __DIR__ . '/..' . '/endroid/qr-code/src/Logo/Logo.php',
|
||||||
|
'Endroid\\QrCode\\Logo\\LogoInterface' => __DIR__ . '/..' . '/endroid/qr-code/src/Logo/LogoInterface.php',
|
||||||
|
'Endroid\\QrCode\\Matrix\\Matrix' => __DIR__ . '/..' . '/endroid/qr-code/src/Matrix/Matrix.php',
|
||||||
|
'Endroid\\QrCode\\Matrix\\MatrixFactoryInterface' => __DIR__ . '/..' . '/endroid/qr-code/src/Matrix/MatrixFactoryInterface.php',
|
||||||
|
'Endroid\\QrCode\\Matrix\\MatrixInterface' => __DIR__ . '/..' . '/endroid/qr-code/src/Matrix/MatrixInterface.php',
|
||||||
|
'Endroid\\QrCode\\QrCode' => __DIR__ . '/..' . '/endroid/qr-code/src/QrCode.php',
|
||||||
|
'Endroid\\QrCode\\QrCodeInterface' => __DIR__ . '/..' . '/endroid/qr-code/src/QrCodeInterface.php',
|
||||||
|
'Endroid\\QrCode\\RoundBlockSizeMode' => __DIR__ . '/..' . '/endroid/qr-code/src/RoundBlockSizeMode.php',
|
||||||
|
'Endroid\\QrCode\\Writer\\AbstractGdWriter' => __DIR__ . '/..' . '/endroid/qr-code/src/Writer/AbstractGdWriter.php',
|
||||||
|
'Endroid\\QrCode\\Writer\\BinaryWriter' => __DIR__ . '/..' . '/endroid/qr-code/src/Writer/BinaryWriter.php',
|
||||||
|
'Endroid\\QrCode\\Writer\\ConsoleWriter' => __DIR__ . '/..' . '/endroid/qr-code/src/Writer/ConsoleWriter.php',
|
||||||
|
'Endroid\\QrCode\\Writer\\DebugWriter' => __DIR__ . '/..' . '/endroid/qr-code/src/Writer/DebugWriter.php',
|
||||||
|
'Endroid\\QrCode\\Writer\\EpsWriter' => __DIR__ . '/..' . '/endroid/qr-code/src/Writer/EpsWriter.php',
|
||||||
|
'Endroid\\QrCode\\Writer\\GifWriter' => __DIR__ . '/..' . '/endroid/qr-code/src/Writer/GifWriter.php',
|
||||||
|
'Endroid\\QrCode\\Writer\\PdfWriter' => __DIR__ . '/..' . '/endroid/qr-code/src/Writer/PdfWriter.php',
|
||||||
|
'Endroid\\QrCode\\Writer\\PngWriter' => __DIR__ . '/..' . '/endroid/qr-code/src/Writer/PngWriter.php',
|
||||||
|
'Endroid\\QrCode\\Writer\\Result\\AbstractResult' => __DIR__ . '/..' . '/endroid/qr-code/src/Writer/Result/AbstractResult.php',
|
||||||
|
'Endroid\\QrCode\\Writer\\Result\\BinaryResult' => __DIR__ . '/..' . '/endroid/qr-code/src/Writer/Result/BinaryResult.php',
|
||||||
|
'Endroid\\QrCode\\Writer\\Result\\ConsoleResult' => __DIR__ . '/..' . '/endroid/qr-code/src/Writer/Result/ConsoleResult.php',
|
||||||
|
'Endroid\\QrCode\\Writer\\Result\\DebugResult' => __DIR__ . '/..' . '/endroid/qr-code/src/Writer/Result/DebugResult.php',
|
||||||
|
'Endroid\\QrCode\\Writer\\Result\\EpsResult' => __DIR__ . '/..' . '/endroid/qr-code/src/Writer/Result/EpsResult.php',
|
||||||
|
'Endroid\\QrCode\\Writer\\Result\\GdResult' => __DIR__ . '/..' . '/endroid/qr-code/src/Writer/Result/GdResult.php',
|
||||||
|
'Endroid\\QrCode\\Writer\\Result\\GifResult' => __DIR__ . '/..' . '/endroid/qr-code/src/Writer/Result/GifResult.php',
|
||||||
|
'Endroid\\QrCode\\Writer\\Result\\PdfResult' => __DIR__ . '/..' . '/endroid/qr-code/src/Writer/Result/PdfResult.php',
|
||||||
|
'Endroid\\QrCode\\Writer\\Result\\PngResult' => __DIR__ . '/..' . '/endroid/qr-code/src/Writer/Result/PngResult.php',
|
||||||
|
'Endroid\\QrCode\\Writer\\Result\\ResultInterface' => __DIR__ . '/..' . '/endroid/qr-code/src/Writer/Result/ResultInterface.php',
|
||||||
|
'Endroid\\QrCode\\Writer\\Result\\SvgResult' => __DIR__ . '/..' . '/endroid/qr-code/src/Writer/Result/SvgResult.php',
|
||||||
|
'Endroid\\QrCode\\Writer\\Result\\WebPResult' => __DIR__ . '/..' . '/endroid/qr-code/src/Writer/Result/WebPResult.php',
|
||||||
|
'Endroid\\QrCode\\Writer\\SvgWriter' => __DIR__ . '/..' . '/endroid/qr-code/src/Writer/SvgWriter.php',
|
||||||
|
'Endroid\\QrCode\\Writer\\ValidatingWriterInterface' => __DIR__ . '/..' . '/endroid/qr-code/src/Writer/ValidatingWriterInterface.php',
|
||||||
|
'Endroid\\QrCode\\Writer\\WebPWriter' => __DIR__ . '/..' . '/endroid/qr-code/src/Writer/WebPWriter.php',
|
||||||
|
'Endroid\\QrCode\\Writer\\WriterInterface' => __DIR__ . '/..' . '/endroid/qr-code/src/Writer/WriterInterface.php',
|
||||||
'Faker\\Calculator\\Ean' => __DIR__ . '/..' . '/fakerphp/faker/src/Faker/Calculator/Ean.php',
|
'Faker\\Calculator\\Ean' => __DIR__ . '/..' . '/fakerphp/faker/src/Faker/Calculator/Ean.php',
|
||||||
'Faker\\Calculator\\Iban' => __DIR__ . '/..' . '/fakerphp/faker/src/Faker/Calculator/Iban.php',
|
'Faker\\Calculator\\Iban' => __DIR__ . '/..' . '/fakerphp/faker/src/Faker/Calculator/Iban.php',
|
||||||
'Faker\\Calculator\\Inn' => __DIR__ . '/..' . '/fakerphp/faker/src/Faker/Calculator/Inn.php',
|
'Faker\\Calculator\\Inn' => __DIR__ . '/..' . '/fakerphp/faker/src/Faker/Calculator/Inn.php',
|
||||||
|
|
|
||||||
78
vendor/composer/installed.json
vendored
78
vendor/composer/installed.json
vendored
|
|
@ -699,6 +699,84 @@
|
||||||
],
|
],
|
||||||
"install-path": "../egulias/email-validator"
|
"install-path": "../egulias/email-validator"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"name": "endroid/qr-code",
|
||||||
|
"version": "5.0.4",
|
||||||
|
"version_normalized": "5.0.4.0",
|
||||||
|
"source": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "https://github.com/endroid/qr-code.git",
|
||||||
|
"reference": "0efd071a3640af323e23c94122fe92cfd5199833"
|
||||||
|
},
|
||||||
|
"dist": {
|
||||||
|
"type": "zip",
|
||||||
|
"url": "https://api.github.com/repos/endroid/qr-code/zipball/0efd071a3640af323e23c94122fe92cfd5199833",
|
||||||
|
"reference": "0efd071a3640af323e23c94122fe92cfd5199833",
|
||||||
|
"shasum": ""
|
||||||
|
},
|
||||||
|
"require": {
|
||||||
|
"bacon/bacon-qr-code": "^2.0.5",
|
||||||
|
"php": "^8.1"
|
||||||
|
},
|
||||||
|
"conflict": {
|
||||||
|
"khanamiryan/qrcode-detector-decoder": "^1.0.6"
|
||||||
|
},
|
||||||
|
"require-dev": {
|
||||||
|
"endroid/quality": "dev-main",
|
||||||
|
"ext-gd": "*",
|
||||||
|
"khanamiryan/qrcode-detector-decoder": "^1.0.4||^2.0.2",
|
||||||
|
"setasign/fpdf": "^1.8.2"
|
||||||
|
},
|
||||||
|
"suggest": {
|
||||||
|
"ext-gd": "Enables you to write PNG images",
|
||||||
|
"khanamiryan/qrcode-detector-decoder": "Enables you to use the image validator",
|
||||||
|
"roave/security-advisories": "Makes sure package versions with known security issues are not installed",
|
||||||
|
"setasign/fpdf": "Enables you to use the PDF writer"
|
||||||
|
},
|
||||||
|
"time": "2023-12-24T13:47:07+00:00",
|
||||||
|
"type": "library",
|
||||||
|
"extra": {
|
||||||
|
"branch-alias": {
|
||||||
|
"dev-main": "5.x-dev"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"installation-source": "dist",
|
||||||
|
"autoload": {
|
||||||
|
"psr-4": {
|
||||||
|
"Endroid\\QrCode\\": "src/"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"notification-url": "https://packagist.org/downloads/",
|
||||||
|
"license": [
|
||||||
|
"MIT"
|
||||||
|
],
|
||||||
|
"authors": [
|
||||||
|
{
|
||||||
|
"name": "Jeroen van den Enden",
|
||||||
|
"email": "info@endroid.nl"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"description": "Endroid QR Code",
|
||||||
|
"homepage": "https://github.com/endroid/qr-code",
|
||||||
|
"keywords": [
|
||||||
|
"code",
|
||||||
|
"endroid",
|
||||||
|
"php",
|
||||||
|
"qr",
|
||||||
|
"qrcode"
|
||||||
|
],
|
||||||
|
"support": {
|
||||||
|
"issues": "https://github.com/endroid/qr-code/issues",
|
||||||
|
"source": "https://github.com/endroid/qr-code/tree/5.0.4"
|
||||||
|
},
|
||||||
|
"funding": [
|
||||||
|
{
|
||||||
|
"url": "https://github.com/endroid",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"install-path": "../endroid/qr-code"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"name": "ezyang/htmlpurifier",
|
"name": "ezyang/htmlpurifier",
|
||||||
"version": "v4.16.0",
|
"version": "v4.16.0",
|
||||||
|
|
|
||||||
13
vendor/composer/installed.php
vendored
13
vendor/composer/installed.php
vendored
|
|
@ -3,7 +3,7 @@
|
||||||
'name' => 'laravel/laravel',
|
'name' => 'laravel/laravel',
|
||||||
'pretty_version' => 'dev-master',
|
'pretty_version' => 'dev-master',
|
||||||
'version' => 'dev-master',
|
'version' => 'dev-master',
|
||||||
'reference' => '19eaa4ce1880ee09ff69b96a79e4e972e1d29aac',
|
'reference' => 'c4d1ad1426feebc23054c1c6c8e6321c30d177f2',
|
||||||
'type' => 'project',
|
'type' => 'project',
|
||||||
'install_path' => __DIR__ . '/../../',
|
'install_path' => __DIR__ . '/../../',
|
||||||
'aliases' => array(),
|
'aliases' => array(),
|
||||||
|
|
@ -112,6 +112,15 @@
|
||||||
'aliases' => array(),
|
'aliases' => array(),
|
||||||
'dev_requirement' => false,
|
'dev_requirement' => false,
|
||||||
),
|
),
|
||||||
|
'endroid/qr-code' => array(
|
||||||
|
'pretty_version' => '5.0.4',
|
||||||
|
'version' => '5.0.4.0',
|
||||||
|
'reference' => '0efd071a3640af323e23c94122fe92cfd5199833',
|
||||||
|
'type' => 'library',
|
||||||
|
'install_path' => __DIR__ . '/../endroid/qr-code',
|
||||||
|
'aliases' => array(),
|
||||||
|
'dev_requirement' => false,
|
||||||
|
),
|
||||||
'ezyang/htmlpurifier' => array(
|
'ezyang/htmlpurifier' => array(
|
||||||
'pretty_version' => 'v4.16.0',
|
'pretty_version' => 'v4.16.0',
|
||||||
'version' => '4.16.0.0',
|
'version' => '4.16.0.0',
|
||||||
|
|
@ -427,7 +436,7 @@
|
||||||
'laravel/laravel' => array(
|
'laravel/laravel' => array(
|
||||||
'pretty_version' => 'dev-master',
|
'pretty_version' => 'dev-master',
|
||||||
'version' => 'dev-master',
|
'version' => 'dev-master',
|
||||||
'reference' => '19eaa4ce1880ee09ff69b96a79e4e972e1d29aac',
|
'reference' => 'c4d1ad1426feebc23054c1c6c8e6321c30d177f2',
|
||||||
'type' => 'project',
|
'type' => 'project',
|
||||||
'install_path' => __DIR__ . '/../../',
|
'install_path' => __DIR__ . '/../../',
|
||||||
'aliases' => array(),
|
'aliases' => array(),
|
||||||
|
|
|
||||||
19
vendor/endroid/qr-code/LICENSE
vendored
Normal file
19
vendor/endroid/qr-code/LICENSE
vendored
Normal file
|
|
@ -0,0 +1,19 @@
|
||||||
|
Copyright 2023 (c) Jeroen van den Enden
|
||||||
|
|
||||||
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
|
of this software and associated documentation files (the "Software"), to deal
|
||||||
|
in the Software without restriction, including without limitation the rights
|
||||||
|
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||||
|
copies of the Software, and to permit persons to whom the Software is furnished
|
||||||
|
to do so, subject to the following conditions:
|
||||||
|
|
||||||
|
The above copyright notice and this permission notice shall be included in all
|
||||||
|
copies or substantial portions of the Software.
|
||||||
|
|
||||||
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||||
|
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||||
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||||
|
THE SOFTWARE.
|
||||||
215
vendor/endroid/qr-code/README.md
vendored
Normal file
215
vendor/endroid/qr-code/README.md
vendored
Normal file
|
|
@ -0,0 +1,215 @@
|
||||||
|
# QR Code
|
||||||
|
|
||||||
|
*By [endroid](https://endroid.nl/)*
|
||||||
|
|
||||||
|
[](https://packagist.org/packages/endroid/qr-code)
|
||||||
|
[](https://github.com/endroid/qr-code/actions)
|
||||||
|
[](https://packagist.org/packages/endroid/qr-code)
|
||||||
|
[](https://packagist.org/packages/endroid/qr-code)
|
||||||
|
[](https://packagist.org/packages/endroid/qr-code)
|
||||||
|
|
||||||
|
This library helps you generate QR codes in a jiffy. Makes use of [bacon/bacon-qr-code](https://github.com/Bacon/BaconQrCode)
|
||||||
|
to generate the matrix and [khanamiryan/qrcode-detector-decoder](https://github.com/khanamiryan/php-qrcode-detector-decoder)
|
||||||
|
for validating generated QR codes. Further extended with Twig extensions, generation routes, a factory and a
|
||||||
|
Symfony bundle for easy installation and configuration. Different writers are provided to generate the QR code
|
||||||
|
as PNG, SVG, EPS or in binary format.
|
||||||
|
|
||||||
|
## Sponsored by
|
||||||
|
|
||||||
|
[](https://www.blackfire.io)
|
||||||
|
|
||||||
|
## Installation
|
||||||
|
|
||||||
|
Use [Composer](https://getcomposer.org/) to install the library. Also make sure you have enabled and configured the
|
||||||
|
[GD extension](https://www.php.net/manual/en/book.image.php) if you want to generate images.
|
||||||
|
|
||||||
|
``` bash
|
||||||
|
composer require endroid/qr-code
|
||||||
|
```
|
||||||
|
|
||||||
|
## Usage: using the builder
|
||||||
|
|
||||||
|
```php
|
||||||
|
use Endroid\QrCode\Builder\Builder;
|
||||||
|
use Endroid\QrCode\Encoding\Encoding;
|
||||||
|
use Endroid\QrCode\ErrorCorrectionLevel;
|
||||||
|
use Endroid\QrCode\Label\LabelAlignment;
|
||||||
|
use Endroid\QrCode\Label\Font\NotoSans;
|
||||||
|
use Endroid\QrCode\RoundBlockSizeMode;
|
||||||
|
use Endroid\QrCode\Writer\PngWriter;
|
||||||
|
|
||||||
|
$result = Builder::create()
|
||||||
|
->writer(new PngWriter())
|
||||||
|
->writerOptions([])
|
||||||
|
->data('Custom QR code contents')
|
||||||
|
->encoding(new Encoding('UTF-8'))
|
||||||
|
->errorCorrectionLevel(ErrorCorrectionLevel::High)
|
||||||
|
->size(300)
|
||||||
|
->margin(10)
|
||||||
|
->roundBlockSizeMode(RoundBlockSizeMode::Margin)
|
||||||
|
->logoPath(__DIR__.'/assets/symfony.png')
|
||||||
|
->logoResizeToWidth(50)
|
||||||
|
->logoPunchoutBackground(true)
|
||||||
|
->labelText('This is the label')
|
||||||
|
->labelFont(new NotoSans(20))
|
||||||
|
->labelAlignment(LabelAlignment::Center)
|
||||||
|
->validateResult(false)
|
||||||
|
->build();
|
||||||
|
```
|
||||||
|
|
||||||
|
## Usage: without using the builder
|
||||||
|
|
||||||
|
```php
|
||||||
|
use Endroid\QrCode\Color\Color;
|
||||||
|
use Endroid\QrCode\Encoding\Encoding;
|
||||||
|
use Endroid\QrCode\ErrorCorrectionLevel;
|
||||||
|
use Endroid\QrCode\QrCode;
|
||||||
|
use Endroid\QrCode\Label\Label;
|
||||||
|
use Endroid\QrCode\Logo\Logo;
|
||||||
|
use Endroid\QrCode\RoundBlockSizeMode;
|
||||||
|
use Endroid\QrCode\Writer\PngWriter;
|
||||||
|
use Endroid\QrCode\Writer\ValidationException;
|
||||||
|
|
||||||
|
$writer = new PngWriter();
|
||||||
|
|
||||||
|
// Create QR code
|
||||||
|
$qrCode = QrCode::create('Life is too short to be generating QR codes')
|
||||||
|
->setEncoding(new Encoding('UTF-8'))
|
||||||
|
->setErrorCorrectionLevel(ErrorCorrectionLevel::Low)
|
||||||
|
->setSize(300)
|
||||||
|
->setMargin(10)
|
||||||
|
->setRoundBlockSizeMode(RoundBlockSizeMode::Margin)
|
||||||
|
->setForegroundColor(new Color(0, 0, 0))
|
||||||
|
->setBackgroundColor(new Color(255, 255, 255));
|
||||||
|
|
||||||
|
// Create generic logo
|
||||||
|
$logo = Logo::create(__DIR__.'/assets/symfony.png')
|
||||||
|
->setResizeToWidth(50)
|
||||||
|
->setPunchoutBackground(true)
|
||||||
|
;
|
||||||
|
|
||||||
|
// Create generic label
|
||||||
|
$label = Label::create('Label')
|
||||||
|
->setTextColor(new Color(255, 0, 0));
|
||||||
|
|
||||||
|
$result = $writer->write($qrCode, $logo, $label);
|
||||||
|
|
||||||
|
// Validate the result
|
||||||
|
$writer->validateResult($result, 'Life is too short to be generating QR codes');
|
||||||
|
```
|
||||||
|
|
||||||
|
## Usage: working with results
|
||||||
|
|
||||||
|
```php
|
||||||
|
|
||||||
|
// Directly output the QR code
|
||||||
|
header('Content-Type: '.$result->getMimeType());
|
||||||
|
echo $result->getString();
|
||||||
|
|
||||||
|
// Save it to a file
|
||||||
|
$result->saveToFile(__DIR__.'/qrcode.png');
|
||||||
|
|
||||||
|
// Generate a data URI to include image data inline (i.e. inside an <img> tag)
|
||||||
|
$dataUri = $result->getDataUri();
|
||||||
|
```
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
### Writer options
|
||||||
|
|
||||||
|
Some writers provide writer options. Each available writer option is can be
|
||||||
|
found as a constant prefixed with WRITER_OPTION_ in the writer class.
|
||||||
|
|
||||||
|
* `PdfWriter`
|
||||||
|
* `unit`: unit of measurement (default: mm)
|
||||||
|
* `fpdf`: PDF to place the image in (default: new PDF)
|
||||||
|
* `x`: image offset (default: 0)
|
||||||
|
* `y`: image offset (default: 0)
|
||||||
|
* `link`: a URL or an identifier returned by `AddLink()`.
|
||||||
|
* `PngWriter`
|
||||||
|
* `compression_level`: compression level (0-9, default: -1 = zlib default)
|
||||||
|
* `SvgWriter`
|
||||||
|
* `block_id`: id of the block element for external reference (default: block)
|
||||||
|
* `exclude_xml_declaration`: exclude XML declaration (default: false)
|
||||||
|
* `exclude_svg_width_and_height`: exclude width and height (default: false)
|
||||||
|
* `force_xlink_href`: forces xlink namespace in case of compatibility issues (default: false)
|
||||||
|
* `WebPWriter`
|
||||||
|
* `quality`: image quality (0-100, default: 80)
|
||||||
|
|
||||||
|
You can provide any writer options like this.
|
||||||
|
|
||||||
|
```php
|
||||||
|
use Endroid\QrCode\Writer\SvgWriter;
|
||||||
|
|
||||||
|
$builder->writerOptions([
|
||||||
|
SvgWriter::WRITER_OPTION_EXCLUDE_XML_DECLARATION => true
|
||||||
|
]);
|
||||||
|
```
|
||||||
|
|
||||||
|
### Encoding
|
||||||
|
|
||||||
|
If you use a barcode scanner you can have some troubles while reading the
|
||||||
|
generated QR codes. Depending on the encoding you chose you will have an extra
|
||||||
|
amount of data corresponding to the ECI block. Some barcode scanner are not
|
||||||
|
programmed to interpret this block of information. To ensure a maximum
|
||||||
|
compatibility you can use the `ISO-8859-1` encoding that is the default
|
||||||
|
encoding used by barcode scanners (if your character set supports it,
|
||||||
|
i.e. no Chinese characters are present).
|
||||||
|
|
||||||
|
### Round block size mode
|
||||||
|
|
||||||
|
By default block sizes are rounded to guarantee sharp images and improve
|
||||||
|
readability. However some other rounding variants are available.
|
||||||
|
|
||||||
|
* `margin (default)`: the size of the QR code is shrunk if necessary but the size
|
||||||
|
of the final image remains unchanged due to additional margin being added.
|
||||||
|
* `enlarge`: the size of the QR code and the final image are enlarged when
|
||||||
|
rounding differences occur.
|
||||||
|
* `shrink`: the size of the QR code and the final image are
|
||||||
|
shrunk when rounding differences occur.
|
||||||
|
* `none`: No rounding. This mode can be used when blocks don't need to be rounded
|
||||||
|
to pixels (for instance SVG).
|
||||||
|
|
||||||
|
## Readability
|
||||||
|
|
||||||
|
The readability of a QR code is primarily determined by the size, the input
|
||||||
|
length, the error correction level and any possible logo over the image so you
|
||||||
|
can tweak these parameters if you are looking for optimal results. You can also
|
||||||
|
check $qrCode->getRoundBlockSize() value to see if block dimensions are rounded
|
||||||
|
so that the image is more sharp and readable. Please note that rounding block
|
||||||
|
size can result in additional padding to compensate for the rounding difference.
|
||||||
|
And finally the encoding (default UTF-8 to support large character sets) can be
|
||||||
|
set to `ISO-8859-1` if possible to improve readability.
|
||||||
|
|
||||||
|
## Validating the generated QR code
|
||||||
|
|
||||||
|
If you need to be extra sure the QR code you generated is readable and contains
|
||||||
|
the exact data you requested you can enable the validation reader, which is
|
||||||
|
disabled by default. You can do this either via the builder or directly on any
|
||||||
|
writer that supports validation. See the examples above.
|
||||||
|
|
||||||
|
Please note that validation affects performance so only use it in case of problems.
|
||||||
|
|
||||||
|
## Symfony integration
|
||||||
|
|
||||||
|
The [endroid/qr-code-bundle](https://github.com/endroid/qr-code-bundle)
|
||||||
|
integrates the QR code library in Symfony for an even better experience.
|
||||||
|
|
||||||
|
* Configure your defaults (like image size, default writer etc.)
|
||||||
|
* Support for multiple configurations and injection via aliases
|
||||||
|
* Generate QR codes for defined configurations via URL like /qr-code/<config>/Hello
|
||||||
|
* Generate QR codes or URLs directly from Twig using dedicated functions
|
||||||
|
|
||||||
|
Read the [bundle documentation](https://github.com/endroid/qr-code-bundle)
|
||||||
|
for more information.
|
||||||
|
|
||||||
|
## Versioning
|
||||||
|
|
||||||
|
Version numbers follow the MAJOR.MINOR.PATCH scheme. Backwards compatibility
|
||||||
|
breaking changes will be kept to a minimum but be aware that these can occur.
|
||||||
|
Lock your dependencies for production and test your code when upgrading.
|
||||||
|
|
||||||
|
## License
|
||||||
|
|
||||||
|
This bundle is under the MIT license. For the full copyright and license
|
||||||
|
information please view the LICENSE file that was distributed with this source code.
|
||||||
BIN
vendor/endroid/qr-code/assets/noto_sans.otf
vendored
Normal file
BIN
vendor/endroid/qr-code/assets/noto_sans.otf
vendored
Normal file
Binary file not shown.
BIN
vendor/endroid/qr-code/assets/open_sans.ttf
vendored
Normal file
BIN
vendor/endroid/qr-code/assets/open_sans.ttf
vendored
Normal file
Binary file not shown.
57
vendor/endroid/qr-code/composer.json
vendored
Normal file
57
vendor/endroid/qr-code/composer.json
vendored
Normal file
|
|
@ -0,0 +1,57 @@
|
||||||
|
{
|
||||||
|
"name": "endroid/qr-code",
|
||||||
|
"description": "Endroid QR Code",
|
||||||
|
"keywords": ["endroid", "qrcode", "qr", "code", "php"],
|
||||||
|
"homepage": "https://github.com/endroid/qr-code",
|
||||||
|
"type": "library",
|
||||||
|
"license": "MIT",
|
||||||
|
"authors": [
|
||||||
|
{
|
||||||
|
"name": "Jeroen van den Enden",
|
||||||
|
"email": "info@endroid.nl"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"require": {
|
||||||
|
"php": "^8.1",
|
||||||
|
"bacon/bacon-qr-code": "^2.0.5"
|
||||||
|
},
|
||||||
|
"require-dev": {
|
||||||
|
"ext-gd": "*",
|
||||||
|
"endroid/quality": "dev-main",
|
||||||
|
"khanamiryan/qrcode-detector-decoder": "^1.0.4||^2.0.2",
|
||||||
|
"setasign/fpdf": "^1.8.2"
|
||||||
|
},
|
||||||
|
"conflict": {
|
||||||
|
"khanamiryan/qrcode-detector-decoder": "^1.0.6"
|
||||||
|
},
|
||||||
|
"suggest": {
|
||||||
|
"ext-gd": "Enables you to write PNG images",
|
||||||
|
"khanamiryan/qrcode-detector-decoder": "Enables you to use the image validator",
|
||||||
|
"roave/security-advisories": "Makes sure package versions with known security issues are not installed",
|
||||||
|
"setasign/fpdf": "Enables you to use the PDF writer"
|
||||||
|
},
|
||||||
|
"autoload": {
|
||||||
|
"psr-4": {
|
||||||
|
"Endroid\\QrCode\\": "src/"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"autoload-dev": {
|
||||||
|
"psr-4": {
|
||||||
|
"Endroid\\QrCode\\Tests\\": "tests/"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"config": {
|
||||||
|
"sort-packages": true,
|
||||||
|
"preferred-install": {
|
||||||
|
"endroid/*": "source"
|
||||||
|
},
|
||||||
|
"allow-plugins": {
|
||||||
|
"endroid/installer": true
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"extra": {
|
||||||
|
"branch-alias": {
|
||||||
|
"dev-main": "5.x-dev"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
21
vendor/endroid/qr-code/src/Bacon/ErrorCorrectionLevelConverter.php
vendored
Normal file
21
vendor/endroid/qr-code/src/Bacon/ErrorCorrectionLevelConverter.php
vendored
Normal file
|
|
@ -0,0 +1,21 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
|
namespace Endroid\QrCode\Bacon;
|
||||||
|
|
||||||
|
use BaconQrCode\Common\ErrorCorrectionLevel as BaconErrorCorrectionLevel;
|
||||||
|
use Endroid\QrCode\ErrorCorrectionLevel;
|
||||||
|
|
||||||
|
final class ErrorCorrectionLevelConverter
|
||||||
|
{
|
||||||
|
public static function convertToBaconErrorCorrectionLevel(ErrorCorrectionLevel $errorCorrectionLevel): BaconErrorCorrectionLevel
|
||||||
|
{
|
||||||
|
return match ($errorCorrectionLevel) {
|
||||||
|
ErrorCorrectionLevel::Low => BaconErrorCorrectionLevel::valueOf('L'),
|
||||||
|
ErrorCorrectionLevel::Medium => BaconErrorCorrectionLevel::valueOf('M'),
|
||||||
|
ErrorCorrectionLevel::Quartile => BaconErrorCorrectionLevel::valueOf('Q'),
|
||||||
|
ErrorCorrectionLevel::High => BaconErrorCorrectionLevel::valueOf('H')
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}
|
||||||
32
vendor/endroid/qr-code/src/Bacon/MatrixFactory.php
vendored
Normal file
32
vendor/endroid/qr-code/src/Bacon/MatrixFactory.php
vendored
Normal file
|
|
@ -0,0 +1,32 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
|
namespace Endroid\QrCode\Bacon;
|
||||||
|
|
||||||
|
use BaconQrCode\Encoder\Encoder;
|
||||||
|
use Endroid\QrCode\Matrix\Matrix;
|
||||||
|
use Endroid\QrCode\Matrix\MatrixFactoryInterface;
|
||||||
|
use Endroid\QrCode\Matrix\MatrixInterface;
|
||||||
|
use Endroid\QrCode\QrCodeInterface;
|
||||||
|
|
||||||
|
final class MatrixFactory implements MatrixFactoryInterface
|
||||||
|
{
|
||||||
|
public function create(QrCodeInterface $qrCode): MatrixInterface
|
||||||
|
{
|
||||||
|
$baconErrorCorrectionLevel = ErrorCorrectionLevelConverter::convertToBaconErrorCorrectionLevel($qrCode->getErrorCorrectionLevel());
|
||||||
|
$baconMatrix = Encoder::encode($qrCode->getData(), $baconErrorCorrectionLevel, strval($qrCode->getEncoding()))->getMatrix();
|
||||||
|
|
||||||
|
$blockValues = [];
|
||||||
|
$columnCount = $baconMatrix->getWidth();
|
||||||
|
$rowCount = $baconMatrix->getHeight();
|
||||||
|
for ($rowIndex = 0; $rowIndex < $rowCount; ++$rowIndex) {
|
||||||
|
$blockValues[$rowIndex] = [];
|
||||||
|
for ($columnIndex = 0; $columnIndex < $columnCount; ++$columnIndex) {
|
||||||
|
$blockValues[$rowIndex][$columnIndex] = $baconMatrix->get($columnIndex, $rowIndex);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return new Matrix($blockValues, $qrCode->getSize(), $qrCode->getMargin(), $qrCode->getRoundBlockSizeMode());
|
||||||
|
}
|
||||||
|
}
|
||||||
282
vendor/endroid/qr-code/src/Builder/Builder.php
vendored
Normal file
282
vendor/endroid/qr-code/src/Builder/Builder.php
vendored
Normal file
|
|
@ -0,0 +1,282 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
|
namespace Endroid\QrCode\Builder;
|
||||||
|
|
||||||
|
use Endroid\QrCode\Color\ColorInterface;
|
||||||
|
use Endroid\QrCode\Encoding\EncodingInterface;
|
||||||
|
use Endroid\QrCode\ErrorCorrectionLevel;
|
||||||
|
use Endroid\QrCode\ErrorCorrectionLevel\ErrorCorrectionLevelInterface;
|
||||||
|
use Endroid\QrCode\Exception\ValidationException;
|
||||||
|
use Endroid\QrCode\Label\Alignment\LabelAlignmentInterface;
|
||||||
|
use Endroid\QrCode\Label\Font\FontInterface;
|
||||||
|
use Endroid\QrCode\Label\Label;
|
||||||
|
use Endroid\QrCode\Label\LabelAlignment;
|
||||||
|
use Endroid\QrCode\Label\LabelInterface;
|
||||||
|
use Endroid\QrCode\Label\Margin\MarginInterface;
|
||||||
|
use Endroid\QrCode\Logo\Logo;
|
||||||
|
use Endroid\QrCode\Logo\LogoInterface;
|
||||||
|
use Endroid\QrCode\QrCode;
|
||||||
|
use Endroid\QrCode\RoundBlockSizeMode;
|
||||||
|
use Endroid\QrCode\RoundBlockSizeMode\RoundBlockSizeModeInterface;
|
||||||
|
use Endroid\QrCode\Writer\PngWriter;
|
||||||
|
use Endroid\QrCode\Writer\Result\ResultInterface;
|
||||||
|
use Endroid\QrCode\Writer\ValidatingWriterInterface;
|
||||||
|
use Endroid\QrCode\Writer\WriterInterface;
|
||||||
|
|
||||||
|
class Builder implements BuilderInterface
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* @var array<string, mixed>{
|
||||||
|
* data: string,
|
||||||
|
* writer: WriterInterface,
|
||||||
|
* writerOptions: array,
|
||||||
|
* qrCodeClass: class-string,
|
||||||
|
* logoClass: class-string,
|
||||||
|
* labelClass: class-string,
|
||||||
|
* validateResult: bool,
|
||||||
|
* size?: int,
|
||||||
|
* encoding?: EncodingInterface,
|
||||||
|
* errorCorrectionLevel?: ErrorCorrectionLevelInterface,
|
||||||
|
* roundBlockSizeMode?: RoundBlockSizeModeInterface,
|
||||||
|
* margin?: int,
|
||||||
|
* backgroundColor?: ColorInterface,
|
||||||
|
* foregroundColor?: ColorInterface,
|
||||||
|
* labelText?: string,
|
||||||
|
* labelFont?: FontInterface,
|
||||||
|
* labelAlignment?: LabelAlignmentInterface,
|
||||||
|
* labelMargin?: MarginInterface,
|
||||||
|
* labelTextColor?: ColorInterface,
|
||||||
|
* logoPath?: string,
|
||||||
|
* logoResizeToWidth?: int,
|
||||||
|
* logoResizeToHeight?: int,
|
||||||
|
* logoPunchoutBackground?: bool
|
||||||
|
* }
|
||||||
|
*/
|
||||||
|
private array $options;
|
||||||
|
|
||||||
|
public function __construct()
|
||||||
|
{
|
||||||
|
$this->options = [
|
||||||
|
'data' => '',
|
||||||
|
'writer' => new PngWriter(),
|
||||||
|
'writerOptions' => [],
|
||||||
|
'qrCodeClass' => QrCode::class,
|
||||||
|
'logoClass' => Logo::class,
|
||||||
|
'labelClass' => Label::class,
|
||||||
|
'validateResult' => false,
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
||||||
|
public static function create(): BuilderInterface
|
||||||
|
{
|
||||||
|
return new self();
|
||||||
|
}
|
||||||
|
|
||||||
|
public function writer(WriterInterface $writer): BuilderInterface
|
||||||
|
{
|
||||||
|
$this->options['writer'] = $writer;
|
||||||
|
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/** @param array<string, mixed> $writerOptions */
|
||||||
|
public function writerOptions(array $writerOptions): BuilderInterface
|
||||||
|
{
|
||||||
|
$this->options['writerOptions'] = $writerOptions;
|
||||||
|
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function data(string $data): BuilderInterface
|
||||||
|
{
|
||||||
|
$this->options['data'] = $data;
|
||||||
|
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function encoding(EncodingInterface $encoding): BuilderInterface
|
||||||
|
{
|
||||||
|
$this->options['encoding'] = $encoding;
|
||||||
|
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function errorCorrectionLevel(ErrorCorrectionLevel $errorCorrectionLevel): BuilderInterface
|
||||||
|
{
|
||||||
|
$this->options['errorCorrectionLevel'] = $errorCorrectionLevel;
|
||||||
|
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function size(int $size): BuilderInterface
|
||||||
|
{
|
||||||
|
$this->options['size'] = $size;
|
||||||
|
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function margin(int $margin): BuilderInterface
|
||||||
|
{
|
||||||
|
$this->options['margin'] = $margin;
|
||||||
|
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function roundBlockSizeMode(RoundBlockSizeMode $roundBlockSizeMode): BuilderInterface
|
||||||
|
{
|
||||||
|
$this->options['roundBlockSizeMode'] = $roundBlockSizeMode;
|
||||||
|
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function foregroundColor(ColorInterface $foregroundColor): BuilderInterface
|
||||||
|
{
|
||||||
|
$this->options['foregroundColor'] = $foregroundColor;
|
||||||
|
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function backgroundColor(ColorInterface $backgroundColor): BuilderInterface
|
||||||
|
{
|
||||||
|
$this->options['backgroundColor'] = $backgroundColor;
|
||||||
|
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function logoPath(string $logoPath): BuilderInterface
|
||||||
|
{
|
||||||
|
$this->options['logoPath'] = $logoPath;
|
||||||
|
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function logoResizeToWidth(int $logoResizeToWidth): BuilderInterface
|
||||||
|
{
|
||||||
|
$this->options['logoResizeToWidth'] = $logoResizeToWidth;
|
||||||
|
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function logoResizeToHeight(int $logoResizeToHeight): BuilderInterface
|
||||||
|
{
|
||||||
|
$this->options['logoResizeToHeight'] = $logoResizeToHeight;
|
||||||
|
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function logoPunchoutBackground(bool $logoPunchoutBackground): BuilderInterface
|
||||||
|
{
|
||||||
|
$this->options['logoPunchoutBackground'] = $logoPunchoutBackground;
|
||||||
|
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function labelText(string $labelText): BuilderInterface
|
||||||
|
{
|
||||||
|
$this->options['labelText'] = $labelText;
|
||||||
|
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function labelFont(FontInterface $labelFont): BuilderInterface
|
||||||
|
{
|
||||||
|
$this->options['labelFont'] = $labelFont;
|
||||||
|
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function labelAlignment(LabelAlignment $labelAlignment): BuilderInterface
|
||||||
|
{
|
||||||
|
$this->options['labelAlignment'] = $labelAlignment;
|
||||||
|
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function labelMargin(MarginInterface $labelMargin): BuilderInterface
|
||||||
|
{
|
||||||
|
$this->options['labelMargin'] = $labelMargin;
|
||||||
|
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function labelTextColor(ColorInterface $labelTextColor): BuilderInterface
|
||||||
|
{
|
||||||
|
$this->options['labelTextColor'] = $labelTextColor;
|
||||||
|
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function validateResult(bool $validateResult): BuilderInterface
|
||||||
|
{
|
||||||
|
$this->options['validateResult'] = $validateResult;
|
||||||
|
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function build(): ResultInterface
|
||||||
|
{
|
||||||
|
$writer = $this->options['writer'];
|
||||||
|
|
||||||
|
if ($this->options['validateResult'] && !$writer instanceof ValidatingWriterInterface) {
|
||||||
|
throw ValidationException::createForUnsupportedWriter(strval(get_class($writer)));
|
||||||
|
}
|
||||||
|
|
||||||
|
/** @var QrCode $qrCode */
|
||||||
|
$qrCode = $this->buildObject($this->options['qrCodeClass']);
|
||||||
|
|
||||||
|
/** @var LogoInterface|null $logo */
|
||||||
|
$logo = $this->buildObject($this->options['logoClass'], 'logo');
|
||||||
|
|
||||||
|
/** @var LabelInterface|null $label */
|
||||||
|
$label = $this->buildObject($this->options['labelClass'], 'label');
|
||||||
|
|
||||||
|
$result = $writer->write($qrCode, $logo, $label, $this->options['writerOptions']);
|
||||||
|
|
||||||
|
if ($this->options['validateResult'] && $writer instanceof ValidatingWriterInterface) {
|
||||||
|
$writer->validateResult($result, $qrCode->getData());
|
||||||
|
}
|
||||||
|
|
||||||
|
return $result;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param class-string $class
|
||||||
|
*
|
||||||
|
* @return mixed
|
||||||
|
*/
|
||||||
|
private function buildObject(string $class, string $optionsPrefix = null)
|
||||||
|
{
|
||||||
|
/** @var \ReflectionClass<object> $reflectionClass */
|
||||||
|
$reflectionClass = new \ReflectionClass($class);
|
||||||
|
|
||||||
|
$arguments = [];
|
||||||
|
$hasBuilderOptions = false;
|
||||||
|
$missingRequiredArguments = [];
|
||||||
|
/** @var \ReflectionMethod $constructor */
|
||||||
|
$constructor = $reflectionClass->getConstructor();
|
||||||
|
$constructorParameters = $constructor->getParameters();
|
||||||
|
foreach ($constructorParameters as $parameter) {
|
||||||
|
$optionName = null === $optionsPrefix ? $parameter->getName() : $optionsPrefix.ucfirst($parameter->getName());
|
||||||
|
if (isset($this->options[$optionName])) {
|
||||||
|
$hasBuilderOptions = true;
|
||||||
|
$arguments[] = $this->options[$optionName];
|
||||||
|
} elseif ($parameter->isDefaultValueAvailable()) {
|
||||||
|
$arguments[] = $parameter->getDefaultValue();
|
||||||
|
} else {
|
||||||
|
$missingRequiredArguments[] = $optionName;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!$hasBuilderOptions) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (count($missingRequiredArguments) > 0) {
|
||||||
|
throw new \Exception(sprintf('Missing required arguments: %s', implode(', ', $missingRequiredArguments)));
|
||||||
|
}
|
||||||
|
|
||||||
|
return $reflectionClass->newInstanceArgs($arguments);
|
||||||
|
}
|
||||||
|
}
|
||||||
63
vendor/endroid/qr-code/src/Builder/BuilderInterface.php
vendored
Normal file
63
vendor/endroid/qr-code/src/Builder/BuilderInterface.php
vendored
Normal file
|
|
@ -0,0 +1,63 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
|
namespace Endroid\QrCode\Builder;
|
||||||
|
|
||||||
|
use Endroid\QrCode\Color\ColorInterface;
|
||||||
|
use Endroid\QrCode\Encoding\EncodingInterface;
|
||||||
|
use Endroid\QrCode\ErrorCorrectionLevel;
|
||||||
|
use Endroid\QrCode\Label\Font\FontInterface;
|
||||||
|
use Endroid\QrCode\Label\LabelAlignment;
|
||||||
|
use Endroid\QrCode\Label\Margin\MarginInterface;
|
||||||
|
use Endroid\QrCode\RoundBlockSizeMode;
|
||||||
|
use Endroid\QrCode\Writer\Result\ResultInterface;
|
||||||
|
use Endroid\QrCode\Writer\WriterInterface;
|
||||||
|
|
||||||
|
interface BuilderInterface
|
||||||
|
{
|
||||||
|
public static function create(): BuilderInterface;
|
||||||
|
|
||||||
|
public function writer(WriterInterface $writer): BuilderInterface;
|
||||||
|
|
||||||
|
/** @param array<string, mixed> $writerOptions */
|
||||||
|
public function writerOptions(array $writerOptions): BuilderInterface;
|
||||||
|
|
||||||
|
public function data(string $data): BuilderInterface;
|
||||||
|
|
||||||
|
public function encoding(EncodingInterface $encoding): BuilderInterface;
|
||||||
|
|
||||||
|
public function errorCorrectionLevel(ErrorCorrectionLevel $errorCorrectionLevel): BuilderInterface;
|
||||||
|
|
||||||
|
public function size(int $size): BuilderInterface;
|
||||||
|
|
||||||
|
public function margin(int $margin): BuilderInterface;
|
||||||
|
|
||||||
|
public function roundBlockSizeMode(RoundBlockSizeMode $roundBlockSizeMode): BuilderInterface;
|
||||||
|
|
||||||
|
public function foregroundColor(ColorInterface $foregroundColor): BuilderInterface;
|
||||||
|
|
||||||
|
public function backgroundColor(ColorInterface $backgroundColor): BuilderInterface;
|
||||||
|
|
||||||
|
public function logoPath(string $logoPath): BuilderInterface;
|
||||||
|
|
||||||
|
public function logoResizeToWidth(int $logoResizeToWidth): BuilderInterface;
|
||||||
|
|
||||||
|
public function logoResizeToHeight(int $logoResizeToHeight): BuilderInterface;
|
||||||
|
|
||||||
|
public function logoPunchoutBackground(bool $logoPunchoutBackground): BuilderInterface;
|
||||||
|
|
||||||
|
public function labelText(string $labelText): BuilderInterface;
|
||||||
|
|
||||||
|
public function labelFont(FontInterface $labelFont): BuilderInterface;
|
||||||
|
|
||||||
|
public function labelAlignment(LabelAlignment $labelAlignment): BuilderInterface;
|
||||||
|
|
||||||
|
public function labelMargin(MarginInterface $labelMargin): BuilderInterface;
|
||||||
|
|
||||||
|
public function labelTextColor(ColorInterface $labelTextColor): BuilderInterface;
|
||||||
|
|
||||||
|
public function validateResult(bool $validateResult): BuilderInterface;
|
||||||
|
|
||||||
|
public function build(): ResultInterface;
|
||||||
|
}
|
||||||
25
vendor/endroid/qr-code/src/Builder/BuilderRegistry.php
vendored
Normal file
25
vendor/endroid/qr-code/src/Builder/BuilderRegistry.php
vendored
Normal file
|
|
@ -0,0 +1,25 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
|
namespace Endroid\QrCode\Builder;
|
||||||
|
|
||||||
|
final class BuilderRegistry implements BuilderRegistryInterface
|
||||||
|
{
|
||||||
|
/** @var array<BuilderInterface> */
|
||||||
|
private array $builders = [];
|
||||||
|
|
||||||
|
public function getBuilder(string $name): BuilderInterface
|
||||||
|
{
|
||||||
|
if (!isset($this->builders[$name])) {
|
||||||
|
throw new \Exception(sprintf('Builder with name "%s" not available from registry', $name));
|
||||||
|
}
|
||||||
|
|
||||||
|
return $this->builders[$name];
|
||||||
|
}
|
||||||
|
|
||||||
|
public function addBuilder(string $name, BuilderInterface $builder): void
|
||||||
|
{
|
||||||
|
$this->builders[$name] = $builder;
|
||||||
|
}
|
||||||
|
}
|
||||||
12
vendor/endroid/qr-code/src/Builder/BuilderRegistryInterface.php
vendored
Normal file
12
vendor/endroid/qr-code/src/Builder/BuilderRegistryInterface.php
vendored
Normal file
|
|
@ -0,0 +1,12 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
|
namespace Endroid\QrCode\Builder;
|
||||||
|
|
||||||
|
interface BuilderRegistryInterface
|
||||||
|
{
|
||||||
|
public function getBuilder(string $name): BuilderInterface;
|
||||||
|
|
||||||
|
public function addBuilder(string $name, BuilderInterface $builder): void;
|
||||||
|
}
|
||||||
56
vendor/endroid/qr-code/src/Color/Color.php
vendored
Normal file
56
vendor/endroid/qr-code/src/Color/Color.php
vendored
Normal file
|
|
@ -0,0 +1,56 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
|
namespace Endroid\QrCode\Color;
|
||||||
|
|
||||||
|
final class Color implements ColorInterface
|
||||||
|
{
|
||||||
|
public function __construct(
|
||||||
|
private readonly int $red,
|
||||||
|
private readonly int $green,
|
||||||
|
private readonly int $blue,
|
||||||
|
private readonly int $alpha = 0
|
||||||
|
) {
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getRed(): int
|
||||||
|
{
|
||||||
|
return $this->red;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getGreen(): int
|
||||||
|
{
|
||||||
|
return $this->green;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getBlue(): int
|
||||||
|
{
|
||||||
|
return $this->blue;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getAlpha(): int
|
||||||
|
{
|
||||||
|
return $this->alpha;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getOpacity(): float
|
||||||
|
{
|
||||||
|
return 1 - $this->alpha / 127;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getHex(): string
|
||||||
|
{
|
||||||
|
return sprintf('#%02x%02x%02x', $this->red, $this->green, $this->blue);
|
||||||
|
}
|
||||||
|
|
||||||
|
public function toArray(): array
|
||||||
|
{
|
||||||
|
return [
|
||||||
|
'red' => $this->red,
|
||||||
|
'green' => $this->green,
|
||||||
|
'blue' => $this->blue,
|
||||||
|
'alpha' => $this->alpha,
|
||||||
|
];
|
||||||
|
}
|
||||||
|
}
|
||||||
23
vendor/endroid/qr-code/src/Color/ColorInterface.php
vendored
Normal file
23
vendor/endroid/qr-code/src/Color/ColorInterface.php
vendored
Normal file
|
|
@ -0,0 +1,23 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
|
namespace Endroid\QrCode\Color;
|
||||||
|
|
||||||
|
interface ColorInterface
|
||||||
|
{
|
||||||
|
public function getRed(): int;
|
||||||
|
|
||||||
|
public function getGreen(): int;
|
||||||
|
|
||||||
|
public function getBlue(): int;
|
||||||
|
|
||||||
|
public function getAlpha(): int;
|
||||||
|
|
||||||
|
public function getOpacity(): float;
|
||||||
|
|
||||||
|
public function getHex(): string;
|
||||||
|
|
||||||
|
/** @return array<string, int> */
|
||||||
|
public function toArray(): array;
|
||||||
|
}
|
||||||
21
vendor/endroid/qr-code/src/Encoding/Encoding.php
vendored
Normal file
21
vendor/endroid/qr-code/src/Encoding/Encoding.php
vendored
Normal file
|
|
@ -0,0 +1,21 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
|
namespace Endroid\QrCode\Encoding;
|
||||||
|
|
||||||
|
final class Encoding implements EncodingInterface
|
||||||
|
{
|
||||||
|
public function __construct(
|
||||||
|
private readonly string $value
|
||||||
|
) {
|
||||||
|
if (!in_array($value, mb_list_encodings())) {
|
||||||
|
throw new \Exception(sprintf('Invalid encoding "%s"', $value));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public function __toString(): string
|
||||||
|
{
|
||||||
|
return $this->value;
|
||||||
|
}
|
||||||
|
}
|
||||||
10
vendor/endroid/qr-code/src/Encoding/EncodingInterface.php
vendored
Normal file
10
vendor/endroid/qr-code/src/Encoding/EncodingInterface.php
vendored
Normal file
|
|
@ -0,0 +1,10 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
|
namespace Endroid\QrCode\Encoding;
|
||||||
|
|
||||||
|
interface EncodingInterface extends \Stringable
|
||||||
|
{
|
||||||
|
public function __toString(): string;
|
||||||
|
}
|
||||||
13
vendor/endroid/qr-code/src/ErrorCorrectionLevel.php
vendored
Normal file
13
vendor/endroid/qr-code/src/ErrorCorrectionLevel.php
vendored
Normal file
|
|
@ -0,0 +1,13 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
|
namespace Endroid\QrCode;
|
||||||
|
|
||||||
|
enum ErrorCorrectionLevel: string
|
||||||
|
{
|
||||||
|
case High = 'high';
|
||||||
|
case Low = 'low';
|
||||||
|
case Medium = 'medium';
|
||||||
|
case Quartile = 'quartile';
|
||||||
|
}
|
||||||
23
vendor/endroid/qr-code/src/Exception/ValidationException.php
vendored
Normal file
23
vendor/endroid/qr-code/src/Exception/ValidationException.php
vendored
Normal file
|
|
@ -0,0 +1,23 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
|
namespace Endroid\QrCode\Exception;
|
||||||
|
|
||||||
|
final class ValidationException extends \Exception
|
||||||
|
{
|
||||||
|
public static function createForUnsupportedWriter(string $writerClass): self
|
||||||
|
{
|
||||||
|
return new self(sprintf('Unable to validate the result: "%s" does not support validation', $writerClass));
|
||||||
|
}
|
||||||
|
|
||||||
|
public static function createForMissingPackage(string $packageName): self
|
||||||
|
{
|
||||||
|
return new self(sprintf('Please install "%s" or disable image validation', $packageName));
|
||||||
|
}
|
||||||
|
|
||||||
|
public static function createForInvalidData(string $expectedData, string $actualData): self
|
||||||
|
{
|
||||||
|
return new self('The validation reader read "'.$actualData.'" instead of "'.$expectedData.'". Adjust your parameters to increase readability or disable validation.');
|
||||||
|
}
|
||||||
|
}
|
||||||
48
vendor/endroid/qr-code/src/ImageData/LabelImageData.php
vendored
Normal file
48
vendor/endroid/qr-code/src/ImageData/LabelImageData.php
vendored
Normal file
|
|
@ -0,0 +1,48 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
|
namespace Endroid\QrCode\ImageData;
|
||||||
|
|
||||||
|
use Endroid\QrCode\Label\LabelInterface;
|
||||||
|
|
||||||
|
final class LabelImageData
|
||||||
|
{
|
||||||
|
private function __construct(
|
||||||
|
private readonly int $width,
|
||||||
|
private readonly int $height
|
||||||
|
) {
|
||||||
|
}
|
||||||
|
|
||||||
|
public static function createForLabel(LabelInterface $label): self
|
||||||
|
{
|
||||||
|
if (str_contains($label->getText(), "\n")) {
|
||||||
|
throw new \Exception('Label does not support line breaks');
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!function_exists('imagettfbbox')) {
|
||||||
|
throw new \Exception('Function "imagettfbbox" does not exist: check your FreeType installation');
|
||||||
|
}
|
||||||
|
|
||||||
|
$labelBox = imagettfbbox($label->getFont()->getSize(), 0, $label->getFont()->getPath(), $label->getText());
|
||||||
|
|
||||||
|
if (!is_array($labelBox)) {
|
||||||
|
throw new \Exception('Unable to generate label image box: check your FreeType installation');
|
||||||
|
}
|
||||||
|
|
||||||
|
return new self(
|
||||||
|
intval($labelBox[2] - $labelBox[0]),
|
||||||
|
intval($labelBox[0] - $labelBox[7])
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getWidth(): int
|
||||||
|
{
|
||||||
|
return $this->width;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getHeight(): int
|
||||||
|
{
|
||||||
|
return $this->height;
|
||||||
|
}
|
||||||
|
}
|
||||||
149
vendor/endroid/qr-code/src/ImageData/LogoImageData.php
vendored
Normal file
149
vendor/endroid/qr-code/src/ImageData/LogoImageData.php
vendored
Normal file
|
|
@ -0,0 +1,149 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
|
namespace Endroid\QrCode\ImageData;
|
||||||
|
|
||||||
|
use Endroid\QrCode\Logo\LogoInterface;
|
||||||
|
|
||||||
|
final class LogoImageData
|
||||||
|
{
|
||||||
|
private function __construct(
|
||||||
|
private readonly string $data,
|
||||||
|
private \GdImage|null $image,
|
||||||
|
private readonly string $mimeType,
|
||||||
|
private readonly int $width,
|
||||||
|
private readonly int $height,
|
||||||
|
private readonly bool $punchoutBackground
|
||||||
|
) {
|
||||||
|
}
|
||||||
|
|
||||||
|
public static function createForLogo(LogoInterface $logo): self
|
||||||
|
{
|
||||||
|
error_clear_last();
|
||||||
|
$data = @file_get_contents($logo->getPath());
|
||||||
|
|
||||||
|
if (!is_string($data)) {
|
||||||
|
$errorDetails = error_get_last()['message'] ?? 'invalid data';
|
||||||
|
throw new \Exception(sprintf('Could not read logo image data from path "%s": %s', $logo->getPath(), $errorDetails));
|
||||||
|
}
|
||||||
|
|
||||||
|
if (false !== filter_var($logo->getPath(), FILTER_VALIDATE_URL)) {
|
||||||
|
$mimeType = self::detectMimeTypeFromUrl($logo->getPath());
|
||||||
|
} else {
|
||||||
|
$mimeType = self::detectMimeTypeFromPath($logo->getPath());
|
||||||
|
}
|
||||||
|
|
||||||
|
$width = $logo->getResizeToWidth();
|
||||||
|
$height = $logo->getResizeToHeight();
|
||||||
|
|
||||||
|
if ('image/svg+xml' === $mimeType) {
|
||||||
|
if (null === $width || null === $height) {
|
||||||
|
throw new \Exception('SVG Logos require an explicitly set resize width and height');
|
||||||
|
}
|
||||||
|
|
||||||
|
return new self($data, null, $mimeType, $width, $height, $logo->getPunchoutBackground());
|
||||||
|
}
|
||||||
|
|
||||||
|
error_clear_last();
|
||||||
|
$image = @imagecreatefromstring($data);
|
||||||
|
|
||||||
|
if (!$image) {
|
||||||
|
$errorDetails = error_get_last()['message'] ?? 'invalid data';
|
||||||
|
throw new \Exception(sprintf('Unable to parse image data at path "%s": %s', $logo->getPath(), $errorDetails));
|
||||||
|
}
|
||||||
|
|
||||||
|
// No target width and height specified: use from original image
|
||||||
|
if (null !== $width && null !== $height) {
|
||||||
|
return new self($data, $image, $mimeType, $width, $height, $logo->getPunchoutBackground());
|
||||||
|
}
|
||||||
|
|
||||||
|
// Only target width specified: calculate height
|
||||||
|
if (null !== $width && null === $height) {
|
||||||
|
return new self($data, $image, $mimeType, $width, intval(imagesy($image) * $width / imagesx($image)), $logo->getPunchoutBackground());
|
||||||
|
}
|
||||||
|
|
||||||
|
// Only target height specified: calculate width
|
||||||
|
if (null === $width && null !== $height) {
|
||||||
|
return new self($data, $image, $mimeType, intval(imagesx($image) * $height / imagesy($image)), $height, $logo->getPunchoutBackground());
|
||||||
|
}
|
||||||
|
|
||||||
|
return new self($data, $image, $mimeType, imagesx($image), imagesy($image), $logo->getPunchoutBackground());
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getData(): string
|
||||||
|
{
|
||||||
|
return $this->data;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getImage(): \GdImage
|
||||||
|
{
|
||||||
|
if (!$this->image instanceof \GdImage) {
|
||||||
|
throw new \Exception('SVG Images have no image resource');
|
||||||
|
}
|
||||||
|
|
||||||
|
return $this->image;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getMimeType(): string
|
||||||
|
{
|
||||||
|
return $this->mimeType;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getWidth(): int
|
||||||
|
{
|
||||||
|
return $this->width;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getHeight(): int
|
||||||
|
{
|
||||||
|
return $this->height;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getPunchoutBackground(): bool
|
||||||
|
{
|
||||||
|
return $this->punchoutBackground;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function createDataUri(): string
|
||||||
|
{
|
||||||
|
return 'data:'.$this->mimeType.';base64,'.base64_encode($this->data);
|
||||||
|
}
|
||||||
|
|
||||||
|
private static function detectMimeTypeFromUrl(string $url): string
|
||||||
|
{
|
||||||
|
$headers = get_headers($url, true);
|
||||||
|
|
||||||
|
if (!is_array($headers) || !isset($headers['Content-Type'])) {
|
||||||
|
throw new \Exception(sprintf('Content type could not be determined for logo URL "%s"', $url));
|
||||||
|
}
|
||||||
|
|
||||||
|
return is_array($headers['Content-Type']) ? $headers['Content-Type'][1] : $headers['Content-Type'];
|
||||||
|
}
|
||||||
|
|
||||||
|
private static function detectMimeTypeFromPath(string $path): string
|
||||||
|
{
|
||||||
|
if (!function_exists('mime_content_type')) {
|
||||||
|
throw new \Exception('You need the ext-fileinfo extension to determine logo mime type');
|
||||||
|
}
|
||||||
|
|
||||||
|
error_clear_last();
|
||||||
|
$mimeType = @mime_content_type($path);
|
||||||
|
|
||||||
|
if (!is_string($mimeType)) {
|
||||||
|
$errorDetails = error_get_last()['message'] ?? 'invalid data';
|
||||||
|
throw new \Exception(sprintf('Could not determine mime type: %s', $errorDetails));
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!preg_match('#^image/#', $mimeType)) {
|
||||||
|
throw new \Exception('Logo path is not an image');
|
||||||
|
}
|
||||||
|
|
||||||
|
// Passing mime type image/svg results in invisible images
|
||||||
|
if ('image/svg' === $mimeType) {
|
||||||
|
return 'image/svg+xml';
|
||||||
|
}
|
||||||
|
|
||||||
|
return $mimeType;
|
||||||
|
}
|
||||||
|
}
|
||||||
32
vendor/endroid/qr-code/src/Label/Font/Font.php
vendored
Normal file
32
vendor/endroid/qr-code/src/Label/Font/Font.php
vendored
Normal file
|
|
@ -0,0 +1,32 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
|
namespace Endroid\QrCode\Label\Font;
|
||||||
|
|
||||||
|
final class Font implements FontInterface
|
||||||
|
{
|
||||||
|
public function __construct(
|
||||||
|
private readonly string $path,
|
||||||
|
private readonly int $size = 16
|
||||||
|
) {
|
||||||
|
$this->assertValidPath($path);
|
||||||
|
}
|
||||||
|
|
||||||
|
private function assertValidPath(string $path): void
|
||||||
|
{
|
||||||
|
if (!file_exists($path)) {
|
||||||
|
throw new \Exception(sprintf('Invalid font path "%s"', $path));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getPath(): string
|
||||||
|
{
|
||||||
|
return $this->path;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getSize(): int
|
||||||
|
{
|
||||||
|
return $this->size;
|
||||||
|
}
|
||||||
|
}
|
||||||
12
vendor/endroid/qr-code/src/Label/Font/FontInterface.php
vendored
Normal file
12
vendor/endroid/qr-code/src/Label/Font/FontInterface.php
vendored
Normal file
|
|
@ -0,0 +1,12 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
|
namespace Endroid\QrCode\Label\Font;
|
||||||
|
|
||||||
|
interface FontInterface
|
||||||
|
{
|
||||||
|
public function getPath(): string;
|
||||||
|
|
||||||
|
public function getSize(): int;
|
||||||
|
}
|
||||||
23
vendor/endroid/qr-code/src/Label/Font/NotoSans.php
vendored
Normal file
23
vendor/endroid/qr-code/src/Label/Font/NotoSans.php
vendored
Normal file
|
|
@ -0,0 +1,23 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
|
namespace Endroid\QrCode\Label\Font;
|
||||||
|
|
||||||
|
final class NotoSans implements FontInterface
|
||||||
|
{
|
||||||
|
public function __construct(
|
||||||
|
private int $size = 16
|
||||||
|
) {
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getPath(): string
|
||||||
|
{
|
||||||
|
return __DIR__.'/../../../assets/noto_sans.otf';
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getSize(): int
|
||||||
|
{
|
||||||
|
return $this->size;
|
||||||
|
}
|
||||||
|
}
|
||||||
23
vendor/endroid/qr-code/src/Label/Font/OpenSans.php
vendored
Normal file
23
vendor/endroid/qr-code/src/Label/Font/OpenSans.php
vendored
Normal file
|
|
@ -0,0 +1,23 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
|
namespace Endroid\QrCode\Label\Font;
|
||||||
|
|
||||||
|
final class OpenSans implements FontInterface
|
||||||
|
{
|
||||||
|
public function __construct(
|
||||||
|
private int $size = 16
|
||||||
|
) {
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getPath(): string
|
||||||
|
{
|
||||||
|
return __DIR__.'/../../../assets/open_sans.ttf';
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getSize(): int
|
||||||
|
{
|
||||||
|
return $this->size;
|
||||||
|
}
|
||||||
|
}
|
||||||
89
vendor/endroid/qr-code/src/Label/Label.php
vendored
Normal file
89
vendor/endroid/qr-code/src/Label/Label.php
vendored
Normal file
|
|
@ -0,0 +1,89 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
|
namespace Endroid\QrCode\Label;
|
||||||
|
|
||||||
|
use Endroid\QrCode\Color\Color;
|
||||||
|
use Endroid\QrCode\Color\ColorInterface;
|
||||||
|
use Endroid\QrCode\Label\Font\Font;
|
||||||
|
use Endroid\QrCode\Label\Font\FontInterface;
|
||||||
|
use Endroid\QrCode\Label\Margin\Margin;
|
||||||
|
use Endroid\QrCode\Label\Margin\MarginInterface;
|
||||||
|
|
||||||
|
final class Label implements LabelInterface
|
||||||
|
{
|
||||||
|
public function __construct(
|
||||||
|
private string $text,
|
||||||
|
private FontInterface $font = new Font(__DIR__.'/../../assets/noto_sans.otf', 16),
|
||||||
|
private LabelAlignment $alignment = LabelAlignment::Center,
|
||||||
|
private MarginInterface $margin = new Margin(0, 10, 10, 10),
|
||||||
|
private ColorInterface $textColor = new Color(0, 0, 0)
|
||||||
|
) {
|
||||||
|
}
|
||||||
|
|
||||||
|
public static function create(string $text): self
|
||||||
|
{
|
||||||
|
return new self($text);
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getText(): string
|
||||||
|
{
|
||||||
|
return $this->text;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function setText(string $text): self
|
||||||
|
{
|
||||||
|
$this->text = $text;
|
||||||
|
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getFont(): FontInterface
|
||||||
|
{
|
||||||
|
return $this->font;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function setFont(FontInterface $font): self
|
||||||
|
{
|
||||||
|
$this->font = $font;
|
||||||
|
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getAlignment(): LabelAlignment
|
||||||
|
{
|
||||||
|
return $this->alignment;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function setAlignment(LabelAlignment $alignment): self
|
||||||
|
{
|
||||||
|
$this->alignment = $alignment;
|
||||||
|
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getMargin(): MarginInterface
|
||||||
|
{
|
||||||
|
return $this->margin;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function setMargin(MarginInterface $margin): self
|
||||||
|
{
|
||||||
|
$this->margin = $margin;
|
||||||
|
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getTextColor(): ColorInterface
|
||||||
|
{
|
||||||
|
return $this->textColor;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function setTextColor(ColorInterface $textColor): self
|
||||||
|
{
|
||||||
|
$this->textColor = $textColor;
|
||||||
|
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
}
|
||||||
12
vendor/endroid/qr-code/src/Label/LabelAlignment.php
vendored
Normal file
12
vendor/endroid/qr-code/src/Label/LabelAlignment.php
vendored
Normal file
|
|
@ -0,0 +1,12 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
|
namespace Endroid\QrCode\Label;
|
||||||
|
|
||||||
|
enum LabelAlignment: string
|
||||||
|
{
|
||||||
|
case Center = 'center';
|
||||||
|
case Left = 'left';
|
||||||
|
case Right = 'right';
|
||||||
|
}
|
||||||
22
vendor/endroid/qr-code/src/Label/LabelInterface.php
vendored
Normal file
22
vendor/endroid/qr-code/src/Label/LabelInterface.php
vendored
Normal file
|
|
@ -0,0 +1,22 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
|
namespace Endroid\QrCode\Label;
|
||||||
|
|
||||||
|
use Endroid\QrCode\Color\ColorInterface;
|
||||||
|
use Endroid\QrCode\Label\Font\FontInterface;
|
||||||
|
use Endroid\QrCode\Label\Margin\MarginInterface;
|
||||||
|
|
||||||
|
interface LabelInterface
|
||||||
|
{
|
||||||
|
public function getText(): string;
|
||||||
|
|
||||||
|
public function getFont(): FontInterface;
|
||||||
|
|
||||||
|
public function getAlignment(): LabelAlignment;
|
||||||
|
|
||||||
|
public function getMargin(): MarginInterface;
|
||||||
|
|
||||||
|
public function getTextColor(): ColorInterface;
|
||||||
|
}
|
||||||
47
vendor/endroid/qr-code/src/Label/Margin/Margin.php
vendored
Normal file
47
vendor/endroid/qr-code/src/Label/Margin/Margin.php
vendored
Normal file
|
|
@ -0,0 +1,47 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
|
namespace Endroid\QrCode\Label\Margin;
|
||||||
|
|
||||||
|
final class Margin implements MarginInterface
|
||||||
|
{
|
||||||
|
public function __construct(
|
||||||
|
private readonly int $top,
|
||||||
|
private readonly int $right,
|
||||||
|
private readonly int $bottom,
|
||||||
|
private readonly int $left
|
||||||
|
) {
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getTop(): int
|
||||||
|
{
|
||||||
|
return $this->top;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getRight(): int
|
||||||
|
{
|
||||||
|
return $this->right;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getBottom(): int
|
||||||
|
{
|
||||||
|
return $this->bottom;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getLeft(): int
|
||||||
|
{
|
||||||
|
return $this->left;
|
||||||
|
}
|
||||||
|
|
||||||
|
/** @return array<string, int> */
|
||||||
|
public function toArray(): array
|
||||||
|
{
|
||||||
|
return [
|
||||||
|
'top' => $this->top,
|
||||||
|
'right' => $this->right,
|
||||||
|
'bottom' => $this->bottom,
|
||||||
|
'left' => $this->left,
|
||||||
|
];
|
||||||
|
}
|
||||||
|
}
|
||||||
19
vendor/endroid/qr-code/src/Label/Margin/MarginInterface.php
vendored
Normal file
19
vendor/endroid/qr-code/src/Label/Margin/MarginInterface.php
vendored
Normal file
|
|
@ -0,0 +1,19 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
|
namespace Endroid\QrCode\Label\Margin;
|
||||||
|
|
||||||
|
interface MarginInterface
|
||||||
|
{
|
||||||
|
public function getTop(): int;
|
||||||
|
|
||||||
|
public function getRight(): int;
|
||||||
|
|
||||||
|
public function getBottom(): int;
|
||||||
|
|
||||||
|
public function getLeft(): int;
|
||||||
|
|
||||||
|
/** @return array<string, int> */
|
||||||
|
public function toArray(): array;
|
||||||
|
}
|
||||||
69
vendor/endroid/qr-code/src/Logo/Logo.php
vendored
Normal file
69
vendor/endroid/qr-code/src/Logo/Logo.php
vendored
Normal file
|
|
@ -0,0 +1,69 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
|
namespace Endroid\QrCode\Logo;
|
||||||
|
|
||||||
|
final class Logo implements LogoInterface
|
||||||
|
{
|
||||||
|
public function __construct(
|
||||||
|
private string $path,
|
||||||
|
private int|null $resizeToWidth = null,
|
||||||
|
private int|null $resizeToHeight = null,
|
||||||
|
private bool $punchoutBackground = false
|
||||||
|
) {
|
||||||
|
}
|
||||||
|
|
||||||
|
public static function create(string $path): self
|
||||||
|
{
|
||||||
|
return new self($path);
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getPath(): string
|
||||||
|
{
|
||||||
|
return $this->path;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function setPath(string $path): self
|
||||||
|
{
|
||||||
|
$this->path = $path;
|
||||||
|
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getResizeToWidth(): int|null
|
||||||
|
{
|
||||||
|
return $this->resizeToWidth;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function setResizeToWidth(int|null $resizeToWidth): self
|
||||||
|
{
|
||||||
|
$this->resizeToWidth = $resizeToWidth;
|
||||||
|
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getResizeToHeight(): int|null
|
||||||
|
{
|
||||||
|
return $this->resizeToHeight;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function setResizeToHeight(int|null $resizeToHeight): self
|
||||||
|
{
|
||||||
|
$this->resizeToHeight = $resizeToHeight;
|
||||||
|
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getPunchoutBackground(): bool
|
||||||
|
{
|
||||||
|
return $this->punchoutBackground;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function setPunchoutBackground(bool $punchoutBackground): self
|
||||||
|
{
|
||||||
|
$this->punchoutBackground = $punchoutBackground;
|
||||||
|
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
}
|
||||||
16
vendor/endroid/qr-code/src/Logo/LogoInterface.php
vendored
Normal file
16
vendor/endroid/qr-code/src/Logo/LogoInterface.php
vendored
Normal file
|
|
@ -0,0 +1,16 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
|
namespace Endroid\QrCode\Logo;
|
||||||
|
|
||||||
|
interface LogoInterface
|
||||||
|
{
|
||||||
|
public function getPath(): string;
|
||||||
|
|
||||||
|
public function getResizeToWidth(): int|null;
|
||||||
|
|
||||||
|
public function getResizeToHeight(): int|null;
|
||||||
|
|
||||||
|
public function getPunchoutBackground(): bool;
|
||||||
|
}
|
||||||
90
vendor/endroid/qr-code/src/Matrix/Matrix.php
vendored
Normal file
90
vendor/endroid/qr-code/src/Matrix/Matrix.php
vendored
Normal file
|
|
@ -0,0 +1,90 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
|
namespace Endroid\QrCode\Matrix;
|
||||||
|
|
||||||
|
use Endroid\QrCode\RoundBlockSizeMode;
|
||||||
|
|
||||||
|
final class Matrix implements MatrixInterface
|
||||||
|
{
|
||||||
|
private readonly float $blockSize;
|
||||||
|
private readonly int $innerSize;
|
||||||
|
private readonly int $outerSize;
|
||||||
|
private readonly int $marginLeft;
|
||||||
|
private readonly int $marginRight;
|
||||||
|
|
||||||
|
/** @param array<array<int>> $blockValues */
|
||||||
|
public function __construct(
|
||||||
|
private array $blockValues,
|
||||||
|
int $size,
|
||||||
|
int $margin,
|
||||||
|
RoundBlockSizeMode $roundBlockSizeMode
|
||||||
|
) {
|
||||||
|
$blockSize = $size / $this->getBlockCount();
|
||||||
|
$innerSize = $size;
|
||||||
|
$outerSize = $size + 2 * $margin;
|
||||||
|
|
||||||
|
switch ($roundBlockSizeMode) {
|
||||||
|
case RoundBlockSizeMode::Enlarge:
|
||||||
|
$blockSize = intval(ceil($blockSize));
|
||||||
|
$innerSize = intval($blockSize * $this->getBlockCount());
|
||||||
|
$outerSize = $innerSize + 2 * $margin;
|
||||||
|
break;
|
||||||
|
case RoundBlockSizeMode::Shrink:
|
||||||
|
$blockSize = intval(floor($blockSize));
|
||||||
|
$innerSize = intval($blockSize * $this->getBlockCount());
|
||||||
|
$outerSize = $innerSize + 2 * $margin;
|
||||||
|
break;
|
||||||
|
case RoundBlockSizeMode::Margin:
|
||||||
|
$blockSize = intval(floor($blockSize));
|
||||||
|
$innerSize = intval($blockSize * $this->getBlockCount());
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($blockSize < 1) {
|
||||||
|
throw new \Exception('Too much data: increase image dimensions or lower error correction level');
|
||||||
|
}
|
||||||
|
|
||||||
|
$this->blockSize = $blockSize;
|
||||||
|
$this->innerSize = $innerSize;
|
||||||
|
$this->outerSize = $outerSize;
|
||||||
|
$this->marginLeft = intval(($this->outerSize - $this->innerSize) / 2);
|
||||||
|
$this->marginRight = $this->outerSize - $this->innerSize - $this->marginLeft;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getBlockValue(int $rowIndex, int $columnIndex): int
|
||||||
|
{
|
||||||
|
return $this->blockValues[$rowIndex][$columnIndex];
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getBlockCount(): int
|
||||||
|
{
|
||||||
|
return count($this->blockValues[0]);
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getBlockSize(): float
|
||||||
|
{
|
||||||
|
return $this->blockSize;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getInnerSize(): int
|
||||||
|
{
|
||||||
|
return $this->innerSize;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getOuterSize(): int
|
||||||
|
{
|
||||||
|
return $this->outerSize;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getMarginLeft(): int
|
||||||
|
{
|
||||||
|
return $this->marginLeft;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getMarginRight(): int
|
||||||
|
{
|
||||||
|
return $this->marginRight;
|
||||||
|
}
|
||||||
|
}
|
||||||
12
vendor/endroid/qr-code/src/Matrix/MatrixFactoryInterface.php
vendored
Normal file
12
vendor/endroid/qr-code/src/Matrix/MatrixFactoryInterface.php
vendored
Normal file
|
|
@ -0,0 +1,12 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
|
namespace Endroid\QrCode\Matrix;
|
||||||
|
|
||||||
|
use Endroid\QrCode\QrCodeInterface;
|
||||||
|
|
||||||
|
interface MatrixFactoryInterface
|
||||||
|
{
|
||||||
|
public function create(QrCodeInterface $qrCode): MatrixInterface;
|
||||||
|
}
|
||||||
22
vendor/endroid/qr-code/src/Matrix/MatrixInterface.php
vendored
Normal file
22
vendor/endroid/qr-code/src/Matrix/MatrixInterface.php
vendored
Normal file
|
|
@ -0,0 +1,22 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
|
namespace Endroid\QrCode\Matrix;
|
||||||
|
|
||||||
|
interface MatrixInterface
|
||||||
|
{
|
||||||
|
public function getBlockValue(int $rowIndex, int $columnIndex): int;
|
||||||
|
|
||||||
|
public function getBlockCount(): int;
|
||||||
|
|
||||||
|
public function getBlockSize(): float;
|
||||||
|
|
||||||
|
public function getInnerSize(): int;
|
||||||
|
|
||||||
|
public function getOuterSize(): int;
|
||||||
|
|
||||||
|
public function getMarginLeft(): int;
|
||||||
|
|
||||||
|
public function getMarginRight(): int;
|
||||||
|
}
|
||||||
126
vendor/endroid/qr-code/src/QrCode.php
vendored
Normal file
126
vendor/endroid/qr-code/src/QrCode.php
vendored
Normal file
|
|
@ -0,0 +1,126 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
|
namespace Endroid\QrCode;
|
||||||
|
|
||||||
|
use Endroid\QrCode\Color\Color;
|
||||||
|
use Endroid\QrCode\Color\ColorInterface;
|
||||||
|
use Endroid\QrCode\Encoding\Encoding;
|
||||||
|
use Endroid\QrCode\Encoding\EncodingInterface;
|
||||||
|
|
||||||
|
final class QrCode implements QrCodeInterface
|
||||||
|
{
|
||||||
|
public function __construct(
|
||||||
|
private string $data,
|
||||||
|
private EncodingInterface $encoding = new Encoding('UTF-8'),
|
||||||
|
private ErrorCorrectionLevel $errorCorrectionLevel = ErrorCorrectionLevel::Low,
|
||||||
|
private int $size = 300,
|
||||||
|
private int $margin = 10,
|
||||||
|
private RoundBlockSizeMode $roundBlockSizeMode = RoundBlockSizeMode::Margin,
|
||||||
|
private ColorInterface $foregroundColor = new Color(0, 0, 0),
|
||||||
|
private ColorInterface $backgroundColor = new Color(255, 255, 255)
|
||||||
|
) {
|
||||||
|
}
|
||||||
|
|
||||||
|
public static function create(string $data): self
|
||||||
|
{
|
||||||
|
return new self($data);
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getData(): string
|
||||||
|
{
|
||||||
|
return $this->data;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function setData(string $data): self
|
||||||
|
{
|
||||||
|
$this->data = $data;
|
||||||
|
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getEncoding(): EncodingInterface
|
||||||
|
{
|
||||||
|
return $this->encoding;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function setEncoding(Encoding $encoding): self
|
||||||
|
{
|
||||||
|
$this->encoding = $encoding;
|
||||||
|
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getErrorCorrectionLevel(): ErrorCorrectionLevel
|
||||||
|
{
|
||||||
|
return $this->errorCorrectionLevel;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function setErrorCorrectionLevel(ErrorCorrectionLevel $errorCorrectionLevel): self
|
||||||
|
{
|
||||||
|
$this->errorCorrectionLevel = $errorCorrectionLevel;
|
||||||
|
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getSize(): int
|
||||||
|
{
|
||||||
|
return $this->size;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function setSize(int $size): self
|
||||||
|
{
|
||||||
|
$this->size = $size;
|
||||||
|
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getMargin(): int
|
||||||
|
{
|
||||||
|
return $this->margin;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function setMargin(int $margin): self
|
||||||
|
{
|
||||||
|
$this->margin = $margin;
|
||||||
|
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getRoundBlockSizeMode(): RoundBlockSizeMode
|
||||||
|
{
|
||||||
|
return $this->roundBlockSizeMode;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function setRoundBlockSizeMode(RoundBlockSizeMode $roundBlockSizeMode): self
|
||||||
|
{
|
||||||
|
$this->roundBlockSizeMode = $roundBlockSizeMode;
|
||||||
|
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getForegroundColor(): ColorInterface
|
||||||
|
{
|
||||||
|
return $this->foregroundColor;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function setForegroundColor(ColorInterface $foregroundColor): self
|
||||||
|
{
|
||||||
|
$this->foregroundColor = $foregroundColor;
|
||||||
|
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getBackgroundColor(): ColorInterface
|
||||||
|
{
|
||||||
|
return $this->backgroundColor;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function setBackgroundColor(ColorInterface $backgroundColor): self
|
||||||
|
{
|
||||||
|
$this->backgroundColor = $backgroundColor;
|
||||||
|
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
}
|
||||||
27
vendor/endroid/qr-code/src/QrCodeInterface.php
vendored
Normal file
27
vendor/endroid/qr-code/src/QrCodeInterface.php
vendored
Normal file
|
|
@ -0,0 +1,27 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
|
namespace Endroid\QrCode;
|
||||||
|
|
||||||
|
use Endroid\QrCode\Color\ColorInterface;
|
||||||
|
use Endroid\QrCode\Encoding\EncodingInterface;
|
||||||
|
|
||||||
|
interface QrCodeInterface
|
||||||
|
{
|
||||||
|
public function getData(): string;
|
||||||
|
|
||||||
|
public function getEncoding(): EncodingInterface;
|
||||||
|
|
||||||
|
public function getErrorCorrectionLevel(): ErrorCorrectionLevel;
|
||||||
|
|
||||||
|
public function getSize(): int;
|
||||||
|
|
||||||
|
public function getMargin(): int;
|
||||||
|
|
||||||
|
public function getRoundBlockSizeMode(): RoundBlockSizeMode;
|
||||||
|
|
||||||
|
public function getForegroundColor(): ColorInterface;
|
||||||
|
|
||||||
|
public function getBackgroundColor(): ColorInterface;
|
||||||
|
}
|
||||||
13
vendor/endroid/qr-code/src/RoundBlockSizeMode.php
vendored
Normal file
13
vendor/endroid/qr-code/src/RoundBlockSizeMode.php
vendored
Normal file
|
|
@ -0,0 +1,13 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
|
namespace Endroid\QrCode;
|
||||||
|
|
||||||
|
enum RoundBlockSizeMode: string
|
||||||
|
{
|
||||||
|
case Enlarge = 'enlarge';
|
||||||
|
case Margin = 'margin';
|
||||||
|
case None = 'none';
|
||||||
|
case Shrink = 'shrink';
|
||||||
|
}
|
||||||
211
vendor/endroid/qr-code/src/Writer/AbstractGdWriter.php
vendored
Normal file
211
vendor/endroid/qr-code/src/Writer/AbstractGdWriter.php
vendored
Normal file
|
|
@ -0,0 +1,211 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
|
namespace Endroid\QrCode\Writer;
|
||||||
|
|
||||||
|
use Endroid\QrCode\Bacon\MatrixFactory;
|
||||||
|
use Endroid\QrCode\Exception\ValidationException;
|
||||||
|
use Endroid\QrCode\ImageData\LabelImageData;
|
||||||
|
use Endroid\QrCode\ImageData\LogoImageData;
|
||||||
|
use Endroid\QrCode\Label\LabelAlignment;
|
||||||
|
use Endroid\QrCode\Label\LabelInterface;
|
||||||
|
use Endroid\QrCode\Logo\LogoInterface;
|
||||||
|
use Endroid\QrCode\Matrix\MatrixInterface;
|
||||||
|
use Endroid\QrCode\QrCodeInterface;
|
||||||
|
use Endroid\QrCode\RoundBlockSizeMode;
|
||||||
|
use Endroid\QrCode\Writer\Result\GdResult;
|
||||||
|
use Endroid\QrCode\Writer\Result\ResultInterface;
|
||||||
|
use Zxing\QrReader;
|
||||||
|
|
||||||
|
abstract class AbstractGdWriter implements WriterInterface, ValidatingWriterInterface
|
||||||
|
{
|
||||||
|
protected function getMatrix(QrCodeInterface $qrCode): MatrixInterface
|
||||||
|
{
|
||||||
|
$matrixFactory = new MatrixFactory();
|
||||||
|
|
||||||
|
return $matrixFactory->create($qrCode);
|
||||||
|
}
|
||||||
|
|
||||||
|
public function write(QrCodeInterface $qrCode, LogoInterface $logo = null, LabelInterface $label = null, array $options = []): ResultInterface
|
||||||
|
{
|
||||||
|
if (!extension_loaded('gd')) {
|
||||||
|
throw new \Exception('Unable to generate image: please check if the GD extension is enabled and configured correctly');
|
||||||
|
}
|
||||||
|
|
||||||
|
$matrix = $this->getMatrix($qrCode);
|
||||||
|
|
||||||
|
$baseBlockSize = RoundBlockSizeMode::None === $qrCode->getRoundBlockSizeMode() ? 10 : intval($matrix->getBlockSize());
|
||||||
|
$baseImage = imagecreatetruecolor($matrix->getBlockCount() * $baseBlockSize, $matrix->getBlockCount() * $baseBlockSize);
|
||||||
|
|
||||||
|
if (!$baseImage) {
|
||||||
|
throw new \Exception('Unable to generate image: please check if the GD extension is enabled and configured correctly');
|
||||||
|
}
|
||||||
|
|
||||||
|
/** @var int $foregroundColor */
|
||||||
|
$foregroundColor = imagecolorallocatealpha(
|
||||||
|
$baseImage,
|
||||||
|
$qrCode->getForegroundColor()->getRed(),
|
||||||
|
$qrCode->getForegroundColor()->getGreen(),
|
||||||
|
$qrCode->getForegroundColor()->getBlue(),
|
||||||
|
$qrCode->getForegroundColor()->getAlpha()
|
||||||
|
);
|
||||||
|
|
||||||
|
/** @var int $transparentColor */
|
||||||
|
$transparentColor = imagecolorallocatealpha($baseImage, 255, 255, 255, 127);
|
||||||
|
|
||||||
|
imagefill($baseImage, 0, 0, $transparentColor);
|
||||||
|
|
||||||
|
for ($rowIndex = 0; $rowIndex < $matrix->getBlockCount(); ++$rowIndex) {
|
||||||
|
for ($columnIndex = 0; $columnIndex < $matrix->getBlockCount(); ++$columnIndex) {
|
||||||
|
if (1 === $matrix->getBlockValue($rowIndex, $columnIndex)) {
|
||||||
|
imagefilledrectangle(
|
||||||
|
$baseImage,
|
||||||
|
$columnIndex * $baseBlockSize,
|
||||||
|
$rowIndex * $baseBlockSize,
|
||||||
|
($columnIndex + 1) * $baseBlockSize - 1,
|
||||||
|
($rowIndex + 1) * $baseBlockSize - 1,
|
||||||
|
$foregroundColor
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$targetWidth = $matrix->getOuterSize();
|
||||||
|
$targetHeight = $matrix->getOuterSize();
|
||||||
|
|
||||||
|
if ($label instanceof LabelInterface) {
|
||||||
|
$labelImageData = LabelImageData::createForLabel($label);
|
||||||
|
$targetHeight += $labelImageData->getHeight() + $label->getMargin()->getTop() + $label->getMargin()->getBottom();
|
||||||
|
}
|
||||||
|
|
||||||
|
$targetImage = imagecreatetruecolor($targetWidth, $targetHeight);
|
||||||
|
|
||||||
|
if (!$targetImage) {
|
||||||
|
throw new \Exception('Unable to generate image: please check if the GD extension is enabled and configured correctly');
|
||||||
|
}
|
||||||
|
|
||||||
|
/** @var int $backgroundColor */
|
||||||
|
$backgroundColor = imagecolorallocatealpha(
|
||||||
|
$targetImage,
|
||||||
|
$qrCode->getBackgroundColor()->getRed(),
|
||||||
|
$qrCode->getBackgroundColor()->getGreen(),
|
||||||
|
$qrCode->getBackgroundColor()->getBlue(),
|
||||||
|
$qrCode->getBackgroundColor()->getAlpha()
|
||||||
|
);
|
||||||
|
|
||||||
|
imagefill($targetImage, 0, 0, $backgroundColor);
|
||||||
|
|
||||||
|
imagecopyresampled(
|
||||||
|
$targetImage,
|
||||||
|
$baseImage,
|
||||||
|
$matrix->getMarginLeft(),
|
||||||
|
$matrix->getMarginLeft(),
|
||||||
|
0,
|
||||||
|
0,
|
||||||
|
$matrix->getInnerSize(),
|
||||||
|
$matrix->getInnerSize(),
|
||||||
|
imagesx($baseImage),
|
||||||
|
imagesy($baseImage)
|
||||||
|
);
|
||||||
|
|
||||||
|
if ($qrCode->getBackgroundColor()->getAlpha() > 0) {
|
||||||
|
imagesavealpha($targetImage, true);
|
||||||
|
}
|
||||||
|
|
||||||
|
$result = new GdResult($matrix, $targetImage);
|
||||||
|
|
||||||
|
if ($logo instanceof LogoInterface) {
|
||||||
|
$result = $this->addLogo($logo, $result);
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($label instanceof LabelInterface) {
|
||||||
|
$result = $this->addLabel($label, $result);
|
||||||
|
}
|
||||||
|
|
||||||
|
return $result;
|
||||||
|
}
|
||||||
|
|
||||||
|
private function addLogo(LogoInterface $logo, GdResult $result): GdResult
|
||||||
|
{
|
||||||
|
$logoImageData = LogoImageData::createForLogo($logo);
|
||||||
|
|
||||||
|
if ('image/svg+xml' === $logoImageData->getMimeType()) {
|
||||||
|
throw new \Exception('PNG Writer does not support SVG logo');
|
||||||
|
}
|
||||||
|
|
||||||
|
$targetImage = $result->getImage();
|
||||||
|
$matrix = $result->getMatrix();
|
||||||
|
|
||||||
|
if ($logoImageData->getPunchoutBackground()) {
|
||||||
|
/** @var int $transparent */
|
||||||
|
$transparent = imagecolorallocatealpha($targetImage, 255, 255, 255, 127);
|
||||||
|
imagealphablending($targetImage, false);
|
||||||
|
$xOffsetStart = intval($matrix->getOuterSize() / 2 - $logoImageData->getWidth() / 2);
|
||||||
|
$yOffsetStart = intval($matrix->getOuterSize() / 2 - $logoImageData->getHeight() / 2);
|
||||||
|
for ($xOffset = $xOffsetStart; $xOffset < $xOffsetStart + $logoImageData->getWidth(); ++$xOffset) {
|
||||||
|
for ($yOffset = $yOffsetStart; $yOffset < $yOffsetStart + $logoImageData->getHeight(); ++$yOffset) {
|
||||||
|
imagesetpixel($targetImage, $xOffset, $yOffset, $transparent);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
imagecopyresampled(
|
||||||
|
$targetImage,
|
||||||
|
$logoImageData->getImage(),
|
||||||
|
intval($matrix->getOuterSize() / 2 - $logoImageData->getWidth() / 2),
|
||||||
|
intval($matrix->getOuterSize() / 2 - $logoImageData->getHeight() / 2),
|
||||||
|
0,
|
||||||
|
0,
|
||||||
|
$logoImageData->getWidth(),
|
||||||
|
$logoImageData->getHeight(),
|
||||||
|
imagesx($logoImageData->getImage()),
|
||||||
|
imagesy($logoImageData->getImage())
|
||||||
|
);
|
||||||
|
|
||||||
|
return new GdResult($matrix, $targetImage);
|
||||||
|
}
|
||||||
|
|
||||||
|
private function addLabel(LabelInterface $label, GdResult $result): GdResult
|
||||||
|
{
|
||||||
|
$targetImage = $result->getImage();
|
||||||
|
|
||||||
|
$labelImageData = LabelImageData::createForLabel($label);
|
||||||
|
|
||||||
|
/** @var int $textColor */
|
||||||
|
$textColor = imagecolorallocatealpha(
|
||||||
|
$targetImage,
|
||||||
|
$label->getTextColor()->getRed(),
|
||||||
|
$label->getTextColor()->getGreen(),
|
||||||
|
$label->getTextColor()->getBlue(),
|
||||||
|
$label->getTextColor()->getAlpha()
|
||||||
|
);
|
||||||
|
|
||||||
|
$x = intval(imagesx($targetImage) / 2 - $labelImageData->getWidth() / 2);
|
||||||
|
$y = imagesy($targetImage) - $label->getMargin()->getBottom();
|
||||||
|
|
||||||
|
if (LabelAlignment::Left === $label->getAlignment()) {
|
||||||
|
$x = $label->getMargin()->getLeft();
|
||||||
|
} elseif (LabelAlignment::Right === $label->getAlignment()) {
|
||||||
|
$x = imagesx($targetImage) - $labelImageData->getWidth() - $label->getMargin()->getRight();
|
||||||
|
}
|
||||||
|
|
||||||
|
imagettftext($targetImage, $label->getFont()->getSize(), 0, $x, $y, $textColor, $label->getFont()->getPath(), $label->getText());
|
||||||
|
|
||||||
|
return new GdResult($result->getMatrix(), $targetImage);
|
||||||
|
}
|
||||||
|
|
||||||
|
public function validateResult(ResultInterface $result, string $expectedData): void
|
||||||
|
{
|
||||||
|
$string = $result->getString();
|
||||||
|
|
||||||
|
if (!class_exists(QrReader::class)) {
|
||||||
|
throw ValidationException::createForMissingPackage('khanamiryan/qrcode-detector-decoder');
|
||||||
|
}
|
||||||
|
|
||||||
|
$reader = new QrReader($string, QrReader::SOURCE_TYPE_BLOB);
|
||||||
|
if ($reader->text() !== $expectedData) {
|
||||||
|
throw ValidationException::createForInvalidData($expectedData, strval($reader->text()));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
23
vendor/endroid/qr-code/src/Writer/BinaryWriter.php
vendored
Normal file
23
vendor/endroid/qr-code/src/Writer/BinaryWriter.php
vendored
Normal file
|
|
@ -0,0 +1,23 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
|
namespace Endroid\QrCode\Writer;
|
||||||
|
|
||||||
|
use Endroid\QrCode\Bacon\MatrixFactory;
|
||||||
|
use Endroid\QrCode\Label\LabelInterface;
|
||||||
|
use Endroid\QrCode\Logo\LogoInterface;
|
||||||
|
use Endroid\QrCode\QrCodeInterface;
|
||||||
|
use Endroid\QrCode\Writer\Result\BinaryResult;
|
||||||
|
use Endroid\QrCode\Writer\Result\ResultInterface;
|
||||||
|
|
||||||
|
final class BinaryWriter implements WriterInterface
|
||||||
|
{
|
||||||
|
public function write(QrCodeInterface $qrCode, LogoInterface $logo = null, LabelInterface $label = null, array $options = []): ResultInterface
|
||||||
|
{
|
||||||
|
$matrixFactory = new MatrixFactory();
|
||||||
|
$matrix = $matrixFactory->create($qrCode);
|
||||||
|
|
||||||
|
return new BinaryResult($matrix);
|
||||||
|
}
|
||||||
|
}
|
||||||
23
vendor/endroid/qr-code/src/Writer/ConsoleWriter.php
vendored
Normal file
23
vendor/endroid/qr-code/src/Writer/ConsoleWriter.php
vendored
Normal file
|
|
@ -0,0 +1,23 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
|
namespace Endroid\QrCode\Writer;
|
||||||
|
|
||||||
|
use Endroid\QrCode\Bacon\MatrixFactory;
|
||||||
|
use Endroid\QrCode\Label\LabelInterface;
|
||||||
|
use Endroid\QrCode\Logo\LogoInterface;
|
||||||
|
use Endroid\QrCode\QrCodeInterface;
|
||||||
|
use Endroid\QrCode\Writer\Result\ConsoleResult;
|
||||||
|
use Endroid\QrCode\Writer\Result\ResultInterface;
|
||||||
|
|
||||||
|
final class ConsoleWriter implements WriterInterface
|
||||||
|
{
|
||||||
|
public function write(QrCodeInterface $qrCode, LogoInterface $logo = null, LabelInterface $label = null, $options = []): ResultInterface
|
||||||
|
{
|
||||||
|
$matrixFactory = new MatrixFactory();
|
||||||
|
$matrix = $matrixFactory->create($qrCode);
|
||||||
|
|
||||||
|
return new ConsoleResult($matrix, $qrCode->getForegroundColor(), $qrCode->getBackgroundColor());
|
||||||
|
}
|
||||||
|
}
|
||||||
32
vendor/endroid/qr-code/src/Writer/DebugWriter.php
vendored
Normal file
32
vendor/endroid/qr-code/src/Writer/DebugWriter.php
vendored
Normal file
|
|
@ -0,0 +1,32 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
|
namespace Endroid\QrCode\Writer;
|
||||||
|
|
||||||
|
use Endroid\QrCode\Bacon\MatrixFactory;
|
||||||
|
use Endroid\QrCode\Label\LabelInterface;
|
||||||
|
use Endroid\QrCode\Logo\LogoInterface;
|
||||||
|
use Endroid\QrCode\QrCodeInterface;
|
||||||
|
use Endroid\QrCode\Writer\Result\DebugResult;
|
||||||
|
use Endroid\QrCode\Writer\Result\ResultInterface;
|
||||||
|
|
||||||
|
final class DebugWriter implements WriterInterface, ValidatingWriterInterface
|
||||||
|
{
|
||||||
|
public function write(QrCodeInterface $qrCode, LogoInterface $logo = null, LabelInterface $label = null, array $options = []): ResultInterface
|
||||||
|
{
|
||||||
|
$matrixFactory = new MatrixFactory();
|
||||||
|
$matrix = $matrixFactory->create($qrCode);
|
||||||
|
|
||||||
|
return new DebugResult($matrix, $qrCode, $logo, $label, $options);
|
||||||
|
}
|
||||||
|
|
||||||
|
public function validateResult(ResultInterface $result, string $expectedData): void
|
||||||
|
{
|
||||||
|
if (!$result instanceof DebugResult) {
|
||||||
|
throw new \Exception('Unable to write logo: instance of DebugResult expected');
|
||||||
|
}
|
||||||
|
|
||||||
|
$result->setValidateResult(true);
|
||||||
|
}
|
||||||
|
}
|
||||||
44
vendor/endroid/qr-code/src/Writer/EpsWriter.php
vendored
Normal file
44
vendor/endroid/qr-code/src/Writer/EpsWriter.php
vendored
Normal file
|
|
@ -0,0 +1,44 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
|
namespace Endroid\QrCode\Writer;
|
||||||
|
|
||||||
|
use Endroid\QrCode\Bacon\MatrixFactory;
|
||||||
|
use Endroid\QrCode\Label\LabelInterface;
|
||||||
|
use Endroid\QrCode\Logo\LogoInterface;
|
||||||
|
use Endroid\QrCode\QrCodeInterface;
|
||||||
|
use Endroid\QrCode\Writer\Result\EpsResult;
|
||||||
|
use Endroid\QrCode\Writer\Result\ResultInterface;
|
||||||
|
|
||||||
|
final class EpsWriter implements WriterInterface
|
||||||
|
{
|
||||||
|
public const DECIMAL_PRECISION = 10;
|
||||||
|
|
||||||
|
public function write(QrCodeInterface $qrCode, LogoInterface $logo = null, LabelInterface $label = null, array $options = []): ResultInterface
|
||||||
|
{
|
||||||
|
$matrixFactory = new MatrixFactory();
|
||||||
|
$matrix = $matrixFactory->create($qrCode);
|
||||||
|
|
||||||
|
$lines = [
|
||||||
|
'%!PS-Adobe-3.0 EPSF-3.0',
|
||||||
|
'%%BoundingBox: 0 0 '.$matrix->getOuterSize().' '.$matrix->getOuterSize(),
|
||||||
|
'/F { rectfill } def',
|
||||||
|
number_format($qrCode->getBackgroundColor()->getRed() / 100, 2, '.', ',').' '.number_format($qrCode->getBackgroundColor()->getGreen() / 100, 2, '.', ',').' '.number_format($qrCode->getBackgroundColor()->getBlue() / 100, 2, '.', ',').' setrgbcolor',
|
||||||
|
'0 0 '.$matrix->getOuterSize().' '.$matrix->getOuterSize().' F',
|
||||||
|
number_format($qrCode->getForegroundColor()->getRed() / 100, 2, '.', ',').' '.number_format($qrCode->getForegroundColor()->getGreen() / 100, 2, '.', ',').' '.number_format($qrCode->getForegroundColor()->getBlue() / 100, 2, '.', ',').' setrgbcolor',
|
||||||
|
];
|
||||||
|
|
||||||
|
for ($rowIndex = 0; $rowIndex < $matrix->getBlockCount(); ++$rowIndex) {
|
||||||
|
for ($columnIndex = 0; $columnIndex < $matrix->getBlockCount(); ++$columnIndex) {
|
||||||
|
if (1 === $matrix->getBlockValue($matrix->getBlockCount() - 1 - $rowIndex, $columnIndex)) {
|
||||||
|
$x = $matrix->getMarginLeft() + $matrix->getBlockSize() * $columnIndex;
|
||||||
|
$y = $matrix->getMarginLeft() + $matrix->getBlockSize() * $rowIndex;
|
||||||
|
$lines[] = number_format($x, self::DECIMAL_PRECISION, '.', '').' '.number_format($y, self::DECIMAL_PRECISION, '.', '').' '.number_format($matrix->getBlockSize(), self::DECIMAL_PRECISION, '.', '').' '.number_format($matrix->getBlockSize(), self::DECIMAL_PRECISION, '.', '').' F';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return new EpsResult($matrix, $lines);
|
||||||
|
}
|
||||||
|
}
|
||||||
23
vendor/endroid/qr-code/src/Writer/GifWriter.php
vendored
Normal file
23
vendor/endroid/qr-code/src/Writer/GifWriter.php
vendored
Normal file
|
|
@ -0,0 +1,23 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
|
namespace Endroid\QrCode\Writer;
|
||||||
|
|
||||||
|
use Endroid\QrCode\Label\LabelInterface;
|
||||||
|
use Endroid\QrCode\Logo\LogoInterface;
|
||||||
|
use Endroid\QrCode\QrCodeInterface;
|
||||||
|
use Endroid\QrCode\Writer\Result\GdResult;
|
||||||
|
use Endroid\QrCode\Writer\Result\GifResult;
|
||||||
|
use Endroid\QrCode\Writer\Result\ResultInterface;
|
||||||
|
|
||||||
|
final class GifWriter extends AbstractGdWriter
|
||||||
|
{
|
||||||
|
public function write(QrCodeInterface $qrCode, LogoInterface $logo = null, LabelInterface $label = null, array $options = []): ResultInterface
|
||||||
|
{
|
||||||
|
/** @var GdResult $gdResult */
|
||||||
|
$gdResult = parent::write($qrCode, $logo, $label, $options);
|
||||||
|
|
||||||
|
return new GifResult($gdResult->getMatrix(), $gdResult->getImage());
|
||||||
|
}
|
||||||
|
}
|
||||||
139
vendor/endroid/qr-code/src/Writer/PdfWriter.php
vendored
Normal file
139
vendor/endroid/qr-code/src/Writer/PdfWriter.php
vendored
Normal file
|
|
@ -0,0 +1,139 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
|
namespace Endroid\QrCode\Writer;
|
||||||
|
|
||||||
|
use Endroid\QrCode\Bacon\MatrixFactory;
|
||||||
|
use Endroid\QrCode\Label\LabelInterface;
|
||||||
|
use Endroid\QrCode\Logo\LogoInterface;
|
||||||
|
use Endroid\QrCode\QrCodeInterface;
|
||||||
|
use Endroid\QrCode\Writer\Result\PdfResult;
|
||||||
|
use Endroid\QrCode\Writer\Result\ResultInterface;
|
||||||
|
|
||||||
|
final class PdfWriter implements WriterInterface
|
||||||
|
{
|
||||||
|
public const WRITER_OPTION_UNIT = 'unit';
|
||||||
|
public const WRITER_OPTION_PDF = 'fpdf';
|
||||||
|
public const WRITER_OPTION_X = 'x';
|
||||||
|
public const WRITER_OPTION_Y = 'y';
|
||||||
|
public const WRITER_OPTION_LINK = 'link';
|
||||||
|
|
||||||
|
public function write(QrCodeInterface $qrCode, LogoInterface $logo = null, LabelInterface $label = null, array $options = []): ResultInterface
|
||||||
|
{
|
||||||
|
$matrixFactory = new MatrixFactory();
|
||||||
|
$matrix = $matrixFactory->create($qrCode);
|
||||||
|
|
||||||
|
$unit = 'mm';
|
||||||
|
if (isset($options[self::WRITER_OPTION_UNIT])) {
|
||||||
|
$unit = $options[self::WRITER_OPTION_UNIT];
|
||||||
|
}
|
||||||
|
|
||||||
|
$allowedUnits = ['mm', 'pt', 'cm', 'in'];
|
||||||
|
if (!in_array($unit, $allowedUnits)) {
|
||||||
|
throw new \Exception(sprintf('PDF Measure unit should be one of [%s]', implode(', ', $allowedUnits)));
|
||||||
|
}
|
||||||
|
|
||||||
|
$labelSpace = 0;
|
||||||
|
if ($label instanceof LabelInterface) {
|
||||||
|
$labelSpace = 30;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!class_exists(\FPDF::class)) {
|
||||||
|
throw new \Exception('Unable to find FPDF: check your installation');
|
||||||
|
}
|
||||||
|
|
||||||
|
$foregroundColor = $qrCode->getForegroundColor();
|
||||||
|
if ($foregroundColor->getAlpha() > 0) {
|
||||||
|
throw new \Exception('PDF Writer does not support alpha channels');
|
||||||
|
}
|
||||||
|
$backgroundColor = $qrCode->getBackgroundColor();
|
||||||
|
if ($backgroundColor->getAlpha() > 0) {
|
||||||
|
throw new \Exception('PDF Writer does not support alpha channels');
|
||||||
|
}
|
||||||
|
|
||||||
|
if (isset($options[self::WRITER_OPTION_PDF])) {
|
||||||
|
$fpdf = $options[self::WRITER_OPTION_PDF];
|
||||||
|
if (!$fpdf instanceof \FPDF) {
|
||||||
|
throw new \Exception('pdf option must be an instance of FPDF');
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
// @todo Check how to add label height later
|
||||||
|
$fpdf = new \FPDF('P', $unit, [$matrix->getOuterSize(), $matrix->getOuterSize() + $labelSpace]);
|
||||||
|
$fpdf->AddPage();
|
||||||
|
}
|
||||||
|
|
||||||
|
$x = 0;
|
||||||
|
if (isset($options[self::WRITER_OPTION_X])) {
|
||||||
|
$x = $options[self::WRITER_OPTION_X];
|
||||||
|
}
|
||||||
|
$y = 0;
|
||||||
|
if (isset($options[self::WRITER_OPTION_Y])) {
|
||||||
|
$y = $options[self::WRITER_OPTION_Y];
|
||||||
|
}
|
||||||
|
|
||||||
|
$fpdf->SetFillColor($backgroundColor->getRed(), $backgroundColor->getGreen(), $backgroundColor->getBlue());
|
||||||
|
$fpdf->Rect($x, $y, $matrix->getOuterSize(), $matrix->getOuterSize(), 'F');
|
||||||
|
$fpdf->SetFillColor($foregroundColor->getRed(), $foregroundColor->getGreen(), $foregroundColor->getBlue());
|
||||||
|
|
||||||
|
for ($rowIndex = 0; $rowIndex < $matrix->getBlockCount(); ++$rowIndex) {
|
||||||
|
for ($columnIndex = 0; $columnIndex < $matrix->getBlockCount(); ++$columnIndex) {
|
||||||
|
if (1 === $matrix->getBlockValue($rowIndex, $columnIndex)) {
|
||||||
|
$fpdf->Rect(
|
||||||
|
$x + $matrix->getMarginLeft() + ($columnIndex * $matrix->getBlockSize()),
|
||||||
|
$y + $matrix->getMarginLeft() + ($rowIndex * $matrix->getBlockSize()),
|
||||||
|
$matrix->getBlockSize(),
|
||||||
|
$matrix->getBlockSize(),
|
||||||
|
'F'
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($logo instanceof LogoInterface) {
|
||||||
|
$this->addLogo($logo, $fpdf, $x, $y, $matrix->getOuterSize());
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($label instanceof LabelInterface) {
|
||||||
|
$fpdf->SetXY($x, $y + $matrix->getOuterSize() + $labelSpace - 25);
|
||||||
|
$fpdf->SetFont('Helvetica', '', $label->getFont()->getSize());
|
||||||
|
$fpdf->Cell($matrix->getOuterSize(), 0, $label->getText(), 0, 0, 'C');
|
||||||
|
}
|
||||||
|
|
||||||
|
if (isset($options[self::WRITER_OPTION_LINK])) {
|
||||||
|
$link = $options[self::WRITER_OPTION_LINK];
|
||||||
|
$fpdf->Link($x, $y, $x + $matrix->getOuterSize(), $y + $matrix->getOuterSize(), $link);
|
||||||
|
}
|
||||||
|
|
||||||
|
return new PdfResult($matrix, $fpdf);
|
||||||
|
}
|
||||||
|
|
||||||
|
private function addLogo(LogoInterface $logo, \FPDF $fpdf, float $x, float $y, float $size): void
|
||||||
|
{
|
||||||
|
$logoPath = $logo->getPath();
|
||||||
|
$logoHeight = $logo->getResizeToHeight();
|
||||||
|
$logoWidth = $logo->getResizeToWidth();
|
||||||
|
|
||||||
|
if (null === $logoHeight || null === $logoWidth) {
|
||||||
|
$imageSize = \getimagesize($logoPath);
|
||||||
|
if (!$imageSize) {
|
||||||
|
throw new \Exception(sprintf('Unable to read image size for logo "%s"', $logoPath));
|
||||||
|
}
|
||||||
|
[$logoSourceWidth, $logoSourceHeight] = $imageSize;
|
||||||
|
|
||||||
|
if (null === $logoWidth) {
|
||||||
|
$logoWidth = (int) $logoSourceWidth;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (null === $logoHeight) {
|
||||||
|
$aspectRatio = $logoWidth / $logoSourceWidth;
|
||||||
|
$logoHeight = (int) ($logoSourceHeight * $aspectRatio);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$logoX = $x + $size / 2 - $logoWidth / 2;
|
||||||
|
$logoY = $y + $size / 2 - $logoHeight / 2;
|
||||||
|
|
||||||
|
$fpdf->Image($logoPath, $logoX, $logoY, $logoWidth, $logoHeight);
|
||||||
|
}
|
||||||
|
}
|
||||||
29
vendor/endroid/qr-code/src/Writer/PngWriter.php
vendored
Normal file
29
vendor/endroid/qr-code/src/Writer/PngWriter.php
vendored
Normal file
|
|
@ -0,0 +1,29 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
|
namespace Endroid\QrCode\Writer;
|
||||||
|
|
||||||
|
use Endroid\QrCode\Label\LabelInterface;
|
||||||
|
use Endroid\QrCode\Logo\LogoInterface;
|
||||||
|
use Endroid\QrCode\QrCodeInterface;
|
||||||
|
use Endroid\QrCode\Writer\Result\GdResult;
|
||||||
|
use Endroid\QrCode\Writer\Result\PngResult;
|
||||||
|
use Endroid\QrCode\Writer\Result\ResultInterface;
|
||||||
|
|
||||||
|
final class PngWriter extends AbstractGdWriter
|
||||||
|
{
|
||||||
|
public const WRITER_OPTION_COMPRESSION_LEVEL = 'compression_level';
|
||||||
|
|
||||||
|
public function write(QrCodeInterface $qrCode, LogoInterface $logo = null, LabelInterface $label = null, array $options = []): ResultInterface
|
||||||
|
{
|
||||||
|
if (!isset($options[self::WRITER_OPTION_COMPRESSION_LEVEL])) {
|
||||||
|
$options[self::WRITER_OPTION_COMPRESSION_LEVEL] = -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
/** @var GdResult $gdResult */
|
||||||
|
$gdResult = parent::write($qrCode, $logo, $label, $options);
|
||||||
|
|
||||||
|
return new PngResult($gdResult->getMatrix(), $gdResult->getImage(), $options[self::WRITER_OPTION_COMPRESSION_LEVEL]);
|
||||||
|
}
|
||||||
|
}
|
||||||
31
vendor/endroid/qr-code/src/Writer/Result/AbstractResult.php
vendored
Normal file
31
vendor/endroid/qr-code/src/Writer/Result/AbstractResult.php
vendored
Normal file
|
|
@ -0,0 +1,31 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
|
namespace Endroid\QrCode\Writer\Result;
|
||||||
|
|
||||||
|
use Endroid\QrCode\Matrix\MatrixInterface;
|
||||||
|
|
||||||
|
abstract class AbstractResult implements ResultInterface
|
||||||
|
{
|
||||||
|
public function __construct(
|
||||||
|
private readonly MatrixInterface $matrix
|
||||||
|
) {
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getMatrix(): MatrixInterface
|
||||||
|
{
|
||||||
|
return $this->matrix;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getDataUri(): string
|
||||||
|
{
|
||||||
|
return 'data:'.$this->getMimeType().';base64,'.base64_encode($this->getString());
|
||||||
|
}
|
||||||
|
|
||||||
|
public function saveToFile(string $path): void
|
||||||
|
{
|
||||||
|
$string = $this->getString();
|
||||||
|
file_put_contents($path, $string);
|
||||||
|
}
|
||||||
|
}
|
||||||
35
vendor/endroid/qr-code/src/Writer/Result/BinaryResult.php
vendored
Normal file
35
vendor/endroid/qr-code/src/Writer/Result/BinaryResult.php
vendored
Normal file
|
|
@ -0,0 +1,35 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
|
namespace Endroid\QrCode\Writer\Result;
|
||||||
|
|
||||||
|
use Endroid\QrCode\Matrix\MatrixInterface;
|
||||||
|
|
||||||
|
final class BinaryResult extends AbstractResult
|
||||||
|
{
|
||||||
|
public function __construct(MatrixInterface $matrix)
|
||||||
|
{
|
||||||
|
parent::__construct($matrix);
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getString(): string
|
||||||
|
{
|
||||||
|
$matrix = $this->getMatrix();
|
||||||
|
|
||||||
|
$binaryString = '';
|
||||||
|
for ($rowIndex = 0; $rowIndex < $matrix->getBlockCount(); ++$rowIndex) {
|
||||||
|
for ($columnIndex = 0; $columnIndex < $matrix->getBlockCount(); ++$columnIndex) {
|
||||||
|
$binaryString .= $matrix->getBlockValue($rowIndex, $columnIndex);
|
||||||
|
}
|
||||||
|
$binaryString .= "\n";
|
||||||
|
}
|
||||||
|
|
||||||
|
return $binaryString;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getMimeType(): string
|
||||||
|
{
|
||||||
|
return 'text/plain';
|
||||||
|
}
|
||||||
|
}
|
||||||
69
vendor/endroid/qr-code/src/Writer/Result/ConsoleResult.php
vendored
Normal file
69
vendor/endroid/qr-code/src/Writer/Result/ConsoleResult.php
vendored
Normal file
|
|
@ -0,0 +1,69 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
|
namespace Endroid\QrCode\Writer\Result;
|
||||||
|
|
||||||
|
use Endroid\QrCode\Color\ColorInterface;
|
||||||
|
use Endroid\QrCode\Matrix\MatrixInterface;
|
||||||
|
|
||||||
|
final class ConsoleResult extends AbstractResult
|
||||||
|
{
|
||||||
|
private const TWO_BLOCKS = [
|
||||||
|
0 => ' ',
|
||||||
|
1 => "\xe2\x96\x80",
|
||||||
|
2 => "\xe2\x96\x84",
|
||||||
|
3 => "\xe2\x96\x88",
|
||||||
|
];
|
||||||
|
|
||||||
|
private string $colorEscapeCode;
|
||||||
|
|
||||||
|
public function __construct(
|
||||||
|
MatrixInterface $matrix,
|
||||||
|
ColorInterface $foreground,
|
||||||
|
ColorInterface $background
|
||||||
|
) {
|
||||||
|
parent::__construct($matrix);
|
||||||
|
|
||||||
|
$this->colorEscapeCode = sprintf(
|
||||||
|
"\e[38;2;%d;%d;%dm\e[48;2;%d;%d;%dm",
|
||||||
|
$foreground->getRed(),
|
||||||
|
$foreground->getGreen(),
|
||||||
|
$foreground->getBlue(),
|
||||||
|
$background->getRed(),
|
||||||
|
$background->getGreen(),
|
||||||
|
$background->getBlue()
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getMimeType(): string
|
||||||
|
{
|
||||||
|
return 'text/plain';
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getString(): string
|
||||||
|
{
|
||||||
|
$matrix = $this->getMatrix();
|
||||||
|
|
||||||
|
$side = $matrix->getBlockCount();
|
||||||
|
$marginLeft = $this->colorEscapeCode.self::TWO_BLOCKS[0].self::TWO_BLOCKS[0];
|
||||||
|
$marginRight = self::TWO_BLOCKS[0].self::TWO_BLOCKS[0]."\e[0m".PHP_EOL;
|
||||||
|
$marginVertical = $marginLeft.str_repeat(self::TWO_BLOCKS[0], $side).$marginRight;
|
||||||
|
|
||||||
|
$qrCodeString = $marginVertical;
|
||||||
|
for ($rowIndex = 0; $rowIndex < $side; $rowIndex += 2) {
|
||||||
|
$qrCodeString .= $marginLeft;
|
||||||
|
for ($columnIndex = 0; $columnIndex < $side; ++$columnIndex) {
|
||||||
|
$combined = $matrix->getBlockValue($rowIndex, $columnIndex);
|
||||||
|
if ($rowIndex + 1 < $side) {
|
||||||
|
$combined |= $matrix->getBlockValue($rowIndex + 1, $columnIndex) << 1;
|
||||||
|
}
|
||||||
|
$qrCodeString .= self::TWO_BLOCKS[$combined];
|
||||||
|
}
|
||||||
|
$qrCodeString .= $marginRight;
|
||||||
|
}
|
||||||
|
$qrCodeString .= $marginVertical;
|
||||||
|
|
||||||
|
return $qrCodeString;
|
||||||
|
}
|
||||||
|
}
|
||||||
74
vendor/endroid/qr-code/src/Writer/Result/DebugResult.php
vendored
Normal file
74
vendor/endroid/qr-code/src/Writer/Result/DebugResult.php
vendored
Normal file
|
|
@ -0,0 +1,74 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
|
namespace Endroid\QrCode\Writer\Result;
|
||||||
|
|
||||||
|
use Endroid\QrCode\Label\LabelInterface;
|
||||||
|
use Endroid\QrCode\Logo\LogoInterface;
|
||||||
|
use Endroid\QrCode\Matrix\MatrixInterface;
|
||||||
|
use Endroid\QrCode\QrCodeInterface;
|
||||||
|
|
||||||
|
final class DebugResult extends AbstractResult
|
||||||
|
{
|
||||||
|
private bool $validateResult = false;
|
||||||
|
|
||||||
|
public function __construct(
|
||||||
|
MatrixInterface $matrix,
|
||||||
|
private readonly QrCodeInterface $qrCode,
|
||||||
|
private readonly LogoInterface|null $logo = null,
|
||||||
|
private readonly LabelInterface|null $label = null,
|
||||||
|
/** @var array<string, mixed> $options */
|
||||||
|
private readonly array $options = []
|
||||||
|
) {
|
||||||
|
parent::__construct($matrix);
|
||||||
|
}
|
||||||
|
|
||||||
|
public function setValidateResult(bool $validateResult): void
|
||||||
|
{
|
||||||
|
$this->validateResult = $validateResult;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getString(): string
|
||||||
|
{
|
||||||
|
$debugLines = [];
|
||||||
|
|
||||||
|
$debugLines[] = 'Data: '.$this->qrCode->getData();
|
||||||
|
$debugLines[] = 'Encoding: '.$this->qrCode->getEncoding();
|
||||||
|
$debugLines[] = 'Error Correction Level: '.get_class($this->qrCode->getErrorCorrectionLevel());
|
||||||
|
$debugLines[] = 'Size: '.$this->qrCode->getSize();
|
||||||
|
$debugLines[] = 'Margin: '.$this->qrCode->getMargin();
|
||||||
|
$debugLines[] = 'Round block size mode: '.get_class($this->qrCode->getRoundBlockSizeMode());
|
||||||
|
$debugLines[] = 'Foreground color: ['.implode(', ', $this->qrCode->getForegroundColor()->toArray()).']';
|
||||||
|
$debugLines[] = 'Background color: ['.implode(', ', $this->qrCode->getBackgroundColor()->toArray()).']';
|
||||||
|
|
||||||
|
foreach ($this->options as $key => $value) {
|
||||||
|
$debugLines[] = 'Writer option: '.$key.': '.$value;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (isset($this->logo)) {
|
||||||
|
$debugLines[] = 'Logo path: '.$this->logo->getPath();
|
||||||
|
$debugLines[] = 'Logo resize to width: '.$this->logo->getResizeToWidth();
|
||||||
|
$debugLines[] = 'Logo resize to height: '.$this->logo->getResizeToHeight();
|
||||||
|
$debugLines[] = 'Logo punchout background: '.($this->logo->getPunchoutBackground() ? 'true' : 'false');
|
||||||
|
}
|
||||||
|
|
||||||
|
if (isset($this->label)) {
|
||||||
|
$debugLines[] = 'Label text: '.$this->label->getText();
|
||||||
|
$debugLines[] = 'Label font path: '.$this->label->getFont()->getPath();
|
||||||
|
$debugLines[] = 'Label font size: '.$this->label->getFont()->getSize();
|
||||||
|
$debugLines[] = 'Label alignment: '.get_class($this->label->getAlignment());
|
||||||
|
$debugLines[] = 'Label margin: ['.implode(', ', $this->label->getMargin()->toArray()).']';
|
||||||
|
$debugLines[] = 'Label text color: ['.implode(', ', $this->label->getTextColor()->toArray()).']';
|
||||||
|
}
|
||||||
|
|
||||||
|
$debugLines[] = 'Validate result: '.($this->validateResult ? 'true' : 'false');
|
||||||
|
|
||||||
|
return implode("\n", $debugLines);
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getMimeType(): string
|
||||||
|
{
|
||||||
|
return 'text/plain';
|
||||||
|
}
|
||||||
|
}
|
||||||
28
vendor/endroid/qr-code/src/Writer/Result/EpsResult.php
vendored
Normal file
28
vendor/endroid/qr-code/src/Writer/Result/EpsResult.php
vendored
Normal file
|
|
@ -0,0 +1,28 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
|
namespace Endroid\QrCode\Writer\Result;
|
||||||
|
|
||||||
|
use Endroid\QrCode\Matrix\MatrixInterface;
|
||||||
|
|
||||||
|
final class EpsResult extends AbstractResult
|
||||||
|
{
|
||||||
|
public function __construct(
|
||||||
|
MatrixInterface $matrix,
|
||||||
|
/** @var array<string> $lines */
|
||||||
|
private readonly array $lines
|
||||||
|
) {
|
||||||
|
parent::__construct($matrix);
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getString(): string
|
||||||
|
{
|
||||||
|
return implode("\n", $this->lines);
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getMimeType(): string
|
||||||
|
{
|
||||||
|
return 'image/eps';
|
||||||
|
}
|
||||||
|
}
|
||||||
32
vendor/endroid/qr-code/src/Writer/Result/GdResult.php
vendored
Normal file
32
vendor/endroid/qr-code/src/Writer/Result/GdResult.php
vendored
Normal file
|
|
@ -0,0 +1,32 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
|
namespace Endroid\QrCode\Writer\Result;
|
||||||
|
|
||||||
|
use Endroid\QrCode\Matrix\MatrixInterface;
|
||||||
|
|
||||||
|
class GdResult extends AbstractResult
|
||||||
|
{
|
||||||
|
public function __construct(
|
||||||
|
MatrixInterface $matrix,
|
||||||
|
protected readonly \GdImage $image
|
||||||
|
) {
|
||||||
|
parent::__construct($matrix);
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getImage(): \GdImage
|
||||||
|
{
|
||||||
|
return $this->image;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getString(): string
|
||||||
|
{
|
||||||
|
throw new \Exception('You can only use this method in a concrete implementation');
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getMimeType(): string
|
||||||
|
{
|
||||||
|
throw new \Exception('You can only use this method in a concrete implementation');
|
||||||
|
}
|
||||||
|
}
|
||||||
21
vendor/endroid/qr-code/src/Writer/Result/GifResult.php
vendored
Normal file
21
vendor/endroid/qr-code/src/Writer/Result/GifResult.php
vendored
Normal file
|
|
@ -0,0 +1,21 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
|
namespace Endroid\QrCode\Writer\Result;
|
||||||
|
|
||||||
|
final class GifResult extends GdResult
|
||||||
|
{
|
||||||
|
public function getString(): string
|
||||||
|
{
|
||||||
|
ob_start();
|
||||||
|
imagegif($this->image);
|
||||||
|
|
||||||
|
return strval(ob_get_clean());
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getMimeType(): string
|
||||||
|
{
|
||||||
|
return 'image/gif';
|
||||||
|
}
|
||||||
|
}
|
||||||
32
vendor/endroid/qr-code/src/Writer/Result/PdfResult.php
vendored
Normal file
32
vendor/endroid/qr-code/src/Writer/Result/PdfResult.php
vendored
Normal file
|
|
@ -0,0 +1,32 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
|
namespace Endroid\QrCode\Writer\Result;
|
||||||
|
|
||||||
|
use Endroid\QrCode\Matrix\MatrixInterface;
|
||||||
|
|
||||||
|
final class PdfResult extends AbstractResult
|
||||||
|
{
|
||||||
|
public function __construct(
|
||||||
|
MatrixInterface $matrix,
|
||||||
|
private readonly \FPDF $fpdf
|
||||||
|
) {
|
||||||
|
parent::__construct($matrix);
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getPdf(): \FPDF
|
||||||
|
{
|
||||||
|
return $this->fpdf;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getString(): string
|
||||||
|
{
|
||||||
|
return $this->fpdf->Output('S');
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getMimeType(): string
|
||||||
|
{
|
||||||
|
return 'application/pdf';
|
||||||
|
}
|
||||||
|
}
|
||||||
31
vendor/endroid/qr-code/src/Writer/Result/PngResult.php
vendored
Normal file
31
vendor/endroid/qr-code/src/Writer/Result/PngResult.php
vendored
Normal file
|
|
@ -0,0 +1,31 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
|
namespace Endroid\QrCode\Writer\Result;
|
||||||
|
|
||||||
|
use Endroid\QrCode\Matrix\MatrixInterface;
|
||||||
|
|
||||||
|
final class PngResult extends GdResult
|
||||||
|
{
|
||||||
|
public function __construct(
|
||||||
|
MatrixInterface $matrix,
|
||||||
|
\GdImage $image,
|
||||||
|
private readonly int $quality = -1
|
||||||
|
) {
|
||||||
|
parent::__construct($matrix, $image);
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getString(): string
|
||||||
|
{
|
||||||
|
ob_start();
|
||||||
|
imagepng($this->image, quality: $this->quality);
|
||||||
|
|
||||||
|
return strval(ob_get_clean());
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getMimeType(): string
|
||||||
|
{
|
||||||
|
return 'image/png';
|
||||||
|
}
|
||||||
|
}
|
||||||
20
vendor/endroid/qr-code/src/Writer/Result/ResultInterface.php
vendored
Normal file
20
vendor/endroid/qr-code/src/Writer/Result/ResultInterface.php
vendored
Normal file
|
|
@ -0,0 +1,20 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
|
namespace Endroid\QrCode\Writer\Result;
|
||||||
|
|
||||||
|
use Endroid\QrCode\Matrix\MatrixInterface;
|
||||||
|
|
||||||
|
interface ResultInterface
|
||||||
|
{
|
||||||
|
public function getMatrix(): MatrixInterface;
|
||||||
|
|
||||||
|
public function getString(): string;
|
||||||
|
|
||||||
|
public function getDataUri(): string;
|
||||||
|
|
||||||
|
public function saveToFile(string $path): void;
|
||||||
|
|
||||||
|
public function getMimeType(): string;
|
||||||
|
}
|
||||||
43
vendor/endroid/qr-code/src/Writer/Result/SvgResult.php
vendored
Normal file
43
vendor/endroid/qr-code/src/Writer/Result/SvgResult.php
vendored
Normal file
|
|
@ -0,0 +1,43 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
|
namespace Endroid\QrCode\Writer\Result;
|
||||||
|
|
||||||
|
use Endroid\QrCode\Matrix\MatrixInterface;
|
||||||
|
|
||||||
|
final class SvgResult extends AbstractResult
|
||||||
|
{
|
||||||
|
public function __construct(
|
||||||
|
MatrixInterface $matrix,
|
||||||
|
private readonly \SimpleXMLElement $xml,
|
||||||
|
private readonly bool $excludeXmlDeclaration = false
|
||||||
|
) {
|
||||||
|
parent::__construct($matrix);
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getXml(): \SimpleXMLElement
|
||||||
|
{
|
||||||
|
return $this->xml;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getString(): string
|
||||||
|
{
|
||||||
|
$string = $this->xml->asXML();
|
||||||
|
|
||||||
|
if (!is_string($string)) {
|
||||||
|
throw new \Exception('Could not save SVG XML to string');
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($this->excludeXmlDeclaration) {
|
||||||
|
$string = str_replace("<?xml version=\"1.0\"?>\n", '', $string);
|
||||||
|
}
|
||||||
|
|
||||||
|
return $string;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getMimeType(): string
|
||||||
|
{
|
||||||
|
return 'image/svg+xml';
|
||||||
|
}
|
||||||
|
}
|
||||||
35
vendor/endroid/qr-code/src/Writer/Result/WebPResult.php
vendored
Normal file
35
vendor/endroid/qr-code/src/Writer/Result/WebPResult.php
vendored
Normal file
|
|
@ -0,0 +1,35 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
|
namespace Endroid\QrCode\Writer\Result;
|
||||||
|
|
||||||
|
use Endroid\QrCode\Matrix\MatrixInterface;
|
||||||
|
|
||||||
|
final class WebPResult extends GdResult
|
||||||
|
{
|
||||||
|
public function __construct(
|
||||||
|
MatrixInterface $matrix,
|
||||||
|
\GdImage $image,
|
||||||
|
private readonly int $quality = -1
|
||||||
|
) {
|
||||||
|
parent::__construct($matrix, $image);
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getString(): string
|
||||||
|
{
|
||||||
|
if (!function_exists('imagewebp')) {
|
||||||
|
throw new \Exception('WebP support is not available in your GD installation');
|
||||||
|
}
|
||||||
|
|
||||||
|
ob_start();
|
||||||
|
imagewebp($this->image, quality: $this->quality);
|
||||||
|
|
||||||
|
return strval(ob_get_clean());
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getMimeType(): string
|
||||||
|
{
|
||||||
|
return 'image/webp';
|
||||||
|
}
|
||||||
|
}
|
||||||
114
vendor/endroid/qr-code/src/Writer/SvgWriter.php
vendored
Normal file
114
vendor/endroid/qr-code/src/Writer/SvgWriter.php
vendored
Normal file
|
|
@ -0,0 +1,114 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
|
namespace Endroid\QrCode\Writer;
|
||||||
|
|
||||||
|
use Endroid\QrCode\Bacon\MatrixFactory;
|
||||||
|
use Endroid\QrCode\ImageData\LogoImageData;
|
||||||
|
use Endroid\QrCode\Label\LabelInterface;
|
||||||
|
use Endroid\QrCode\Logo\LogoInterface;
|
||||||
|
use Endroid\QrCode\QrCodeInterface;
|
||||||
|
use Endroid\QrCode\Writer\Result\ResultInterface;
|
||||||
|
use Endroid\QrCode\Writer\Result\SvgResult;
|
||||||
|
|
||||||
|
final class SvgWriter implements WriterInterface
|
||||||
|
{
|
||||||
|
public const DECIMAL_PRECISION = 10;
|
||||||
|
public const WRITER_OPTION_BLOCK_ID = 'block_id';
|
||||||
|
public const WRITER_OPTION_EXCLUDE_XML_DECLARATION = 'exclude_xml_declaration';
|
||||||
|
public const WRITER_OPTION_EXCLUDE_SVG_WIDTH_AND_HEIGHT = 'exclude_svg_width_and_height';
|
||||||
|
public const WRITER_OPTION_FORCE_XLINK_HREF = 'force_xlink_href';
|
||||||
|
|
||||||
|
public function write(QrCodeInterface $qrCode, LogoInterface $logo = null, LabelInterface $label = null, array $options = []): ResultInterface
|
||||||
|
{
|
||||||
|
if (!isset($options[self::WRITER_OPTION_BLOCK_ID])) {
|
||||||
|
$options[self::WRITER_OPTION_BLOCK_ID] = 'block';
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!isset($options[self::WRITER_OPTION_EXCLUDE_XML_DECLARATION])) {
|
||||||
|
$options[self::WRITER_OPTION_EXCLUDE_XML_DECLARATION] = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!isset($options[self::WRITER_OPTION_EXCLUDE_SVG_WIDTH_AND_HEIGHT])) {
|
||||||
|
$options[self::WRITER_OPTION_EXCLUDE_SVG_WIDTH_AND_HEIGHT] = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
$matrixFactory = new MatrixFactory();
|
||||||
|
$matrix = $matrixFactory->create($qrCode);
|
||||||
|
|
||||||
|
$xml = new \SimpleXMLElement('<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"/>');
|
||||||
|
$xml->addAttribute('version', '1.1');
|
||||||
|
if (!$options[self::WRITER_OPTION_EXCLUDE_SVG_WIDTH_AND_HEIGHT]) {
|
||||||
|
$xml->addAttribute('width', $matrix->getOuterSize().'px');
|
||||||
|
$xml->addAttribute('height', $matrix->getOuterSize().'px');
|
||||||
|
}
|
||||||
|
$xml->addAttribute('viewBox', '0 0 '.$matrix->getOuterSize().' '.$matrix->getOuterSize());
|
||||||
|
$xml->addChild('defs');
|
||||||
|
|
||||||
|
$blockDefinition = $xml->defs->addChild('rect');
|
||||||
|
$blockDefinition->addAttribute('id', strval($options[self::WRITER_OPTION_BLOCK_ID]));
|
||||||
|
$blockDefinition->addAttribute('width', number_format($matrix->getBlockSize(), self::DECIMAL_PRECISION, '.', ''));
|
||||||
|
$blockDefinition->addAttribute('height', number_format($matrix->getBlockSize(), self::DECIMAL_PRECISION, '.', ''));
|
||||||
|
$blockDefinition->addAttribute('fill', '#'.sprintf('%02x%02x%02x', $qrCode->getForegroundColor()->getRed(), $qrCode->getForegroundColor()->getGreen(), $qrCode->getForegroundColor()->getBlue()));
|
||||||
|
$blockDefinition->addAttribute('fill-opacity', strval($qrCode->getForegroundColor()->getOpacity()));
|
||||||
|
|
||||||
|
$background = $xml->addChild('rect');
|
||||||
|
$background->addAttribute('x', '0');
|
||||||
|
$background->addAttribute('y', '0');
|
||||||
|
$background->addAttribute('width', strval($matrix->getOuterSize()));
|
||||||
|
$background->addAttribute('height', strval($matrix->getOuterSize()));
|
||||||
|
$background->addAttribute('fill', '#'.sprintf('%02x%02x%02x', $qrCode->getBackgroundColor()->getRed(), $qrCode->getBackgroundColor()->getGreen(), $qrCode->getBackgroundColor()->getBlue()));
|
||||||
|
$background->addAttribute('fill-opacity', strval($qrCode->getBackgroundColor()->getOpacity()));
|
||||||
|
|
||||||
|
for ($rowIndex = 0; $rowIndex < $matrix->getBlockCount(); ++$rowIndex) {
|
||||||
|
for ($columnIndex = 0; $columnIndex < $matrix->getBlockCount(); ++$columnIndex) {
|
||||||
|
if (1 === $matrix->getBlockValue($rowIndex, $columnIndex)) {
|
||||||
|
$block = $xml->addChild('use');
|
||||||
|
$block->addAttribute('x', number_format($matrix->getMarginLeft() + $matrix->getBlockSize() * $columnIndex, self::DECIMAL_PRECISION, '.', ''));
|
||||||
|
$block->addAttribute('y', number_format($matrix->getMarginLeft() + $matrix->getBlockSize() * $rowIndex, self::DECIMAL_PRECISION, '.', ''));
|
||||||
|
$block->addAttribute('xlink:href', '#'.$options[self::WRITER_OPTION_BLOCK_ID], 'http://www.w3.org/1999/xlink');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$result = new SvgResult($matrix, $xml, boolval($options[self::WRITER_OPTION_EXCLUDE_XML_DECLARATION]));
|
||||||
|
|
||||||
|
if ($logo instanceof LogoInterface) {
|
||||||
|
$this->addLogo($logo, $result, $options);
|
||||||
|
}
|
||||||
|
|
||||||
|
return $result;
|
||||||
|
}
|
||||||
|
|
||||||
|
/** @param array<string, mixed> $options */
|
||||||
|
private function addLogo(LogoInterface $logo, SvgResult $result, array $options): void
|
||||||
|
{
|
||||||
|
$logoImageData = LogoImageData::createForLogo($logo);
|
||||||
|
|
||||||
|
if (!isset($options[self::WRITER_OPTION_FORCE_XLINK_HREF])) {
|
||||||
|
$options[self::WRITER_OPTION_FORCE_XLINK_HREF] = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
$xml = $result->getXml();
|
||||||
|
|
||||||
|
/** @var \SimpleXMLElement $xmlAttributes */
|
||||||
|
$xmlAttributes = $xml->attributes();
|
||||||
|
|
||||||
|
$x = intval($xmlAttributes->width) / 2 - $logoImageData->getWidth() / 2;
|
||||||
|
$y = intval($xmlAttributes->height) / 2 - $logoImageData->getHeight() / 2;
|
||||||
|
|
||||||
|
$imageDefinition = $xml->addChild('image');
|
||||||
|
$imageDefinition->addAttribute('x', strval($x));
|
||||||
|
$imageDefinition->addAttribute('y', strval($y));
|
||||||
|
$imageDefinition->addAttribute('width', strval($logoImageData->getWidth()));
|
||||||
|
$imageDefinition->addAttribute('height', strval($logoImageData->getHeight()));
|
||||||
|
$imageDefinition->addAttribute('preserveAspectRatio', 'none');
|
||||||
|
|
||||||
|
if ($options[self::WRITER_OPTION_FORCE_XLINK_HREF]) {
|
||||||
|
$imageDefinition->addAttribute('xlink:href', $logoImageData->createDataUri(), 'http://www.w3.org/1999/xlink');
|
||||||
|
} else {
|
||||||
|
$imageDefinition->addAttribute('href', $logoImageData->createDataUri());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
12
vendor/endroid/qr-code/src/Writer/ValidatingWriterInterface.php
vendored
Normal file
12
vendor/endroid/qr-code/src/Writer/ValidatingWriterInterface.php
vendored
Normal file
|
|
@ -0,0 +1,12 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
|
namespace Endroid\QrCode\Writer;
|
||||||
|
|
||||||
|
use Endroid\QrCode\Writer\Result\ResultInterface;
|
||||||
|
|
||||||
|
interface ValidatingWriterInterface
|
||||||
|
{
|
||||||
|
public function validateResult(ResultInterface $result, string $expectedData): void;
|
||||||
|
}
|
||||||
29
vendor/endroid/qr-code/src/Writer/WebPWriter.php
vendored
Normal file
29
vendor/endroid/qr-code/src/Writer/WebPWriter.php
vendored
Normal file
|
|
@ -0,0 +1,29 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
|
namespace Endroid\QrCode\Writer;
|
||||||
|
|
||||||
|
use Endroid\QrCode\Label\LabelInterface;
|
||||||
|
use Endroid\QrCode\Logo\LogoInterface;
|
||||||
|
use Endroid\QrCode\QrCodeInterface;
|
||||||
|
use Endroid\QrCode\Writer\Result\GdResult;
|
||||||
|
use Endroid\QrCode\Writer\Result\ResultInterface;
|
||||||
|
use Endroid\QrCode\Writer\Result\WebPResult;
|
||||||
|
|
||||||
|
final class WebPWriter extends AbstractGdWriter
|
||||||
|
{
|
||||||
|
public const WRITER_OPTION_QUALITY = 'quality';
|
||||||
|
|
||||||
|
public function write(QrCodeInterface $qrCode, LogoInterface $logo = null, LabelInterface $label = null, array $options = []): ResultInterface
|
||||||
|
{
|
||||||
|
if (!isset($options[self::WRITER_OPTION_QUALITY])) {
|
||||||
|
$options[self::WRITER_OPTION_QUALITY] = -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
/** @var GdResult $gdResult */
|
||||||
|
$gdResult = parent::write($qrCode, $logo, $label, $options);
|
||||||
|
|
||||||
|
return new WebPResult($gdResult->getMatrix(), $gdResult->getImage(), $options[self::WRITER_OPTION_QUALITY]);
|
||||||
|
}
|
||||||
|
}
|
||||||
16
vendor/endroid/qr-code/src/Writer/WriterInterface.php
vendored
Normal file
16
vendor/endroid/qr-code/src/Writer/WriterInterface.php
vendored
Normal file
|
|
@ -0,0 +1,16 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
|
namespace Endroid\QrCode\Writer;
|
||||||
|
|
||||||
|
use Endroid\QrCode\Label\LabelInterface;
|
||||||
|
use Endroid\QrCode\Logo\LogoInterface;
|
||||||
|
use Endroid\QrCode\QrCodeInterface;
|
||||||
|
use Endroid\QrCode\Writer\Result\ResultInterface;
|
||||||
|
|
||||||
|
interface WriterInterface
|
||||||
|
{
|
||||||
|
/** @param array<string, mixed> $options */
|
||||||
|
public function write(QrCodeInterface $qrCode, LogoInterface $logo = null, LabelInterface $label = null, array $options = []): ResultInterface;
|
||||||
|
}
|
||||||
Loading…
Reference in New Issue
Block a user