Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

operation_module_code_clean #3751

Merged
merged 29 commits into from
Jan 9, 2025
Merged
Show file tree
Hide file tree
Changes from 20 commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
fe16764
operation_module_code_clean
SagarZeddlabz Dec 11, 2024
7b9b2ee
updated
sagar1862000 Dec 12, 2024
ca3f5fe
issues resolved
sagar1862000 Dec 12, 2024
7a2bb34
migration issue
sagar1862000 Dec 12, 2024
b98ade0
m
sagar1862000 Dec 12, 2024
d48a2de
M
sagar1862000 Dec 12, 2024
d5a0f5a
M
sagar1862000 Dec 12, 2024
a8405a9
indentation error solved
sagar1862000 Dec 12, 2024
99da9e1
indentation error solved
sagar1862000 Dec 12, 2024
1813038
imports related error solved
sagar1862000 Dec 12, 2024
933e3d0
imports related error solved
sagar1862000 Dec 12, 2024
fd1045d
imports related error solved
sagar1862000 Dec 12, 2024
e39eb25
homeController related error solved
sagar1862000 Dec 12, 2024
d983b40
office location cleanups in user modules
rathorevaibhav Dec 24, 2024
fd9e7d4
more cleanups
rathorevaibhav Dec 27, 2024
d8ad8aa
reverted unnecssary change
rathorevaibhav Dec 27, 2024
220849a
updated composer
rathorevaibhav Dec 27, 2024
107fa24
updated composer
rathorevaibhav Dec 27, 2024
6ee2d98
added packge in require-dev
rathorevaibhav Dec 27, 2024
e02b973
phpcsfixer addition
rathorevaibhav Jan 9, 2025
b3c16cf
ci updates
rathorevaibhav Jan 9, 2025
1280e6a
fully_qualified_strict_types set to false
rathorevaibhav Jan 9, 2025
ea771b4
ci fixes
rathorevaibhav Jan 9, 2025
2b31556
phpcs fixer
rathorevaibhav Jan 9, 2025
a22c28e
other ci fixes
rathorevaibhav Jan 9, 2025
44a06bb
psr12
rathorevaibhav Jan 9, 2025
eb47b95
all fixes
rathorevaibhav Jan 9, 2025
a5571d4
migration fixes
rathorevaibhav Jan 9, 2025
db46c19
coderabbit fix
rathorevaibhav Jan 9, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/coding-standards.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,4 @@ jobs:
- name: clear cache
run: php artisan cache:clear
- name: ColoredCowLaravelCI
run: "php artisan check:ci --with-tty"
run: php artisan check:ci --with-tty
4 changes: 4 additions & 0 deletions .php-cs-fixer.php
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,10 @@
'normalize_index_brace' => true,
'not_operator_with_successor_space' => true,
'object_operator_without_whitespace' => true,
'phpdoc_no_alias_tag' => true,
'phpdoc_align' => [
'tags' => ['param', 'return', 'throws', 'type'],
],
'phpdoc_indent' => true,
'phpdoc_no_access' => true,
'phpdoc_no_package' => true,
Expand Down
6 changes: 0 additions & 6 deletions Modules/CodeTrek/Entities/CodeTrekApplicant.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\SoftDeletes;
use Modules\CodeTrek\Database\factories\CodeTrekApplicantFactory;
use Modules\Operations\Entities\OfficeLocation;
use Modules\User\Entities\User;

class CodeTrekApplicant extends Model
Expand All @@ -25,11 +24,6 @@ public static function factory()
return new CodeTrekApplicantFactory();
}

public function center()
{
return $this->belongsTo(OfficeLocation::class, 'center_id');
}

public function getDaysInCodetrekAttribute()
{
$internshipStartDate = Carbon::parse($this->internship_start_date);
Expand Down
7 changes: 1 addition & 6 deletions Modules/CodeTrek/Http/Controllers/CodeTrekController.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
use Modules\CodeTrek\Entities\CodeTrekApplicant;
use Modules\CodeTrek\Http\Requests\CodeTrekRequest;
use Modules\CodeTrek\Services\CodeTrekService;
use Modules\Operations\Entities\OfficeLocation;
use Modules\User\Entities\User;

class CodeTrekController extends Controller
Expand All @@ -28,7 +27,6 @@ public function index(Request $request)
{
// $this->authorize('view', $applicant); There are some issues in the production, which is why these lines are commented out.

$centres = OfficeLocation::all();
$mentors = User::all();
$applicantData = $this->service->getCodeTrekApplicants($request->all());
$applicants = $applicantData['applicants'];
Expand All @@ -41,7 +39,6 @@ public function index(Request $request)

return view('codetrek::index', [
'applicants' => $applicants,
'centres' => $centres,
'mentors' => $mentors,
'reportApplicationCounts' => $reportApplicationCounts,
'statusCounts' => $statusCounts,
Expand Down Expand Up @@ -78,12 +75,10 @@ public function edit(CodeTrekApplicant $applicant)
{
// $this->authorize('update', $applicant); There are some issues in the production, which is why these lines are commented out.

$centres = OfficeLocation::all();

$mentors = User::all();
$this->service->edit($applicant);

return view('codetrek::edit', ['applicant' => $applicant, 'centres' => $centres, 'mentors' => $mentors]);
return view('codetrek::edit', ['applicant' => $applicant, 'mentors' => $mentors]);
}
public function evaluate(CodeTrekApplicant $applicant)
{
Expand Down
13 changes: 2 additions & 11 deletions Modules/CodeTrek/Resources/views/edit.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@
@section('content')

<div class="container" id="update_details">
<div class="card-body">
<div class="card-body">
<form action="{{route('codetrek.update', $applicant)}}" method="POST" id='updateForm' enctype="multipart/form-data">
@csrf
<input type="hidden" name="codetrek" value="applicant->id">
<div class="card-body">
<h4 class="mb-3 font-weight-bold">Edit Applicant information</h4>
<h4 class="mb-3 font-weight-bold">Edit Applicant Information</h4>
@if ($errors->any())
<div class="alert alert-danger">
<ul>
Expand Down Expand Up @@ -71,15 +71,6 @@
@endfor
</select>
</div>
<div class="form-group offset-md-1 col-md-5">
<label for="centre" class="field-required">Centre Name</label>
<select name="centre" id="centreId" class="form-control" required>
<option value="">Select Centre Name</option>
@foreach($centres as $centre)
<option value="{{ $centre->id }}" {{ $applicant->centre_id == $centre->id ? 'selected' : '' }}>{{ $centre->centre_name }}</option>
@endforeach
</select>
</div>
</div>
<div class="form-row">
<div class="form-group col-md-5">
Expand Down
20 changes: 10 additions & 10 deletions Modules/CodeTrek/Resources/views/index.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
<div>
<form action="{{ route('codetrek.index') }}" id="centreFilterForm">
<div class="form-group ml-25 w-180">
@can('codetrek_applicant.create')
@can('codetrek_applicant.create')
<select class="form-control bg-light" name="centre" id="centre" onchange="document.getElementById('centreFilterForm').submit();">
<option value="" {{ !request()->has('centre') || empty(request()->get('centre')) ? 'selected' : '' }}>
{!! __('All Centres') !!}
Expand Down Expand Up @@ -83,7 +83,7 @@
<span class="d-inline-block h-18 w-20">{!! file_get_contents(public_path('icons/clipboard-check.svg')) !!}</span>
Active({{ $statusCounts['active'] }})
</a>
</li>
</li>
<li class="nav-item mr-3">
@php
$inactiveParams = array_merge(request()->except(['status']), ['status' => 'inactive']);
Expand All @@ -96,7 +96,7 @@
<span class="d-inline-block h-18 w-20">{!! file_get_contents(public_path('icons/x-circle.svg')) !!}</span>
Inactive({{ $statusCounts['inactive'] }})
</a>
</li>
</li>
<li class="nav-item mr-3">
@php
$completedParams = ['name' => $name, 'centre' => $centre, 'status' => 'completed'];
Expand All @@ -109,7 +109,7 @@
<span class="d-inline-block h-18 w-20">{!! file_get_contents(public_path('icons/person-check.svg')) !!}</span>
Completed({{ $statusCounts['completed'] }})
</a>
</li>
</li>
</div>
@elseif (request()->tab == 'reports')
<li class="nav-item mr-3">
Expand Down Expand Up @@ -165,7 +165,7 @@
<tbody>
@forelse ($applicants as $applicant)
<tr>
<td>
<td>
<div class="d-flex align-items-center">
<div class="d-flex align-items-center">
<h4>{{ $applicant->first_name }} {{ $applicant->last_name }}</h4>
Expand Down Expand Up @@ -207,15 +207,15 @@ class="btn-sm btn-primary mr-1 text-decoration-none"
<span class="{{ config('codetrek.rounds.' . $applicant->latest_round_name . '.class') }} badge-pill mr-1 mb-1 fz-16">
{{ config('codetrek.rounds.' . $applicant->latest_round_name . '.label') }}
</span>
</div>
</div>
</td>
<td>
<div class="d-flex align-items-center">
<div class="d-flex align-items-center">
@if ($applicant->mentor)
<div class="col">
<div class="d-flex align-items-center">
<div class="d-flex align-items-center">
<img src="{{ $applicant->mentor->avatar }}" class="w-35 h-30 rounded-circle ">
<h4 class="ml-2 mb-0">{{ $applicant->mentor->name }}</h4>
<h4 class="ml-2 mb-0">{{ $applicant->mentor->name }}</h4>
</div>
</div>
@else
Expand Down Expand Up @@ -249,7 +249,7 @@ class="btn-sm btn-primary mr-1 text-decoration-none"
</div>
<canvas class="w-full" id="CodeTrekApplicationReport"></canvas>
</div>
</div>
</div>
@endif
</div>
@endsection
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,15 +72,6 @@
@endfor
</select>
</div>
<div class="form-group offset-md-1 col-md-5">
<label for="centre" class="field-required">Centre Name</label>
<select name="centre" id="centreId" class="form-control" required>
<option value="">Select Centre Name</option>
@foreach($centres as $centre)
<option value="{{ $centre->id }}">{{ $centre->centre_name }}</option>
@endforeach
</select>
</div>
</div>
<div class="form-row">
<div class="form-group col-md-5">
Expand Down
1 change: 0 additions & 1 deletion Modules/CodeTrek/Services/CodeTrekService.php
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,6 @@ public function store($data)
$applicant->start_date = $data['start_date'];
$applicant->graduation_year = $data['graduation_year'] ?? null;
$applicant->university = $data['university_name'] ?? null;
$applicant->centre_id = $data['centre'];
$applicant->mentor_id = $data['mentorId'];
$applicant->domain_name = $data['domain'];
$applicant->latest_round_name = config('codetrek.rounds.introductory-call.slug');
Expand Down
9 changes: 0 additions & 9 deletions Modules/Expense/Resources/views/create.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -61,15 +61,6 @@
</select>

</div>
<div class="form-group offset-md-1 col-md-5">
<label for="location" class="field-required">Location</label>
<select class="form-control" name="location">
<option value="">Select Location</option>
@foreach (config('constants.office_locations') as $office => $location)
<option value="{{ $office }}">{{ $location }}</option>
@endforeach
</select>
</div>
</div>
<hr>
<div class="parent">
Expand Down
11 changes: 0 additions & 11 deletions Modules/Expense/Resources/views/edit.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -62,17 +62,6 @@
@endforeach
</select>
</div>
<div class="form-group offset-md-1 col-md-5">
<label for="location" class="field-required">Location</label>
<select class="form-control" value="{{ $expense->location }}" name="location">
<option value="disabled">Select Location</option>
@foreach (config('constants.office_locations') as $office => $location)
<option
value="{{ $office }}"{{ $expense->location == $office ? 'selected' : '' }}>
{{ $location }}</option>
@endforeach
</select>
</div>
</div>
<hr>
@foreach ($expenseFile as $document)
Expand Down
Empty file removed Modules/Operations/Config/.gitkeep
Empty file.
5 changes: 0 additions & 5 deletions Modules/Operations/Config/config.php

This file was deleted.

Empty file.
Empty file.
Empty file.
27 changes: 0 additions & 27 deletions Modules/Operations/Database/Seeders/OfficeLocationTableSeeder.php

This file was deleted.

22 changes: 0 additions & 22 deletions Modules/Operations/Database/Seeders/OperationsDatabaseSeeder.php

This file was deleted.

This file was deleted.

Empty file.
Empty file.
16 changes: 0 additions & 16 deletions Modules/Operations/Entities/OfficeLocation.php

This file was deleted.

Empty file.
Loading
Loading