Compare commits

...

15 Commits

Author SHA1 Message Date
ygbanzato
fdbb662fba Correction of errors and start of implementation of projects in execution 2023-07-20 10:02:53 +01:00
ygbanzato
9d510ab765 First part of the implementation of the work in progress 2023-07-15 21:39:24 +01:00
ygbanzato
599fd6bf7a we have finalized the part of the prepared works as well as their general implementation and we have started the creation of the works in execution. 2023-07-11 10:18:38 +01:00
ygbanzato
f622782eae Final implementations for Project creation 2023-07-04 19:23:28 +01:00
ygbanzato
4e737a48bd adjustments in parts of the code and implementation of the workstations 2023-07-03 11:46:11 +01:00
ygbanzato
d83552e106 Implementation of structure for creation of the work 2023-06-22 10:05:51 +01:00
ygbanzato
3db065ae53 updating best practices in project models and controllers, and linking tables.
- Creation of controller : CreateProject, for creation of the company works.
- Controller : ProjectDatacontroller to manage data of the equipments and installations in general.
2023-06-03 19:01:17 +01:00
ygbanzato
0238996df9 addition of template for creation of valves, and creation of models for data administration between tables, based on the creation of the project 2023-05-22 14:36:40 +01:00
ygbanzato
44e0a3f373 changing fortify routes to work better with email and adding excel template for future implementation of equipment in DB. 2023-05-14 19:09:36 +01:00
ygbanzato
ef5536a0d3 user creation update from pending_users 2023-05-05 18:45:07 +01:00
ygbanzato
a57af0d118 update the crud model for users and create the pending_users table (To wait for the creation of these users the user table, as soon as Super_Admin, changes it) 2023-05-04 15:30:42 +01:00
ygbanzato
c387eae375 creation and implementation of the crud model for users and start of the pending_users DB 2023-05-02 12:27:53 +01:00
ygbanzato
1da54d43f4 Creating routes based on user_type and permissions to access routes 2023-04-26 15:21:41 +01:00
ygbanzato
567605ceb9 adding styles to the page and creating a test view for form submission and email system 2023-04-26 09:34:03 +01:00
ygbanzato
7f4defa009 Updated functionality such as: registration, registration verification by email and password change by email 2023-04-22 10:12:00 +01:00
4220 changed files with 883053 additions and 217 deletions

View File

@ -8,6 +8,8 @@
use Illuminate\Validation\Rule;
use Laravel\Fortify\Contracts\CreatesNewUsers;
use Illuminate\Auth\Events\Registered;
class CreateNewUser implements CreatesNewUsers
{
use PasswordValidationRules;
@ -19,22 +21,31 @@ class CreateNewUser implements CreatesNewUsers
*/
public function create(array $input): User
{
Validator::make($input, [
'name' => ['required', 'string', 'max:255'],
'email' => [
'required',
'string',
'email',
'max:255',
Rule::unique(User::class),
],
'password' => $this->passwordRules(),
])->validate();
// dd($input);
// Validator::make($input, [
// 'name' => ['required', 'string', 'max:255'],
// 'email' => [
// 'required',
// 'string',
// 'email',
// 'max:255',
// Rule::unique(User::class),
// ],
// 'user_type' => ['required', Rule::in(['Cliente', 'Administrador', 'Super_Administrador','Gestor_Obra','Tecnicos','inspetor'])],
// 'user_phone' => ['required', 'integer'],
// 'user_nif' => ['required', 'string', 'max:15'],
// 'password' => $this->passwordRules(),
// ])->validate();
return User::create([
'name' => $input['name'],
'email' => $input['email'],
'password' => Hash::make($input['password']),
'user_type' => $input['user_type'],
'user_phone' => $input['user_phone'],
'user_nif' => $input['user_nif'],
]);
// event(new Registered($user));
}
}

View File

@ -0,0 +1,15 @@
<?php
namespace App\Http\Controllers\Auth;
use App\Http\Controllers\Controller;
use Illuminate\Http\Request;
use Laravel\Fortify\Contracts\SendPasswordResetLinkViewResponse;
class PasswordResetLinkController extends Controller
{
public function create()
{
return view('auth.forgot-password');
}
}

View File

@ -0,0 +1,60 @@
<?php
namespace App\Http\Controllers\Auth;
use App\Http\Controllers\Controller;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Password;
use Illuminate\Support\Str;
class ResetPasswordController extends Controller
{
// public function create(Request $request, $token)
// {
// return view('auth.reset-password', ['token' => $token, 'email' => $request->email]);
// }
public function reset(Request $request)
{
$request->validate([
'token' => 'required',
'email' => 'required|email',
'password' => 'required|min:8|confirmed',
]);
$response = Password::reset(
$request->only('email', 'password', 'password_confirmation', 'token'),
function ($user, $password) {
$user->forceFill([
'password' => bcrypt($password)
])->save();
$user->setRememberToken(Str::random(60));
}
);
if ($response == Password::PASSWORD_RESET) {
return response()->json(['message' => 'Password reset successfully.']);
} else {
return response()->json(['message' => 'Failed to reset the password.'], 400);
}
}
}
// use App\Http\Controllers\ResetPasswordController;
// Route::post('/reset-password', [ResetPasswordController::class, 'reset'])->name('password.update');

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,61 @@
<?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use App\Actions\Fortify\CreateNewUser;
use Illuminate\Auth\Events\Registered;
use Illuminate\Foundation\Auth\EmailVerificationRequest;
use Illuminate\Http\JsonResponse;
use Illuminate\Http\RedirectResponse;
use Illuminate\Support\Facades\Auth;
use Illuminate\Support\Facades\Redirect;
use Illuminate\Auth\Events\Verified;
use App\Models\User;
use App\Models\PendingUser;
use App\Mail\NewUserNotification;
use Illuminate\Support\Facades\Mail;
class CustomRegistrationController extends Controller
{
public function store(Request $request): RedirectResponse
{
$user = app(CreateNewUser::class)->create($request->all());
event(new Registered($user));
// Chame sendEmailVerificationNotification para enviar o e-mail de verificação
$user->sendEmailVerificationNotification();
$pendingUser = PendingUser::where('pending_email', $user->email)->first();
if ($pendingUser) {
$pendingUser->delete();
}
return $request->wantsJson()
? new JsonResponse([], 201)
: Redirect::to('/CreateUsers')->with('success', 'Usuário criado com sucesso, aguarda confirmacao por Email!!');
}
public function yourVerificationMethod(Request $request, $id, $hash)
{
$user = User::findOrFail($id);
if (!hash_equals((string) $hash, sha1($user->getEmailForVerification()))) {
abort(403, 'Unauthorized action.');
}
if ($user->markEmailAsVerified()) {
event(new Verified($user));
}
// Redirecione para a rota desejada após a verificação bem-sucedida
return redirect()->route('CreateUsers')->with('message', 'E-mail verificado com sucesso!');
}
}

View File

@ -0,0 +1,111 @@
<?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use App\Models\CompanyProject;
use App\Models\ConstructionWorkstation;
use App\Models\ControlEquipmentWorkstation;
use App\Models\Equipment;
use App\Models\EquipmentComments;
use App\Models\EquipmentType;
use App\Models\OrderEquipmentTasks;
use Yajra\DataTables\Facades\DataTables;
class ExecutionProjectController extends Controller
{
public function enterWorkstation()
{
return view('enterWorkstation');
}
public function receiveExecutionProject($ProjectId)
{
$DatasProject = CompanyProject::find($ProjectId);
$equipmentsTypes = EquipmentType::all();
// return view('projectsClients/executionProject')
return view('projectsClients/executionProject')
->with('DatasProject', $DatasProject)
->with('equipmentsTypes', $equipmentsTypes);
}
public function receiveWorkstationExecutionProject($receiveNumberProject)
{
$model = ConstructionWorkstation::where('company_projects_id', $receiveNumberProject)->with('workstationsAssociationTasks');
return DataTables::of($model)
->addColumn('workstations_Association_Tasks', function ($row) {
return $row->workstationsAssociationTasks->map(function ($task) {
return $task->elementalTask->elemental_tasks_code;
})->implode('-');
})
->toJson();
}
public function receiveEquipmentIdForShowModal($EquipmentID)
{
// Recebe e encontra os dados do Equipamento indicada na Tabela.
$equipment = Equipment::find($EquipmentID);
// Recebe todas as tarefas e devolve em um Array
$task_codes = $equipment->orderEquipmentTasks->map(function ($task) {
return $task->elementalTask->elemental_tasks_code;
})->toArray();
$receveControlEquipment = ControlEquipmentWorkstation::where('equipment_id',$EquipmentID)->get();
$receiveCommentsEquipment = EquipmentComments::where('equipment_id',$EquipmentID)->get();
// return view('projectsClients/executionProject',['receveControlEquipment'=>$receveControlEquipment]);
return response()->json(['task_codes' => $task_codes,'receveControlEquipment' => $receveControlEquipment, 'receiveCommentsEquipment' => $receiveCommentsEquipment]);
}
// public function receiveEquipmentsExecutionProject($receiveNumberProject)
// {
// // Recebe os dados vindos da funcao 'data' criada na view
// $equipment_type_id = request('equipment_type_id');
// $ambits_id = request('ambits_id');
// //Recebe sempre apenas os equipamentos relacionados a obra
// $model = Equipment::where('company_projects_id', $receiveNumberProject);
// // Caso 'equipment_type_id' seja '#', mostra todos os equipamentos
// if ($equipment_type_id == '#') {
// $model = Equipment::query()->with(['equipmentType', 'unit', 'equipmentAssociationAmbit.ambitsEquipment']);
// }
// // Caso 'equipment_type_id' não seja '#', filtra os equipamentos por tipo e ambito (caso 'ambits_id' não seja '#')
// else {
// $equipment_type_id = intval($equipment_type_id);
// $model = Equipment::where('equipments.equipment_type_id', $equipment_type_id)
// ->join('equipment_association_ambits', 'equipments.equipment_id', '=', 'equipment_association_ambits.equipment_id')
// ->with(['equipmentType', 'unit', 'equipmentAssociationAmbit.ambitsEquipment']);
// if ($ambits_id != '#') {
// $ambits_id = intval($ambits_id);
// $model->where('equipment_association_ambits.ambits_id', $ambits_id);
// }
// }
// return DataTables::of($model)
// ->addColumn('equipment_type', function ($row) {
// return $row->equipmentType->equipment_type_name;
// })
// ->addColumn('Ambits', function ($row) {
// return $row->equipmentAssociationAmbit->ambitsEquipment->ambits_description;
// })
// ->addColumn('order_tasks', function ($row) {
// return $row->orderEquipmentTasks->map(function ($task) {
// return $task->elementalTask->elemental_tasks_code;
// })->implode('-');
// })
// ->addColumn('current_task', function ($row) {
// return $row->controlEquipmentWorkstation->map(function ($task) {
// return $task->elementalTask->elemental_tasks_code;
// })->implode('-');
// })
// ->toJson();
// }
}

View File

@ -0,0 +1,22 @@
<?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Mail;
class FormController extends Controller
{
public function enviarEmail(Request $request)
{
$email = $request->input('email');
Mail::send('email.email', [], function ($message) use ($email) {
$message->to($email);
$message->subject('Assunto do email');
});
return back()->with('status', 'Email enviado com sucesso!');
}
}

View File

@ -0,0 +1,72 @@
<?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Hash;
use App\Mail\NewUserNotification;
use Illuminate\Support\Facades\Mail;
use App\Models\PendingUser;
use App\Models\User;
use App\Models\TypeUser;
class Pending_UserController extends Controller
{
public function ListPendingUsers()
{
$pend_users = PendingUser::all();
return view('email/pendingUsers', compact('pend_users'));
}
public function ShowFormUser($id){
$pend_users = PendingUser::findOrFail($id);
$types = TypeUser::all();
return view ('Admin.CrudUsers.createUser', compact('pend_users','types'));
}
public function store(Request $request){
$request->validate([
'name' => 'required',
'lastName' => 'required',
'pending_email' => 'required|email|unique:pending_users,pending_user_email|unique:users,email',
'pending_phone' => 'required',
'pending_nif' => 'required',
'pending_password' => 'required|min:8|confirmed',
]);
$joinName = $request->get('name') . ' ' . $request->get('lastName');
// $pendingUser = new PendingUser([
// 'pending_user_name' => $joinName,
// 'pending_user_email' => $request->get('pending_email'),
// 'pending_user_phone' => $request->get('pending_phone'),
// 'pending_user_nif' => $request->get('pending_nif'),
// 'pending_user_password' => Hash::make($request->get('pending_password')),
// ]);
$pendingUser = new PendingUser();
$pendingUser->pending_user_name = $joinName;
$pendingUser->pending_user_email = $request->get('pending_email');
$pendingUser->pending_user_phone = $request->get('pending_phone');
$pendingUser->pending_user_nif = $request->get('pending_nif');
$pendingUser->pending_user_password = Hash::make($request->get('pending_password'));
$pendingUser->save();
// Enviar email de notificação para todos os Super_Administrador
$superAdmins = User::where('type_users', 'Super_Administrador')->get();
$newUserNotification = new NewUserNotification();
foreach ($superAdmins as $superAdmin) {
Mail::to($superAdmin->email)->send($newUserNotification);
}
return redirect('/formulario')->with('success', 'O seu registro foi enviado e aguarda aprovação.');
}
}

View File

@ -0,0 +1,118 @@
<?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\DB;
use Yajra\DataTables\DataTables;
use App\Models\CompanyProject;
use App\Models\Equipment;
use App\Models\EquipmentType;
use App\Models\Unit;
use App\Models\AmbitsEquipment;
class PreparedProjectController extends Controller
{
public function PreparedProject($ProjectId)
{
$numberProject = CompanyProject::find($ProjectId);
$equipmentsProjects = Equipment::all()->where('company_projects_id', $ProjectId);
$equipmentsTypes = EquipmentType::all();
//Retorna todas as Fabricas Unit, com base na instalacao
$checkUnits = DB::table('units')
->join('plants', 'units.plant_id', '=', 'plants.plant_id')
->join('company_projects', 'plants.plant_id', '=', 'company_projects.plant_id')
->select('units.*')
->where('company_projects.company_projects_id', '=', $numberProject->company_projects_id)
->get();
return view('projectsClients/preparedProject')
// ->with('equipmentsProjects', $equipmentsProjects)
->with('equipmentsTypes', $equipmentsTypes)
->with('units', $checkUnits)
->with('numberProject', $numberProject);
}
public function getAmbits($equipmentType)
{
$ambits = DB::table('ambits_equipments')
->select('ambits_equipments.*')
->where('ambits_equipments.equipment_type_id', $equipmentType)
->get();
return response()->json($ambits);
}
public function editProjectForArticulated(Request $request)
{
$numberProject = CompanyProject::find($request->ProjectId);
$numberProject->order_project = 1;
$numberProject->save();
return redirect()->route('home');
}
public function getData1()
{
$equipment_type_id = request('equipment_type_id');
$unit_id = request('unit_id');
$ambits_id = request('ambits_id');
// Equipment::all()->where('company_projects_id', $ProjectId);
// Caso 'equipment_type_id' seja '#', mostra todos os equipamentos
if ($equipment_type_id == '#') {
$model = Equipment::query()->with(['equipmentType', 'unit', 'equipmentAssociationAmbit.ambitsEquipment']);
}
// Caso 'equipment_type_id' não seja '#', filtra os equipamentos por tipo e ambito (caso 'ambits_id' não seja '#')
else {
$equipment_type_id = intval($equipment_type_id);
$model = Equipment::where('equipments.equipment_type_id', $equipment_type_id)
->join('equipment_association_ambits', 'equipments.equipment_id', '=', 'equipment_association_ambits.equipment_id')
->with(['equipmentType', 'unit', 'equipmentAssociationAmbit.ambitsEquipment']);
if ($ambits_id != '#') {
$ambits_id = intval($ambits_id);
$model->where('equipment_association_ambits.ambits_id', $ambits_id);
}
}
if(request()->has('inspec') && request('inspec') != '#') {
$inspectionFilter = request('inspec') === 'Sim';
$model->whereHas('orderEquipmentTasks', function ($query) use ($inspectionFilter) {
$query->where('inspection', $inspectionFilter ? 'Sim' : 'Nao');
});
}
// Aplica o filtro de 'unit_id', se aplicável
if ($unit_id != '#') {
$unit_id = intval($unit_id);
$model->where('equipments.unit_id', $unit_id);
}
// Gera a tabela de dados
return DataTables::of($model)
->addColumn('equipment_type', function ($row) {
return $row->equipmentType->equipment_type_name;
})
->addColumn('Unit', function ($row) {
return $row->unit->unit_name;
})
->addColumn('Ambits', function ($row) {
return $row->equipmentAssociationAmbit->ambitsEquipment->ambits_description;
})
->addColumn('Inspec', function ($row) {
return $row->hasInspectionYes() ? 'Sim' : 'Nao';
})
->toJson();
}
}

View File

@ -0,0 +1,132 @@
<?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\DB;
use Yajra\DataTables\Facades\DataTables;
use App\Models\Equipment;
use App\Models\Plant;
use App\Models\CompanyProject;
use App\Models\ConstructionWorkstation;
class ProjectoDatacontroller extends Controller
{
public function HomePage()
{
$CompanyProject = CompanyProject::all();
return view('Admin/index')
// return view('codePronto');
->with("CompanyProject", $CompanyProject);
}
public function ManageAssets()
{
$units = DB::table('plants')
->join('units', 'plants.plant_id', '=', 'units.plant_id')
->join('users', 'plants.user_id', '=', 'users.user_id')
->select('plants.*', 'units.unit_name', 'users.user_name as user_name')
->get();
$equipments = Equipment::all();
// $equipaments = DB::table('equipaments')
// ->join('factories','equipaments.factory_id', '=', 'factories.factories_id')
// ->join('equipament_types', 'equipaments.equipament_type_id', '=' , 'equipament_types.equipament_type_id')
// ->select('equipaments.*', 'factories.factories_name', 'equipament_types.equipment_type_name')
// ->get();
// return view('Admin/DataManagement/manageassets', compact('units','equipaments'));
return view('Admin/DataManagement/manageassets', compact('units', 'equipments'));
}
public function showUnit($id)
{
$equipaments = Equipment::where('equipment_id', $id)->firstOrFail();
return view('Admin/DataManagement/showEquipament', compact('equipaments'));
}
public function receiveEquipmentsProject($receiveNumberProject)
{
// Recebe os dados vindos da funcao 'data' criada na view
$equipment_type_id = request('equipment_type_id');
$ambits_id = request('ambits_id');
//Recebe sempre apenas os equipamentos relacionados a obra
// $model = Equipment::where('company_projects_id', $receiveNumberProject);
// Caso 'equipment_type_id' seja '#', mostra todos os equipamentos
if ($equipment_type_id == '#') {
$model = Equipment::query()
->where('company_projects_id', $receiveNumberProject)
->with(['equipmentType', 'unit', 'equipmentAssociationAmbit.ambitsEquipment']);
}
// Caso 'equipment_type_id' não seja '#', filtra os equipamentos por tipo e ambito (caso 'ambits_id' não seja '#')
else {
$equipment_type_id = intval($equipment_type_id);
$model = Equipment::where('equipments.equipment_type_id', $equipment_type_id)
->where('company_projects_id', $receiveNumberProject)
->join('equipment_association_ambits', 'equipments.equipment_id', '=', 'equipment_association_ambits.equipment_id')
->with(['equipmentType', 'unit', 'equipmentAssociationAmbit.ambitsEquipment']);
if ($ambits_id != '#') {
$ambits_id = intval($ambits_id);
$model->where('equipment_association_ambits.ambits_id', $ambits_id)
->where('company_projects_id', $receiveNumberProject);
}
}
return DataTables::of($model)
->addColumn('equipment_type', function ($row) {
return $row->equipmentType->equipment_type_name;
})
->addColumn('Unit', function ($row) {
return $row->unit->unit_name;
})
->addColumn('Ambits', function ($row) {
return $row->equipmentAssociationAmbit->ambitsEquipment->ambits_description;
})
->addColumn('order_tasks', function ($row) {
return $row->orderEquipmentTasks->map(function ($task) {
return $task->elementalTask->elemental_tasks_code;
})->implode('-');
})
->addColumn('current_task', function ($row) {
return $row->controlEquipmentWorkstation->map(function ($task) {
return $task->elementalTask->elemental_tasks_code;
})->implode('-');
})
->addColumn('Inspec', function ($row) {
return $row->hasInspectionYes() ? 'Sim' : 'Nao';
})
->toJson();
}
public function receiveWorkstationProject($receiveNumberProject)
{
$model = ConstructionWorkstation::where('company_projects_id', $receiveNumberProject)->with('workstationsAssociationTasks');
return DataTables::of($model)
->addColumn('workstations_Association_Tasks', function ($row) {
return $row->workstationsAssociationTasks->map(function ($task) {
return $task->elementalTask->elemental_tasks_code;
})->implode('-');
})
->toJson();
}
}

View File

@ -0,0 +1,163 @@
<?php
namespace App\Http\Controllers;
use App\Models\TypeUser;
use Illuminate\Support\Facades\Hash;
use Illuminate\Support\Facades\Auth;
use Illuminate\Validation\ValidationException;
use Illuminate\Http\Request;
use Laravel\Fortify\Contracts\LoginResponse as LoginResponseContract;
use Laravel\Fortify\Contracts\LogoutResponse as LogoutResponseContract;
use Laravel\Fortify\Fortify;
use Laravel\Fortify\Http\Controllers\AuthenticatedSessionController as FortifyAuthenticatedSessionController;
use Illuminate\Auth\Events\Verified;
use App\Models\User;
class userController extends Controller
{
public function UserProfile($id)
{
$user = User::find($id);
return view('Admin.profile', compact('user'));
}
public function yourVerificationMethod(Request $request, $id, $hash)
{
$user = User::findOrFail($id);
if (!hash_equals((string) $hash, sha1($user->getEmailForVerification()))) {
abort(403, 'Unauthorized action.');
}
if ($user->markEmailAsVerified()) {
event(new Verified($user));
}
// Redirecione para a rota desejada após a verificação bem-sucedida
return redirect()->route('CreateUsers')->with('message', 'E-mail verificado com sucesso!');
}
public function authenticate(Request $request)
{
$request->validate([
Fortify::username() => 'required|string',
'password' => 'required|string',
]);
$user = User::where('email', $request->email)->first();
if ($user && Hash::check($request->password, $user->password)) {
return $user;
}
return null;
}
public static function authenticateAndRedirect(Request $request)
{
$user = User::where('email', $request->email)->first();
if ($user && Hash::check($request->password, $user->password)) {
Auth::login($user);
return redirect()->route('CreateUsers');
}
return null;
}
public function ListCompanies()
{
$users = User::with('userType')->where('type_users', '=', 3)->get();
return view('Admin.CrudUsers.listCompany', compact('users'));
}
//Busca Todos os utilizadores Exeto as 'Empresas'
public function ListUsers()
{
$users = User::with('userType')->where('type_users', '<>', 3)->get();
return view('Admin.CrudUsers.listUsers', compact('users'));
}
public function show($id)
{
$user = User::findOrFail($id);
return view('Admin.CrudUsers.showUsers', compact('user'));
}
public function edit($id)
{
$user = User::findOrFail($id);
return view('Admin.CrudUsers.editUsers', compact('user'));
}
public function update(Request $request, User $user)
{
$request->validate([
'name' => 'required',
'email' => 'required|email|unique:users,email,' . $user->user_id,
'password' => 'nullable|min:8|confirmed',
'user_type' => 'required',
'user_phone' => 'required',
'user_nif' => 'required',
]);
$user->update([
'name' => $request->get('name'),
'email' => $request->get('email'),
'password' => $request->filled('password') ? Hash::make($request->get('password')) : $user->password,
'user_type' => $request->get('user_type'),
'user_phone' => $request->get('user_phone'),
'user_nif' => $request->get('user_nif'),
]);
return redirect('/users/ListUsers')->with('success', 'Usuario atualizado com Sucesso!!');
}
public function create()
{
return view('users.create');
}
public function store(Request $request)
{
$request->validate([
'name' => 'required',
'email' => 'required|email|unique:users',
'password' => 'required|min:8|confirmed',
'user_type' => 'required',
'user_phone' => 'required',
'user_nif' => 'required',
]);
$user = new User([
'name' => $request->get('name'),
'email' => $request->get('email'),
'password' => Hash::make($request->get('password')),
'user_type' => $request->get('user_type'),
'user_phone' => $request->get('user_phone'),
'user_nif' => $request->get('user_nif'),
]);
$user->save();
return redirect('/users')->with('success', 'User created successfully!');
}
public function destroy(User $user)
{
$user->delete();
return redirect('/users/ListUsers')->with('success', 'User deleted successfully!');
}
}

View File

@ -53,6 +53,8 @@ class Kernel extends HttpKernel
* @var array<string, class-string|string>
*/
protected $middlewareAliases = [
'checksuperadmin' => \App\Http\Middleware\CheckSuperAdmin::class,
'checkUserType' => \App\Http\Middleware\CheckUserType::class,
'auth' => \App\Http\Middleware\Authenticate::class,
'auth.basic' => \Illuminate\Auth\Middleware\AuthenticateWithBasicAuth::class,
'auth.session' => \Illuminate\Session\Middleware\AuthenticateSession::class,
@ -63,5 +65,6 @@ class Kernel extends HttpKernel
'signed' => \App\Http\Middleware\ValidateSignature::class,
'throttle' => \Illuminate\Routing\Middleware\ThrottleRequests::class,
'verified' => \Illuminate\Auth\Middleware\EnsureEmailIsVerified::class,
];
}

View File

@ -0,0 +1,24 @@
<?php
namespace App\Http\Middleware;
use Closure;
use Illuminate\Http\Request;
use Symfony\Component\HttpFoundation\Response;
class CheckSuperAdmin
{
/**
* Handle an incoming request.
*
* @param \Closure(\Illuminate\Http\Request): (\Symfony\Component\HttpFoundation\Response) $next
*/
public function handle(Request $request, Closure $next): Response
{
if (auth()->user() && auth()->user()->userType->type_user == 'Super_Administrador') {
return $next($request);
}
return abort(403, 'Acesso não autorizado.');
}
}

View File

@ -0,0 +1,33 @@
<?php
namespace App\Http\Middleware;
use Closure;
use Illuminate\Http\Request;
use Symfony\Component\HttpFoundation\Response;
use Illuminate\Support\Facades\Auth;
use Illuminate\Support\Facades\Route;
class CheckUserType
{
/**
* Handle an incoming request.
*
* @param \Closure(\Illuminate\Http\Request): (\Symfony\Component\HttpFoundation\Response) $next
*/
public function handle(Request $request, Closure $next)
{
if (auth()->user()) {
$currentRoute = Route::currentRouteName();
$userType = auth()->user()->userType->type_user;
if ($userType == 'Super_Administrador' && $currentRoute != 'home') {
return redirect()->route('home');
} elseif ($userType == 'Tecnicos' && $currentRoute != 'enterWorkstation') {
return redirect()->route('enterWorkstation');
}
}
return $next($request);
}
}

View File

@ -19,11 +19,29 @@ public function handle(Request $request, Closure $next, string ...$guards): Resp
{
$guards = empty($guards) ? [null] : $guards;
// foreach ($guards as $guard) {
// if (Auth::guard($guard)->check()) {
// return redirect(RouteServiceProvider::HOME);
// }
// }
foreach ($guards as $guard) {
if (Auth::guard($guard)->check()) {
if (Auth::guard($guard)->check() && ! $request->is('register') && ! $request->is('email/verify')) {
$user = Auth::guard($guard)->user();
switch ($user->user_type) {
case 'Cliente':
return redirect(RouteServiceProvider::CLIENTE);
case 'Tecnicos':
return redirect(RouteServiceProvider::TECNICO);
case 'inspetor':
return redirect(RouteServiceProvider::INSPETOR);
// Adicione outros tipos de usuário e suas rotas aqui
default:
return redirect(RouteServiceProvider::HOME);
}
}
}
return $next($request);
}

View File

@ -11,7 +11,7 @@ class VerifyCsrfToken extends Middleware
*
* @var array<int, string>
*/
protected $except = [
//
];
// protected $except = [
// '/create-equipament-project',
// ];
}

View File

@ -0,0 +1,59 @@
<?php
namespace App\Mail;
use Illuminate\Bus\Queueable;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Mail\Mailable;
use Illuminate\Mail\Mailables\Content;
use Illuminate\Mail\Mailables\Envelope;
use Illuminate\Queue\SerializesModels;
class NewUserNotification extends Mailable
{
use Queueable, SerializesModels;
/**
* Create a new message instance.
*/
public function __construct()
{
//
}
public function build()
{
return $this->subject('Um novo usuário para criar')
->view('emails.new_user_notification');
}
/**
* Get the message envelope.
*/
public function envelope(): Envelope
{
return new Envelope(
subject: 'New User Notification',
);
}
/**
* Get the message content definition.
*/
public function content(): Content
{
return new Content(
view: 'email.new_user_notification',
);
}
/**
* Get the attachments for the message.
*
* @return array<int, \Illuminate\Mail\Mailables\Attachment>
*/
public function attachments(): array
{
return [];
}
}

View File

@ -0,0 +1,21 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
class AmbitsEquipment extends Model
{
use HasFactory;
protected $table = 'ambits_equipments';
protected $primaryKey = 'ambits_equipment_id';
public $timestamps = false;
public function equipmentAssociationAmbit(){
return $this->hasMany(EquipmentAssociationAmbit::class, 'ambits_id', 'ambits_id');
}
}

View File

@ -0,0 +1,25 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
class CompanyProject extends Model
{
use HasFactory;
protected $table = 'company_projects';
protected $primaryKey = 'company_projects_id';
public $timestamps = false;
public function plants(){
return $this->hasMany(Plant::class,'plant_id', 'plant_id');
}
public function user(){
return $this->hasOneThrough(User::class, Plant::class, 'plant_id', 'user_id');
}
}

View File

@ -0,0 +1,22 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
class ConstructionWorkstation extends Model
{
use HasFactory;
public $timestamps = false;
protected $table = 'construction_workstations';
protected $primaryKey = 'id_workstations';
public function workstationsAssociationTasks()
{
return $this->hasMany(WorkstationsAssociationTasks::class, 'id_workstations','id_workstations');
}
}

View File

@ -0,0 +1,27 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
class ControlEquipmentWorkstation extends Model
{
use HasFactory;
public $timestamps = false;
protected $table = 'control_equipment_workstation';
// protected $primaryKey = 'id';
public function equipment()
{
return $this->belongsTo(Equipment::class, 'equipment_id', 'equipment_id');
}
public function elementalTask()
{
return $this->belongsTo(ElementalTasks::class,'elemental_tasks_id','elemental_tasks_id');
}
}

View File

@ -0,0 +1,31 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
class ElementalTasks extends Model
{
use HasFactory;
public $timestamps = false;
protected $table = 'elemental_tasks';
protected $primaryKey = 'elemental_tasks_id';
public function orderEquipmentTasks()
{
return $this->hasMany(OrderEquipmentTasks::class,'elemental_tasks_id','elemental_tasks_id');
}
public function controlEquipmentWorkstation()
{
return $this->hasMany(ControlEquipmentWorkstation::class, 'elemental_tasks_id', 'elemental_tasks_id');
}
public function workstationsAssociationTasks()
{
return $this->hasMany(WorkstationsAssociationTasks::class,'elemental_tasks_id','elemental_tasks_id');
}
}

67
app/Models/Equipment.php Normal file
View File

@ -0,0 +1,67 @@
<?php
namespace App\Models;
use APP\Models\equipament_type;
use App\Models\factorie;
use App\Models\specific_Attributes_Equipament_Type;
use App\Models\installation;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
class Equipment extends Model
{
use HasFactory;
public $timestamps = false;
protected $table = 'equipments';
protected $primaryKey = 'equipment_id';
public function unit()
{
return $this->belongsTo(Unit::class, 'unit_id', 'unit_id');
}
public function equipmentType()
{
return $this->belongsTo(EquipmentType::class, 'equipment_type_id', 'equipment_type_id');
}
public function specificAttributes()
{
return $this->hasMany(SpecificAttributesEquipmentType::class, 'equipment_id', 'equipment_id')
->join('general_attributes_equipaments', 'specific_attributes_equipament_types.general_attributes_equipment_id', '=', 'general_attributes_equipaments.general_attributes_equipment_id')
->orderBy('general_attributes_equipaments.general_attributes_equipment_description', 'asc');
}
public function equipmentAssociationAmbit()
{
//Antiga hasMany , apenas colocado hasOne para funcionar o datatables
return $this->hasOne(EquipmentAssociationAmbit::class, 'equipment_id', 'equipment_id');
}
public function orderEquipmentTasks()
{
return $this->hasMany(OrderEquipmentTasks::class, 'equipment_id', 'equipment_id');
}
public function equipmentComments()
{
return $this->hasMany(EquipmentComments::class, 'equipment_id', 'equipment_id');
}
public function controlEquipmentWorkstation()
{
return $this->hasMany(ControlEquipmentWorkstation::class, 'equipment_id', 'equipment_id');
}
public function hasInspectionYes()
{
return $this->orderEquipmentTasks()->where('inspection', 'Sim')->exists();
}
}

View File

@ -0,0 +1,28 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
class EquipmentAssociationAmbit extends Model
{
use HasFactory;
public $timestamps = false;
protected $table = 'equipment_association_ambits';
public function equipmentType(){
return $this->belongsTo(EquipmentType::class,'equipment_type_id', 'equipment_type_id');
}
public function ambitsEquipment(){
return $this->belongsTo(AmbitsEquipment::class,'ambits_id', 'ambits_id');
}
public function Equipment(){
return $this->belongsTo(Equipment::class,'equipment_id', 'equipment_id');
}
}

View File

@ -0,0 +1,23 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
class EquipmentComments extends Model
{
use HasFactory;
public $timestamps = false;
protected $table = 'equipment_comments';
protected $primaryKey = 'equipment_comment_id';
public function equipment()
{
return $this->belongsTo(Equipment::class, 'equipment_id', 'equipment_id');
}
}

View File

@ -0,0 +1,32 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
class EquipmentType extends Model
{
use HasFactory;
protected $table = 'equipment_types';
protected $primaryKey = 'equipament_type_id';
public function equipments(){
return $this->hasMany(Equipment::class, 'equipment_type_id', 'equipment_type_id');
}
public function pendingEquipments(){
return $this->hasMany(PendingEquipment::class, 'pending_equipment_type_id', 'equipment_type_id');
}
public function specificAttributesEquipamentTypes(){
return $this->hasMany(SpecificAttributesEquipmentType::class, 'equipment_type_id', 'equipment_type_id');
}
public function equipmentAssociationAmbits(){
return $this->hasMany(EquipmentAssociationAmbit::class,'equipment_type_id', 'equipment_type_id');
}
}

View File

@ -0,0 +1,19 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
class FurtherTasks extends Model
{
use HasFactory;
public $timestamps = false;
protected $table = 'further_tasks';
protected $primaryKey = 'further_tasks_id';
}

View File

@ -0,0 +1,20 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
class GeneralAttributesEquipment extends Model
{
use HasFactory;
protected $table = 'general_attributes_equipaments';
protected $primaryKey = 'general_attributes_equipment_id';
public function specificAttributes()
{
return $this->hasMany(SpecificAttributesEquipmentType::class, 'general_attributes_equipment_id', 'general_attributes_equipment_id');
}
}

View File

@ -0,0 +1,24 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
class OrderEquipmentTasks extends Model
{
use HasFactory;
public $timestamps = false;
protected $table = 'ordered_equipment_tasks';
public function equipment()
{
return $this->belongsTo(Equipment::class, 'equipment_id', 'equipment_id');
}
public function elementalTask()
{
return $this->belongsTo(ElementalTasks::class,'elemental_tasks_id','elemental_tasks_id');
}
}

View File

@ -0,0 +1,28 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
class PendingEquipment extends Model
{
use HasFactory;
public $timestamps = false;
protected $table = 'pending_equipments';
protected $primaryKey = 'pending_equipment_id';
public function unit()
{
return $this->belongsTo(Unit::class, 'pending_equipment_unit_id', 'unit_id');
}
public function equipmentType()
{
return $this->belongsTo(EquipmentType::class, 'pending_equipment_type_id', 'equipment_type_id');
}
}

View File

@ -0,0 +1,38 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
class PendingUser extends Model
{
use HasFactory;
protected $table = 'pending_users';
protected $primaryKey = 'pending_user_id';
/**
* The attributes that are mass assignable.
*
* @var array<int, string>
*/
protected $fillable = [
'pending_name',
'pending_email',
'pending_phone',
'pending_nif',
'pending_password',
];
/**
* The attributes that should be hidden for serialization.
*
* @var array<int, string>
*/
protected $hidden = [
'password',
];
}

29
app/Models/Plant.php Normal file
View File

@ -0,0 +1,29 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
class Plant extends Model
{
use HasFactory;
protected $table = 'plants';
protected $primaryKey = 'plant_id';
public $timestamps = false;
public function user(){
return $this->belongsTo(User::class, 'user_id', 'user_id');
}
public function companyProjects(){
return $this->hasMany(CompanyProject::class, 'plant_id', 'plant_id');
}
public function units(){
return $this->hasMany(Unit::class, 'plant_id', 'plant_id');
}
}

View File

@ -0,0 +1,34 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
class SpecificAttributesEquipmentType extends Model
{
use HasFactory;
public $timestamps = false;
protected $table = 'specific_attributes_equipament_types';
public function equipmentType(){
return $this->belongsTo(EquipmentType::class,'equipment_type_id', 'equipment_type_id');
}
public function equipment()
{
return $this->belongsTo(Equipment::class, 'equipment_id', 'equipment_id');
}
public function generalAttributesEquipment()
{
return $this->belongsTo(GeneralAttributesEquipament::class, 'general_attributes_equipment_id', 'general_attributes_equipment_id');
}
}

View File

@ -0,0 +1,13 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
class TasksAssociationAmbits extends Model
{
use HasFactory;
protected $table = 'tasks_association_ambits';
}

20
app/Models/TypeUser.php Normal file
View File

@ -0,0 +1,20 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
class TypeUser extends Model
{
use HasFactory;
protected $table = 'type_users';
protected $primaryKey = 'type_user_id';
public function users()
{
return $this->hasMany(User::class, 'type_users', 'type_user_id');
}
}

24
app/Models/Unit.php Normal file
View File

@ -0,0 +1,24 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
class Unit extends Model
{
use HasFactory;
public $timestamps = false;
protected $table = 'units';
protected $primaryKey = 'unit_id';
public function equipments(){
return $this->hasMany(Equipment::class, 'unit_id', 'unit_id');
}
public function pendingEquipments(){
return $this->hasMany(PendingEquipment::class, 'pending_equipment_unit_id', 'unit_id');
}
}

View File

@ -8,10 +8,19 @@
use Illuminate\Notifications\Notifiable;
use Laravel\Sanctum\HasApiTokens;
// use Illuminate\Contracts\Auth\MustVerifyEmail;
class User extends Authenticatable
// implements MustVerifyEmail
{
use HasApiTokens, HasFactory, Notifiable;
protected $table = 'users';
protected $primaryKey = 'user_id';
/**
* The attributes that are mass assignable.
*
@ -21,6 +30,10 @@ class User extends Authenticatable
'name',
'email',
'password',
'user_type',
'user_phone',
'user_nif'
];
/**
@ -41,4 +54,17 @@ class User extends Authenticatable
protected $casts = [
'email_verified_at' => 'datetime',
];
// public function typeUser(){
// return $this->belongsTo(TypeUser::class, 'type_users', 'type_user_id');
// }
public function userType() {
return $this->belongsTo(TypeUser::class, 'type_users', 'type_user_id');
}
public function plants(){
return $this->hasMany(Plant::class,'user_id', 'user_id');
}
}

View File

@ -0,0 +1,25 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
class WorkstationsAssociationTasks extends Model
{
use HasFactory;
public $timestamps = false;
protected $table = 'workstations_association_tasks';
public function constructionWorkstation()
{
return $this->belongsTo(ConstructionWorkstation::class, 'id_workstations','id_workstations');
}
public function elementalTask()
{
return $this->belongsTo(ElementalTasks::class,'elemental_tasks_id','elemental_tasks_id');
}
}

View File

@ -10,6 +10,16 @@
use Illuminate\Http\Request;
use Illuminate\Support\Facades\RateLimiter;
use Illuminate\Support\ServiceProvider;
use App\Models\User;
use Illuminate\Support\Facades\Hash;
use Laravel\Fortify\Contracts\ResetPasswordViewResponse;
use App\Http\Controllers\Auth\ResetPasswordController;
use App\Http\Controllers\Auth\PasswordResetLinkController;
use Laravel\Fortify\Fortify;
class FortifyServiceProvider extends ServiceProvider
@ -19,7 +29,9 @@ class FortifyServiceProvider extends ServiceProvider
*/
public function register(): void
{
//
$this->app->singleton(ResetPasswordController::class, function () {
return new ResetPasswordController();
});
}
/**
@ -32,11 +44,35 @@ public function boot(): void
return view('auth.login');
});
Fortify::registerView(function () {
return view('auth.register');
});
Fortify::verifyEmailView(function () {
return view('auth.verify-email');
});
Fortify::authenticateUsing(function (Request $request) {
$email = $request->input('email');
// Verifica se "@" já está presente no e-mail. Se não, adiciona "@isptgroup.com" ao final.
if (!str_contains($email, '@')) {
$email .= '@isptgroup.com';
}
$password = $request->input('password');
$user = User::where('email', $email)->first();
if ($user && Hash::check($password, $user->password)) {
return $user;
}
});
Fortify::createUsersUsing(CreateNewUser::class);
Fortify::updateUserProfileInformationUsing(UpdateUserProfileInformation::class);
Fortify::updateUserPasswordsUsing(UpdateUserPassword::class);
Fortify::resetUserPasswordsUsing(ResetUserPassword::class);
RateLimiter::for('login', function (Request $request) {
$email = (string) $request->email;
@ -47,5 +83,30 @@ public function boot(): void
RateLimiter::for('two-factor', function (Request $request) {
return Limit::perMinute(5)->by($request->session()->get('login.id'));
});
Fortify::resetUserPasswordsUsing(ResetUserPassword::class);
Fortify::requestPasswordResetLinkView(function () {
return view('auth.forgot-password');
});
$this->registerPasswordResetResponseBindings();
Fortify::resetPasswordView(function ($request) {
return view('auth.reset-password', ['token' => $request->route('token')]);
});
}
protected function registerPasswordResetResponseBindings()
{
$this->app->singleton(SendPasswordResetLinkViewResponse::class, function () {
return view('auth.forgot-password');
});
$this->app->singleton(ResetPasswordViewResponse::class, function () {
return view('auth.reset-password');
});
}
}

View File

@ -19,6 +19,11 @@ class RouteServiceProvider extends ServiceProvider
*/
public const HOME = '/';
// public const HOME = '/home';
public const CLIENTE = '/cliente';
public const TECNICO = '/Tecnicos';
public const INSPETOR = '/inspetor';
/**
* Define your route model bindings, pattern filters, and other route configuration.
*/

View File

@ -6,11 +6,15 @@
"license": "MIT",
"require": {
"php": "^8.1",
"guzzlehttp/guzzle": "^7.2",
"guzzlehttp/guzzle": "^7.5",
"laravel/fortify": "^1.17",
"laravel/framework": "^10.8",
"laravel/sanctum": "^3.2",
"laravel/tinker": "^2.8"
"laravel/tinker": "^2.8",
"phpoffice/phpspreadsheet": "^1.28",
"symfony/http-client": "^6.2",
"symfony/mailgun-mailer": "^6.2",
"yajra/laravel-datatables-oracle": "^10.3.1"
},
"require-dev": {
"fakerphp/faker": "^1.9.1",

786
composer.lock generated
View File

@ -4,7 +4,7 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically"
],
"content-hash": "245aaa8f3ba6d74abbfa93a3545386ff",
"content-hash": "51ebbc942093bdb678f8cecc025df588",
"packages": [
{
"name": "bacon/bacon-qr-code",
@ -536,6 +536,67 @@
],
"time": "2023-01-14T14:17:03+00:00"
},
{
"name": "ezyang/htmlpurifier",
"version": "v4.16.0",
"source": {
"type": "git",
"url": "https://github.com/ezyang/htmlpurifier.git",
"reference": "523407fb06eb9e5f3d59889b3978d5bfe94299c8"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/ezyang/htmlpurifier/zipball/523407fb06eb9e5f3d59889b3978d5bfe94299c8",
"reference": "523407fb06eb9e5f3d59889b3978d5bfe94299c8",
"shasum": ""
},
"require": {
"php": "~5.6.0 || ~7.0.0 || ~7.1.0 || ~7.2.0 || ~7.3.0 || ~7.4.0 || ~8.0.0 || ~8.1.0 || ~8.2.0"
},
"require-dev": {
"cerdic/css-tidy": "^1.7 || ^2.0",
"simpletest/simpletest": "dev-master"
},
"suggest": {
"cerdic/css-tidy": "If you want to use the filter 'Filter.ExtractStyleBlocks'.",
"ext-bcmath": "Used for unit conversion and imagecrash protection",
"ext-iconv": "Converts text to and from non-UTF-8 encodings",
"ext-tidy": "Used for pretty-printing HTML"
},
"type": "library",
"autoload": {
"files": [
"library/HTMLPurifier.composer.php"
],
"psr-0": {
"HTMLPurifier": "library/"
},
"exclude-from-classmap": [
"/library/HTMLPurifier/Language/"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"LGPL-2.1-or-later"
],
"authors": [
{
"name": "Edward Z. Yang",
"email": "admin@htmlpurifier.org",
"homepage": "http://ezyang.com"
}
],
"description": "Standards compliant HTML filter written in PHP",
"homepage": "http://htmlpurifier.org/",
"keywords": [
"html"
],
"support": {
"issues": "https://github.com/ezyang/htmlpurifier/issues",
"source": "https://github.com/ezyang/htmlpurifier/tree/v4.16.0"
},
"time": "2022-09-18T07:06:19+00:00"
},
{
"name": "fruitcake/php-cors",
"version": "v1.2.0",
@ -1869,6 +1930,191 @@
],
"time": "2022-04-17T13:12:02+00:00"
},
{
"name": "maennchen/zipstream-php",
"version": "v2.4.0",
"source": {
"type": "git",
"url": "https://github.com/maennchen/ZipStream-PHP.git",
"reference": "3fa72e4c71a43f9e9118752a5c90e476a8dc9eb3"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/maennchen/ZipStream-PHP/zipball/3fa72e4c71a43f9e9118752a5c90e476a8dc9eb3",
"reference": "3fa72e4c71a43f9e9118752a5c90e476a8dc9eb3",
"shasum": ""
},
"require": {
"ext-mbstring": "*",
"myclabs/php-enum": "^1.5",
"php": "^8.0",
"psr/http-message": "^1.0"
},
"require-dev": {
"ext-zip": "*",
"friendsofphp/php-cs-fixer": "^3.9",
"guzzlehttp/guzzle": "^6.5.3 || ^7.2.0",
"mikey179/vfsstream": "^1.6",
"php-coveralls/php-coveralls": "^2.4",
"phpunit/phpunit": "^8.5.8 || ^9.4.2",
"vimeo/psalm": "^5.0"
},
"type": "library",
"autoload": {
"psr-4": {
"ZipStream\\": "src/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Paul Duncan",
"email": "pabs@pablotron.org"
},
{
"name": "Jonatan Männchen",
"email": "jonatan@maennchen.ch"
},
{
"name": "Jesse Donat",
"email": "donatj@gmail.com"
},
{
"name": "András Kolesár",
"email": "kolesar@kolesar.hu"
}
],
"description": "ZipStream is a library for dynamically streaming dynamic zip files from PHP without writing to the disk at all on the server.",
"keywords": [
"stream",
"zip"
],
"support": {
"issues": "https://github.com/maennchen/ZipStream-PHP/issues",
"source": "https://github.com/maennchen/ZipStream-PHP/tree/v2.4.0"
},
"funding": [
{
"url": "https://github.com/maennchen",
"type": "github"
},
{
"url": "https://opencollective.com/zipstream",
"type": "open_collective"
}
],
"time": "2022-12-08T12:29:14+00:00"
},
{
"name": "markbaker/complex",
"version": "3.0.2",
"source": {
"type": "git",
"url": "https://github.com/MarkBaker/PHPComplex.git",
"reference": "95c56caa1cf5c766ad6d65b6344b807c1e8405b9"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/MarkBaker/PHPComplex/zipball/95c56caa1cf5c766ad6d65b6344b807c1e8405b9",
"reference": "95c56caa1cf5c766ad6d65b6344b807c1e8405b9",
"shasum": ""
},
"require": {
"php": "^7.2 || ^8.0"
},
"require-dev": {
"dealerdirect/phpcodesniffer-composer-installer": "dev-master",
"phpcompatibility/php-compatibility": "^9.3",
"phpunit/phpunit": "^7.0 || ^8.0 || ^9.0",
"squizlabs/php_codesniffer": "^3.7"
},
"type": "library",
"autoload": {
"psr-4": {
"Complex\\": "classes/src/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Mark Baker",
"email": "mark@lange.demon.co.uk"
}
],
"description": "PHP Class for working with complex numbers",
"homepage": "https://github.com/MarkBaker/PHPComplex",
"keywords": [
"complex",
"mathematics"
],
"support": {
"issues": "https://github.com/MarkBaker/PHPComplex/issues",
"source": "https://github.com/MarkBaker/PHPComplex/tree/3.0.2"
},
"time": "2022-12-06T16:21:08+00:00"
},
{
"name": "markbaker/matrix",
"version": "3.0.1",
"source": {
"type": "git",
"url": "https://github.com/MarkBaker/PHPMatrix.git",
"reference": "728434227fe21be27ff6d86621a1b13107a2562c"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/MarkBaker/PHPMatrix/zipball/728434227fe21be27ff6d86621a1b13107a2562c",
"reference": "728434227fe21be27ff6d86621a1b13107a2562c",
"shasum": ""
},
"require": {
"php": "^7.1 || ^8.0"
},
"require-dev": {
"dealerdirect/phpcodesniffer-composer-installer": "dev-master",
"phpcompatibility/php-compatibility": "^9.3",
"phpdocumentor/phpdocumentor": "2.*",
"phploc/phploc": "^4.0",
"phpmd/phpmd": "2.*",
"phpunit/phpunit": "^7.0 || ^8.0 || ^9.0",
"sebastian/phpcpd": "^4.0",
"squizlabs/php_codesniffer": "^3.7"
},
"type": "library",
"autoload": {
"psr-4": {
"Matrix\\": "classes/src/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Mark Baker",
"email": "mark@demon-angel.eu"
}
],
"description": "PHP Class for working with matrices",
"homepage": "https://github.com/MarkBaker/PHPMatrix",
"keywords": [
"mathematics",
"matrix",
"vector"
],
"support": {
"issues": "https://github.com/MarkBaker/PHPMatrix/issues",
"source": "https://github.com/MarkBaker/PHPMatrix/tree/3.0.1"
},
"time": "2022-12-02T22:17:43+00:00"
},
{
"name": "monolog/monolog",
"version": "3.3.1",
@ -1970,6 +2216,69 @@
],
"time": "2023-02-06T13:46:10+00:00"
},
{
"name": "myclabs/php-enum",
"version": "1.8.4",
"source": {
"type": "git",
"url": "https://github.com/myclabs/php-enum.git",
"reference": "a867478eae49c9f59ece437ae7f9506bfaa27483"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/myclabs/php-enum/zipball/a867478eae49c9f59ece437ae7f9506bfaa27483",
"reference": "a867478eae49c9f59ece437ae7f9506bfaa27483",
"shasum": ""
},
"require": {
"ext-json": "*",
"php": "^7.3 || ^8.0"
},
"require-dev": {
"phpunit/phpunit": "^9.5",
"squizlabs/php_codesniffer": "1.*",
"vimeo/psalm": "^4.6.2"
},
"type": "library",
"autoload": {
"psr-4": {
"MyCLabs\\Enum\\": "src/"
},
"classmap": [
"stubs/Stringable.php"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "PHP Enum contributors",
"homepage": "https://github.com/myclabs/php-enum/graphs/contributors"
}
],
"description": "PHP Enum implementation",
"homepage": "http://github.com/myclabs/php-enum",
"keywords": [
"enum"
],
"support": {
"issues": "https://github.com/myclabs/php-enum/issues",
"source": "https://github.com/myclabs/php-enum/tree/1.8.4"
},
"funding": [
{
"url": "https://github.com/mnapoli",
"type": "github"
},
{
"url": "https://tidelift.com/funding/github/packagist/myclabs/php-enum",
"type": "tidelift"
}
],
"time": "2022-08-04T09:53:51+00:00"
},
{
"name": "nesbot/carbon",
"version": "2.66.0",
@ -2223,16 +2532,16 @@
},
{
"name": "nikic/php-parser",
"version": "v4.15.4",
"version": "v4.15.5",
"source": {
"type": "git",
"url": "https://github.com/nikic/PHP-Parser.git",
"reference": "6bb5176bc4af8bcb7d926f88718db9b96a2d4290"
"reference": "11e2663a5bc9db5d714eedb4277ee300403b4a9e"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/6bb5176bc4af8bcb7d926f88718db9b96a2d4290",
"reference": "6bb5176bc4af8bcb7d926f88718db9b96a2d4290",
"url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/11e2663a5bc9db5d714eedb4277ee300403b4a9e",
"reference": "11e2663a5bc9db5d714eedb4277ee300403b4a9e",
"shasum": ""
},
"require": {
@ -2273,9 +2582,9 @@
],
"support": {
"issues": "https://github.com/nikic/PHP-Parser/issues",
"source": "https://github.com/nikic/PHP-Parser/tree/v4.15.4"
"source": "https://github.com/nikic/PHP-Parser/tree/v4.15.5"
},
"time": "2023-03-05T19:49:14+00:00"
"time": "2023-05-19T20:20:00+00:00"
},
{
"name": "nunomaduro/termwind",
@ -2430,6 +2739,111 @@
},
"time": "2022-06-14T06:56:20+00:00"
},
{
"name": "phpoffice/phpspreadsheet",
"version": "1.28.0",
"source": {
"type": "git",
"url": "https://github.com/PHPOffice/PhpSpreadsheet.git",
"reference": "6e81cf39bbd93ebc3a4e8150444c41e8aa9b769a"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/PHPOffice/PhpSpreadsheet/zipball/6e81cf39bbd93ebc3a4e8150444c41e8aa9b769a",
"reference": "6e81cf39bbd93ebc3a4e8150444c41e8aa9b769a",
"shasum": ""
},
"require": {
"ext-ctype": "*",
"ext-dom": "*",
"ext-fileinfo": "*",
"ext-gd": "*",
"ext-iconv": "*",
"ext-libxml": "*",
"ext-mbstring": "*",
"ext-simplexml": "*",
"ext-xml": "*",
"ext-xmlreader": "*",
"ext-xmlwriter": "*",
"ext-zip": "*",
"ext-zlib": "*",
"ezyang/htmlpurifier": "^4.15",
"maennchen/zipstream-php": "^2.1",
"markbaker/complex": "^3.0",
"markbaker/matrix": "^3.0",
"php": "^7.4 || ^8.0",
"psr/http-client": "^1.0",
"psr/http-factory": "^1.0",
"psr/simple-cache": "^1.0 || ^2.0 || ^3.0"
},
"require-dev": {
"dealerdirect/phpcodesniffer-composer-installer": "dev-main",
"dompdf/dompdf": "^1.0 || ^2.0",
"friendsofphp/php-cs-fixer": "^3.2",
"mitoteam/jpgraph": "^10.2.4",
"mpdf/mpdf": "^8.1.1",
"phpcompatibility/php-compatibility": "^9.3",
"phpstan/phpstan": "^1.1",
"phpstan/phpstan-phpunit": "^1.0",
"phpunit/phpunit": "^8.5 || ^9.0",
"squizlabs/php_codesniffer": "^3.7",
"tecnickcom/tcpdf": "^6.5"
},
"suggest": {
"dompdf/dompdf": "Option for rendering PDF with PDF Writer",
"ext-intl": "PHP Internationalization Functions",
"mitoteam/jpgraph": "Option for rendering charts, or including charts with PDF or HTML Writers",
"mpdf/mpdf": "Option for rendering PDF with PDF Writer",
"tecnickcom/tcpdf": "Option for rendering PDF with PDF Writer"
},
"type": "library",
"autoload": {
"psr-4": {
"PhpOffice\\PhpSpreadsheet\\": "src/PhpSpreadsheet"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Maarten Balliauw",
"homepage": "https://blog.maartenballiauw.be"
},
{
"name": "Mark Baker",
"homepage": "https://markbakeruk.net"
},
{
"name": "Franck Lefevre",
"homepage": "https://rootslabs.net"
},
{
"name": "Erik Tilt"
},
{
"name": "Adrien Crivelli"
}
],
"description": "PHPSpreadsheet - Read, Create and Write Spreadsheet documents in PHP - Spreadsheet engine",
"homepage": "https://github.com/PHPOffice/PhpSpreadsheet",
"keywords": [
"OpenXML",
"excel",
"gnumeric",
"ods",
"php",
"spreadsheet",
"xls",
"xlsx"
],
"support": {
"issues": "https://github.com/PHPOffice/PhpSpreadsheet/issues",
"source": "https://github.com/PHPOffice/PhpSpreadsheet/tree/1.28.0"
},
"time": "2023-02-25T12:24:49+00:00"
},
{
"name": "phpoption/phpoption",
"version": "1.9.1",
@ -2769,16 +3183,16 @@
},
{
"name": "psr/http-message",
"version": "2.0",
"version": "1.1",
"source": {
"type": "git",
"url": "https://github.com/php-fig/http-message.git",
"reference": "402d35bcb92c70c026d1a6a9883f06b2ead23d71"
"reference": "cb6ce4845ce34a8ad9e68117c10ee90a29919eba"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/php-fig/http-message/zipball/402d35bcb92c70c026d1a6a9883f06b2ead23d71",
"reference": "402d35bcb92c70c026d1a6a9883f06b2ead23d71",
"url": "https://api.github.com/repos/php-fig/http-message/zipball/cb6ce4845ce34a8ad9e68117c10ee90a29919eba",
"reference": "cb6ce4845ce34a8ad9e68117c10ee90a29919eba",
"shasum": ""
},
"require": {
@ -2787,7 +3201,7 @@
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "2.0.x-dev"
"dev-master": "1.1.x-dev"
}
},
"autoload": {
@ -2802,7 +3216,7 @@
"authors": [
{
"name": "PHP-FIG",
"homepage": "https://www.php-fig.org/"
"homepage": "http://www.php-fig.org/"
}
],
"description": "Common interface for HTTP messages",
@ -2816,9 +3230,9 @@
"response"
],
"support": {
"source": "https://github.com/php-fig/http-message/tree/2.0"
"source": "https://github.com/php-fig/http-message/tree/1.1"
},
"time": "2023-04-04T09:54:51+00:00"
"time": "2023-04-04T09:50:52+00:00"
},
{
"name": "psr/log",
@ -3224,16 +3638,16 @@
},
{
"name": "symfony/console",
"version": "v6.2.8",
"version": "v6.2.10",
"source": {
"type": "git",
"url": "https://github.com/symfony/console.git",
"reference": "3582d68a64a86ec25240aaa521ec8bc2342b369b"
"reference": "12288d9f4500f84a4d02254d4aa968b15488476f"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/console/zipball/3582d68a64a86ec25240aaa521ec8bc2342b369b",
"reference": "3582d68a64a86ec25240aaa521ec8bc2342b369b",
"url": "https://api.github.com/repos/symfony/console/zipball/12288d9f4500f84a4d02254d4aa968b15488476f",
"reference": "12288d9f4500f84a4d02254d4aa968b15488476f",
"shasum": ""
},
"require": {
@ -3300,7 +3714,7 @@
"terminal"
],
"support": {
"source": "https://github.com/symfony/console/tree/v6.2.8"
"source": "https://github.com/symfony/console/tree/v6.2.10"
},
"funding": [
{
@ -3316,7 +3730,7 @@
"type": "tidelift"
}
],
"time": "2023-03-29T21:42:15+00:00"
"time": "2023-04-28T13:37:43+00:00"
},
{
"name": "symfony/css-selector",
@ -3747,6 +4161,175 @@
],
"time": "2023-02-16T09:57:23+00:00"
},
{
"name": "symfony/http-client",
"version": "v6.2.9",
"source": {
"type": "git",
"url": "https://github.com/symfony/http-client.git",
"reference": "7daf5d24c21a683164688b95bb73b7a4bd3b32fc"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/http-client/zipball/7daf5d24c21a683164688b95bb73b7a4bd3b32fc",
"reference": "7daf5d24c21a683164688b95bb73b7a4bd3b32fc",
"shasum": ""
},
"require": {
"php": ">=8.1",
"psr/log": "^1|^2|^3",
"symfony/deprecation-contracts": "^2.1|^3",
"symfony/http-client-contracts": "^3",
"symfony/service-contracts": "^1.0|^2|^3"
},
"provide": {
"php-http/async-client-implementation": "*",
"php-http/client-implementation": "*",
"psr/http-client-implementation": "1.0",
"symfony/http-client-implementation": "3.0"
},
"require-dev": {
"amphp/amp": "^2.5",
"amphp/http-client": "^4.2.1",
"amphp/http-tunnel": "^1.0",
"amphp/socket": "^1.1",
"guzzlehttp/promises": "^1.4",
"nyholm/psr7": "^1.0",
"php-http/httplug": "^1.0|^2.0",
"psr/http-client": "^1.0",
"symfony/dependency-injection": "^5.4|^6.0",
"symfony/http-kernel": "^5.4|^6.0",
"symfony/process": "^5.4|^6.0",
"symfony/stopwatch": "^5.4|^6.0"
},
"type": "library",
"autoload": {
"psr-4": {
"Symfony\\Component\\HttpClient\\": ""
},
"exclude-from-classmap": [
"/Tests/"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Nicolas Grekas",
"email": "p@tchwork.com"
},
{
"name": "Symfony Community",
"homepage": "https://symfony.com/contributors"
}
],
"description": "Provides powerful methods to fetch HTTP resources synchronously or asynchronously",
"homepage": "https://symfony.com",
"keywords": [
"http"
],
"support": {
"source": "https://github.com/symfony/http-client/tree/v6.2.9"
},
"funding": [
{
"url": "https://symfony.com/sponsor",
"type": "custom"
},
{
"url": "https://github.com/fabpot",
"type": "github"
},
{
"url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
"type": "tidelift"
}
],
"time": "2023-04-11T16:03:19+00:00"
},
{
"name": "symfony/http-client-contracts",
"version": "v3.2.1",
"source": {
"type": "git",
"url": "https://github.com/symfony/http-client-contracts.git",
"reference": "df2ecd6cb70e73c1080e6478aea85f5f4da2c48b"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/http-client-contracts/zipball/df2ecd6cb70e73c1080e6478aea85f5f4da2c48b",
"reference": "df2ecd6cb70e73c1080e6478aea85f5f4da2c48b",
"shasum": ""
},
"require": {
"php": ">=8.1"
},
"suggest": {
"symfony/http-client-implementation": ""
},
"type": "library",
"extra": {
"branch-alias": {
"dev-main": "3.3-dev"
},
"thanks": {
"name": "symfony/contracts",
"url": "https://github.com/symfony/contracts"
}
},
"autoload": {
"psr-4": {
"Symfony\\Contracts\\HttpClient\\": ""
},
"exclude-from-classmap": [
"/Test/"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Nicolas Grekas",
"email": "p@tchwork.com"
},
{
"name": "Symfony Community",
"homepage": "https://symfony.com/contributors"
}
],
"description": "Generic abstractions related to HTTP clients",
"homepage": "https://symfony.com",
"keywords": [
"abstractions",
"contracts",
"decoupling",
"interfaces",
"interoperability",
"standards"
],
"support": {
"source": "https://github.com/symfony/http-client-contracts/tree/v3.2.1"
},
"funding": [
{
"url": "https://symfony.com/sponsor",
"type": "custom"
},
{
"url": "https://github.com/fabpot",
"type": "github"
},
{
"url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
"type": "tidelift"
}
],
"time": "2023-03-01T10:32:47+00:00"
},
{
"name": "symfony/http-foundation",
"version": "v6.2.8",
@ -4015,6 +4598,71 @@
],
"time": "2023-03-14T15:00:05+00:00"
},
{
"name": "symfony/mailgun-mailer",
"version": "v6.2.7",
"source": {
"type": "git",
"url": "https://github.com/symfony/mailgun-mailer.git",
"reference": "9e27b8ec2f6ee7575c6229a61be1578a5a4b21ee"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/mailgun-mailer/zipball/9e27b8ec2f6ee7575c6229a61be1578a5a4b21ee",
"reference": "9e27b8ec2f6ee7575c6229a61be1578a5a4b21ee",
"shasum": ""
},
"require": {
"php": ">=8.1",
"symfony/mailer": "^5.4.21|^6.2.7"
},
"require-dev": {
"symfony/http-client": "^5.4|^6.0"
},
"type": "symfony-mailer-bridge",
"autoload": {
"psr-4": {
"Symfony\\Component\\Mailer\\Bridge\\Mailgun\\": ""
},
"exclude-from-classmap": [
"/Tests/"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Fabien Potencier",
"email": "fabien@symfony.com"
},
{
"name": "Symfony Community",
"homepage": "https://symfony.com/contributors"
}
],
"description": "Symfony Mailgun Mailer Bridge",
"homepage": "https://symfony.com",
"support": {
"source": "https://github.com/symfony/mailgun-mailer/tree/v6.2.7"
},
"funding": [
{
"url": "https://symfony.com/sponsor",
"type": "custom"
},
{
"url": "https://github.com/fabpot",
"type": "github"
},
{
"url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
"type": "tidelift"
}
],
"time": "2023-02-21T10:35:38+00:00"
},
{
"name": "symfony/mime",
"version": "v6.2.7",
@ -5685,6 +6333,90 @@
"source": "https://github.com/webmozarts/assert/tree/1.11.0"
},
"time": "2022-06-03T18:03:27+00:00"
},
{
"name": "yajra/laravel-datatables-oracle",
"version": "v10.6.0",
"source": {
"type": "git",
"url": "https://github.com/yajra/laravel-datatables.git",
"reference": "66299d930c1dd626e9d264cd8b0cfa0ddee13366"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/yajra/laravel-datatables/zipball/66299d930c1dd626e9d264cd8b0cfa0ddee13366",
"reference": "66299d930c1dd626e9d264cd8b0cfa0ddee13366",
"shasum": ""
},
"require": {
"illuminate/database": "^9|^10",
"illuminate/filesystem": "^9|^10",
"illuminate/http": "^9|^10",
"illuminate/support": "^9|^10",
"illuminate/view": "^9|^10",
"php": "^8.0.2"
},
"require-dev": {
"nunomaduro/larastan": "^2.4",
"orchestra/testbench": "^8",
"yajra/laravel-datatables-html": "^9.3.4|^10"
},
"suggest": {
"yajra/laravel-datatables-buttons": "Plugin for server-side exporting of dataTables.",
"yajra/laravel-datatables-editor": "Plugin to use DataTables Editor (requires a license).",
"yajra/laravel-datatables-export": "Plugin for server-side exporting using livewire and queue worker.",
"yajra/laravel-datatables-fractal": "Plugin for server-side response using Fractal.",
"yajra/laravel-datatables-html": "Plugin for server-side HTML builder of dataTables."
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "10.x-dev"
},
"laravel": {
"providers": [
"Yajra\\DataTables\\DataTablesServiceProvider"
],
"aliases": {
"DataTables": "Yajra\\DataTables\\Facades\\DataTables"
}
}
},
"autoload": {
"files": [
"src/helper.php"
],
"psr-4": {
"Yajra\\DataTables\\": "src/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Arjay Angeles",
"email": "aqangeles@gmail.com"
}
],
"description": "jQuery DataTables API for Laravel 4|5|6|7|8|9|10",
"keywords": [
"datatables",
"jquery",
"laravel"
],
"support": {
"issues": "https://github.com/yajra/laravel-datatables/issues",
"source": "https://github.com/yajra/laravel-datatables/tree/v10.6.0"
},
"funding": [
{
"url": "https://github.com/sponsors/yajra",
"type": "github"
}
],
"time": "2023-06-29T10:05:01+00:00"
}
],
"packages-dev": [
@ -7069,16 +7801,16 @@
},
{
"name": "sebastian/diff",
"version": "5.0.1",
"version": "5.0.3",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/diff.git",
"reference": "aae9a0a43bff37bd5d8d0311426c87bf36153f02"
"reference": "912dc2fbe3e3c1e7873313cc801b100b6c68c87b"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/aae9a0a43bff37bd5d8d0311426c87bf36153f02",
"reference": "aae9a0a43bff37bd5d8d0311426c87bf36153f02",
"url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/912dc2fbe3e3c1e7873313cc801b100b6c68c87b",
"reference": "912dc2fbe3e3c1e7873313cc801b100b6c68c87b",
"shasum": ""
},
"require": {
@ -7124,7 +7856,7 @@
"support": {
"issues": "https://github.com/sebastianbergmann/diff/issues",
"security": "https://github.com/sebastianbergmann/diff/security/policy",
"source": "https://github.com/sebastianbergmann/diff/tree/5.0.1"
"source": "https://github.com/sebastianbergmann/diff/tree/5.0.3"
},
"funding": [
{
@ -7132,7 +7864,7 @@
"type": "github"
}
],
"time": "2023-03-23T05:12:41+00:00"
"time": "2023-05-01T07:48:21+00:00"
},
{
"name": "sebastian/environment",

View File

@ -83,7 +83,9 @@
|
*/
'locale' => 'en',
// 'locale' => 'en',
'locale' => 'pt',
/*
|--------------------------------------------------------------------------
@ -170,7 +172,9 @@
App\Providers\RouteServiceProvider::class,
// Laravel\Fortify\FortifyServiceProvider::class,
App\Providers\FortifyServiceProvider::class
App\Providers\FortifyServiceProvider::class,
])->toArray(),
/*

View File

@ -63,6 +63,7 @@
'home' => RouteServiceProvider::HOME,
/*
|--------------------------------------------------------------------------
| Fortify Routes Prefix / Subdomain
@ -134,8 +135,8 @@
'features' => [
Features::registration(),
Features::resetPasswords(),
// Features::emailVerification(),
// Features::updateProfileInformation(),
// Features::updatePasswords(),
// Features::twoFactorAuthentication([
@ -144,9 +145,4 @@
// // 'window' => 0,
// ]),
],
];

View File

@ -51,6 +51,8 @@
'mailgun' => [
'transport' => 'mailgun',
'domain' => env('MAILGUN_DOMAIN'),
'secret' => env('MAILGUN_SECRET'),
// 'client' => [
// 'timeout' => 5,
// ],

View File

@ -0,0 +1,38 @@
<?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
{
Schema::table('users', function (Blueprint $table) {
$table->enum('user_type', ['Cliente', 'Administrador', 'Super_Administrador','Gestor_Obra','Tecnicos','inspetor'])
->default('Cliente')
->after('password');
$table->integer('user_phone')
->after('user_type')
->nullable();
$table->string('user_nif', 15)->after('user_phone');
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::table('users', function (Blueprint $table) {
$table->dropColumn('user_type');
$table->dropColumn('user_phone');
$table->dropColumn('user_nif');
});
}
};

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

12
public/StyleAdmin/css/adminlte.min.css vendored Normal file

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,66 @@
:root {
--prm-color: #0381ff;
--prm-gray: #dfdfdf;
}
/* CSS */
.steps {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 2rem;
position: relative;
}
.step-button {
width: 50px;
height: 50px;
border-radius: 50%;
border: none;
background-color: var(--prm-gray);
transition: .4s;
display:flex;
align-items: center;
text-align: center;
justify-content: center;
}
.step-button[aria-expanded="true"] {
width: 60px;
height: 60px;
background-color: var(--prm-color);
color: #fff;
}
.done {
background-color: var(--prm-color);
color: #fff;
}
.step-item {
z-index: 10;
text-align: center;
}
#progress {
-webkit-appearance:none;
position: absolute;
width: 95%;
z-index: 5;
height: 10px;
margin-left: 18px;
margin-bottom: 18px;
}
/* to customize progress bar */
#progress::-webkit-progress-value {
background-color: var(--prm-color);
transition: .5s ease;
}
#progress::-webkit-progress-bar {
background-color: var(--prm-gray);
}

View File

@ -0,0 +1,74 @@
:root {
--prm-color: #0381ff;
--prm-gray: #b1b1b1;
}
/* unnecessary */
body {
height: 100vh;
display: flex;
align-items: center;
justify-content: space-evenly;
flex-direction:column;
}
section{
width:100%;
}
/* unnecessary finished*/
/* CSS */
.steps {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 2rem;
position: relative;
}
.step-button {
width: 50px;
height: 50px;
border-radius: 50%;
border: none;
background-color: var(--prm-gray);
transition: .4s;
}
.step-button[aria-expanded="true"] {
width: 60px;
height: 60px;
background-color: var(--prm-color);
color: #fff;
}
.done {
background-color: var(--prm-color);
color: #fff;
}
.step-item {
z-index: 10;
text-align: center;
}
#progress {
-webkit-appearance:none;
position: absolute;
width: 95%;
z-index: 5;
height: 10px;
margin-left: 18px;
margin-bottom: 18px;
}
/* to customize progress bar */
#progress::-webkit-progress-value {
background-color: var(--prm-color);
transition: .5s ease;
}
#progress::-webkit-progress-bar {
background-color: var(--prm-gray);
}

View File

@ -0,0 +1,78 @@
body{
overflow-x: hidden;
}
#employer-post-new-job .res-steps-container .res-steps {
width: 25%;
text-align: center;
float: left;
cursor: pointer
}
#employer-post-new-job .res-steps-container .res-steps .res-step-bar {
-webkit-border-radius: 50% !important;
-moz-border-radius: 50% !important;
-ms-border-radius: 50% !important;
border-radius: 50% !important;
background: #0aa7e1;
display: inline-block;
height: 40px;
width: 40px;
margin-top: 10px;
text-align: center;
color: #fff;
padding-top: 7px;
font-size: 20px
}
#employer-post-new-job .res-steps-container .res-steps .res-progress-title {
text-align: center;
font-size: 15px;
padding-top: 10px;
display: block
}
#employer-post-new-job .res-steps-container .res-steps .res-progress-bar {
height: 5px;
background: #0aa7e1;
width: 50%;
margin: -22px 0 0 50%;
float: left
}
#employer-post-new-job .res-steps-container .res-step-two .res-progress-bar, #employer-post-new-job .res-steps-container .res-step-three .res-progress-bar, #employer-post-new-job .res-steps-container .res-step-four .res-progress-bar {
width: 100%;
margin-left: 0%
}
#employer-post-new-job .res-steps-container .res-step-four .res-progress-bar {
width: 50%;
margin-right: 50%
}
#employer-post-new-job .res-step-form {
border: 1px solid #d2d2d2;
box-shadow: 0px 6px 4px -2px silver;
position: absolute
}
#employer-post-new-job .res-step-form h3 {
margin: 10px 0;
color: #0aa7e1;
font-size: 18px
}
#employer-post-new-job .res-step-form .form-horizontal label {
font-weight: normal
}
#employer-post-new-job .res-form-two, #employer-post-new-job .res-form-three, #employer-post-new-job .res-form-four .res-form-five{
left: 150%
}
#employer-post-new-job .active .res-step-bar {
background: #f19b20 !important
}
#employer-post-new-job .active .res-progress-title {
color: #0aa7e1
}

BIN
public/img/AdminLTELogo.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB

BIN
public/img/avatar.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.9 KiB

BIN
public/img/avatar2.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.1 KiB

BIN
public/img/avatar3.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.0 KiB

BIN
public/img/avatar4.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

BIN
public/img/avatar5.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.4 KiB

BIN
public/img/boxed-bg.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 121 KiB

BIN
public/img/boxed-bg.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 43 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

BIN
public/img/credit/visa.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 339 B

BIN
public/img/icons.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

BIN
public/img/ispt.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.2 KiB

BIN
public/img/ispt.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.0 KiB

BIN
public/img/logo4.0.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 290 KiB

BIN
public/img/photo1.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 647 KiB

BIN
public/img/photo2.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 413 KiB

BIN
public/img/photo3.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 362 KiB

BIN
public/img/photo4.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 MiB

BIN
public/img/prod-1.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 44 KiB

BIN
public/img/prod-2.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 32 KiB

BIN
public/img/prod-3.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

BIN
public/img/prod-4.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 26 KiB

BIN
public/img/prod-5.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 31 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.9 KiB

57
public/js/.eslintrc.json Normal file
View File

@ -0,0 +1,57 @@
{
"root": true,
"parserOptions": {
"ecmaVersion": 5,
"sourceType": "script"
},
"env": {
"jquery": true
},
"extends": [
"plugin:unicorn/recommended",
"xo",
"xo/browser"
],
"rules": {
"capitalized-comments": "off",
"comma-dangle": [
"error",
"never"
],
"indent": [
"error",
2,
{
"MemberExpression": "off",
"SwitchCase": 1
}
],
"multiline-ternary": [
"error",
"always-multiline"
],
"no-var": "off",
"object-curly-spacing": [
"error",
"always"
],
"object-shorthand": "off",
"prefer-arrow-callback": "off",
"semi": [
"error",
"never"
],
"strict": "error",
"unicorn/no-array-for-each": "off",
"unicorn/no-for-loop": "off",
"unicorn/no-null": "off",
"unicorn/numeric-separators-style": "off",
"unicorn/prefer-dataset": "off",
"unicorn/prefer-includes": "off",
"unicorn/prefer-module": "off",
"unicorn/prefer-node-append": "off",
"unicorn/prefer-query-selector": "off",
"unicorn/prefer-spread": "off",
"unicorn/prevent-abbreviations": "off"
}
}

3069
public/js/adminlte.js Normal file

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

7
public/js/adminlte.min.js vendored Normal file

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

689
public/js/demo.js Normal file
View File

@ -0,0 +1,689 @@
/**
* AdminLTE Demo Menu
* ------------------
* You should not use this file in production.
* This file is for demo purposes only.
*/
/* eslint-disable camelcase */
(function ($) {
'use strict'
setTimeout(function () {
if (window.___browserSync___ === undefined && Number(localStorage.getItem('AdminLTE:Demo:MessageShowed')) < Date.now()) {
localStorage.setItem('AdminLTE:Demo:MessageShowed', (Date.now()) + (15 * 60 * 1000))
// eslint-disable-next-line no-alert
alert('You load AdminLTE\'s "demo.js", \nthis file is only created for testing purposes!')
}
}, 1000)
function capitalizeFirstLetter(string) {
return string.charAt(0).toUpperCase() + string.slice(1)
}
function createSkinBlock(colors, callback, noneSelected) {
var $block = $('<select />', {
class: noneSelected ? 'custom-select mb-3 border-0' : 'custom-select mb-3 text-light border-0 ' + colors[0].replace(/accent-|navbar-/, 'bg-')
})
if (noneSelected) {
var $default = $('<option />', {
text: 'None Selected'
})
$block.append($default)
}
colors.forEach(function (color) {
var $color = $('<option />', {
class: (typeof color === 'object' ? color.join(' ') : color).replace('navbar-', 'bg-').replace('accent-', 'bg-'),
text: capitalizeFirstLetter((typeof color === 'object' ? color.join(' ') : color).replace(/navbar-|accent-|bg-/, '').replace('-', ' '))
})
$block.append($color)
})
if (callback) {
$block.on('change', callback)
}
return $block
}
var $sidebar = $('.control-sidebar')
var $container = $('<div />', {
class: 'p-3 control-sidebar-content'
})
$sidebar.append($container)
// Checkboxes
$container.append(
'<h5>Customize AdminLTE</h5><hr class="mb-2"/>'
)
var $dark_mode_checkbox = $('<input />', {
type: 'checkbox',
value: 1,
checked: $('body').hasClass('dark-mode'),
class: 'mr-1'
}).on('click', function () {
if ($(this).is(':checked')) {
$('body').addClass('dark-mode')
} else {
$('body').removeClass('dark-mode')
}
})
var $dark_mode_container = $('<div />', { class: 'mb-4' }).append($dark_mode_checkbox).append('<span>Dark Mode</span>')
$container.append($dark_mode_container)
$container.append('<h6>Header Options</h6>')
var $header_fixed_checkbox = $('<input />', {
type: 'checkbox',
value: 1,
checked: $('body').hasClass('layout-navbar-fixed'),
class: 'mr-1'
}).on('click', function () {
if ($(this).is(':checked')) {
$('body').addClass('layout-navbar-fixed')
} else {
$('body').removeClass('layout-navbar-fixed')
}
})
var $header_fixed_container = $('<div />', { class: 'mb-1' }).append($header_fixed_checkbox).append('<span>Fixed</span>')
$container.append($header_fixed_container)
var $dropdown_legacy_offset_checkbox = $('<input />', {
type: 'checkbox',
value: 1,
checked: $('.main-header').hasClass('dropdown-legacy'),
class: 'mr-1'
}).on('click', function () {
if ($(this).is(':checked')) {
$('.main-header').addClass('dropdown-legacy')
} else {
$('.main-header').removeClass('dropdown-legacy')
}
})
var $dropdown_legacy_offset_container = $('<div />', { class: 'mb-1' }).append($dropdown_legacy_offset_checkbox).append('<span>Dropdown Legacy Offset</span>')
$container.append($dropdown_legacy_offset_container)
var $no_border_checkbox = $('<input />', {
type: 'checkbox',
value: 1,
checked: $('.main-header').hasClass('border-bottom-0'),
class: 'mr-1'
}).on('click', function () {
if ($(this).is(':checked')) {
$('.main-header').addClass('border-bottom-0')
} else {
$('.main-header').removeClass('border-bottom-0')
}
})
var $no_border_container = $('<div />', { class: 'mb-4' }).append($no_border_checkbox).append('<span>No border</span>')
$container.append($no_border_container)
$container.append('<h6>Sidebar Options</h6>')
var $sidebar_collapsed_checkbox = $('<input />', {
type: 'checkbox',
value: 1,
checked: $('body').hasClass('sidebar-collapse'),
class: 'mr-1'
}).on('click', function () {
if ($(this).is(':checked')) {
$('body').addClass('sidebar-collapse')
$(window).trigger('resize')
} else {
$('body').removeClass('sidebar-collapse')
$(window).trigger('resize')
}
})
var $sidebar_collapsed_container = $('<div />', { class: 'mb-1' }).append($sidebar_collapsed_checkbox).append('<span>Collapsed</span>')
$container.append($sidebar_collapsed_container)
$(document).on('collapsed.lte.pushmenu', '[data-widget="pushmenu"]', function () {
$sidebar_collapsed_checkbox.prop('checked', true)
})
$(document).on('shown.lte.pushmenu', '[data-widget="pushmenu"]', function () {
$sidebar_collapsed_checkbox.prop('checked', false)
})
var $sidebar_fixed_checkbox = $('<input />', {
type: 'checkbox',
value: 1,
checked: $('body').hasClass('layout-fixed'),
class: 'mr-1'
}).on('click', function () {
if ($(this).is(':checked')) {
$('body').addClass('layout-fixed')
$(window).trigger('resize')
} else {
$('body').removeClass('layout-fixed')
$(window).trigger('resize')
}
})
var $sidebar_fixed_container = $('<div />', { class: 'mb-1' }).append($sidebar_fixed_checkbox).append('<span>Fixed</span>')
$container.append($sidebar_fixed_container)
var $sidebar_mini_checkbox = $('<input />', {
type: 'checkbox',
value: 1,
checked: $('body').hasClass('sidebar-mini'),
class: 'mr-1'
}).on('click', function () {
if ($(this).is(':checked')) {
$('body').addClass('sidebar-mini')
} else {
$('body').removeClass('sidebar-mini')
}
})
var $sidebar_mini_container = $('<div />', { class: 'mb-1' }).append($sidebar_mini_checkbox).append('<span>Sidebar Mini</span>')
$container.append($sidebar_mini_container)
var $sidebar_mini_md_checkbox = $('<input />', {
type: 'checkbox',
value: 1,
checked: $('body').hasClass('sidebar-mini-md'),
class: 'mr-1'
}).on('click', function () {
if ($(this).is(':checked')) {
$('body').addClass('sidebar-mini-md')
} else {
$('body').removeClass('sidebar-mini-md')
}
})
var $sidebar_mini_md_container = $('<div />', { class: 'mb-1' }).append($sidebar_mini_md_checkbox).append('<span>Sidebar Mini MD</span>')
$container.append($sidebar_mini_md_container)
var $sidebar_mini_xs_checkbox = $('<input />', {
type: 'checkbox',
value: 1,
checked: $('body').hasClass('sidebar-mini-xs'),
class: 'mr-1'
}).on('click', function () {
if ($(this).is(':checked')) {
$('body').addClass('sidebar-mini-xs')
} else {
$('body').removeClass('sidebar-mini-xs')
}
})
var $sidebar_mini_xs_container = $('<div />', { class: 'mb-1' }).append($sidebar_mini_xs_checkbox).append('<span>Sidebar Mini XS</span>')
$container.append($sidebar_mini_xs_container)
var $flat_sidebar_checkbox = $('<input />', {
type: 'checkbox',
value: 1,
checked: $('.nav-sidebar').hasClass('nav-flat'),
class: 'mr-1'
}).on('click', function () {
if ($(this).is(':checked')) {
$('.nav-sidebar').addClass('nav-flat')
} else {
$('.nav-sidebar').removeClass('nav-flat')
}
})
var $flat_sidebar_container = $('<div />', { class: 'mb-1' }).append($flat_sidebar_checkbox).append('<span>Nav Flat Style</span>')
$container.append($flat_sidebar_container)
var $legacy_sidebar_checkbox = $('<input />', {
type: 'checkbox',
value: 1,
checked: $('.nav-sidebar').hasClass('nav-legacy'),
class: 'mr-1'
}).on('click', function () {
if ($(this).is(':checked')) {
$('.nav-sidebar').addClass('nav-legacy')
} else {
$('.nav-sidebar').removeClass('nav-legacy')
}
})
var $legacy_sidebar_container = $('<div />', { class: 'mb-1' }).append($legacy_sidebar_checkbox).append('<span>Nav Legacy Style</span>')
$container.append($legacy_sidebar_container)
var $compact_sidebar_checkbox = $('<input />', {
type: 'checkbox',
value: 1,
checked: $('.nav-sidebar').hasClass('nav-compact'),
class: 'mr-1'
}).on('click', function () {
if ($(this).is(':checked')) {
$('.nav-sidebar').addClass('nav-compact')
} else {
$('.nav-sidebar').removeClass('nav-compact')
}
})
var $compact_sidebar_container = $('<div />', { class: 'mb-1' }).append($compact_sidebar_checkbox).append('<span>Nav Compact</span>')
$container.append($compact_sidebar_container)
var $child_indent_sidebar_checkbox = $('<input />', {
type: 'checkbox',
value: 1,
checked: $('.nav-sidebar').hasClass('nav-child-indent'),
class: 'mr-1'
}).on('click', function () {
if ($(this).is(':checked')) {
$('.nav-sidebar').addClass('nav-child-indent')
} else {
$('.nav-sidebar').removeClass('nav-child-indent')
}
})
var $child_indent_sidebar_container = $('<div />', { class: 'mb-1' }).append($child_indent_sidebar_checkbox).append('<span>Nav Child Indent</span>')
$container.append($child_indent_sidebar_container)
var $child_hide_sidebar_checkbox = $('<input />', {
type: 'checkbox',
value: 1,
checked: $('.nav-sidebar').hasClass('nav-collapse-hide-child'),
class: 'mr-1'
}).on('click', function () {
if ($(this).is(':checked')) {
$('.nav-sidebar').addClass('nav-collapse-hide-child')
} else {
$('.nav-sidebar').removeClass('nav-collapse-hide-child')
}
})
var $child_hide_sidebar_container = $('<div />', { class: 'mb-1' }).append($child_hide_sidebar_checkbox).append('<span>Nav Child Hide on Collapse</span>')
$container.append($child_hide_sidebar_container)
var $no_expand_sidebar_checkbox = $('<input />', {
type: 'checkbox',
value: 1,
checked: $('.main-sidebar').hasClass('sidebar-no-expand'),
class: 'mr-1'
}).on('click', function () {
if ($(this).is(':checked')) {
$('.main-sidebar').addClass('sidebar-no-expand')
} else {
$('.main-sidebar').removeClass('sidebar-no-expand')
}
})
var $no_expand_sidebar_container = $('<div />', { class: 'mb-4' }).append($no_expand_sidebar_checkbox).append('<span>Disable Hover/Focus Auto-Expand</span>')
$container.append($no_expand_sidebar_container)
$container.append('<h6>Footer Options</h6>')
var $footer_fixed_checkbox = $('<input />', {
type: 'checkbox',
value: 1,
checked: $('body').hasClass('layout-footer-fixed'),
class: 'mr-1'
}).on('click', function () {
if ($(this).is(':checked')) {
$('body').addClass('layout-footer-fixed')
} else {
$('body').removeClass('layout-footer-fixed')
}
})
var $footer_fixed_container = $('<div />', { class: 'mb-4' }).append($footer_fixed_checkbox).append('<span>Fixed</span>')
$container.append($footer_fixed_container)
$container.append('<h6>Small Text Options</h6>')
var $text_sm_body_checkbox = $('<input />', {
type: 'checkbox',
value: 1,
checked: $('body').hasClass('text-sm'),
class: 'mr-1'
}).on('click', function () {
if ($(this).is(':checked')) {
$('body').addClass('text-sm')
} else {
$('body').removeClass('text-sm')
}
})
var $text_sm_body_container = $('<div />', { class: 'mb-1' }).append($text_sm_body_checkbox).append('<span>Body</span>')
$container.append($text_sm_body_container)
var $text_sm_header_checkbox = $('<input />', {
type: 'checkbox',
value: 1,
checked: $('.main-header').hasClass('text-sm'),
class: 'mr-1'
}).on('click', function () {
if ($(this).is(':checked')) {
$('.main-header').addClass('text-sm')
} else {
$('.main-header').removeClass('text-sm')
}
})
var $text_sm_header_container = $('<div />', { class: 'mb-1' }).append($text_sm_header_checkbox).append('<span>Navbar</span>')
$container.append($text_sm_header_container)
var $text_sm_brand_checkbox = $('<input />', {
type: 'checkbox',
value: 1,
checked: $('.brand-link').hasClass('text-sm'),
class: 'mr-1'
}).on('click', function () {
if ($(this).is(':checked')) {
$('.brand-link').addClass('text-sm')
} else {
$('.brand-link').removeClass('text-sm')
}
})
var $text_sm_brand_container = $('<div />', { class: 'mb-1' }).append($text_sm_brand_checkbox).append('<span>Brand</span>')
$container.append($text_sm_brand_container)
var $text_sm_sidebar_checkbox = $('<input />', {
type: 'checkbox',
value: 1,
checked: $('.nav-sidebar').hasClass('text-sm'),
class: 'mr-1'
}).on('click', function () {
if ($(this).is(':checked')) {
$('.nav-sidebar').addClass('text-sm')
} else {
$('.nav-sidebar').removeClass('text-sm')
}
})
var $text_sm_sidebar_container = $('<div />', { class: 'mb-1' }).append($text_sm_sidebar_checkbox).append('<span>Sidebar Nav</span>')
$container.append($text_sm_sidebar_container)
var $text_sm_footer_checkbox = $('<input />', {
type: 'checkbox',
value: 1,
checked: $('.main-footer').hasClass('text-sm'),
class: 'mr-1'
}).on('click', function () {
if ($(this).is(':checked')) {
$('.main-footer').addClass('text-sm')
} else {
$('.main-footer').removeClass('text-sm')
}
})
var $text_sm_footer_container = $('<div />', { class: 'mb-4' }).append($text_sm_footer_checkbox).append('<span>Footer</span>')
$container.append($text_sm_footer_container)
// Color Arrays
var navbar_dark_skins = [
'navbar-primary',
'navbar-secondary',
'navbar-info',
'navbar-success',
'navbar-danger',
'navbar-indigo',
'navbar-purple',
'navbar-pink',
'navbar-navy',
'navbar-lightblue',
'navbar-teal',
'navbar-cyan',
'navbar-dark',
'navbar-gray-dark',
'navbar-gray'
]
var navbar_light_skins = [
'navbar-light',
'navbar-warning',
'navbar-white',
'navbar-orange'
]
var sidebar_colors = [
'bg-primary',
'bg-warning',
'bg-info',
'bg-danger',
'bg-success',
'bg-indigo',
'bg-lightblue',
'bg-navy',
'bg-purple',
'bg-fuchsia',
'bg-pink',
'bg-maroon',
'bg-orange',
'bg-lime',
'bg-teal',
'bg-olive'
]
var accent_colors = [
'accent-primary',
'accent-warning',
'accent-info',
'accent-danger',
'accent-success',
'accent-indigo',
'accent-lightblue',
'accent-navy',
'accent-purple',
'accent-fuchsia',
'accent-pink',
'accent-maroon',
'accent-orange',
'accent-lime',
'accent-teal',
'accent-olive'
]
var sidebar_skins = [
'sidebar-dark-primary',
'sidebar-dark-warning',
'sidebar-dark-info',
'sidebar-dark-danger',
'sidebar-dark-success',
'sidebar-dark-indigo',
'sidebar-dark-lightblue',
'sidebar-dark-navy',
'sidebar-dark-purple',
'sidebar-dark-fuchsia',
'sidebar-dark-pink',
'sidebar-dark-maroon',
'sidebar-dark-orange',
'sidebar-dark-lime',
'sidebar-dark-teal',
'sidebar-dark-olive',
'sidebar-light-primary',
'sidebar-light-warning',
'sidebar-light-info',
'sidebar-light-danger',
'sidebar-light-success',
'sidebar-light-indigo',
'sidebar-light-lightblue',
'sidebar-light-navy',
'sidebar-light-purple',
'sidebar-light-fuchsia',
'sidebar-light-pink',
'sidebar-light-maroon',
'sidebar-light-orange',
'sidebar-light-lime',
'sidebar-light-teal',
'sidebar-light-olive'
]
// Navbar Variants
$container.append('<h6>Navbar Variants</h6>')
var $navbar_variants = $('<div />', {
class: 'd-flex'
})
var navbar_all_colors = navbar_dark_skins.concat(navbar_light_skins)
var $navbar_variants_colors = createSkinBlock(navbar_all_colors, function () {
var color = $(this).find('option:selected').attr('class')
var $main_header = $('.main-header')
$main_header.removeClass('navbar-dark').removeClass('navbar-light')
navbar_all_colors.forEach(function (color) {
$main_header.removeClass(color)
})
$(this).removeClass().addClass('custom-select mb-3 text-light border-0 ')
if (navbar_dark_skins.indexOf(color) > -1) {
$main_header.addClass('navbar-dark')
$(this).addClass(color).addClass('text-light')
} else {
$main_header.addClass('navbar-light')
$(this).addClass(color)
}
$main_header.addClass(color)
})
var active_navbar_color = null
$('.main-header')[0].classList.forEach(function (className) {
if (navbar_all_colors.indexOf(className) > -1 && active_navbar_color === null) {
active_navbar_color = className.replace('navbar-', 'bg-')
}
})
$navbar_variants_colors.find('option.' + active_navbar_color).prop('selected', true)
$navbar_variants_colors.removeClass().addClass('custom-select mb-3 text-light border-0 ').addClass(active_navbar_color)
$navbar_variants.append($navbar_variants_colors)
$container.append($navbar_variants)
// Sidebar Colors
$container.append('<h6>Accent Color Variants</h6>')
var $accent_variants = $('<div />', {
class: 'd-flex'
})
$container.append($accent_variants)
$container.append(createSkinBlock(accent_colors, function () {
var color = $(this).find('option:selected').attr('class')
var $body = $('body')
accent_colors.forEach(function (skin) {
$body.removeClass(skin)
})
var accent_color_class = color.replace('bg-', 'accent-')
$body.addClass(accent_color_class)
}, true))
var active_accent_color = null
$('body')[0].classList.forEach(function (className) {
if (accent_colors.indexOf(className) > -1 && active_accent_color === null) {
active_accent_color = className.replace('navbar-', 'bg-')
}
})
// $accent_variants.find('option.' + active_accent_color).prop('selected', true)
// $accent_variants.removeClass().addClass('custom-select mb-3 text-light border-0 ').addClass(active_accent_color)
$container.append('<h6>Dark Sidebar Variants</h6>')
var $sidebar_variants_dark = $('<div />', {
class: 'd-flex'
})
$container.append($sidebar_variants_dark)
var $sidebar_dark_variants = createSkinBlock(sidebar_colors, function () {
var color = $(this).find('option:selected').attr('class')
var sidebar_class = 'sidebar-dark-' + color.replace('bg-', '')
var $sidebar = $('.main-sidebar')
sidebar_skins.forEach(function (skin) {
$sidebar.removeClass(skin)
$sidebar_light_variants.removeClass(skin.replace('sidebar-dark-', 'bg-')).removeClass('text-light')
})
$(this).removeClass().addClass('custom-select mb-3 text-light border-0').addClass(color)
$sidebar_light_variants.find('option').prop('selected', false)
$sidebar.addClass(sidebar_class)
$('.sidebar').removeClass('os-theme-dark').addClass('os-theme-light')
}, true)
$container.append($sidebar_dark_variants)
var active_sidebar_dark_color = null
$('.main-sidebar')[0].classList.forEach(function (className) {
var color = className.replace('sidebar-dark-', 'bg-')
if (sidebar_colors.indexOf(color) > -1 && active_sidebar_dark_color === null) {
active_sidebar_dark_color = color
}
})
$sidebar_dark_variants.find('option.' + active_sidebar_dark_color).prop('selected', true)
$sidebar_dark_variants.removeClass().addClass('custom-select mb-3 text-light border-0 ').addClass(active_sidebar_dark_color)
$container.append('<h6>Light Sidebar Variants</h6>')
var $sidebar_variants_light = $('<div />', {
class: 'd-flex'
})
$container.append($sidebar_variants_light)
var $sidebar_light_variants = createSkinBlock(sidebar_colors, function () {
var color = $(this).find('option:selected').attr('class')
var sidebar_class = 'sidebar-light-' + color.replace('bg-', '')
var $sidebar = $('.main-sidebar')
sidebar_skins.forEach(function (skin) {
$sidebar.removeClass(skin)
$sidebar_dark_variants.removeClass(skin.replace('sidebar-light-', 'bg-')).removeClass('text-light')
})
$(this).removeClass().addClass('custom-select mb-3 text-light border-0').addClass(color)
$sidebar_dark_variants.find('option').prop('selected', false)
$sidebar.addClass(sidebar_class)
$('.sidebar').removeClass('os-theme-light').addClass('os-theme-dark')
}, true)
$container.append($sidebar_light_variants)
var active_sidebar_light_color = null
$('.main-sidebar')[0].classList.forEach(function (className) {
var color = className.replace('sidebar-light-', 'bg-')
if (sidebar_colors.indexOf(color) > -1 && active_sidebar_light_color === null) {
active_sidebar_light_color = color
}
})
if (active_sidebar_light_color !== null) {
$sidebar_light_variants.find('option.' + active_sidebar_light_color).prop('selected', true)
$sidebar_light_variants.removeClass().addClass('custom-select mb-3 text-light border-0 ').addClass(active_sidebar_light_color)
}
var logo_skins = navbar_all_colors
$container.append('<h6>Brand Logo Variants</h6>')
var $logo_variants = $('<div />', {
class: 'd-flex'
})
$container.append($logo_variants)
var $clear_btn = $('<a />', {
href: '#'
}).text('clear').on('click', function (e) {
e.preventDefault()
var $logo = $('.brand-link')
logo_skins.forEach(function (skin) {
$logo.removeClass(skin)
})
})
var $brand_variants = createSkinBlock(logo_skins, function () {
var color = $(this).find('option:selected').attr('class')
var $logo = $('.brand-link')
if (color === 'navbar-light' || color === 'navbar-white') {
$logo.addClass('text-black')
} else {
$logo.removeClass('text-black')
}
logo_skins.forEach(function (skin) {
$logo.removeClass(skin)
})
if (color) {
$(this).removeClass().addClass('custom-select mb-3 border-0').addClass(color).addClass(color !== 'navbar-light' && color !== 'navbar-white' ? 'text-light' : '')
} else {
$(this).removeClass().addClass('custom-select mb-3 border-0')
}
$logo.addClass(color)
}, true).append($clear_btn)
$container.append($brand_variants)
var active_brand_color = null
$('.brand-link')[0].classList.forEach(function (className) {
if (logo_skins.indexOf(className) > -1 && active_brand_color === null) {
active_brand_color = className.replace('navbar-', 'bg-')
}
})
if (active_brand_color) {
$brand_variants.find('option.' + active_brand_color).prop('selected', true)
$brand_variants.removeClass().addClass('custom-select mb-3 text-light border-0 ').addClass(active_brand_color)
}
})(jQuery)

View File

@ -0,0 +1,267 @@
/*
* Author: Abdullah A Almsaeed
* Date: 4 Jan 2014
* Description:
* This is a demo file used only for the main dashboard (index.html)
**/
/* global moment:false, Chart:false, Sparkline:false */
$(function () {
'use strict'
// Make the dashboard widgets sortable Using jquery UI
$('.connectedSortable').sortable({
placeholder: 'sort-highlight',
connectWith: '.connectedSortable',
handle: '.card-header, .nav-tabs',
forcePlaceholderSize: true,
zIndex: 999999
})
$('.connectedSortable .card-header').css('cursor', 'move')
// jQuery UI sortable for the todo list
$('.todo-list').sortable({
placeholder: 'sort-highlight',
handle: '.handle',
forcePlaceholderSize: true,
zIndex: 999999
})
// bootstrap WYSIHTML5 - text editor
$('.textarea').summernote()
$('.daterange').daterangepicker({
ranges: {
Today: [moment(), moment()],
Yesterday: [moment().subtract(1, 'days'), moment().subtract(1, 'days')],
'Last 7 Days': [moment().subtract(6, 'days'), moment()],
'Last 30 Days': [moment().subtract(29, 'days'), moment()],
'This Month': [moment().startOf('month'), moment().endOf('month')],
'Last Month': [moment().subtract(1, 'month').startOf('month'), moment().subtract(1, 'month').endOf('month')]
},
startDate: moment().subtract(29, 'days'),
endDate: moment()
}, function (start, end) {
// eslint-disable-next-line no-alert
alert('You chose: ' + start.format('MMMM D, YYYY') + ' - ' + end.format('MMMM D, YYYY'))
})
/* jQueryKnob */
$('.knob').knob()
// jvectormap data
var visitorsData = {
US: 398, // USA
SA: 400, // Saudi Arabia
CA: 1000, // Canada
DE: 500, // Germany
FR: 760, // France
CN: 300, // China
AU: 700, // Australia
BR: 600, // Brazil
IN: 800, // India
GB: 320, // Great Britain
RU: 3000 // Russia
}
// World map by jvectormap
$('#world-map').vectorMap({
map: 'usa_en',
backgroundColor: 'transparent',
regionStyle: {
initial: {
fill: 'rgba(255, 255, 255, 0.7)',
'fill-opacity': 1,
stroke: 'rgba(0,0,0,.2)',
'stroke-width': 1,
'stroke-opacity': 1
}
},
series: {
regions: [{
values: visitorsData,
scale: ['#ffffff', '#0154ad'],
normalizeFunction: 'polynomial'
}]
},
onRegionLabelShow: function (e, el, code) {
if (typeof visitorsData[code] !== 'undefined') {
el.html(el.html() + ': ' + visitorsData[code] + ' new visitors')
}
}
})
// Sparkline charts
var sparkline1 = new Sparkline($('#sparkline-1')[0], { width: 80, height: 50, lineColor: '#92c1dc', endColor: '#ebf4f9' })
var sparkline2 = new Sparkline($('#sparkline-2')[0], { width: 80, height: 50, lineColor: '#92c1dc', endColor: '#ebf4f9' })
var sparkline3 = new Sparkline($('#sparkline-3')[0], { width: 80, height: 50, lineColor: '#92c1dc', endColor: '#ebf4f9' })
sparkline1.draw([1000, 1200, 920, 927, 931, 1027, 819, 930, 1021])
sparkline2.draw([515, 519, 520, 522, 652, 810, 370, 627, 319, 630, 921])
sparkline3.draw([15, 19, 20, 22, 33, 27, 31, 27, 19, 30, 21])
// The Calender
$('#calendar').datetimepicker({
format: 'L',
inline: true
})
// SLIMSCROLL FOR CHAT WIDGET
$('#chat-box').overlayScrollbars({
height: '250px'
})
/* Chart.js Charts */
// Sales chart
var salesChartCanvas = document.getElementById('revenue-chart-canvas').getContext('2d')
// $('#revenue-chart').get(0).getContext('2d');
var salesChartData = {
labels: ['January', 'February', 'March', 'April', 'May', 'June', 'July'],
datasets: [
{
label: 'Digital Goods',
backgroundColor: 'rgba(60,141,188,0.9)',
borderColor: 'rgba(60,141,188,0.8)',
pointRadius: false,
pointColor: '#3b8bba',
pointStrokeColor: 'rgba(60,141,188,1)',
pointHighlightFill: '#fff',
pointHighlightStroke: 'rgba(60,141,188,1)',
data: [28, 48, 40, 19, 86, 27, 90]
},
{
label: 'Electronics',
backgroundColor: 'rgba(210, 214, 222, 1)',
borderColor: 'rgba(210, 214, 222, 1)',
pointRadius: false,
pointColor: 'rgba(210, 214, 222, 1)',
pointStrokeColor: '#c1c7d1',
pointHighlightFill: '#fff',
pointHighlightStroke: 'rgba(220,220,220,1)',
data: [65, 59, 80, 81, 56, 55, 40]
}
]
}
var salesChartOptions = {
maintainAspectRatio: false,
responsive: true,
legend: {
display: false
},
scales: {
xAxes: [{
gridLines: {
display: false
}
}],
yAxes: [{
gridLines: {
display: false
}
}]
}
}
// This will get the first returned node in the jQuery collection.
// eslint-disable-next-line no-unused-vars
var salesChart = new Chart(salesChartCanvas, { // lgtm[js/unused-local-variable]
type: 'line',
data: salesChartData,
options: salesChartOptions
})
// Donut Chart
var pieChartCanvas = $('#sales-chart-canvas').get(0).getContext('2d')
var pieData = {
labels: [
'Instore Sales',
'Download Sales',
'Mail-Order Sales'
],
datasets: [
{
data: [30, 12, 20],
backgroundColor: ['#f56954', '#00a65a', '#f39c12']
}
]
}
var pieOptions = {
legend: {
display: false
},
maintainAspectRatio: false,
responsive: true
}
// Create pie or douhnut chart
// You can switch between pie and douhnut using the method below.
// eslint-disable-next-line no-unused-vars
var pieChart = new Chart(pieChartCanvas, { // lgtm[js/unused-local-variable]
type: 'doughnut',
data: pieData,
options: pieOptions
})
// Sales graph chart
var salesGraphChartCanvas = $('#line-chart').get(0).getContext('2d')
// $('#revenue-chart').get(0).getContext('2d');
var salesGraphChartData = {
labels: ['2011 Q1', '2011 Q2', '2011 Q3', '2011 Q4', '2012 Q1', '2012 Q2', '2012 Q3', '2012 Q4', '2013 Q1', '2013 Q2'],
datasets: [
{
label: 'Digital Goods',
fill: false,
borderWidth: 2,
lineTension: 0,
spanGaps: true,
borderColor: '#efefef',
pointRadius: 3,
pointHoverRadius: 7,
pointColor: '#efefef',
pointBackgroundColor: '#efefef',
data: [2666, 2778, 4912, 3767, 6810, 5670, 4820, 15073, 10687, 8432]
}
]
}
var salesGraphChartOptions = {
maintainAspectRatio: false,
responsive: true,
legend: {
display: false
},
scales: {
xAxes: [{
ticks: {
fontColor: '#efefef'
},
gridLines: {
display: false,
color: '#efefef',
drawBorder: false
}
}],
yAxes: [{
ticks: {
stepSize: 5000,
fontColor: '#efefef'
},
gridLines: {
display: true,
color: '#efefef',
drawBorder: false
}
}]
}
}
// This will get the first returned node in the jQuery collection.
// eslint-disable-next-line no-unused-vars
var salesGraphChart = new Chart(salesGraphChartCanvas, { // lgtm[js/unused-local-variable]
type: 'line',
data: salesGraphChartData,
options: salesGraphChartOptions
})
})

View File

@ -0,0 +1,270 @@
/* global Chart:false */
$(function () {
'use strict'
/* ChartJS
* -------
* Here we will create a few charts using ChartJS
*/
//-----------------------
// - MONTHLY SALES CHART -
//-----------------------
// Get context with jQuery - using jQuery's .get() method.
var salesChartCanvas = $('#salesChart').get(0).getContext('2d')
var salesChartData = {
labels: ['January', 'February', 'March', 'April', 'May', 'June', 'July'],
datasets: [
{
label: 'Digital Goods',
backgroundColor: 'rgba(60,141,188,0.9)',
borderColor: 'rgba(60,141,188,0.8)',
pointRadius: false,
pointColor: '#3b8bba',
pointStrokeColor: 'rgba(60,141,188,1)',
pointHighlightFill: '#fff',
pointHighlightStroke: 'rgba(60,141,188,1)',
data: [28, 48, 40, 19, 86, 27, 90]
},
{
label: 'Electronics',
backgroundColor: 'rgba(210, 214, 222, 1)',
borderColor: 'rgba(210, 214, 222, 1)',
pointRadius: false,
pointColor: 'rgba(210, 214, 222, 1)',
pointStrokeColor: '#c1c7d1',
pointHighlightFill: '#fff',
pointHighlightStroke: 'rgba(220,220,220,1)',
data: [65, 59, 80, 81, 56, 55, 40]
}
]
}
var salesChartOptions = {
maintainAspectRatio: false,
responsive: true,
legend: {
display: false
},
scales: {
xAxes: [{
gridLines: {
display: false
}
}],
yAxes: [{
gridLines: {
display: false
}
}]
}
}
// This will get the first returned node in the jQuery collection.
// eslint-disable-next-line no-unused-vars
var salesChart = new Chart(salesChartCanvas, {
type: 'line',
data: salesChartData,
options: salesChartOptions
}
)
//---------------------------
// - END MONTHLY SALES CHART -
//---------------------------
//-------------
// - PIE CHART -
//-------------
// Get context with jQuery - using jQuery's .get() method.
var pieChartCanvas = $('#pieChart').get(0).getContext('2d')
var pieData = {
labels: [
'Chrome',
'IE',
'FireFox',
'Safari',
'Opera',
'Navigator'
],
datasets: [
{
data: [700, 500, 400, 600, 300, 100],
backgroundColor: ['#f56954', '#00a65a', '#f39c12', '#00c0ef', '#3c8dbc', '#d2d6de']
}
]
}
var pieOptions = {
legend: {
display: false
}
}
// Create pie or douhnut chart
// You can switch between pie and douhnut using the method below.
// eslint-disable-next-line no-unused-vars
var pieChart = new Chart(pieChartCanvas, {
type: 'doughnut',
data: pieData,
options: pieOptions
})
//-----------------
// - END PIE CHART -
//-----------------
/* jVector Maps
* ------------
* Create a world map with markers
*/
$('#world-map-markers').mapael({
map: {
name: 'usa_states',
zoom: {
enabled: true,
maxLevel: 10
}
}
})
// $('#world-map-markers').vectorMap({
// map : 'world_en',
// normalizeFunction: 'polynomial',
// hoverOpacity : 0.7,
// hoverColor : false,
// backgroundColor : 'transparent',
// regionStyle : {
// initial : {
// fill : 'rgba(210, 214, 222, 1)',
// 'fill-opacity' : 1,
// stroke : 'none',
// 'stroke-width' : 0,
// 'stroke-opacity': 1
// },
// hover : {
// 'fill-opacity': 0.7,
// cursor : 'pointer'
// },
// selected : {
// fill: 'yellow'
// },
// selectedHover: {}
// },
// markerStyle : {
// initial: {
// fill : '#00a65a',
// stroke: '#111'
// }
// },
// markers : [
// {
// latLng: [41.90, 12.45],
// name : 'Vatican City'
// },
// {
// latLng: [43.73, 7.41],
// name : 'Monaco'
// },
// {
// latLng: [-0.52, 166.93],
// name : 'Nauru'
// },
// {
// latLng: [-8.51, 179.21],
// name : 'Tuvalu'
// },
// {
// latLng: [43.93, 12.46],
// name : 'San Marino'
// },
// {
// latLng: [47.14, 9.52],
// name : 'Liechtenstein'
// },
// {
// latLng: [7.11, 171.06],
// name : 'Marshall Islands'
// },
// {
// latLng: [17.3, -62.73],
// name : 'Saint Kitts and Nevis'
// },
// {
// latLng: [3.2, 73.22],
// name : 'Maldives'
// },
// {
// latLng: [35.88, 14.5],
// name : 'Malta'
// },
// {
// latLng: [12.05, -61.75],
// name : 'Grenada'
// },
// {
// latLng: [13.16, -61.23],
// name : 'Saint Vincent and the Grenadines'
// },
// {
// latLng: [13.16, -59.55],
// name : 'Barbados'
// },
// {
// latLng: [17.11, -61.85],
// name : 'Antigua and Barbuda'
// },
// {
// latLng: [-4.61, 55.45],
// name : 'Seychelles'
// },
// {
// latLng: [7.35, 134.46],
// name : 'Palau'
// },
// {
// latLng: [42.5, 1.51],
// name : 'Andorra'
// },
// {
// latLng: [14.01, -60.98],
// name : 'Saint Lucia'
// },
// {
// latLng: [6.91, 158.18],
// name : 'Federated States of Micronesia'
// },
// {
// latLng: [1.3, 103.8],
// name : 'Singapore'
// },
// {
// latLng: [1.46, 173.03],
// name : 'Kiribati'
// },
// {
// latLng: [-21.13, -175.2],
// name : 'Tonga'
// },
// {
// latLng: [15.3, -61.38],
// name : 'Dominica'
// },
// {
// latLng: [-20.2, 57.5],
// name : 'Mauritius'
// },
// {
// latLng: [26.02, 50.55],
// name : 'Bahrain'
// },
// {
// latLng: [0.33, 6.73],
// name : 'São Tomé and Príncipe'
// }
// ]
// })
})
// lgtm [js/unused-local-variable]

View File

@ -0,0 +1,147 @@
/* global Chart:false */
$(function () {
'use strict'
var ticksStyle = {
fontColor: '#495057',
fontStyle: 'bold'
}
var mode = 'index'
var intersect = true
var $salesChart = $('#sales-chart')
// eslint-disable-next-line no-unused-vars
var salesChart = new Chart($salesChart, {
type: 'bar',
data: {
labels: ['JUN', 'JUL', 'AUG', 'SEP', 'OCT', 'NOV', 'DEC'],
datasets: [
{
backgroundColor: '#007bff',
borderColor: '#007bff',
data: [1000, 2000, 3000, 2500, 2700, 2500, 3000]
},
{
backgroundColor: '#ced4da',
borderColor: '#ced4da',
data: [700, 1700, 2700, 2000, 1800, 1500, 2000]
}
]
},
options: {
maintainAspectRatio: false,
tooltips: {
mode: mode,
intersect: intersect
},
hover: {
mode: mode,
intersect: intersect
},
legend: {
display: false
},
scales: {
yAxes: [{
// display: false,
gridLines: {
display: true,
lineWidth: '4px',
color: 'rgba(0, 0, 0, .2)',
zeroLineColor: 'transparent'
},
ticks: $.extend({
beginAtZero: true,
// Include a dollar sign in the ticks
callback: function (value) {
if (value >= 1000) {
value /= 1000
value += 'k'
}
return '$' + value
}
}, ticksStyle)
}],
xAxes: [{
display: true,
gridLines: {
display: false
},
ticks: ticksStyle
}]
}
}
})
var $visitorsChart = $('#visitors-chart')
// eslint-disable-next-line no-unused-vars
var visitorsChart = new Chart($visitorsChart, {
data: {
labels: ['18th', '20th', '22nd', '24th', '26th', '28th', '30th'],
datasets: [{
type: 'line',
data: [100, 120, 170, 167, 180, 177, 160],
backgroundColor: 'transparent',
borderColor: '#007bff',
pointBorderColor: '#007bff',
pointBackgroundColor: '#007bff',
fill: false
// pointHoverBackgroundColor: '#007bff',
// pointHoverBorderColor : '#007bff'
},
{
type: 'line',
data: [60, 80, 70, 67, 80, 77, 100],
backgroundColor: 'tansparent',
borderColor: '#ced4da',
pointBorderColor: '#ced4da',
pointBackgroundColor: '#ced4da',
fill: false
// pointHoverBackgroundColor: '#ced4da',
// pointHoverBorderColor : '#ced4da'
}]
},
options: {
maintainAspectRatio: false,
tooltips: {
mode: mode,
intersect: intersect
},
hover: {
mode: mode,
intersect: intersect
},
legend: {
display: false
},
scales: {
yAxes: [{
// display: false,
gridLines: {
display: true,
lineWidth: '4px',
color: 'rgba(0, 0, 0, .2)',
zeroLineColor: 'transparent'
},
ticks: $.extend({
beginAtZero: true,
suggestedMax: 200
}, ticksStyle)
}],
xAxes: [{
display: true,
gridLines: {
display: false
},
ticks: ticksStyle
}]
}
}
})
})
// lgtm [js/unused-local-variable]

View File

@ -0,0 +1,399 @@
/*!
* Bootstrap Colorpicker - Bootstrap Colorpicker is a modular color picker plugin for Bootstrap 4.
* @package bootstrap-colorpicker
* @version v3.4.0
* @license MIT
* @link https://itsjavi.com/bootstrap-colorpicker/
* @link https://github.com/itsjavi/bootstrap-colorpicker.git
*/
.colorpicker {
position: relative;
display: none;
font-size: inherit;
color: inherit;
text-align: left;
list-style: none;
background-color: #ffffff;
background-clip: padding-box;
border: 1px solid rgba(0, 0, 0, 0.2);
padding: .75rem .75rem;
width: 148px;
border-radius: 4px;
-webkit-box-sizing: content-box;
box-sizing: content-box; }
.colorpicker.colorpicker-disabled,
.colorpicker.colorpicker-disabled * {
cursor: default !important; }
.colorpicker div {
position: relative; }
.colorpicker-popup {
position: absolute;
top: 100%;
left: 0;
float: left;
margin-top: 1px;
z-index: 1060; }
.colorpicker-popup.colorpicker-bs-popover-content {
position: relative;
top: auto;
left: auto;
float: none;
margin: 0;
z-index: initial;
border: none;
padding: 0.25rem 0;
border-radius: 0;
background: none;
-webkit-box-shadow: none;
box-shadow: none; }
.colorpicker:before,
.colorpicker:after {
content: "";
display: table;
clear: both;
line-height: 0; }
.colorpicker-clear {
clear: both;
display: block; }
.colorpicker:before {
content: '';
display: inline-block;
border-left: 7px solid transparent;
border-right: 7px solid transparent;
border-bottom: 7px solid #ccc;
border-bottom-color: rgba(0, 0, 0, 0.2);
position: absolute;
top: -7px;
left: auto;
right: 6px; }
.colorpicker:after {
content: '';
display: inline-block;
border-left: 6px solid transparent;
border-right: 6px solid transparent;
border-bottom: 6px solid #ffffff;
position: absolute;
top: -6px;
left: auto;
right: 7px; }
.colorpicker.colorpicker-with-alpha {
width: 170px; }
.colorpicker.colorpicker-with-alpha .colorpicker-alpha {
display: block; }
.colorpicker-saturation {
position: relative;
width: 126px;
height: 126px;
/* FF3.6+ */
/* Chrome,Safari4+ */
/* Chrome10+,Safari5.1+ */
/* Opera 11.10+ */
/* IE10+ */
background: -webkit-gradient(linear, left top, left bottom, from(transparent), to(black)), -webkit-gradient(linear, left top, right top, from(white), to(rgba(255, 255, 255, 0)));
background: linear-gradient(to bottom, transparent 0%, black 100%), linear-gradient(to right, white 0%, rgba(255, 255, 255, 0) 100%);
/* W3C */
cursor: crosshair;
float: left;
-webkit-box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.2);
box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.2);
margin-bottom: 6px; }
.colorpicker-saturation .colorpicker-guide {
display: block;
height: 6px;
width: 6px;
border-radius: 6px;
border: 1px solid #000;
-webkit-box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.8);
box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.8);
position: absolute;
top: 0;
left: 0;
margin: -3px 0 0 -3px; }
.colorpicker-hue,
.colorpicker-alpha {
position: relative;
width: 16px;
height: 126px;
float: left;
cursor: row-resize;
margin-left: 6px;
margin-bottom: 6px; }
.colorpicker-alpha-color {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%; }
.colorpicker-hue,
.colorpicker-alpha-color {
-webkit-box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.2);
box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.2); }
.colorpicker-hue .colorpicker-guide,
.colorpicker-alpha .colorpicker-guide {
display: block;
height: 4px;
background: rgba(255, 255, 255, 0.8);
border: 1px solid rgba(0, 0, 0, 0.4);
position: absolute;
top: 0;
left: 0;
margin-left: -2px;
margin-top: -2px;
right: -2px;
z-index: 1; }
.colorpicker-hue {
/* FF3.6+ */
/* Chrome,Safari4+ */
/* Chrome10+,Safari5.1+ */
/* Opera 11.10+ */
/* IE10+ */
background: -webkit-gradient(linear, left bottom, left top, from(red), color-stop(8%, #ff8000), color-stop(17%, yellow), color-stop(25%, #80ff00), color-stop(33%, lime), color-stop(42%, #00ff80), color-stop(50%, cyan), color-stop(58%, #0080ff), color-stop(67%, blue), color-stop(75%, #8000ff), color-stop(83%, magenta), color-stop(92%, #ff0080), to(red));
background: linear-gradient(to top, red 0%, #ff8000 8%, yellow 17%, #80ff00 25%, lime 33%, #00ff80 42%, cyan 50%, #0080ff 58%, blue 67%, #8000ff 75%, magenta 83%, #ff0080 92%, red 100%);
/* W3C */ }
.colorpicker-alpha {
background: linear-gradient(45deg, rgba(0, 0, 0, 0.1) 25%, transparent 25%, transparent 75%, rgba(0, 0, 0, 0.1) 75%, rgba(0, 0, 0, 0.1) 0), linear-gradient(45deg, rgba(0, 0, 0, 0.1) 25%, transparent 25%, transparent 75%, rgba(0, 0, 0, 0.1) 75%, rgba(0, 0, 0, 0.1) 0), white;
background-size: 10px 10px;
background-position: 0 0, 5px 5px;
display: none; }
.colorpicker-bar {
min-height: 16px;
margin: 6px 0 0 0;
clear: both;
text-align: center;
font-size: 10px;
line-height: normal;
max-width: 100%;
-webkit-box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.2);
box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.2); }
.colorpicker-bar:before {
content: "";
display: table;
clear: both; }
.colorpicker-bar.colorpicker-bar-horizontal {
height: 126px;
width: 16px;
margin: 0 0 6px 0;
float: left; }
.colorpicker-input-addon {
position: relative; }
.colorpicker-input-addon i {
display: inline-block;
cursor: pointer;
vertical-align: text-top;
height: 16px;
width: 16px;
position: relative; }
.colorpicker-input-addon:before {
content: "";
position: absolute;
width: 16px;
height: 16px;
display: inline-block;
vertical-align: text-top;
background: linear-gradient(45deg, rgba(0, 0, 0, 0.1) 25%, transparent 25%, transparent 75%, rgba(0, 0, 0, 0.1) 75%, rgba(0, 0, 0, 0.1) 0), linear-gradient(45deg, rgba(0, 0, 0, 0.1) 25%, transparent 25%, transparent 75%, rgba(0, 0, 0, 0.1) 75%, rgba(0, 0, 0, 0.1) 0), white;
background-size: 10px 10px;
background-position: 0 0, 5px 5px; }
.colorpicker.colorpicker-inline {
position: relative;
display: inline-block;
float: none;
z-index: auto;
vertical-align: text-bottom; }
.colorpicker.colorpicker-horizontal {
width: 126px;
height: auto; }
.colorpicker.colorpicker-horizontal .colorpicker-bar {
width: 126px; }
.colorpicker.colorpicker-horizontal .colorpicker-saturation {
float: none;
margin-bottom: 0; }
.colorpicker.colorpicker-horizontal .colorpicker-hue,
.colorpicker.colorpicker-horizontal .colorpicker-alpha {
float: none;
width: 126px;
height: 16px;
cursor: col-resize;
margin-left: 0;
margin-top: 6px;
margin-bottom: 0; }
.colorpicker.colorpicker-horizontal .colorpicker-hue .colorpicker-guide,
.colorpicker.colorpicker-horizontal .colorpicker-alpha .colorpicker-guide {
position: absolute;
display: block;
bottom: -2px;
left: 0;
right: auto;
height: auto;
width: 4px; }
.colorpicker.colorpicker-horizontal .colorpicker-hue {
/* FF3.6+ */
/* Chrome,Safari4+ */
/* Chrome10+,Safari5.1+ */
/* Opera 11.10+ */
/* IE10+ */
background: -webkit-gradient(linear, right top, left top, from(red), color-stop(8%, #ff8000), color-stop(17%, yellow), color-stop(25%, #80ff00), color-stop(33%, lime), color-stop(42%, #00ff80), color-stop(50%, cyan), color-stop(58%, #0080ff), color-stop(67%, blue), color-stop(75%, #8000ff), color-stop(83%, magenta), color-stop(92%, #ff0080), to(red));
background: linear-gradient(to left, red 0%, #ff8000 8%, yellow 17%, #80ff00 25%, lime 33%, #00ff80 42%, cyan 50%, #0080ff 58%, blue 67%, #8000ff 75%, magenta 83%, #ff0080 92%, red 100%);
/* W3C */ }
.colorpicker.colorpicker-horizontal .colorpicker-alpha {
background: linear-gradient(45deg, rgba(0, 0, 0, 0.1) 25%, transparent 25%, transparent 75%, rgba(0, 0, 0, 0.1) 75%, rgba(0, 0, 0, 0.1) 0), linear-gradient(45deg, rgba(0, 0, 0, 0.1) 25%, transparent 25%, transparent 75%, rgba(0, 0, 0, 0.1) 75%, rgba(0, 0, 0, 0.1) 0), white;
background-size: 10px 10px;
background-position: 0 0, 5px 5px; }
.colorpicker-inline:before,
.colorpicker-no-arrow:before,
.colorpicker-popup.colorpicker-bs-popover-content:before {
content: none;
display: none; }
.colorpicker-inline:after,
.colorpicker-no-arrow:after,
.colorpicker-popup.colorpicker-bs-popover-content:after {
content: none;
display: none; }
.colorpicker-alpha,
.colorpicker-saturation,
.colorpicker-hue {
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none; }
.colorpicker.colorpicker-visible,
.colorpicker-alpha.colorpicker-visible,
.colorpicker-saturation.colorpicker-visible,
.colorpicker-hue.colorpicker-visible,
.colorpicker-bar.colorpicker-visible {
display: block; }
.colorpicker.colorpicker-hidden,
.colorpicker-alpha.colorpicker-hidden,
.colorpicker-saturation.colorpicker-hidden,
.colorpicker-hue.colorpicker-hidden,
.colorpicker-bar.colorpicker-hidden {
display: none; }
.colorpicker-inline.colorpicker-visible {
display: inline-block; }
.colorpicker.colorpicker-disabled:after {
border: none;
content: '';
display: block;
width: 100%;
height: 100%;
background: rgba(233, 236, 239, 0.33);
top: 0;
left: 0;
right: auto;
z-index: 2;
position: absolute; }
.colorpicker.colorpicker-disabled .colorpicker-guide {
display: none; }
/** EXTENSIONS **/
.colorpicker-preview {
background: linear-gradient(45deg, rgba(0, 0, 0, 0.1) 25%, transparent 25%, transparent 75%, rgba(0, 0, 0, 0.1) 75%, rgba(0, 0, 0, 0.1) 0), linear-gradient(45deg, rgba(0, 0, 0, 0.1) 25%, transparent 25%, transparent 75%, rgba(0, 0, 0, 0.1) 75%, rgba(0, 0, 0, 0.1) 0), white;
background-size: 10px 10px;
background-position: 0 0, 5px 5px; }
.colorpicker-preview > div {
position: absolute;
left: 0;
top: 0;
width: 100%;
height: 100%; }
.colorpicker-bar.colorpicker-swatches {
-webkit-box-shadow: none;
box-shadow: none;
height: auto; }
.colorpicker-swatches--inner {
clear: both;
margin-top: -6px; }
.colorpicker-swatch {
position: relative;
cursor: pointer;
float: left;
height: 16px;
width: 16px;
margin-right: 6px;
margin-top: 6px;
margin-left: 0;
display: block;
-webkit-box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.2);
box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.2);
background: linear-gradient(45deg, rgba(0, 0, 0, 0.1) 25%, transparent 25%, transparent 75%, rgba(0, 0, 0, 0.1) 75%, rgba(0, 0, 0, 0.1) 0), linear-gradient(45deg, rgba(0, 0, 0, 0.1) 25%, transparent 25%, transparent 75%, rgba(0, 0, 0, 0.1) 75%, rgba(0, 0, 0, 0.1) 0), white;
background-size: 10px 10px;
background-position: 0 0, 5px 5px; }
.colorpicker-swatch--inner {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%; }
.colorpicker-swatch:nth-of-type(7n+0) {
margin-right: 0; }
.colorpicker-with-alpha .colorpicker-swatch:nth-of-type(7n+0) {
margin-right: 6px; }
.colorpicker-with-alpha .colorpicker-swatch:nth-of-type(8n+0) {
margin-right: 0; }
.colorpicker-horizontal .colorpicker-swatch:nth-of-type(6n+0) {
margin-right: 0; }
.colorpicker-horizontal .colorpicker-swatch:nth-of-type(7n+0) {
margin-right: 6px; }
.colorpicker-horizontal .colorpicker-swatch:nth-of-type(8n+0) {
margin-right: 6px; }
.colorpicker-swatch:last-of-type:after {
content: "";
display: table;
clear: both; }
*[dir='rtl'] .colorpicker-element input,
.colorpicker-element[dir='rtl'] input,
.colorpicker-element input[dir='rtl'] {
direction: ltr;
text-align: right; }
/*# sourceMappingURL=bootstrap-colorpicker.css.map */

File diff suppressed because one or more lines are too long

Some files were not shown because too many files have changed in this diff Show More