Compare commits
41 Commits
revert-fix
...
c9c7c38088
| Author | SHA1 | Date | |
|---|---|---|---|
| c9c7c38088 | |||
|
|
31bc4a7fd0 | ||
| 90cfe9ef0d | |||
|
|
2b52a6e542 | ||
| aa806f2fe3 | |||
|
|
15374002f1 | ||
| 0eb6f76ca6 | |||
|
|
0ef8ba73cc | ||
| 73366ccd70 | |||
|
|
8446282856 | ||
| acbecedce9 | |||
|
|
cac8cdd7ce | ||
| 614d89932b | |||
|
|
2a7db20796 | ||
| c839c6fdbc | |||
|
|
08aaccf1b8 | ||
| d9445a9d4b | |||
|
|
6f77f8ecbc | ||
| 50476c8a2c | |||
|
|
7f55378541 | ||
| c57cfe71ca | |||
|
|
9040f094c1 | ||
| 96c08c34c1 | |||
|
|
ec98c9b2ce | ||
| 19cf7c8edd | |||
|
|
acf326c6ca | ||
| 66086dd2d7 | |||
|
|
e082d5bb49 | ||
| 5da724c9a4 | |||
|
|
e6276378f8 | ||
| 6b723c0929 | |||
|
|
71e8c29801 | ||
| 8e20d0732d | |||
|
|
2524ad4620 | ||
| 1d8fb1c9aa | |||
|
|
a85faafe90 | ||
| 33bbce47ba | |||
|
|
03033c2365 | ||
| 860ff96134 | |||
|
|
31a4e10158 | ||
| f12856f1a3 |
33
.github/workflows/gemini-pr-review.yaml
vendored
33
.github/workflows/gemini-pr-review.yaml
vendored
@@ -1,19 +1,23 @@
|
|||||||
# Filename: .github/workflows/gemini-pr-review.yaml
|
# Filename: .github/workflows/gemini-pr-review.yaml
|
||||||
|
|
||||||
name: Gemini PR Review
|
name: Gemini PR Review
|
||||||
|
|
||||||
on:
|
on:
|
||||||
pull_request:
|
pull_request:
|
||||||
types: [opened, reopened, synchronize]
|
types: [opened, reopened, synchronize]
|
||||||
|
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
|
|
||||||
|
concurrency:
|
||||||
|
group: ${{ github.workflow }}-${{ github.ref }}
|
||||||
|
cancel-in-progress: true
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
review:
|
gemini-pr-review:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
name: Gemini PR Review
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout code
|
- name: Checkout code
|
||||||
uses: actions/checkout@v5
|
uses: actions/checkout@v6
|
||||||
with:
|
with:
|
||||||
fetch-depth: 0 # This fetches the full history
|
fetch-depth: 0 # This fetches the full history
|
||||||
|
|
||||||
@@ -22,7 +26,6 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
node-version: '24'
|
node-version: '24'
|
||||||
|
|
||||||
|
|
||||||
- name: Get npm cache directory
|
- name: Get npm cache directory
|
||||||
id: npm-cache-dir
|
id: npm-cache-dir
|
||||||
run: |
|
run: |
|
||||||
@@ -36,8 +39,14 @@ jobs:
|
|||||||
restore-keys: |
|
restore-keys: |
|
||||||
${{ runner.os }}-npm-global-
|
${{ runner.os }}-npm-global-
|
||||||
|
|
||||||
- name: Install Gemini CLI globally
|
- name: Install Gemini CLI globally (if not already installed)
|
||||||
run: npm install -g --loglevel=http @google/gemini-cli
|
run: |
|
||||||
|
if ! command -v gemini &> /dev/null; then
|
||||||
|
echo "Gemini CLI not found, installing..."
|
||||||
|
npm install -g --loglevel=http @google/gemini-cli
|
||||||
|
else
|
||||||
|
echo "Gemini CLI already installed."
|
||||||
|
fi
|
||||||
|
|
||||||
- name: Generate git diff and review with Gemini
|
- name: Generate git diff and review with Gemini
|
||||||
id: review
|
id: review
|
||||||
@@ -48,11 +57,17 @@ jobs:
|
|||||||
git diff "${{ gitea.event.pull_request.base.sha }}...${{ gitea.event.pull_request.head.sha }}" > pr.diff
|
git diff "${{ gitea.event.pull_request.base.sha }}...${{ gitea.event.pull_request.head.sha }}" > pr.diff
|
||||||
|
|
||||||
echo "Performing code review with Gemini..."
|
echo "Performing code review with Gemini..."
|
||||||
cat .github/workflows/gemini-pr-review.md pr.diff | gemini > /tmp/gemini-output.txt
|
if cat .github/workflows/gemini-pr-review.md pr.diff | gemini --model=gemini-pro > /tmp/gemini-output.txt; then
|
||||||
|
echo "Gemini review completed."
|
||||||
|
else
|
||||||
|
echo "⚠️ Gemini review failed (quota / API issue)." > /tmp/gemini-output.txt
|
||||||
|
echo "" >> /tmp/gemini-output.txt
|
||||||
|
echo "Check logs for details." >> /tmp/gemini-output.txt
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "Gemini error logs (if any):"
|
||||||
cat /tmp/gemini-client-error*.json || true
|
cat /tmp/gemini-client-error*.json || true
|
||||||
|
|
||||||
|
|
||||||
- name: Post output to PR comment
|
- name: Post output to PR comment
|
||||||
id: post_comment
|
id: post_comment
|
||||||
run: |
|
run: |
|
||||||
|
|||||||
@@ -26,6 +26,8 @@ class ProductionRejectReason extends Page
|
|||||||
{
|
{
|
||||||
protected static ?string $navigationIcon = 'heroicon-o-document-text';
|
protected static ?string $navigationIcon = 'heroicon-o-document-text';
|
||||||
|
|
||||||
|
protected static ?string $navigationGroup = 'Production Reject';
|
||||||
|
|
||||||
protected static string $view = 'filament.pages.production-reject-reason';
|
protected static string $view = 'filament.pages.production-reject-reason';
|
||||||
|
|
||||||
public $qrData, $pId, $bId, $sId, $lId, $iId, $succId, $sNoId, $succStat, $recQr, $prodOrder;
|
public $qrData, $pId, $bId, $sId, $lId, $iId, $succId, $sNoId, $succStat, $recQr, $prodOrder;
|
||||||
|
|||||||
@@ -35,6 +35,8 @@ class WebcamCapture extends Page implements HasForms
|
|||||||
use HasFiltersForm;
|
use HasFiltersForm;
|
||||||
protected static ?string $navigationIcon = 'heroicon-o-document-text';
|
protected static ?string $navigationIcon = 'heroicon-o-document-text';
|
||||||
|
|
||||||
|
protected static ?string $navigationGroup = 'OCR Validations';
|
||||||
|
|
||||||
protected static string $view = 'filament.pages.webcam-capture';
|
protected static string $view = 'filament.pages.webcam-capture';
|
||||||
|
|
||||||
public $photo;
|
public $photo;
|
||||||
|
|||||||
@@ -25,6 +25,8 @@ class ClassCharacteristicResource extends Resource
|
|||||||
|
|
||||||
protected static ?string $navigationIcon = 'heroicon-o-rectangle-stack';
|
protected static ?string $navigationIcon = 'heroicon-o-rectangle-stack';
|
||||||
|
|
||||||
|
protected static ?string $navigationGroup = 'Laser';
|
||||||
|
|
||||||
public static function form(Form $form): Form
|
public static function form(Form $form): Form
|
||||||
{
|
{
|
||||||
return $form
|
return $form
|
||||||
|
|||||||
@@ -39,6 +39,8 @@ class GrMasterResource extends Resource
|
|||||||
|
|
||||||
protected static ?string $navigationIcon = 'heroicon-o-rectangle-stack';
|
protected static ?string $navigationIcon = 'heroicon-o-rectangle-stack';
|
||||||
|
|
||||||
|
protected static ?string $navigationGroup = 'Process Order';
|
||||||
|
|
||||||
public static function form(Form $form): Form
|
public static function form(Form $form): Form
|
||||||
{
|
{
|
||||||
return $form
|
return $form
|
||||||
|
|||||||
@@ -32,6 +32,8 @@ class OcrValidationResource extends Resource
|
|||||||
|
|
||||||
protected static ?string $navigationIcon = 'heroicon-o-rectangle-stack';
|
protected static ?string $navigationIcon = 'heroicon-o-rectangle-stack';
|
||||||
|
|
||||||
|
protected static ?string $navigationGroup = 'OCR Validations';
|
||||||
|
|
||||||
public $camera_capture;
|
public $camera_capture;
|
||||||
public $serialNumbers = [];
|
public $serialNumbers = [];
|
||||||
|
|
||||||
|
|||||||
@@ -29,6 +29,8 @@ class ProductCharacteristicsMasterResource extends Resource
|
|||||||
|
|
||||||
protected static ?string $navigationIcon = 'heroicon-o-rectangle-stack';
|
protected static ?string $navigationIcon = 'heroicon-o-rectangle-stack';
|
||||||
|
|
||||||
|
protected static ?string $navigationGroup = 'Process Order';
|
||||||
|
|
||||||
public static function form(Form $form): Form
|
public static function form(Form $form): Form
|
||||||
{
|
{
|
||||||
return $form
|
return $form
|
||||||
|
|||||||
@@ -36,6 +36,8 @@ class RejectReasonResource extends Resource
|
|||||||
|
|
||||||
protected static ?string $navigationIcon = 'heroicon-o-rectangle-stack';
|
protected static ?string $navigationIcon = 'heroicon-o-rectangle-stack';
|
||||||
|
|
||||||
|
protected static ?string $navigationGroup = 'Production Reject';
|
||||||
|
|
||||||
public static function form(Form $form): Form
|
public static function form(Form $form): Form
|
||||||
{
|
{
|
||||||
return $form
|
return $form
|
||||||
|
|||||||
@@ -25,6 +25,10 @@ class StickerMappingMasterResource extends Resource
|
|||||||
|
|
||||||
protected static ?string $navigationIcon = 'heroicon-o-rectangle-stack';
|
protected static ?string $navigationIcon = 'heroicon-o-rectangle-stack';
|
||||||
|
|
||||||
|
protected static ?string $navigationGroup = 'Master Entries';
|
||||||
|
|
||||||
|
protected static ?int $navigationSort = 16;
|
||||||
|
|
||||||
public static function form(Form $form): Form
|
public static function form(Form $form): Form
|
||||||
{
|
{
|
||||||
return $form
|
return $form
|
||||||
|
|||||||
@@ -26,6 +26,8 @@ class StickerPrintingResource extends Resource
|
|||||||
|
|
||||||
protected static ?string $navigationIcon = 'heroicon-o-rectangle-stack';
|
protected static ?string $navigationIcon = 'heroicon-o-rectangle-stack';
|
||||||
|
|
||||||
|
protected static ?string $navigationGroup = 'Sticker Reprint';
|
||||||
|
|
||||||
public static function form(Form $form): Form
|
public static function form(Form $form): Form
|
||||||
{
|
{
|
||||||
return $form
|
return $form
|
||||||
|
|||||||
201
app/Filament/Resources/StickerStructureDetailResource.php
Normal file
201
app/Filament/Resources/StickerStructureDetailResource.php
Normal file
@@ -0,0 +1,201 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Filament\Resources;
|
||||||
|
|
||||||
|
use App\Filament\Exports\StickerStructureDetailExporter;
|
||||||
|
use App\Filament\Imports\StickerStructureDetailImporter;
|
||||||
|
use App\Filament\Resources\StickerStructureDetailResource\Pages;
|
||||||
|
use App\Filament\Resources\StickerStructureDetailResource\RelationManagers;
|
||||||
|
use App\Models\StickerStructureDetail;
|
||||||
|
use Filament\Facades\Filament;
|
||||||
|
use Filament\Forms;
|
||||||
|
use Filament\Forms\Form;
|
||||||
|
use Filament\Resources\Resource;
|
||||||
|
use Filament\Tables;
|
||||||
|
use Filament\Tables\Table;
|
||||||
|
use Illuminate\Database\Eloquent\Builder;
|
||||||
|
use Illuminate\Database\Eloquent\SoftDeletingScope;
|
||||||
|
use Filament\Forms\Components\Actions\Action;
|
||||||
|
use Illuminate\Support\HtmlString;
|
||||||
|
use Filament\Forms\Components\Html;
|
||||||
|
use Filament\Forms\Get;
|
||||||
|
use Filament\Tables\Actions\ExportAction;
|
||||||
|
use Filament\Tables\Actions\ImportAction;
|
||||||
|
|
||||||
|
class StickerStructureDetailResource extends Resource
|
||||||
|
{
|
||||||
|
protected static ?string $model = StickerStructureDetail::class;
|
||||||
|
|
||||||
|
protected static ?string $navigationIcon = 'heroicon-o-rectangle-stack';
|
||||||
|
|
||||||
|
protected static ?string $navigationGroup = 'Customized Sticker Printing';
|
||||||
|
|
||||||
|
public static function form(Form $form): Form
|
||||||
|
{
|
||||||
|
return $form
|
||||||
|
->schema([
|
||||||
|
Forms\Components\TextInput::make('sticker_id')
|
||||||
|
->label('Sticker ID')
|
||||||
|
->reactive()
|
||||||
|
->required()
|
||||||
|
->afterStateUpdated(function ($state, callable $set) {
|
||||||
|
//\Log::info('Sticker ID typed:', ['sticker_id' => $state]);
|
||||||
|
$set('sticker_id_live', $state);
|
||||||
|
}),
|
||||||
|
Forms\Components\TextInput::make('sticker_width')
|
||||||
|
->label('Sticker Width')
|
||||||
|
->required(),
|
||||||
|
Forms\Components\TextInput::make('sticker_height')
|
||||||
|
->label('Sticker Height')
|
||||||
|
->required(),
|
||||||
|
Forms\Components\TextInput::make('sticker_lmargin')
|
||||||
|
->label('Sticker Left Margin')
|
||||||
|
->required(),
|
||||||
|
Forms\Components\TextInput::make('sticker_rmargin')
|
||||||
|
->label('Sticker Right Margin')
|
||||||
|
->required(),
|
||||||
|
Forms\Components\TextInput::make('sticker_tmargin')
|
||||||
|
->label('Sticker Top Margin')
|
||||||
|
->required(),
|
||||||
|
Forms\Components\TextInput::make('sticker_bmargin')
|
||||||
|
->label('Sticker Bottom Margin')
|
||||||
|
->required(),
|
||||||
|
Forms\Components\Hidden::make('created_by')
|
||||||
|
->label('Created By')
|
||||||
|
->default(Filament::auth()->user()?->name),
|
||||||
|
Forms\Components\Hidden::make('updated_by')
|
||||||
|
->label('Updated By')
|
||||||
|
->default(Filament::auth()->user()?->name),
|
||||||
|
Forms\Components\TextInput::make('sticker_id_live')
|
||||||
|
->default(fn ($get) => $get('sticker_id'))
|
||||||
|
->reactive()
|
||||||
|
->afterStateUpdated(function ($state, callable $set) {
|
||||||
|
\Log::info('Sticker ID Live:', ['sticker_id_live' => $state]);
|
||||||
|
$set('sticker_id_live', $state);
|
||||||
|
}),
|
||||||
|
Forms\Components\ViewField::make('generate_template')
|
||||||
|
->view('fields.generate-template')
|
||||||
|
->reactive()
|
||||||
|
->key(fn ($get) => 'generate-template' . ($get('sticker_id_live') ?? 'empty'))
|
||||||
|
->viewData(fn (Get $get) => [
|
||||||
|
'sticker_id' => $get('sticker_id_live') ?? 'empty',
|
||||||
|
])
|
||||||
|
// ->extraAttributes([
|
||||||
|
// // Pass the current sticker_id typed by the user
|
||||||
|
// //'sticker_id' => fn ($get) => $get('sticker_id'),
|
||||||
|
|
||||||
|
// 'sticker_id' => fn ($get) => $get('sticker_id') ?? 'empty',
|
||||||
|
|
||||||
|
|
||||||
|
// // 'sticker_id' => function ($get) {
|
||||||
|
// // \Log::info('ViewField closure executed');
|
||||||
|
|
||||||
|
// // $stickerId = $get('sticker_id');
|
||||||
|
|
||||||
|
// // // Use Laravel log to see value in real time
|
||||||
|
// // \Log::info('Sticker ID in ViewField:', $stickerId);
|
||||||
|
|
||||||
|
// // // You can also temporarily dd(), but it will stop form render
|
||||||
|
// // // dd($stickerId);
|
||||||
|
|
||||||
|
// // return $stickerId;
|
||||||
|
// // },
|
||||||
|
// ]),
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static function table(Table $table): Table
|
||||||
|
{
|
||||||
|
return $table
|
||||||
|
->columns([
|
||||||
|
Tables\Columns\TextColumn::make('id')
|
||||||
|
->label('ID')
|
||||||
|
->numeric()
|
||||||
|
->sortable(),
|
||||||
|
Tables\Columns\TextColumn::make('sticker_id')
|
||||||
|
->label('Sticker ID'),
|
||||||
|
Tables\Columns\TextColumn::make('sticker_width')
|
||||||
|
->label('Sticker Width'),
|
||||||
|
Tables\Columns\TextColumn::make('sticker_height')
|
||||||
|
->label('Sticker Height'),
|
||||||
|
Tables\Columns\TextColumn::make('sticker_lmargin')
|
||||||
|
->label('Sticker Left Margin'),
|
||||||
|
Tables\Columns\TextColumn::make('sticker_rmargin')
|
||||||
|
->label('Sticker Right Margin'),
|
||||||
|
Tables\Columns\TextColumn::make('sticker_tmargin')
|
||||||
|
->label('Sticker Top Margin'),
|
||||||
|
Tables\Columns\TextColumn::make('sticker_bmargin')
|
||||||
|
->label('Sticker Bottom Margin'),
|
||||||
|
Tables\Columns\TextColumn::make('created_at')
|
||||||
|
->label('Created At')
|
||||||
|
->dateTime()
|
||||||
|
->sortable()
|
||||||
|
->toggleable(isToggledHiddenByDefault: true),
|
||||||
|
Tables\Columns\TextColumn::make('updated_at')
|
||||||
|
->label('Updated At')
|
||||||
|
->dateTime()
|
||||||
|
->sortable()
|
||||||
|
->toggleable(isToggledHiddenByDefault: true),
|
||||||
|
Tables\Columns\TextColumn::make('deleted_at')
|
||||||
|
->label('Deleted At')
|
||||||
|
->dateTime()
|
||||||
|
->sortable()
|
||||||
|
->toggleable(isToggledHiddenByDefault: true),
|
||||||
|
])
|
||||||
|
->filters([
|
||||||
|
Tables\Filters\TrashedFilter::make(),
|
||||||
|
])
|
||||||
|
->actions([
|
||||||
|
Tables\Actions\ViewAction::make(),
|
||||||
|
Tables\Actions\EditAction::make(),
|
||||||
|
])
|
||||||
|
->bulkActions([
|
||||||
|
Tables\Actions\BulkActionGroup::make([
|
||||||
|
Tables\Actions\DeleteBulkAction::make(),
|
||||||
|
Tables\Actions\ForceDeleteBulkAction::make(),
|
||||||
|
Tables\Actions\RestoreBulkAction::make(),
|
||||||
|
]),
|
||||||
|
])
|
||||||
|
->headerActions([
|
||||||
|
ImportAction::make()
|
||||||
|
->label('Import Sticker Structure Details')
|
||||||
|
->color('warning')
|
||||||
|
->importer(StickerStructureDetailImporter::class)
|
||||||
|
->visible(function() {
|
||||||
|
return Filament::auth()->user()->can('view import sticker structure details');
|
||||||
|
}),
|
||||||
|
ExportAction::make()
|
||||||
|
->label('Export Sticker Structure Details')
|
||||||
|
->color('warning')
|
||||||
|
->exporter(StickerStructureDetailExporter::class)
|
||||||
|
->visible(function() {
|
||||||
|
return Filament::auth()->user()->can('view export sticker structure details');
|
||||||
|
}),
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static function getRelations(): array
|
||||||
|
{
|
||||||
|
return [
|
||||||
|
//
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
||||||
|
public static function getPages(): array
|
||||||
|
{
|
||||||
|
return [
|
||||||
|
'index' => Pages\ListStickerStructureDetails::route('/'),
|
||||||
|
'create' => Pages\CreateStickerStructureDetail::route('/create'),
|
||||||
|
'view' => Pages\ViewStickerStructureDetail::route('/{record}'),
|
||||||
|
'edit' => Pages\EditStickerStructureDetail::route('/{record}/edit'),
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
||||||
|
public static function getEloquentQuery(): Builder
|
||||||
|
{
|
||||||
|
return parent::getEloquentQuery()
|
||||||
|
->withoutGlobalScopes([
|
||||||
|
SoftDeletingScope::class,
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,12 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Filament\Resources\StickerStructureDetailResource\Pages;
|
||||||
|
|
||||||
|
use App\Filament\Resources\StickerStructureDetailResource;
|
||||||
|
use Filament\Actions;
|
||||||
|
use Filament\Resources\Pages\CreateRecord;
|
||||||
|
|
||||||
|
class CreateStickerStructureDetail extends CreateRecord
|
||||||
|
{
|
||||||
|
protected static string $resource = StickerStructureDetailResource::class;
|
||||||
|
}
|
||||||
@@ -0,0 +1,22 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Filament\Resources\StickerStructureDetailResource\Pages;
|
||||||
|
|
||||||
|
use App\Filament\Resources\StickerStructureDetailResource;
|
||||||
|
use Filament\Actions;
|
||||||
|
use Filament\Resources\Pages\EditRecord;
|
||||||
|
|
||||||
|
class EditStickerStructureDetail extends EditRecord
|
||||||
|
{
|
||||||
|
protected static string $resource = StickerStructureDetailResource::class;
|
||||||
|
|
||||||
|
protected function getHeaderActions(): array
|
||||||
|
{
|
||||||
|
return [
|
||||||
|
Actions\ViewAction::make(),
|
||||||
|
Actions\DeleteAction::make(),
|
||||||
|
Actions\ForceDeleteAction::make(),
|
||||||
|
Actions\RestoreAction::make(),
|
||||||
|
];
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,19 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Filament\Resources\StickerStructureDetailResource\Pages;
|
||||||
|
|
||||||
|
use App\Filament\Resources\StickerStructureDetailResource;
|
||||||
|
use Filament\Actions;
|
||||||
|
use Filament\Resources\Pages\ListRecords;
|
||||||
|
|
||||||
|
class ListStickerStructureDetails extends ListRecords
|
||||||
|
{
|
||||||
|
protected static string $resource = StickerStructureDetailResource::class;
|
||||||
|
|
||||||
|
protected function getHeaderActions(): array
|
||||||
|
{
|
||||||
|
return [
|
||||||
|
Actions\CreateAction::make(),
|
||||||
|
];
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,19 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Filament\Resources\StickerStructureDetailResource\Pages;
|
||||||
|
|
||||||
|
use App\Filament\Resources\StickerStructureDetailResource;
|
||||||
|
use Filament\Actions;
|
||||||
|
use Filament\Resources\Pages\ViewRecord;
|
||||||
|
|
||||||
|
class ViewStickerStructureDetail extends ViewRecord
|
||||||
|
{
|
||||||
|
protected static string $resource = StickerStructureDetailResource::class;
|
||||||
|
|
||||||
|
protected function getHeaderActions(): array
|
||||||
|
{
|
||||||
|
return [
|
||||||
|
Actions\EditAction::make(),
|
||||||
|
];
|
||||||
|
}
|
||||||
|
}
|
||||||
26
app/Models/StickerStructureDetail.php
Normal file
26
app/Models/StickerStructureDetail.php
Normal file
@@ -0,0 +1,26 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Models;
|
||||||
|
|
||||||
|
use Illuminate\Database\Eloquent\Model;
|
||||||
|
use Illuminate\Database\Eloquent\SoftDeletes;
|
||||||
|
|
||||||
|
class StickerStructureDetail extends Model
|
||||||
|
{
|
||||||
|
|
||||||
|
use SoftDeletes;
|
||||||
|
|
||||||
|
protected $fillable = [
|
||||||
|
'sticker_id',
|
||||||
|
'sticker_width',
|
||||||
|
'sticker_height',
|
||||||
|
'sticker_lmargin',
|
||||||
|
'sticker_rmargin',
|
||||||
|
'sticker_tmargin',
|
||||||
|
'sticker_bmargin',
|
||||||
|
'created_at',
|
||||||
|
'updated_at',
|
||||||
|
'created_by',
|
||||||
|
'updated_by'
|
||||||
|
];
|
||||||
|
}
|
||||||
@@ -18,6 +18,8 @@ return new class extends Migration
|
|||||||
identification1 TEXT DEFAULT NULL,
|
identification1 TEXT DEFAULT NULL,
|
||||||
identification2 TEXT DEFAULT NULL,
|
identification2 TEXT DEFAULT NULL,
|
||||||
identification3 TEXT DEFAULT NULL,
|
identification3 TEXT DEFAULT NULL,
|
||||||
|
contact_number TEXT DEFAULT NULL,
|
||||||
|
alternate_number TEXT DEFAULT NULL,
|
||||||
created_at TIMESTAMP NOT NULL DEFAULT NOW(),
|
created_at TIMESTAMP NOT NULL DEFAULT NOW(),
|
||||||
updated_at TIMESTAMP NOT NULL DEFAULT NOW(),
|
updated_at TIMESTAMP NOT NULL DEFAULT NOW(),
|
||||||
created_by TEXT DEFAULT NULL,
|
created_by TEXT DEFAULT NULL,
|
||||||
|
|||||||
@@ -0,0 +1,42 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
use Illuminate\Database\Migrations\Migration;
|
||||||
|
use Illuminate\Database\Schema\Blueprint;
|
||||||
|
use Illuminate\Support\Facades\Schema;
|
||||||
|
|
||||||
|
return new class extends Migration
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Run the migrations.
|
||||||
|
*/
|
||||||
|
public function up(): void
|
||||||
|
{
|
||||||
|
$sql = <<<'SQL'
|
||||||
|
CREATE TABLE sticker_structure_details (
|
||||||
|
id BIGINT GENERATED always AS IDENTITY PRIMARY KEY,
|
||||||
|
sticker_id TEXT,
|
||||||
|
sticker_width TEXT,
|
||||||
|
sticker_height TEXT,
|
||||||
|
sticker_lmargin TEXT,
|
||||||
|
sticker_rmargin TEXT,
|
||||||
|
sticker_tmargin TEXT,
|
||||||
|
sticker_bmargin TEXT,
|
||||||
|
|
||||||
|
created_at TIMESTAMP NOT NULL DEFAULT NOW(),
|
||||||
|
updated_at TIMESTAMP NOT NULL DEFAULT NOW(),
|
||||||
|
created_by TEXT DEFAULT NULL,
|
||||||
|
updated_by TEXT DEFAULT NULL,
|
||||||
|
deleted_at TIMESTAMP
|
||||||
|
);
|
||||||
|
SQL;
|
||||||
|
DB::statement($sql);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Reverse the migrations.
|
||||||
|
*/
|
||||||
|
public function down(): void
|
||||||
|
{
|
||||||
|
Schema::dropIfExists('sticker_structure_details');
|
||||||
|
}
|
||||||
|
};
|
||||||
Reference in New Issue
Block a user