Skip to content

WIP Label Database table refactor#14864

Draft
Godmartinz wants to merge 21 commits intogrokability:developfrom
Godmartinz:Label_refactor
Draft

WIP Label Database table refactor#14864
Godmartinz wants to merge 21 commits intogrokability:developfrom
Godmartinz:Label_refactor

Conversation

@Godmartinz
Copy link
Member

Description

This is still a WIP.

-Moved template measurements from files to the database
-Combines the write function into one class, currently this is a ball of yarn.
-Label Preview loads but currently it does not line up correctly.

Fixes # (issue)

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • [x ] New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration

  • Test A
  • Test B

Test Configuration:

  • PHP version:
  • MySQL version
  • Webserver version
  • OS version

Checklist:

@what-the-diff
Copy link

what-the-diff bot commented Jun 13, 2024

PR Summary

  • Type Hint Addition in Helper Method
    A type hint ($srcUnit) was added to the convertUnit method within Helper.php. This update helps in communicating what kind of variable should be passed to this function, which further increases code reliability.

  • Inclusion of Label Template Model
    LabelTemplate model has been included in two label controller files. This indicates new functionalities associated with label templates are added to the system.

  • Search Functionality Enhancement
    The searching process within the Labels API controller has been improved, replacing the Label::find() with LabelTemplate::query().

  • Label and Labels Transformer Upgrades
    Updates occurred to transform labels that now work with the LabelTemplate model, offering more flexible label transformations.

  • Introduced a New Label Template Model
    A new model LabelTemplate.php was added, indicating the addition of a new data structure that supports further label functionality developments.

  • Label Orientation Detection Method Update
    Updates were made within the Label.php file to include a method (getOrientation) that identifies orientation based on label or tape dimensions.

  • Label PDF Preparation Update
    Modifications were made to the preparePDF method in two files which no longer require the $template parameter, indicating a simplification in PDF generation process.

  • Label Writing Enhancement
    The writerAll method was improved to use the LabelWriter class to create labels.

  • A New LabelWriter Model Added
    The addition of LabelWriter.php signals new features related to writing or generating labels completed.

  • Label Template Seeder Creation
    A seeder file was created for Label Templates, which will facilitate in initializing label templates with pre-defined data during local setup or deployment.

  • Commenting Out Code Blocks in Label Settings View
    Several blocks of code were commented out in the labels.blade.php file, likely as part of a process to deprecate or pause certain functionalities that aren't currently needed.

@probot-autolabeler probot-autolabeler bot added the dependencies Pull requests that update a dependency file label Jun 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

api backend dependencies Pull requests that update a dependency file frontend tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant