Skip to content

Commit

Permalink
refactor(global): Rename folder for routes from partials to module
Browse files Browse the repository at this point in the history
- Improve i18n add missing keys

BREAKING CHANGE: Important: Rename folder for routes from partials to module
  • Loading branch information
gnovaro committed Mar 18, 2024
1 parent d543ff3 commit 41e5e47
Show file tree
Hide file tree
Showing 27 changed files with 37 additions and 26 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,6 @@

class CalendarDeleteEventController extends MainController
{
/**
* @return \Illuminate\Http\JsonResponse
*/
public function delete(Request $request, int $id)
{
Calendar::find($id)->delete();
Expand Down
3 changes: 2 additions & 1 deletion app/Http/Controllers/Calendar/CalendarExportController.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
use App\Http\Controllers\Controller;
use App\Models\Calendar as CalendarModel;
use DateTime;
use Illuminate\Support\Str;
use Spatie\IcalendarGenerator\Components\Calendar;
use Spatie\IcalendarGenerator\Components\Event;

Expand Down Expand Up @@ -52,7 +53,7 @@ public function exportICal(int $id): \Symfony\Component\HttpFoundation\BinaryFil

// Descargar el archivo iCalendar
return response()
->download($tempFilePath, $calendarEvent->title.'.ics')
->download($tempFilePath, Str::slug($calendarEvent->title).'.ics')
->deleteFileAfterSend(true);
}
}
7 changes: 7 additions & 0 deletions lang/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@
"In progress" : "In progress",
"In_progress" : "In progress",
"Industry" : "Industry",
"Insurance" : "Insurance",
"Import" : "Import",
"Job title" : "Job title",
"Language" : "Language",
Expand All @@ -95,10 +96,13 @@
"Notes" : "Notes",
"Notification" : "Notification",
"Notifications" : "Notifications",
"Number" : "Number",
"of" : "Number",
"Open" : "Open",
"Order" : "Order",
"Orders" : "Orders",
"Password" : "Password",
"Permission": "Permission",
"Permissions": "Permissions",
"Phone" : "Phone",
"Photo" : "Photo",
Expand All @@ -116,6 +120,7 @@
"Quantity" : "Quantity",
"Remember contact" : "Remember contact",
"Reports" : "Reports",
"results" : "results",
"Sales report" : "Sales report",
"Save" : "Save",
"Search" : "Search",
Expand All @@ -125,6 +130,7 @@
"Separator" : "Separator",
"Setting" : "Setting",
"Settings" : "Settings",
"Showing" : "Showing",
"Signature" : "Signature",
"Social networks" : "Social networks",
"Source" : "Source",
Expand All @@ -136,6 +142,7 @@
"Tags" : "Tags",
"Tax" : "Tax",
"Taxes" : "Taxes",
"to": "to",
"To" : "To",
"Time zone" : "Time zone",
"Title" : "Title",
Expand Down
3 changes: 3 additions & 0 deletions lang/es-ES.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
"Category" : "Categoría",
"Categories" : "Categorías",
"Cancel" : "Cancelar",
"Choose" : "Seleccionar",
"City" : "Ciudad",
"Close" : "Cerrar",
"Closed" : "Cerrado",
Expand Down Expand Up @@ -71,6 +72,7 @@
"In progress" : "En progreso",
"In_progress" : "En progreso",
"Industry" : "Industria",
"Insurance" : "Seguros",
"Import" : "Importar",
"Job title" : "Puesto",
"Language" : "Idioma",
Expand Down Expand Up @@ -148,6 +150,7 @@
"Title" : "Título",
"Today" : "Hoy",
"Type" : "Tipo",
"Type to search" : "Escribe para buscar",
"Update" : "Actualizar",
"Updated at" : "Fecha modificación",
"User" : "Usuario",
Expand Down
2 changes: 2 additions & 0 deletions lang/es.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
"Category" : "Categoría",
"Categories" : "Categorías",
"Cancel" : "Cancelar",
"Choose" : "Seleccionar",
"City" : "Ciudad",
"Close" : "Cerrar",
"Closed" : "Cerrado",
Expand Down Expand Up @@ -71,6 +72,7 @@
"In progress" : "En progreso",
"In_progress" : "En progreso",
"Industry" : "Industria",
"Insurance" : "Seguros",
"Import" : "Importar",
"Job title" : "Puesto",
"Language" : "Idioma",
Expand Down
2 changes: 1 addition & 1 deletion resources/views/bank/index.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
</div>
</div>

<div class="card">
<div class="card mt-2">
<div class="card-body">
<div class="table-responsive">
<table class="table table-bordered table-stiped">
Expand Down
2 changes: 1 addition & 1 deletion resources/views/calendar/calendar.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ class="las la-chevron-left"></i></a>
<a href="{{ route('calendar.index',$date->copy()->addMonth()->toDateString()) }}"
class="btn btn-outline-dark me-2" title="{{ __('Next month') }}"><i
class="las la-chevron-right"></i></a>
<span class="fs-5">{{ __('calendar.'.$date->format('F')) }} {{ $date->format('Y') }}</span>
<span class="fs-5">{{ __($date->format('F')) }} {{ $date->format('Y') }}</span>
</div>
</div>
</div>
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
->name('calendar.save');
Route::get('/calendar/event/update/{id}',
[\App\Http\Controllers\Calendar\CalendarUpdateEventController::class, 'update'])->name('calendar.update');
Route::delete('/calendar/event/delete/{id}',
Route::get('/calendar/event/delete/{id}',
[\App\Http\Controllers\Calendar\CalendarDeleteEventController::class, 'delete'])->name('calendar.delete');
Route::get('/calendar/{id}/export', [CalendarExportController::class, 'exportICal'])
->name('calendar.export');
File renamed without changes.
File renamed without changes.
File renamed without changes.
1 change: 1 addition & 0 deletions routes/partials/contact.php → routes/module/contact.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
use Illuminate\Support\Facades\Route;

Route::post('/contact/save', [\App\Http\Controllers\Contact\ContactSaveController::class, 'save']);
Route::get('/contact/search/{name}', [\App\Http\Controllers\Contact\ContactGetAjaxController::class, 'searchByName']);
Route::get('/contact/export-vcard/{id}', [\App\Http\Controllers\Contact\ContactExportVCard::class, 'export']);
Route::get('/contact/create/{model}/{id_model}', [\App\Http\Controllers\Contact\ContactCreateController::class, 'create']);
Route::get('/contact/update/{id}', [\App\Http\Controllers\Contact\ContactUpdateController::class, 'update']);
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
36 changes: 18 additions & 18 deletions routes/web.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,35 +27,35 @@
Route::post('/unlock', [\App\Http\Controllers\Auth\UnlockController::class, 'unlock'])->name('unlock');

//Order
require_once __DIR__.'/partials/order.php';
require_once __DIR__.'/module/order.php';

//Product
require_once __DIR__.'/partials/product.php';
require_once __DIR__.'/module/product.php';

//Brand
require_once __DIR__.'/partials/brand.php';
require_once __DIR__.'/module/brand.php';

// Lead
require_once __DIR__.'/partials/lead.php';
require_once __DIR__.'/module/lead.php';

//Customer
require_once __DIR__.'/partials/customer.php';
require_once __DIR__.'/module/customer.php';

//Category
require_once __DIR__.'/partials/category.php';
require_once __DIR__.'/module/category.php';

// Company
require_once __DIR__.'/partials/company.php';
require_once __DIR__.'/module/company.php';

// Contact
require_once __DIR__.'/partials/contact.php';
require_once __DIR__.'/module/contact.php';

// Account
Route::get('/accounting', [\App\Http\Controllers\Account\AccountIndexController::class, 'index']);
Route::post('/account/save', [\App\Http\Controllers\Account\AccountSaveController::class, 'save']);

// User
require_once __DIR__.'/partials/user.php';
require_once __DIR__.'/module/user.php';

// Profile
Route::get('/profile', [\App\Http\Controllers\Profile\ProfileUpdateController::class, 'update']);
Expand All @@ -65,23 +65,23 @@
Route::get('/home', [\App\Http\Controllers\HomeController::class, 'index']);

// Calendar
require_once __DIR__.'/partials/calendar.php';
require_once __DIR__.'/module/calendar.php';

// Email
require_once __DIR__.'/partials/email.php';
require_once __DIR__.'/module/email.php';

// Email template
Route::match(['get', 'post'], '/email-template',
[\App\Http\Controllers\EmailTemplate\EmailTemplateIndexController::class, 'index']);

// Campaign
require_once __DIR__.'/partials/campaign.php';
require_once __DIR__.'/module/campaign.php';

// Supplier
require_once __DIR__.'/partials/supplier.php';
require_once __DIR__.'/module/supplier.php';

// Ticket
require_once __DIR__.'/partials/ticket.php';
require_once __DIR__.'/module/ticket.php';

// Regions
Route::get('ajax/region/{country}', [\App\Http\Controllers\Region\RegionGetAjaxController::class, 'index']);
Expand All @@ -95,7 +95,7 @@
Route::get('/web-form', [\App\Http\Controllers\WebForm\WebFormIndexController::class, 'index']);

// Notifications
require_once __DIR__.'/partials/notification.php';
require_once __DIR__.'/module/notification.php';

// Unsubscribe
Route::get('/unsubscribe', [\App\Http\Controllers\Unsubscribe\UnsubscribeUpdateController::class, 'update']);
Expand All @@ -106,10 +106,10 @@
Route::post('/permission', [\App\Http\Controllers\Permission\PermissionSaveController::class, 'save']);

//Bank
require_once __DIR__.'/partials/bank.php';
require_once __DIR__.'/module/bank.php';

//Bank account
require_once __DIR__.'/partials/bank_account.php';
require_once __DIR__.'/module/bank_account.php';

// Payroll
require_once __DIR__.'/partials/payroll.php';
require_once __DIR__.'/module/payroll.php';
2 changes: 1 addition & 1 deletion version.php
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
<?php

const APP_VERSION = '3.8.3';
const APP_VERSION = '3.9.0';

0 comments on commit 41e5e47

Please sign in to comment.