Showing AI reviews for avriti-backend
Project AI Score ?
59%
Quality Avg ?
64%
Security Avg ?
45%
Reviews ?
57

Review Result ?

jattin01/avriti-backend · ad720cf4
This commit adds a new relationship method in the OrderItem model and introduces numerous duplicate div container blocks in various view files. It also adds two new ignored files to .gitignore. The changes to the model are a good step for data integrity but minimal. The repeated duplicated HTML div elements across many views appear to be copy-paste without distinct functional changes, which adds little value and may indicate poor maintenance or fake work. The commit message is vague and does not describe changes adequately. There are no obvious security improvements or bug risk mitigations.
Quality ?
60%
Security ?
10%
Business Value ?
40%
Maintainability ?
70%
Issues & Suggested Fixes ?
1AI detects the issue
2Shows file, line, or evidence
3Suggests the fix to apply
Issue
Where commit message
Issue / Evidence issue
Suggested Fix provide clear, descriptive commit messages specifying purpose and details of changes
Duplicate Logic
Where resources/views/admin/banners.blade.php:100
Issue / Evidence duplicated HTML div block
Suggested Fix refactor to avoid redundancy and improve maintainability
Duplicate Logic
Where resources/views/admin/banners.blade.php:149
Issue / Evidence duplicated HTML div block
Suggested Fix refactor to avoid redundancy and improve maintainability
Duplicate Logic
Where resources/views/admin/coupons.blade.php:102
Issue / Evidence duplicated HTML div block
Suggested Fix refactor to avoid redundancy and improve maintainability
Duplicate Logic
Where resources/views/admin/coupons.blade.php:120
Issue / Evidence duplicated HTML div block
Suggested Fix refactor to avoid redundancy and improve maintainability
Duplicate Logic
Where resources/views/admin/product-categories.blade.php:75
Issue / Evidence duplicated HTML div block
Suggested Fix refactor to avoid redundancy and improve maintainability
Duplicate Logic
Where resources/views/admin/product-categories.blade.php:92
Issue / Evidence duplicated HTML div block
Suggested Fix refactor to avoid redundancy and improve maintainability
Duplicate Logic
Where resources/views/admin/product-types.blade.php:75
Issue / Evidence duplicated HTML div block
Suggested Fix refactor to avoid redundancy and improve maintainability
Duplicate Logic
Where resources/views/admin/product-types.blade.php:92
Issue / Evidence duplicated HTML div block
Suggested Fix refactor to avoid redundancy and improve maintainability
Duplicate Logic
Where resources/views/admin/tax-settings.blade.php:99
Issue / Evidence duplicated HTML div block
Suggested Fix refactor to avoid redundancy and improve maintainability
Duplicate Logic
Where resources/views/admin/tax-settings.blade.php:117
Issue / Evidence duplicated HTML div block
Suggested Fix refactor to avoid redundancy and improve maintainability
Duplicate Logic
Where resources/views/admin/variants.blade.php:79
Issue / Evidence duplicated HTML div block
Suggested Fix refactor to avoid redundancy and improve maintainability
Duplicate Logic
Where resources/views/admin/variants.blade.php:96
Issue / Evidence duplicated HTML div block
Suggested Fix refactor to avoid redundancy and improve maintainability
Code Change Preview · .gitignore ?
Removed / Before Commit
- .claude
- avrithi.xlsx
- /.claude
- /avrithi.xlsx
- \ No newline at end of file
- \ No newline at end of file
Added / After Commit
+ .claude
+ avrithi.xlsx
+ /.claude
+ \ No newline at end of file
+ /avrithi.xlsx
+ /AVRITI_PROJECT_PROMPT.md
+ \ No newline at end of file
Removed / Before Commit
- 'order_id',
- 'product_id',
- 'combo_product_id',
- 'variant_id',
- 'product_name',
- 'variant_name',
- {
- return $this->belongsTo(ComboProduct::class);
- }
- }
Added / After Commit
+ 'order_id',
+ 'product_id',
+ 'combo_product_id',
+         'service_detail_id',
+ 'variant_id',
+ 'product_name',
+ 'variant_name',
+ {
+ return $this->belongsTo(ComboProduct::class);
+ }
+ 
+     public function serviceDetail(): BelongsTo
+     {
+         return $this->belongsTo(ServiceDetail::class);
+     }
+ }
Removed / Before Commit
- 
- {{-- Add Modal --}}
- <div id="createBannerModal" class="hidden fixed inset-0 z-50 flex items-center justify-center bg-black/40 px-4 py-6" data-modal>
-   <div class="w-full max-w-lg overflow-hidden rounded-[32px] bg-white shadow-xl">
- <div class="flex items-center justify-between border-b border-gray-200 px-6 py-5">
- <h2 class="text-xl font-semibold text-[#0b3dba]">Add Banner</h2>
- <button type="button" data-modal-close class="inline-flex h-9 w-9 items-center justify-center rounded-full border border-gray-200 text-gray-500 hover:bg-gray-50">
- {{-- Edit Modals --}}
- @foreach($banners as $banner)
- <div id="editBannerModal{{ $banner->id }}" class="hidden fixed inset-0 z-50 flex items-center justify-center bg-black/40 px-4 py-6" data-modal>
-   <div class="w-full max-w-lg overflow-hidden rounded-[32px] bg-white shadow-xl">
- <div class="flex items-center justify-between border-b border-gray-200 px-6 py-5">
- <h2 class="text-xl font-semibold text-[#0b3dba]">Edit Banner</h2>
- <button type="button" data-modal-close class="inline-flex h-9 w-9 items-center justify-center rounded-full border border-gray-200 text-gray-500 hover:bg-gray-50">
Added / After Commit
+ 
+ {{-- Add Modal --}}
+ <div id="createBannerModal" class="hidden fixed inset-0 z-50 flex items-center justify-center bg-black/40 px-4 py-6" data-modal>
+   <div class="w-full max-w-lg max-h-[90vh] overflow-y-auto rounded-[32px] bg-white shadow-xl">
+ <div class="flex items-center justify-between border-b border-gray-200 px-6 py-5">
+ <h2 class="text-xl font-semibold text-[#0b3dba]">Add Banner</h2>
+ <button type="button" data-modal-close class="inline-flex h-9 w-9 items-center justify-center rounded-full border border-gray-200 text-gray-500 hover:bg-gray-50">
+ {{-- Edit Modals --}}
+ @foreach($banners as $banner)
+ <div id="editBannerModal{{ $banner->id }}" class="hidden fixed inset-0 z-50 flex items-center justify-center bg-black/40 px-4 py-6" data-modal>
+   <div class="w-full max-w-lg max-h-[90vh] overflow-y-auto rounded-[32px] bg-white shadow-xl">
+ <div class="flex items-center justify-between border-b border-gray-200 px-6 py-5">
+ <h2 class="text-xl font-semibold text-[#0b3dba]">Edit Banner</h2>
+ <button type="button" data-modal-close class="inline-flex h-9 w-9 items-center justify-center rounded-full border border-gray-200 text-gray-500 hover:bg-gray-50">
Removed / Before Commit
- 
- {{-- Create Modal --}}
- <div id="createCouponModal" class="{{ $openModal === 'create' ? '' : 'hidden' }} fixed inset-0 z-50 flex items-center justify-center bg-black/40 px-4 py-6" data-modal>
-   <div class="w-full max-w-2xl overflow-hidden rounded-[32px] bg-white shadow-xl">
- <div class="flex items-center justify-between border-b border-gray-200 px-6 py-5">
- <h2 class="text-xl font-semibold text-[#0b3dba]">Add Coupon</h2>
- <button type="button" data-modal-close class="inline-flex h-9 w-9 items-center justify-center rounded-full border border-gray-200 text-gray-500 hover:bg-gray-50">
- {{-- Edit Modals --}}
- @foreach ($coupons as $coupon)
- <div id="editCouponModal{{ $coupon->id }}" class="{{ $openModal === 'edit-'.$coupon->id ? '' : 'hidden' }} fixed inset-0 z-50 flex items-center justify-center bg-black/40 px-4 py-6" data-modal>
-     <div class="w-full max-w-2xl overflow-hidden rounded-[32px] bg-white shadow-xl">
- <div class="flex items-center justify-between border-b border-gray-200 px-6 py-5">
- <h2 class="text-xl font-semibold text-[#0b3dba]">Edit Coupon</h2>
- <button type="button" data-modal-close class="inline-flex h-9 w-9 items-center justify-center rounded-full border border-gray-200 text-gray-500 hover:bg-gray-50">
Added / After Commit
+ 
+ {{-- Create Modal --}}
+ <div id="createCouponModal" class="{{ $openModal === 'create' ? '' : 'hidden' }} fixed inset-0 z-50 flex items-center justify-center bg-black/40 px-4 py-6" data-modal>
+   <div class="w-full max-w-2xl max-h-[90vh] overflow-y-auto rounded-[32px] bg-white shadow-xl">
+ <div class="flex items-center justify-between border-b border-gray-200 px-6 py-5">
+ <h2 class="text-xl font-semibold text-[#0b3dba]">Add Coupon</h2>
+ <button type="button" data-modal-close class="inline-flex h-9 w-9 items-center justify-center rounded-full border border-gray-200 text-gray-500 hover:bg-gray-50">
+ {{-- Edit Modals --}}
+ @foreach ($coupons as $coupon)
+ <div id="editCouponModal{{ $coupon->id }}" class="{{ $openModal === 'edit-'.$coupon->id ? '' : 'hidden' }} fixed inset-0 z-50 flex items-center justify-center bg-black/40 px-4 py-6" data-modal>
+     <div class="w-full max-w-2xl max-h-[90vh] overflow-y-auto rounded-[32px] bg-white shadow-xl">
+ <div class="flex items-center justify-between border-b border-gray-200 px-6 py-5">
+ <h2 class="text-xl font-semibold text-[#0b3dba]">Edit Coupon</h2>
+ <button type="button" data-modal-close class="inline-flex h-9 w-9 items-center justify-center rounded-full border border-gray-200 text-gray-500 hover:bg-gray-50">
Removed / Before Commit
- </div>
- 
- <div id="createCategoryModal" class="{{ $openModal === 'create' ? '' : 'hidden' }} fixed inset-0 z-50 flex items-center justify-center bg-black/40 px-4 py-6" data-modal>
-   <div class="w-full max-w-2xl overflow-hidden rounded-[32px] bg-white shadow-xl">
- <div class="flex items-center justify-between border-b border-gray-200 px-6 py-5">
- <h2 class="text-xl font-semibold text-[#0b3dba]">Add Category</h2>
- <button type="button" data-modal-close class="inline-flex h-9 w-9 items-center justify-center rounded-full border border-gray-200 text-gray-500 hover:bg-gray-50">
- 
- @foreach ($categories as $category)
- <div id="editCategoryModal{{ $category->id }}" class="{{ $openModal === 'edit-'.$category->id ? '' : 'hidden' }} fixed inset-0 z-50 flex items-center justify-center bg-black/40 px-4 py-6" data-modal>
-     <div class="w-full max-w-2xl overflow-hidden rounded-[32px] bg-white shadow-xl">
- <div class="flex items-center justify-between border-b border-gray-200 px-6 py-5">
- <h2 class="text-xl font-semibold text-[#0b3dba]">Edit Category</h2>
- <button type="button" data-modal-close class="inline-flex h-9 w-9 items-center justify-center rounded-full border border-gray-200 text-gray-500 hover:bg-gray-50">
Added / After Commit
+ </div>
+ 
+ <div id="createCategoryModal" class="{{ $openModal === 'create' ? '' : 'hidden' }} fixed inset-0 z-50 flex items-center justify-center bg-black/40 px-4 py-6" data-modal>
+   <div class="w-full max-w-2xl max-h-[90vh] overflow-y-auto rounded-[32px] bg-white shadow-xl">
+ <div class="flex items-center justify-between border-b border-gray-200 px-6 py-5">
+ <h2 class="text-xl font-semibold text-[#0b3dba]">Add Category</h2>
+ <button type="button" data-modal-close class="inline-flex h-9 w-9 items-center justify-center rounded-full border border-gray-200 text-gray-500 hover:bg-gray-50">
+ 
+ @foreach ($categories as $category)
+ <div id="editCategoryModal{{ $category->id }}" class="{{ $openModal === 'edit-'.$category->id ? '' : 'hidden' }} fixed inset-0 z-50 flex items-center justify-center bg-black/40 px-4 py-6" data-modal>
+     <div class="w-full max-w-2xl max-h-[90vh] overflow-y-auto rounded-[32px] bg-white shadow-xl">
+ <div class="flex items-center justify-between border-b border-gray-200 px-6 py-5">
+ <h2 class="text-xl font-semibold text-[#0b3dba]">Edit Category</h2>
+ <button type="button" data-modal-close class="inline-flex h-9 w-9 items-center justify-center rounded-full border border-gray-200 text-gray-500 hover:bg-gray-50">
Removed / Before Commit
- </div>
- 
- <div id="createTypeModal" class="{{ $openModal === 'create' ? '' : 'hidden' }} fixed inset-0 z-50 flex items-center justify-center bg-black/40 px-4 py-6" data-modal>
-   <div class="w-full max-w-2xl overflow-hidden rounded-[32px] bg-white shadow-xl">
- <div class="flex items-center justify-between border-b border-gray-200 px-6 py-5">
- <h2 class="text-xl font-semibold text-[#0b3dba]">Add Type</h2>
- <button type="button" data-modal-close class="inline-flex h-9 w-9 items-center justify-center rounded-full border border-gray-200 text-gray-500 hover:bg-gray-50">
- 
- @foreach ($types as $type)
- <div id="editTypeModal{{ $type->id }}" class="{{ $openModal === 'edit-'.$type->id ? '' : 'hidden' }} fixed inset-0 z-50 flex items-center justify-center bg-black/40 px-4 py-6" data-modal>
-     <div class="w-full max-w-2xl overflow-hidden rounded-[32px] bg-white shadow-xl">
- <div class="flex items-center justify-between border-b border-gray-200 px-6 py-5">
- <h2 class="text-xl font-semibold text-[#0b3dba]">Edit Type</h2>
- <button type="button" data-modal-close class="inline-flex h-9 w-9 items-center justify-center rounded-full border border-gray-200 text-gray-500 hover:bg-gray-50">
Added / After Commit
+ </div>
+ 
+ <div id="createTypeModal" class="{{ $openModal === 'create' ? '' : 'hidden' }} fixed inset-0 z-50 flex items-center justify-center bg-black/40 px-4 py-6" data-modal>
+   <div class="w-full max-w-2xl max-h-[90vh] overflow-y-auto rounded-[32px] bg-white shadow-xl">
+ <div class="flex items-center justify-between border-b border-gray-200 px-6 py-5">
+ <h2 class="text-xl font-semibold text-[#0b3dba]">Add Type</h2>
+ <button type="button" data-modal-close class="inline-flex h-9 w-9 items-center justify-center rounded-full border border-gray-200 text-gray-500 hover:bg-gray-50">
+ 
+ @foreach ($types as $type)
+ <div id="editTypeModal{{ $type->id }}" class="{{ $openModal === 'edit-'.$type->id ? '' : 'hidden' }} fixed inset-0 z-50 flex items-center justify-center bg-black/40 px-4 py-6" data-modal>
+     <div class="w-full max-w-2xl max-h-[90vh] overflow-y-auto rounded-[32px] bg-white shadow-xl">
+ <div class="flex items-center justify-between border-b border-gray-200 px-6 py-5">
+ <h2 class="text-xl font-semibold text-[#0b3dba]">Edit Type</h2>
+ <button type="button" data-modal-close class="inline-flex h-9 w-9 items-center justify-center rounded-full border border-gray-200 text-gray-500 hover:bg-gray-50">
Removed / Before Commit
- 
- {{-- Create Modal --}}
- <div id="createTaxModal" class="{{ $openModal === 'create' ? '' : 'hidden' }} fixed inset-0 z-50 flex items-center justify-center bg-black/40 px-4 py-6" data-modal>
-   <div class="w-full max-w-2xl overflow-hidden rounded-[32px] bg-white shadow-xl">
- <div class="flex items-center justify-between border-b border-gray-200 px-6 py-5">
- <h2 class="text-xl font-semibold text-[#0b3dba]">Add Country Tax</h2>
- <button type="button" data-modal-close class="inline-flex h-9 w-9 items-center justify-center rounded-full border border-gray-200 text-gray-500 hover:bg-gray-50">
- {{-- Edit Modals --}}
- @foreach ($taxSettings as $taxSetting)
- <div id="editTaxModal{{ $taxSetting->id }}" class="{{ $openModal === 'edit-'.$taxSetting->id ? '' : 'hidden' }} fixed inset-0 z-50 flex items-center justify-center bg-black/40 px-4 py-6" data-modal>
-     <div class="w-full max-w-2xl overflow-hidden rounded-[32px] bg-white shadow-xl">
- <div class="flex items-center justify-between border-b border-gray-200 px-6 py-5">
- <h2 class="text-xl font-semibold text-[#0b3dba]">Edit Country Tax</h2>
- <button type="button" data-modal-close class="inline-flex h-9 w-9 items-center justify-center rounded-full border border-gray-200 text-gray-500 hover:bg-gray-50">
Added / After Commit
+ 
+ {{-- Create Modal --}}
+ <div id="createTaxModal" class="{{ $openModal === 'create' ? '' : 'hidden' }} fixed inset-0 z-50 flex items-center justify-center bg-black/40 px-4 py-6" data-modal>
+   <div class="w-full max-w-2xl max-h-[90vh] overflow-y-auto rounded-[32px] bg-white shadow-xl">
+ <div class="flex items-center justify-between border-b border-gray-200 px-6 py-5">
+ <h2 class="text-xl font-semibold text-[#0b3dba]">Add Country Tax</h2>
+ <button type="button" data-modal-close class="inline-flex h-9 w-9 items-center justify-center rounded-full border border-gray-200 text-gray-500 hover:bg-gray-50">
+ {{-- Edit Modals --}}
+ @foreach ($taxSettings as $taxSetting)
+ <div id="editTaxModal{{ $taxSetting->id }}" class="{{ $openModal === 'edit-'.$taxSetting->id ? '' : 'hidden' }} fixed inset-0 z-50 flex items-center justify-center bg-black/40 px-4 py-6" data-modal>
+     <div class="w-full max-w-2xl max-h-[90vh] overflow-y-auto rounded-[32px] bg-white shadow-xl">
+ <div class="flex items-center justify-between border-b border-gray-200 px-6 py-5">
+ <h2 class="text-xl font-semibold text-[#0b3dba]">Edit Country Tax</h2>
+ <button type="button" data-modal-close class="inline-flex h-9 w-9 items-center justify-center rounded-full border border-gray-200 text-gray-500 hover:bg-gray-50">
Removed / Before Commit
- </div>
- 
- <div id="createVariantModal" class="{{ $openModal === 'create' ? '' : 'hidden' }} fixed inset-0 z-50 flex items-center justify-center bg-black/40 px-4 py-6" data-modal>
-   <div class="w-full max-w-2xl overflow-hidden rounded-[32px] bg-white shadow-xl">
- <div class="flex items-center justify-between border-b border-gray-200 px-6 py-5">
- <h2 class="text-xl font-semibold text-[#0b3dba]">Add Attribute</h2>
- <button type="button" data-modal-close class="inline-flex h-9 w-9 items-center justify-center rounded-full border border-gray-200 text-gray-500 hover:bg-gray-50">
- 
- @foreach ($variants as $variant)
- <div id="editVariantModal{{ $variant->id }}" class="{{ $openModal === 'edit-'.$variant->id ? '' : 'hidden' }} fixed inset-0 z-50 flex items-center justify-center bg-black/40 px-4 py-6" data-modal>
-     <div class="w-full max-w-2xl overflow-hidden rounded-[32px] bg-white shadow-xl">
- <div class="flex items-center justify-between border-b border-gray-200 px-6 py-5">
- <h2 class="text-xl font-semibold text-[#0b3dba]">Edit Attribute</h2>
- <button type="button" data-modal-close class="inline-flex h-9 w-9 items-center justify-center rounded-full border border-gray-200 text-gray-500 hover:bg-gray-50">
Added / After Commit
+ </div>
+ 
+ <div id="createVariantModal" class="{{ $openModal === 'create' ? '' : 'hidden' }} fixed inset-0 z-50 flex items-center justify-center bg-black/40 px-4 py-6" data-modal>
+   <div class="w-full max-w-2xl max-h-[90vh] overflow-y-auto rounded-[32px] bg-white shadow-xl">
+ <div class="flex items-center justify-between border-b border-gray-200 px-6 py-5">
+ <h2 class="text-xl font-semibold text-[#0b3dba]">Add Attribute</h2>
+ <button type="button" data-modal-close class="inline-flex h-9 w-9 items-center justify-center rounded-full border border-gray-200 text-gray-500 hover:bg-gray-50">
+ 
+ @foreach ($variants as $variant)
+ <div id="editVariantModal{{ $variant->id }}" class="{{ $openModal === 'edit-'.$variant->id ? '' : 'hidden' }} fixed inset-0 z-50 flex items-center justify-center bg-black/40 px-4 py-6" data-modal>
+     <div class="w-full max-w-2xl max-h-[90vh] overflow-y-auto rounded-[32px] bg-white shadow-xl">
+ <div class="flex items-center justify-between border-b border-gray-200 px-6 py-5">
+ <h2 class="text-xl font-semibold text-[#0b3dba]">Edit Attribute</h2>
+ <button type="button" data-modal-close class="inline-flex h-9 w-9 items-center justify-center rounded-full border border-gray-200 text-gray-500 hover:bg-gray-50">