13 Commits

Author SHA1 Message Date
9a7b42dea5 Update .github/workflows/gemini-pr-review.yaml
Some checks failed
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 11s
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (pull_request) Successful in 9s
Gemini PR Review / Gemini PR Review (pull_request) Failing after 16s
Laravel Pint / pint (pull_request) Successful in 2m33s
Laravel Larastan / larastan (pull_request) Failing after 3m38s
2026-01-13 09:18:16 +00:00
0ce59ebe22 Merge pull request 'changed time in scheduler for invoice in transit' (#178) from ranjith-dev into master
All checks were successful
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 15s
Reviewed-on: #178
2026-01-08 04:26:24 +00:00
dhanabalan
053c07bcfb changed time in scheduler for invoice in transit
Some checks failed
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 12s
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (pull_request) Successful in 10s
Gemini PR Review / review (pull_request) Failing after 37s
Laravel Pint / pint (pull_request) Successful in 2m15s
Laravel Larastan / larastan (pull_request) Failing after 3m20s
2026-01-08 09:56:12 +05:30
c032cdc58d Merge pull request 'changed time in invoice in transit' (#177) from ranjith-dev into master
All checks were successful
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 14s
Reviewed-on: #177
2026-01-07 04:59:13 +00:00
dhanabalan
b09ed3481a changed time in invoice in transit
Some checks failed
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 11s
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (pull_request) Successful in 10s
Gemini PR Review / review (pull_request) Failing after 23s
Laravel Pint / pint (pull_request) Successful in 2m40s
Laravel Larastan / larastan (pull_request) Failing after 3m38s
2026-01-07 10:29:01 +05:30
4074374614 Merge pull request 'Added logic for columns missing invoice in transit' (#176) from ranjith-dev into master
All checks were successful
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 17s
Reviewed-on: #176
2026-01-07 03:59:10 +00:00
dhanabalan
c2d840d772 Added logic for columns missing invoice in transit
Some checks failed
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 11s
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (pull_request) Successful in 10s
Gemini PR Review / review (pull_request) Failing after 42s
Laravel Pint / pint (pull_request) Successful in 2m37s
Laravel Larastan / larastan (pull_request) Failing after 3m49s
2026-01-07 09:28:57 +05:30
15712c44b6 Merge pull request 'changed report time for invoice in transit' (#175) from ranjith-dev into master
All checks were successful
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 15s
Reviewed-on: #175
2026-01-07 02:52:28 +00:00
dhanabalan
119262405c changed report time for invoice in transit
Some checks failed
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 11s
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (pull_request) Successful in 12s
Gemini PR Review / review (pull_request) Failing after 33s
Laravel Pint / pint (pull_request) Successful in 2m5s
Laravel Larastan / larastan (pull_request) Failing after 3m11s
2026-01-07 08:21:52 +05:30
99f7450e5e Merge pull request 'changed logic in testing temp resource page' (#174) from ranjith-dev into master
All checks were successful
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 13s
Reviewed-on: #174
2026-01-06 13:48:37 +00:00
dhanabalan
84748c5e3d changed logic in testing temp resource page
Some checks failed
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 11s
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (pull_request) Successful in 11s
Gemini PR Review / review (pull_request) Failing after 23s
Laravel Pint / pint (pull_request) Successful in 3m49s
Laravel Larastan / larastan (pull_request) Failing after 4m51s
2026-01-06 19:18:22 +05:30
f6f6f0924e Merge pull request 'Added testing temp policy file' (#173) from ranjith-dev into master
All checks were successful
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 13s
Reviewed-on: #173
2026-01-06 13:28:27 +00:00
dhanabalan
4ec781b942 Added testing temp policy file
Some checks failed
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 15s
Gemini PR Review / review (pull_request) Failing after 26s
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (pull_request) Successful in 11s
Laravel Pint / pint (pull_request) Successful in 2m33s
Laravel Larastan / larastan (pull_request) Failing after 3m35s
2026-01-06 18:58:16 +05:30
4 changed files with 222 additions and 24 deletions

View File

@@ -5,15 +5,20 @@ 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 +27,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 +40,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
@@ -52,7 +62,6 @@ jobs:
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: |

View File

@@ -454,6 +454,22 @@ class InvoiceInTransitResource extends Resource
return; return;
} }
$mandatoryColumns = 23;
$firstRow = $rows[0] ?? [];
if (count($firstRow) < $mandatoryColumns) {
Notification::make()
->title('Invalid Excel Format')
->body('Few columns not found. Columns A to W are mandatory.')
->danger()
->persistent()
->send();
return;
}
foreach ($rows as $index => $row) foreach ($rows as $index => $row)
{ {
if ($index == 0) { if ($index == 0) {

View File

@@ -30,6 +30,19 @@ class TestingTempResource extends Resource
->schema([ ->schema([
Forms\Components\TextInput::make('name') Forms\Components\TextInput::make('name')
->label('File Name'), ->label('File Name'),
Forms\Components\Select::make('selected_file')
->label('Select Uploaded File')
->options(function () {
return collect(Storage::disk('local')->files('uploads'))
->mapWithKeys(function ($file) {
return [
$file => basename($file), // value => label
];
})
->toArray();
})
->searchable()
->reactive(),
Forms\Components\FileUpload::make('attachment') Forms\Components\FileUpload::make('attachment')
->label('Upload') ->label('Upload')
// ->acceptedFileTypes(['application/pdf']) // ->acceptedFileTypes(['application/pdf'])
@@ -41,6 +54,7 @@ class TestingTempResource extends Resource
Forms\Components\Actions::make([ Forms\Components\Actions::make([
Action::make('uploadNow') Action::make('uploadNow')
->label('File Upload') ->label('File Upload')
->color('success')
->action(function ($get) { ->action(function ($get) {
$uploadedFiles = $get('attachment'); $uploadedFiles = $get('attachment');
@@ -76,41 +90,94 @@ class TestingTempResource extends Resource
} }
}), }),
// Action::make('downloadAttachment')
// ->label('Download File')
// ->action(function ($get) {
// $fileName = basename($get('selected_file'));
// //dd($fileName);
// // if (!$fileName) {
// // Notification::make()
// // ->title('Enter file name to download')
// // ->danger()
// // ->send();
// // return;
// // }
// $files = Storage::disk('local')->files('uploads');
// foreach ($files as $file) {
// if (pathinfo($file, PATHINFO_FILENAME) === $fileName) {
// dd($fileName);
// Notification::make()
// ->title("File downloaded successfully")
// ->success()
// ->send();
// return response()->download(
// Storage::disk('local')->path($file)
// );
// }
// }
// // Notification::make()
// // ->title('File not found')
// // ->danger()
// // ->send();
// }),
Action::make('downloadAttachment') Action::make('downloadAttachment')
->label('Download File') ->label('Download File')
->action(function ($get) { ->action(function ($get) {
$fileName = $get('name'); $filePath = $get('selected_file'); // uploads/filename.pdf
if (!$fileName) {
Notification::make()
->title('Enter file name to download')
->danger()
->send();
return;
}
$files = Storage::disk('local')->files('uploads');
foreach ($files as $file) {
if (pathinfo($file, PATHINFO_FILENAME) === $fileName) {
Notification::make()
->title("File downloaded successfully")
->success()
->send();
return response()->download(
Storage::disk('local')->path($file)
);
}
}
if (!$filePath || !Storage::disk('local')->exists($filePath)) {
Notification::make() Notification::make()
->title('File not found') ->title('File not found')
->danger() ->danger()
->send(); ->send();
return;
}
Notification::make()
->title('File downloaded successfully')
->success()
->send();
return response()->download(
Storage::disk('local')->path($filePath)
);
}), }),
Action::make('deleteAttachment')
->label('Delete File')
->color('danger')
->requiresConfirmation()
->action(function ($get) {
$filePath = $get('selected_file'); // uploads/filename.pdf
if (!$filePath || !Storage::disk('local')->exists($filePath)) {
Notification::make()
->title('File not found')
->danger()
->send();
return;
}
Storage::disk('local')->delete($filePath);
Notification::make()
->title('File deleted successfully')
->success()
->send();
}),
]), ]),
Forms\Components\Hidden::make('created_by') Forms\Components\Hidden::make('created_by')
->label('Created By') ->label('Created By')

View File

@@ -0,0 +1,106 @@
<?php
namespace App\Policies;
use Illuminate\Auth\Access\Response;
use App\Models\TestingTemp;
use App\Models\User;
class TestingTempPolicy
{
/**
* Determine whether the user can view any models.
*/
public function viewAny(User $user): bool
{
return $user->checkPermissionTo('view-any TestingTemp');
}
/**
* Determine whether the user can view the model.
*/
public function view(User $user, TestingTemp $testingtemp): bool
{
return $user->checkPermissionTo('view TestingTemp');
}
/**
* Determine whether the user can create models.
*/
public function create(User $user): bool
{
return $user->checkPermissionTo('create TestingTemp');
}
/**
* Determine whether the user can update the model.
*/
public function update(User $user, TestingTemp $testingtemp): bool
{
return $user->checkPermissionTo('update TestingTemp');
}
/**
* Determine whether the user can delete the model.
*/
public function delete(User $user, TestingTemp $testingtemp): bool
{
return $user->checkPermissionTo('delete TestingTemp');
}
/**
* Determine whether the user can delete any models.
*/
public function deleteAny(User $user): bool
{
return $user->checkPermissionTo('delete-any TestingTemp');
}
/**
* Determine whether the user can restore the model.
*/
public function restore(User $user, TestingTemp $testingtemp): bool
{
return $user->checkPermissionTo('restore TestingTemp');
}
/**
* Determine whether the user can restore any models.
*/
public function restoreAny(User $user): bool
{
return $user->checkPermissionTo('restore-any TestingTemp');
}
/**
* Determine whether the user can replicate the model.
*/
public function replicate(User $user, TestingTemp $testingtemp): bool
{
return $user->checkPermissionTo('replicate TestingTemp');
}
/**
* Determine whether the user can reorder the models.
*/
public function reorder(User $user): bool
{
return $user->checkPermissionTo('reorder TestingTemp');
}
/**
* Determine whether the user can permanently delete the model.
*/
public function forceDelete(User $user, TestingTemp $testingtemp): bool
{
return $user->checkPermissionTo('force-delete TestingTemp');
}
/**
* Determine whether the user can permanently delete any models.
*/
public function forceDeleteAny(User $user): bool
{
return $user->checkPermissionTo('force-delete-any TestingTemp');
}
}