Compare commits
5 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| cf45a5bc31 | |||
| 9826331545 | |||
| 62bf4ebd92 | |||
| 6e465e3010 | |||
| 8b08969c69 |
+12
@@ -51,4 +51,16 @@ public/userarea/class/curl_request_debug.log
|
||||
# Ignora cartella photostrf in public/userarea
|
||||
/public/userarea/photostrf/
|
||||
public/userarea/customfield_values_response.json
|
||||
/public/userarea/logaspi/
|
||||
|
||||
public/userarea/logsapi/campione_762_1.json
|
||||
public/userarea/logsapi/campione_763_1.json
|
||||
public/userarea/logsapi/campione_762_2.json
|
||||
public/userarea/logsapi/campione_763_2.json
|
||||
public/userarea/logsapi/commessaweb_create_762.json
|
||||
public/userarea/logsapi/commessaweb_create_763.json
|
||||
public/userarea/logsapi/commessaweb_customfields_762.json
|
||||
public/userarea/logsapi/commessaweb_customfields_763.json
|
||||
public/userarea/logsapi/commessaweb_invia_762.json
|
||||
public/userarea/logsapi/commessaweb_invia_763.json
|
||||
public/userarea/logsapi/last_auth_url.txt
|
||||
|
||||
@@ -34,9 +34,6 @@ class EventServiceProvider extends ServiceProvider
|
||||
Verified::class => [
|
||||
ActivateUser::class,
|
||||
],
|
||||
\SocialiteProviders\Manager\SocialiteWasCalled::class => [
|
||||
'SocialiteProviders\\Azure\\AzureExtendSocialite@handle',
|
||||
],
|
||||
];
|
||||
|
||||
/**
|
||||
@@ -46,7 +43,7 @@ class EventServiceProvider extends ServiceProvider
|
||||
*/
|
||||
public function boot()
|
||||
{
|
||||
parent::boot(); // Aggiungi questa linea per sicurezza
|
||||
//
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -44,7 +44,6 @@
|
||||
"phpmailer/phpmailer": "^6.9",
|
||||
"phpoffice/phpspreadsheet": "^4.1",
|
||||
"proengsoft/laravel-jsvalidation": "^4.0.0",
|
||||
"socialiteproviders/microsoft-azure": "^5.2",
|
||||
"spatie/laravel-query-builder": "^5.0",
|
||||
"vanguardapp/activity-log": "^6.0",
|
||||
"vanguardapp/announcements": "^6.0",
|
||||
|
||||
Generated
+1
-126
@@ -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": "583c865e5b67680202a816953a662b03",
|
||||
"content-hash": "ef3e05e7260284f5b7c7b4b6f93b252b",
|
||||
"packages": [
|
||||
{
|
||||
"name": "akaunting/laravel-setting",
|
||||
@@ -4980,131 +4980,6 @@
|
||||
],
|
||||
"time": "2024-04-27T21:32:50+00:00"
|
||||
},
|
||||
{
|
||||
"name": "socialiteproviders/manager",
|
||||
"version": "v4.8.1",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/SocialiteProviders/Manager.git",
|
||||
"reference": "8180ec14bef230ec2351cff993d5d2d7ca470ef4"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/SocialiteProviders/Manager/zipball/8180ec14bef230ec2351cff993d5d2d7ca470ef4",
|
||||
"reference": "8180ec14bef230ec2351cff993d5d2d7ca470ef4",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"illuminate/support": "^8.0 || ^9.0 || ^10.0 || ^11.0 || ^12.0",
|
||||
"laravel/socialite": "^5.5",
|
||||
"php": "^8.1"
|
||||
},
|
||||
"require-dev": {
|
||||
"mockery/mockery": "^1.2",
|
||||
"phpunit/phpunit": "^9.0"
|
||||
},
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"laravel": {
|
||||
"providers": [
|
||||
"SocialiteProviders\\Manager\\ServiceProvider"
|
||||
]
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"SocialiteProviders\\Manager\\": "src/"
|
||||
}
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"MIT"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Andy Wendt",
|
||||
"email": "andy@awendt.com"
|
||||
},
|
||||
{
|
||||
"name": "Anton Komarev",
|
||||
"email": "a.komarev@cybercog.su"
|
||||
},
|
||||
{
|
||||
"name": "Miguel Piedrafita",
|
||||
"email": "soy@miguelpiedrafita.com"
|
||||
},
|
||||
{
|
||||
"name": "atymic",
|
||||
"email": "atymicq@gmail.com",
|
||||
"homepage": "https://atymic.dev"
|
||||
}
|
||||
],
|
||||
"description": "Easily add new or override built-in providers in Laravel Socialite.",
|
||||
"homepage": "https://socialiteproviders.com",
|
||||
"keywords": [
|
||||
"laravel",
|
||||
"manager",
|
||||
"oauth",
|
||||
"providers",
|
||||
"socialite"
|
||||
],
|
||||
"support": {
|
||||
"issues": "https://github.com/socialiteproviders/manager/issues",
|
||||
"source": "https://github.com/socialiteproviders/manager"
|
||||
},
|
||||
"time": "2025-02-24T19:33:30+00:00"
|
||||
},
|
||||
{
|
||||
"name": "socialiteproviders/microsoft-azure",
|
||||
"version": "5.2.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/SocialiteProviders/Microsoft-Azure.git",
|
||||
"reference": "453d62c9d7e3b3b76e94c913fb46e68a33347b16"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/SocialiteProviders/Microsoft-Azure/zipball/453d62c9d7e3b3b76e94c913fb46e68a33347b16",
|
||||
"reference": "453d62c9d7e3b3b76e94c913fb46e68a33347b16",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"ext-json": "*",
|
||||
"php": "^8.0",
|
||||
"socialiteproviders/manager": "^4.4"
|
||||
},
|
||||
"type": "library",
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"SocialiteProviders\\Azure\\": ""
|
||||
}
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"MIT"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Chris Hemmings",
|
||||
"email": "chris@hemmin.gs"
|
||||
}
|
||||
],
|
||||
"description": "Microsoft Azure OAuth2 Provider for Laravel Socialite",
|
||||
"keywords": [
|
||||
"azure",
|
||||
"laravel",
|
||||
"microsoft",
|
||||
"oauth",
|
||||
"provider",
|
||||
"socialite"
|
||||
],
|
||||
"support": {
|
||||
"docs": "https://socialiteproviders.com/microsoft-azure",
|
||||
"issues": "https://github.com/socialiteproviders/providers/issues",
|
||||
"source": "https://github.com/socialiteproviders/providers"
|
||||
},
|
||||
"time": "2024-03-15T03:02:10+00:00"
|
||||
},
|
||||
{
|
||||
"name": "spatie/laravel-package-tools",
|
||||
"version": "1.16.4",
|
||||
|
||||
+3
-3
@@ -11,9 +11,9 @@ return [
|
||||
|
|
||||
*/
|
||||
|
||||
'social' => [
|
||||
'providers' => ['azure'],
|
||||
],
|
||||
// 'social' => [
|
||||
// 'providers' => ['facebook', 'twitter', 'google'],
|
||||
// ],
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
|
||||
@@ -78,11 +78,4 @@ return [
|
||||
'channel' => env('SLACK_BOT_USER_DEFAULT_CHANNEL'),
|
||||
],
|
||||
],
|
||||
|
||||
'azure' => [
|
||||
'client_id' => env('AZURE_CLIENT_ID'),
|
||||
'client_secret' => env('AZURE_CLIENT_SECRET'),
|
||||
'redirect' => env('AZURE_REDIRECT_URI'),
|
||||
'tenant' => env('AZURE_TENANT_ID'),
|
||||
],
|
||||
];
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<?php
|
||||
require_once dirname(__DIR__, 3) . '/vendor/autoload.php'; // Torna al livello di public
|
||||
require_once dirname(__DIR__, 3) . '/vendor/autoload.php';
|
||||
|
||||
use Dotenv\Dotenv;
|
||||
|
||||
@@ -13,7 +13,7 @@ class VisualLimsApiClient
|
||||
|
||||
private function __construct()
|
||||
{
|
||||
$dotenv = Dotenv::createImmutable(dirname(__DIR__, 3)); // Torna al livello di public
|
||||
$dotenv = Dotenv::createImmutable(dirname(__DIR__, 3)); // Corretto per C:\xampp8-2-12\htdocs\trf_certest\.env
|
||||
$dotenv->load();
|
||||
|
||||
$this->baseUrl = $_ENV['API_BASE_URL'];
|
||||
@@ -87,6 +87,7 @@ class VisualLimsApiClient
|
||||
$token = $this->getToken();
|
||||
$url = "{$this->baseUrl}/api/odata/{$endpoint}";
|
||||
|
||||
|
||||
$ch = curl_init($url);
|
||||
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
|
||||
curl_setopt($ch, CURLOPT_HTTPHEADER, [
|
||||
@@ -120,4 +121,88 @@ class VisualLimsApiClient
|
||||
|
||||
return $data;
|
||||
}
|
||||
|
||||
public function post($endpoint, $payload)
|
||||
{
|
||||
$token = $this->getToken();
|
||||
$url = "{$this->baseUrl}/api/odata/{$endpoint}"; // Corretto per /api/odata/CommessaWeb
|
||||
file_put_contents(__DIR__ . '/url_debug.log', date('Y-m-d H:i:s') . " - POST URL: {$url}\n", FILE_APPEND);
|
||||
$ch = curl_init($url);
|
||||
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
|
||||
curl_setopt($ch, CURLOPT_POST, true);
|
||||
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($payload));
|
||||
curl_setopt($ch, CURLOPT_HTTPHEADER, [
|
||||
"Authorization: Bearer {$token}",
|
||||
"Content-Type: application/json",
|
||||
"Accept: application/json"
|
||||
]);
|
||||
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
|
||||
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false);
|
||||
curl_setopt($ch, CURLOPT_VERBOSE, true);
|
||||
$log = fopen(__DIR__ . '/curl_request_debug.log', 'w') ?: fopen('php://stderr', 'w');
|
||||
curl_setopt($ch, CURLOPT_STDERR, $log);
|
||||
|
||||
$response = curl_exec($ch);
|
||||
$http_code = curl_getinfo($ch, CURLINFO_HTTP_CODE);
|
||||
$curl_error = curl_error($ch);
|
||||
fclose($log);
|
||||
curl_close($ch);
|
||||
|
||||
if ($response === false) {
|
||||
throw new Exception("Errore nella richiesta POST: {$curl_error}");
|
||||
}
|
||||
|
||||
if ($http_code >= 400) {
|
||||
throw new Exception("Errore nella richiesta POST: HTTP {$http_code}, Risposta: " . substr($response, 0, 1000));
|
||||
}
|
||||
|
||||
$data = json_decode($response, true);
|
||||
if (json_last_error() !== JSON_ERROR_NONE) {
|
||||
throw new Exception("Risposta non JSON valida: " . substr($response, 0, 1000));
|
||||
}
|
||||
|
||||
return $data;
|
||||
}
|
||||
|
||||
public function patch($endpoint, $payload)
|
||||
{
|
||||
$token = $this->getToken();
|
||||
$url = "{$this->baseUrl}/api/odata/{$endpoint}"; // Corretto per /api/odata/CommessaWeb({key})
|
||||
|
||||
$ch = curl_init($url);
|
||||
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
|
||||
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'PATCH');
|
||||
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($payload));
|
||||
curl_setopt($ch, CURLOPT_HTTPHEADER, [
|
||||
"Authorization: Bearer {$token}",
|
||||
"Content-Type: application/json",
|
||||
"Accept: application/json"
|
||||
]);
|
||||
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
|
||||
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false);
|
||||
curl_setopt($ch, CURLOPT_VERBOSE, true);
|
||||
$log = fopen(__DIR__ . '/curl_request_debug.log', 'w') ?: fopen('php://stderr', 'w');
|
||||
curl_setopt($ch, CURLOPT_STDERR, $log);
|
||||
|
||||
$response = curl_exec($ch);
|
||||
$http_code = curl_getinfo($ch, CURLINFO_HTTP_CODE);
|
||||
$curl_error = curl_error($ch);
|
||||
fclose($log);
|
||||
curl_close($ch);
|
||||
|
||||
if ($response === false) {
|
||||
throw new Exception("Errore nella richiesta PATCH: {$curl_error}");
|
||||
}
|
||||
|
||||
if ($http_code >= 400) {
|
||||
throw new Exception("Errore nella richiesta PATCH: HTTP {$http_code}, Risposta: " . substr($response, 0, 1000));
|
||||
}
|
||||
|
||||
$data = json_decode($response, true);
|
||||
if (json_last_error() !== JSON_ERROR_NONE) {
|
||||
throw new Exception("Risposta non JSON valida: " . substr($response, 0, 1000));
|
||||
}
|
||||
|
||||
return $data;
|
||||
}
|
||||
}
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -0,0 +1,239 @@
|
||||
document.addEventListener("DOMContentLoaded", () => {
|
||||
console.log("export_to_lims.js loaded");
|
||||
|
||||
// Debug: verifica che i pulsanti siano trovati
|
||||
const exportButtons = document.querySelectorAll(".export-lims-btn");
|
||||
console.log(`Found ${exportButtons.length} export-lims-btn buttons`);
|
||||
|
||||
if (exportButtons.length === 0) {
|
||||
console.warn("No .export-lims-btn buttons found in the DOM");
|
||||
return;
|
||||
}
|
||||
|
||||
exportButtons.forEach((btn) => {
|
||||
btn.addEventListener("click", (e) => {
|
||||
e.preventDefault();
|
||||
const rowIndex = btn.dataset.row;
|
||||
const iddatadb = btn.dataset.iddatadb;
|
||||
console.log(
|
||||
`Export to LIMS clicked for row ${rowIndex}, iddatadb: ${iddatadb}`,
|
||||
);
|
||||
|
||||
// Mostra il modale di conferma
|
||||
const confirmModalElement =
|
||||
document.getElementById("exportConfirmModal");
|
||||
if (!confirmModalElement) {
|
||||
console.error("exportConfirmModal not found in the DOM");
|
||||
alert("Errore: Modale di conferma non trovato");
|
||||
return;
|
||||
}
|
||||
|
||||
const confirmModal = new bootstrap.Modal(confirmModalElement, {
|
||||
keyboard: false,
|
||||
});
|
||||
document.getElementById("exportIddatadb").textContent = iddatadb;
|
||||
confirmModal.show();
|
||||
|
||||
// Gestisci il click su "Conferma"
|
||||
const confirmBtn = document.getElementById("exportConfirmBtn");
|
||||
if (!confirmBtn) {
|
||||
console.error("exportConfirmBtn not found in the DOM");
|
||||
confirmModal.hide();
|
||||
alert("Errore: Pulsante di conferma non trovato");
|
||||
return;
|
||||
}
|
||||
|
||||
const confirmHandler = async () => {
|
||||
console.log(`Confirmed export for iddatadb: ${iddatadb}`);
|
||||
confirmModal.hide();
|
||||
|
||||
const formData = new FormData();
|
||||
formData.append("iddatadb", iddatadb);
|
||||
|
||||
try {
|
||||
const response = await fetch("export_to_lims.php", {
|
||||
method: "POST",
|
||||
body: formData,
|
||||
});
|
||||
if (!response.ok)
|
||||
throw new Error(
|
||||
`HTTP error! status: ${response.status}`,
|
||||
);
|
||||
const data = await response.json();
|
||||
|
||||
console.log("Export response:", data);
|
||||
|
||||
// Mostra il modale di risposta
|
||||
const responseModalElement = document.getElementById(
|
||||
"exportResponseModal",
|
||||
);
|
||||
if (!responseModalElement) {
|
||||
console.error(
|
||||
"exportResponseModal not found in the DOM",
|
||||
);
|
||||
alert("Errore: Modale di risposta non trovato");
|
||||
return;
|
||||
}
|
||||
|
||||
const responseModal = new bootstrap.Modal(
|
||||
responseModalElement,
|
||||
{
|
||||
keyboard: false,
|
||||
},
|
||||
);
|
||||
const responseMessage = document.getElementById(
|
||||
"exportResponseMessage",
|
||||
);
|
||||
if (data.success) {
|
||||
responseMessage.innerHTML = `${data.message.replace(/\n/g, "<br>")}<br>ID CommessaWeb: ${data.idcommessaweb}`;
|
||||
document.getElementById(
|
||||
"exportResponseModalLabel",
|
||||
).textContent = "Esportazione Completata";
|
||||
responseModal.show();
|
||||
|
||||
// Aggiorna la UI per riflettere lo stato 'To LIMS'
|
||||
const statusCell = btn
|
||||
.closest(".grid-row")
|
||||
.querySelector(
|
||||
'.grid-cell[data-col="status"] .status-badge',
|
||||
);
|
||||
if (statusCell) {
|
||||
statusCell.classList.remove("status-i", "status-P");
|
||||
statusCell.classList.add("status-l");
|
||||
statusCell.textContent = "To LIMS";
|
||||
}
|
||||
|
||||
// Gestisci la chiusura del modale di risposta
|
||||
responseModalElement.addEventListener(
|
||||
"hidden.bs.modal",
|
||||
() => {
|
||||
console.log(
|
||||
"exportResponseModal closed, cleaning up",
|
||||
);
|
||||
// Rimuovi tutti i backdrop residui
|
||||
document
|
||||
.querySelectorAll(".modal-backdrop")
|
||||
.forEach((backdrop) => {
|
||||
console.log(
|
||||
"Removing backdrop:",
|
||||
backdrop,
|
||||
);
|
||||
backdrop.remove();
|
||||
});
|
||||
// Ripristina il body
|
||||
document.body.classList.remove("modal-open");
|
||||
document.body.style.paddingRight = "";
|
||||
// Nascondi l'overlay
|
||||
const overlay = document.querySelector(
|
||||
".overlay.toggle-icon",
|
||||
);
|
||||
if (overlay) {
|
||||
overlay.style.display = "none";
|
||||
}
|
||||
},
|
||||
{ once: true },
|
||||
);
|
||||
} else {
|
||||
responseMessage.textContent = `Errore durante la generazione dei payload: ${data.message}`;
|
||||
document.getElementById(
|
||||
"exportResponseModalLabel",
|
||||
).textContent = "Errore Esportazione";
|
||||
responseModal.show();
|
||||
|
||||
// Gestisci la chiusura del modale di risposta anche in caso di errore
|
||||
responseModalElement.addEventListener(
|
||||
"hidden.bs.modal",
|
||||
() => {
|
||||
console.log(
|
||||
"exportResponseModal closed, cleaning up",
|
||||
);
|
||||
// Rimuovi tutti i backdrop residui
|
||||
document
|
||||
.querySelectorAll(".modal-backdrop")
|
||||
.forEach((backdrop) => {
|
||||
console.log(
|
||||
"Removing backdrop:",
|
||||
backdrop,
|
||||
);
|
||||
backdrop.remove();
|
||||
});
|
||||
// Ripristina il body
|
||||
document.body.classList.remove("modal-open");
|
||||
document.body.style.paddingRight = "";
|
||||
// Nascondi l'overlay
|
||||
const overlay = document.querySelector(
|
||||
".overlay.toggle-icon",
|
||||
);
|
||||
if (overlay) {
|
||||
overlay.style.display = "none";
|
||||
}
|
||||
},
|
||||
{ once: true },
|
||||
);
|
||||
}
|
||||
} catch (error) {
|
||||
console.error("Export error:", error);
|
||||
const responseModalElement = document.getElementById(
|
||||
"exportResponseModal",
|
||||
);
|
||||
if (!responseModalElement) {
|
||||
console.error(
|
||||
"exportResponseModal not found in the DOM",
|
||||
);
|
||||
alert("Errore: Modale di risposta non trovato");
|
||||
return;
|
||||
}
|
||||
const responseModal = new bootstrap.Modal(
|
||||
responseModalElement,
|
||||
{
|
||||
keyboard: false,
|
||||
},
|
||||
);
|
||||
document.getElementById(
|
||||
"exportResponseMessage",
|
||||
).textContent =
|
||||
`Errore durante la generazione dei payload: ${error.message}`;
|
||||
document.getElementById(
|
||||
"exportResponseModalLabel",
|
||||
).textContent = "Errore Esportazione";
|
||||
responseModal.show();
|
||||
|
||||
// Gestisci la chiusura del modale di risposta in caso di errore
|
||||
responseModalElement.addEventListener(
|
||||
"hidden.bs.modal",
|
||||
() => {
|
||||
console.log(
|
||||
"exportResponseModal closed, cleaning up",
|
||||
);
|
||||
// Rimuovi tutti i backdrop residui
|
||||
document
|
||||
.querySelectorAll(".modal-backdrop")
|
||||
.forEach((backdrop) => {
|
||||
console.log("Removing backdrop:", backdrop);
|
||||
backdrop.remove();
|
||||
});
|
||||
// Ripristina il body
|
||||
document.body.classList.remove("modal-open");
|
||||
document.body.style.paddingRight = "";
|
||||
// Nascondi l'overlay
|
||||
const overlay = document.querySelector(
|
||||
".overlay.toggle-icon",
|
||||
);
|
||||
if (overlay) {
|
||||
overlay.style.display = "none";
|
||||
}
|
||||
},
|
||||
{ once: true },
|
||||
);
|
||||
}
|
||||
|
||||
// Rimuovi il listener dopo l'esecuzione
|
||||
confirmBtn.removeEventListener("click", confirmHandler);
|
||||
};
|
||||
|
||||
// Rimuovi eventuali listener precedenti
|
||||
confirmBtn.removeEventListener("click", confirmHandler);
|
||||
confirmBtn.addEventListener("click", confirmHandler);
|
||||
});
|
||||
});
|
||||
});
|
||||
@@ -0,0 +1,290 @@
|
||||
<?php
|
||||
// File: export_to_lims.php
|
||||
ini_set('display_errors', '1');
|
||||
error_reporting(E_ALL);
|
||||
ini_set('log_errors', 1);
|
||||
ini_set('error_log', __DIR__ . '/logsapi/export_lims_error.log');
|
||||
|
||||
// Includi il file con la connessione al database e Dotenv
|
||||
require_once __DIR__ . '/include/headscript.php';
|
||||
require_once dirname(__DIR__, 2) . '/vendor/autoload.php';
|
||||
require_once __DIR__ . '/class/VisualLimsApiClient.class.php';
|
||||
|
||||
use Dotenv\Dotenv;
|
||||
|
||||
// Carica il file .env
|
||||
$dotenv = Dotenv::createImmutable(dirname(__DIR__, 2)); // Torna al livello di public
|
||||
$dotenv->load();
|
||||
|
||||
// Leggi la variabile SIMULATE_EXPORT_LIMS
|
||||
$simulate = filter_var($_ENV['SIMULATE_EXPORT_LIMS'] ?? true, FILTER_VALIDATE_BOOLEAN);
|
||||
|
||||
header('Content-Type: application/json');
|
||||
|
||||
try {
|
||||
// Verifica che la richiesta sia POST e contenga iddatadb
|
||||
if ($_SERVER['REQUEST_METHOD'] !== 'POST' || !isset($_POST['iddatadb'])) {
|
||||
throw new Exception('Richiesta non valida: iddatadb mancante');
|
||||
}
|
||||
|
||||
$iddatadb = (int)$_POST['iddatadb'];
|
||||
|
||||
// Crea la cartella logsapi se non esiste
|
||||
$logDir = __DIR__ . '/logsapi';
|
||||
if (!is_dir($logDir)) {
|
||||
mkdir($logDir, 0755, true);
|
||||
}
|
||||
|
||||
// Ottieni connessione al database
|
||||
$db = DBHandlerSelect::getInstance();
|
||||
$pdo = $db->getConnection();
|
||||
|
||||
// Step 1: Creazione payload per CommessaWeb
|
||||
$queryCommessa = "
|
||||
SELECT
|
||||
d.iddatadb,
|
||||
e.idclient AS Cliente,
|
||||
e.idschema AS SchemaCustomField
|
||||
FROM datadb d
|
||||
LEFT JOIN excel_templates e ON d.templateid = e.id
|
||||
WHERE d.iddatadb = :iddatadb
|
||||
";
|
||||
|
||||
$stmtCommessa = $pdo->prepare($queryCommessa);
|
||||
$stmtCommessa->execute(['iddatadb' => $iddatadb]);
|
||||
$recordCommessa = $stmtCommessa->fetch(PDO::FETCH_ASSOC);
|
||||
|
||||
if (!$recordCommessa) {
|
||||
throw new Exception("Nessun record trovato per iddatadb: {$iddatadb}");
|
||||
}
|
||||
|
||||
// Validazione payload
|
||||
if (empty($recordCommessa['Cliente']) || empty($recordCommessa['SchemaCustomField'])) {
|
||||
throw new Exception("Dati mancanti per CommessaWeb: Cliente o SchemaCustomField non validi");
|
||||
}
|
||||
|
||||
// Payload per creazione CommessaWeb
|
||||
$payloadCommessa = [
|
||||
'Cliente' => (int)$recordCommessa['Cliente'],
|
||||
'SchemaCustomField' => (int)$recordCommessa['SchemaCustomField'],
|
||||
'Richiedente' => 'Richiedente test',
|
||||
'Descrizione' => 'esempio Claudio'
|
||||
];
|
||||
|
||||
// Step 2: Creazione payload per campi custom (CommesseCustomFields)
|
||||
$queryCustomFields = "
|
||||
SELECT
|
||||
tm.field_id AS IdCommesseCustomFields,
|
||||
idd.field_value AS Valore
|
||||
FROM import_data_details idd
|
||||
JOIN template_mapping tm ON idd.mapping_id = tm.id
|
||||
WHERE idd.id = :iddatadb
|
||||
";
|
||||
|
||||
$stmtCustomFields = $pdo->prepare($queryCustomFields);
|
||||
$stmtCustomFields->execute(['iddatadb' => $iddatadb]);
|
||||
$customFields = $stmtCustomFields->fetchAll(PDO::FETCH_ASSOC);
|
||||
|
||||
$commesseCustomFields = [];
|
||||
foreach ($customFields as $field) {
|
||||
$commesseCustomFields[] = [
|
||||
'IdCommesseCustomFields' => (int)$field['IdCommesseCustomFields'],
|
||||
'Valore' => $field['Valore'] ?? ''
|
||||
];
|
||||
}
|
||||
|
||||
$payloadCustomFields = [
|
||||
'CommesseCustomFields' => $commesseCustomFields
|
||||
];
|
||||
|
||||
// Step 3: Creazione payload per Campioni (da identification_parts)
|
||||
$queryCampioni = "
|
||||
SELECT
|
||||
part_number,
|
||||
idmatrice AS Matrice,
|
||||
part_description AS NoteWeb
|
||||
FROM identification_parts
|
||||
WHERE iddatadb = :iddatadb
|
||||
";
|
||||
|
||||
$stmtCampioni = $pdo->prepare($queryCampioni);
|
||||
$stmtCampioni->execute(['iddatadb' => $iddatadb]);
|
||||
$campioni = $stmtCampioni->fetchAll(PDO::FETCH_ASSOC);
|
||||
|
||||
$payloadsCampioni = [];
|
||||
foreach ($campioni as $campione) {
|
||||
if (empty($campione['Matrice'])) {
|
||||
throw new Exception("Matrice non valida per campione: {$campione['part_number']}");
|
||||
}
|
||||
$payloadCampione = [
|
||||
'Commessa' => null, // Sarà impostato dopo
|
||||
'Matrice' => (int)$campione['Matrice'],
|
||||
'SottoMatrice' => null,
|
||||
'SchemaCustomField' => 1,
|
||||
'NoteWeb' => $campione['NoteWeb'] ?? ''
|
||||
];
|
||||
$payloadsCampioni[] = $payloadCampione;
|
||||
}
|
||||
|
||||
// Step 4: Creazione payload per InviaCommessa
|
||||
$payloadInviaCommessa = [];
|
||||
|
||||
// Variabile per idcommessaweb
|
||||
$idcommessaweb = null;
|
||||
$commessaweb = '';
|
||||
|
||||
if ($simulate) {
|
||||
// Flusso simulato
|
||||
$idcommessaweb = 10176; // Fittizio per il test
|
||||
|
||||
// Salva idcommessaweb in datadb
|
||||
$updateStmt = $pdo->prepare("UPDATE datadb SET idcommessaweb = :idcommessaweb WHERE iddatadb = :iddatadb");
|
||||
$updateStmt->execute(['idcommessaweb' => $idcommessaweb, 'iddatadb' => $iddatadb]);
|
||||
|
||||
// Salva i payload in file JSON
|
||||
$outputFileCommessa = $logDir . "/commessaweb_create_{$iddatadb}.json";
|
||||
file_put_contents($outputFileCommessa, json_encode($payloadCommessa, JSON_PRETTY_PRINT));
|
||||
|
||||
$outputFileCustomFields = $logDir . "/commessaweb_customfields_{$iddatadb}.json";
|
||||
file_put_contents($outputFileCustomFields, json_encode($payloadCustomFields, JSON_PRETTY_PRINT));
|
||||
|
||||
foreach ($payloadsCampioni as $index => $payloadCampione) {
|
||||
$payloadCampione['Commessa'] = $idcommessaweb;
|
||||
$outputFileCampione = $logDir . "/campione_{$iddatadb}_{$campioni[$index]['part_number']}.json";
|
||||
file_put_contents($outputFileCampione, json_encode($payloadCampione, JSON_PRETTY_PRINT));
|
||||
}
|
||||
|
||||
$outputFileInviaCommessa = $logDir . "/commessaweb_invia_{$iddatadb}.json";
|
||||
file_put_contents($outputFileInviaCommessa, json_encode($payloadInviaCommessa, JSON_PRETTY_PRINT));
|
||||
|
||||
// Aggiorna lo status a 'l' (To LIMS)
|
||||
$updateStmt = $pdo->prepare("UPDATE datadb SET status = 'l' WHERE iddatadb = :iddatadb");
|
||||
$updateStmt->execute(['iddatadb' => $iddatadb]);
|
||||
|
||||
// Risposta di successo (simulazione)
|
||||
echo json_encode([
|
||||
'success' => true,
|
||||
'mode' => 'simulated',
|
||||
'message' => "Payload generati e salvati in {$outputFileCommessa}, {$outputFileCustomFields}, file campioni e {$outputFileInviaCommessa}",
|
||||
'idcommessaweb' => $idcommessaweb,
|
||||
'commessaweb' => $commessaweb,
|
||||
'payload_commessa' => $payloadCommessa,
|
||||
'payload_customfields' => $payloadCustomFields,
|
||||
'payload_campioni' => $payloadsCampioni,
|
||||
'payload_invia_commessa' => $payloadInviaCommessa
|
||||
]);
|
||||
} else {
|
||||
// Flusso reale
|
||||
$apiClient = VisualLimsApiClient::getInstance();
|
||||
|
||||
// Step 1: Crea CommessaWeb
|
||||
try {
|
||||
$response = $apiClient->post('CommessaWeb', $payloadCommessa);
|
||||
if (!isset($response['IdCommessa']) || !isset($response['CodiceCommessa'])) {
|
||||
throw new Exception("Risposta API non valida: IdCommessa o CodiceCommessa mancanti: " . json_encode($response));
|
||||
}
|
||||
$idcommessaweb = (int)$response['IdCommessa'];
|
||||
$commessaweb = $response['CodiceCommessa'];
|
||||
error_log(date('Y-m-d H:i:s') . " - CommessaWeb creata: idcommessaweb {$idcommessaweb}, codice {$commessaweb} per iddatadb {$iddatadb}\n", 3, $logDir . '/export_lims_success.log');
|
||||
// Salva payload CommessaWeb
|
||||
$outputFileCommessa = $logDir . "/commessaweb_create_{$iddatadb}_{$idcommessaweb}.json";
|
||||
file_put_contents($outputFileCommessa, json_encode($payloadCommessa, JSON_PRETTY_PRINT));
|
||||
error_log(date('Y-m-d H:i:s') . " - Payload CommessaWeb salvato in {$outputFileCommessa}\n", 3, $logDir . '/export_lims_success.log');
|
||||
} catch (Exception $e) {
|
||||
error_log(date('Y-m-d H:i:s') . " - Errore nella creazione della CommessaWeb: " . $e->getMessage() . "\n", 3, $logDir . '/export_lims_error.log');
|
||||
throw new Exception("Errore nella creazione della CommessaWeb: " . $e->getMessage());
|
||||
}
|
||||
|
||||
// Salva idcommessaweb e commessaweb in datadb
|
||||
$updateStmt = $pdo->prepare("UPDATE datadb SET idcommessaweb = :idcommessaweb, commessaweb = :commessaweb WHERE iddatadb = :iddatadb");
|
||||
$updateStmt->execute([
|
||||
'idcommessaweb' => $idcommessaweb,
|
||||
'commessaweb' => $commessaweb,
|
||||
'iddatadb' => $iddatadb
|
||||
]);
|
||||
|
||||
// Step 2: Crea Campioni
|
||||
try {
|
||||
foreach ($payloadsCampioni as $index => $payloadCampione) {
|
||||
$payloadCampione['Commessa'] = $idcommessaweb;
|
||||
// Salva payload Campione
|
||||
$outputFileCampione = $logDir . "/campione_{$iddatadb}_{$idcommessaweb}_{$campioni[$index]['part_number']}.json";
|
||||
file_put_contents($outputFileCampione, json_encode($payloadCampione, JSON_PRETTY_PRINT));
|
||||
error_log(date('Y-m-d H:i:s') . " - Payload Campione salvato in {$outputFileCampione}\n", 3, $logDir . '/export_lims_success.log');
|
||||
$apiClient->post('Campione', $payloadCampione);
|
||||
$payloadsCampioni[$index] = $payloadCampione; // Aggiorna il payload con Commessa
|
||||
error_log(date('Y-m-d H:i:s') . " - Campione creato: part_number {$campioni[$index]['part_number']} per idcommessaweb {$idcommessaweb}\n", 3, $logDir . '/export_lims_success.log');
|
||||
}
|
||||
} catch (Exception $e) {
|
||||
error_log(date('Y-m-d H:i:s') . " - Errore nella creazione dei Campioni: " . $e->getMessage() . "\n", 3, $logDir . '/export_lims_error.log');
|
||||
throw new Exception("Errore nella creazione dei Campioni: " . $e->getMessage());
|
||||
}
|
||||
|
||||
// Step 3: Aggiorna CommesseCustomFields
|
||||
try {
|
||||
// Salva payload CustomFields
|
||||
$outputFileCustomFields = $logDir . "/commessaweb_customfields_{$iddatadb}_{$idcommessaweb}.json";
|
||||
file_put_contents($outputFileCustomFields, json_encode($payloadCustomFields, JSON_PRETTY_PRINT));
|
||||
error_log(date('Y-m-d H:i:s') . " - PayloadCustomFields per idcommessaweb {$idcommessaweb}: " . json_encode($payloadCustomFields, JSON_PRETTY_PRINT) . "\n", 3, $logDir . '/export_lims_success.log');
|
||||
error_log(date('Y-m-d H:i:s') . " - Payload CustomFields salvato in {$outputFileCustomFields}\n", 3, $logDir . '/export_lims_success.log');
|
||||
$apiClient->patch("CommessaWeb({$idcommessaweb})", $payloadCustomFields);
|
||||
error_log(date('Y-m-d H:i:s') . " - CommesseCustomFields aggiornati per idcommessaweb {$idcommessaweb}\n", 3, $logDir . '/export_lims_success.log');
|
||||
} catch (Exception $e) {
|
||||
error_log(date('Y-m-d H:i:s') . " - Errore nell'aggiornamento CommesseCustomFields: " . $e->getMessage() . "\n", 3, $logDir . '/export_lims_error.log');
|
||||
throw new Exception("Errore nell'aggiornamento CommesseCustomFields: " . $e->getMessage());
|
||||
}
|
||||
|
||||
// Step 4: Invia Commessa
|
||||
try {
|
||||
// Salva payload InviaCommessa
|
||||
$outputFileInviaCommessa = $logDir . "/commessaweb_invia_{$iddatadb}_{$idcommessaweb}.json";
|
||||
file_put_contents($outputFileInviaCommessa, json_encode($payloadInviaCommessa, JSON_PRETTY_PRINT));
|
||||
error_log(date('Y-m-d H:i:s') . " - Payload InviaCommessa salvato in {$outputFileInviaCommessa}\n", 3, $logDir . '/export_lims_success.log');
|
||||
$apiClient->post("CommessaWeb({$idcommessaweb})/InviaCommessa", $payloadInviaCommessa);
|
||||
error_log(date('Y-m-d H:i:s') . " - Commessa inviata: idcommessaweb {$idcommessaweb}\n", 3, $logDir . '/export_lims_success.log');
|
||||
} catch (Exception $e) {
|
||||
error_log(date('Y-m-d H:i:s') . " - Errore nell'invio della Commessa: " . $e->getMessage() . "\n", 3, $logDir . '/export_lims_error.log');
|
||||
throw new Exception("Errore nell'invio della Commessa: " . $e->getMessage());
|
||||
}
|
||||
|
||||
// Step 5: Recupera il numero commessaweb
|
||||
try {
|
||||
$commessaData = $apiClient->get("CommessaWeb({$idcommessaweb})");
|
||||
$commessaweb = $commessaData['CodiceCommessaWeb'] ?? $commessaweb; // Usa CodiceCommessaWeb o fallback
|
||||
if ($commessaweb) {
|
||||
$updateStmt = $pdo->prepare("UPDATE datadb SET commessaweb = :commessaweb WHERE iddatadb = :iddatadb");
|
||||
$updateStmt->execute(['commessaweb' => $commessaweb, 'iddatadb' => $iddatadb]);
|
||||
}
|
||||
error_log(date('Y-m-d H:i:s') . " - CommessaWeb recuperata: codice {$commessaweb} per idcommessaweb {$idcommessaweb}\n", 3, $logDir . '/export_lims_success.log');
|
||||
} catch (Exception $e) {
|
||||
error_log(date('Y-m-d H:i:s') . " - Errore nel recupero della CommessaWeb: " . $e->getMessage() . "\n", 3, $logDir . '/export_lims_error.log');
|
||||
throw new Exception("Errore nel recupero della CommessaWeb: " . $e->getMessage());
|
||||
}
|
||||
|
||||
// Aggiorna lo status a 'l' (To LIMS)
|
||||
$updateStmt = $pdo->prepare("UPDATE datadb SET status = 'l' WHERE iddatadb = :iddatadb");
|
||||
$updateStmt->execute(['iddatadb' => $iddatadb]);
|
||||
|
||||
// Risposta di successo (flusso reale)
|
||||
echo json_encode([
|
||||
'success' => true,
|
||||
'mode' => 'real',
|
||||
'message' => "Dati inviati al LIMS con successo",
|
||||
'idcommessaweb' => $idcommessaweb,
|
||||
'commessaweb' => $commessaweb,
|
||||
'payload_commessa' => $payloadCommessa,
|
||||
'payload_customfields' => $payloadCustomFields,
|
||||
'payload_campioni' => $payloadsCampioni,
|
||||
'payload_invia_commessa' => $payloadInviaCommessa
|
||||
]);
|
||||
}
|
||||
} catch (Exception $e) {
|
||||
// Log dell'errore
|
||||
file_put_contents($logDir . '/export_lims_error.log', date('Y-m-d H:i:s') . ' - Flusso ' . ($simulate ? 'simulato' : 'reale') . ' fallito: ' . $e->getMessage() . PHP_EOL, FILE_APPEND);
|
||||
http_response_code(500);
|
||||
echo json_encode([
|
||||
'success' => false,
|
||||
'mode' => $simulate ? 'simulated' : 'real',
|
||||
'message' => 'Errore: ' . $e->getMessage()
|
||||
]);
|
||||
}
|
||||
@@ -0,0 +1,36 @@
|
||||
<?php
|
||||
require_once dirname(__DIR__, 2) . '/vendor/autoload.php';
|
||||
require_once dirname(__FILE__) . '/class/VisualLimsApiClient.class.php';
|
||||
|
||||
header('Content-Type: application/json');
|
||||
|
||||
ini_set('display_errors', '0');
|
||||
error_reporting(E_ALL);
|
||||
|
||||
try {
|
||||
$api = VisualLimsApiClient::getInstance();
|
||||
|
||||
// Endpoint per recuperare le Matrici
|
||||
$endpoint = 'Matrice';
|
||||
|
||||
// (Opzionale) aggiungi parametri, ad esempio $top per limitare i risultati
|
||||
$options = []; // oppure ad esempio: ['$top' => 100]
|
||||
|
||||
// Debug: salva URL usato
|
||||
$base_url = 'https://93.43.5.102/limsapi/api/odata/';
|
||||
$query = http_build_query($options);
|
||||
$full_url = $base_url . $endpoint . ($query ? '?' . $query : '');
|
||||
file_put_contents(__DIR__ . '/last_url.txt', $full_url . PHP_EOL, FILE_APPEND);
|
||||
|
||||
// Chiamata API
|
||||
$data = $api->get($endpoint, $options);
|
||||
|
||||
// Salva il JSON in locale
|
||||
file_put_contents(__DIR__ . '/matrici_response.json', json_encode($data, JSON_PRETTY_PRINT));
|
||||
|
||||
echo json_encode($data);
|
||||
} catch (Exception $e) {
|
||||
file_put_contents(__DIR__ . '/error_log.txt', date('Y-m-d H:i:s') . ' - ' . $e->getMessage() . PHP_EOL, FILE_APPEND);
|
||||
http_response_code(500);
|
||||
echo json_encode(['error' => $e->getMessage()]);
|
||||
}
|
||||
@@ -405,6 +405,16 @@ foreach ($stmt->fetchAll(PDO::FETCH_ASSOC) as $row) {
|
||||
.save-all-btn:hover {
|
||||
background-color: #218838;
|
||||
}
|
||||
|
||||
#exportConfirmModal,
|
||||
#exportResponseModal {
|
||||
z-index: 1300 !important;
|
||||
}
|
||||
|
||||
#exportConfirmModal .modal-backdrop,
|
||||
#exportResponseModal .modal-backdrop {
|
||||
z-index: 1299 !important;
|
||||
}
|
||||
</style>
|
||||
<title>Edit Imported Data - <?= htmlspecialchars($titlewebsite, ENT_QUOTES, 'UTF-8'); ?></title>
|
||||
</head>
|
||||
@@ -708,6 +718,7 @@ foreach ($stmt->fetchAll(PDO::FETCH_ASSOC) as $row) {
|
||||
<script src="photos.js"></script>
|
||||
<script src="parts.js"></script>
|
||||
<script src="tracking.js"></script>
|
||||
<script src="export_to_lims.js"></script>
|
||||
<script>
|
||||
document.addEventListener("DOMContentLoaded", function() {
|
||||
console.log("Page loaded, initializing event listeners");
|
||||
@@ -900,6 +911,8 @@ foreach ($stmt->fetchAll(PDO::FETCH_ASSOC) as $row) {
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
|
||||
window.addEventListener("beforeunload", function(e) {
|
||||
if (hasChanges) {
|
||||
e.preventDefault();
|
||||
@@ -907,6 +920,26 @@ foreach ($stmt->fetchAll(PDO::FETCH_ASSOC) as $row) {
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
// Gestisci la chiusura dei modali per rimuovere i backdrop
|
||||
document.querySelectorAll('#exportConfirmModal, #exportResponseModal').forEach(modal => {
|
||||
modal.addEventListener('hidden.bs.modal', () => {
|
||||
console.log(`Modal ${modal.id} closed, removing backdrops`);
|
||||
// Rimuovi tutti i backdrop residui
|
||||
document.querySelectorAll('.modal-backdrop').forEach(backdrop => {
|
||||
console.log('Removing backdrop:', backdrop);
|
||||
backdrop.remove();
|
||||
});
|
||||
// Ripristina il body
|
||||
document.body.classList.remove('modal-open');
|
||||
document.body.style.paddingRight = '';
|
||||
// Assicurati che l'overlay sia nascosto
|
||||
const overlay = document.querySelector('.overlay.toggle-icon');
|
||||
if (overlay) {
|
||||
overlay.style.display = 'none';
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
<script>
|
||||
document.addEventListener("DOMContentLoaded", function() {
|
||||
@@ -1066,6 +1099,43 @@ foreach ($stmt->fetchAll(PDO::FETCH_ASSOC) as $row) {
|
||||
populateDropdowns();
|
||||
});
|
||||
</script>
|
||||
<!-- Modale di conferma per l'esportazione -->
|
||||
<div class="modal fade" id="exportConfirmModal" tabindex="-1" aria-labelledby="exportConfirmModalLabel" aria-hidden="true">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title" id="exportConfirmModalLabel">Conferma Esportazione</h5>
|
||||
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<p id="exportConfirmMessage">Confermi l'esportazione al LIMS per iddatadb <span id="exportIddatadb"></span>?</p>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-secondary btn-sm" data-bs-dismiss="modal">Annulla</button>
|
||||
<button type="button" class="btn btn-primary btn-sm" id="exportConfirmBtn">Conferma</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Modale di risposta per l'esportazione -->
|
||||
<div class="modal fade" id="exportResponseModal" tabindex="-1" aria-labelledby="exportResponseModalLabel" aria-hidden="true">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title" id="exportResponseModalLabel">Risultato Esportazione</h5>
|
||||
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<p id="exportResponseMessage"></p>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-primary btn-sm" data-bs-dismiss="modal">Chiudi</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</body>
|
||||
|
||||
</html>
|
||||
@@ -190,4 +190,38 @@
|
||||
box-shadow: 0 0 0 0 rgba(220, 53, 69, 0);
|
||||
}
|
||||
}
|
||||
|
||||
/* Stile per il selettore personalizzato dei colori */
|
||||
.color-picker-container {
|
||||
position: relative;
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.color-picker {
|
||||
display: none;
|
||||
position: absolute;
|
||||
top: 25px;
|
||||
left: 0;
|
||||
background: #fff;
|
||||
border: 1px solid #ccc;
|
||||
padding: 5px;
|
||||
z-index: 1002;
|
||||
box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
|
||||
flex-wrap: wrap;
|
||||
width: 120px;
|
||||
}
|
||||
|
||||
.color-option {
|
||||
width: 24px;
|
||||
height: 24px;
|
||||
margin: 3px;
|
||||
border: 1px solid #000;
|
||||
cursor: pointer;
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.color-option:hover {
|
||||
border: 2px solid #000;
|
||||
margin: 2px;
|
||||
}
|
||||
</style>
|
||||
@@ -457,14 +457,6 @@ $(document).ready(function () {
|
||||
}
|
||||
});
|
||||
|
||||
$(document).on("change", ".part-color", function () {
|
||||
const partNumber = $(this).closest("li").data("part-number");
|
||||
const partColor = $(this).val();
|
||||
partColors[partNumber] = partColor;
|
||||
updateMarkers();
|
||||
markUnsaved();
|
||||
});
|
||||
|
||||
function loadExistingParts(iddatadb) {
|
||||
$.ajax({
|
||||
url: "load_parts.php",
|
||||
@@ -517,6 +509,19 @@ $(document).ready(function () {
|
||||
function updatePartsList() {
|
||||
const showMixParts = $("#showMixParts").is(":checked");
|
||||
$("#partsList").empty();
|
||||
|
||||
// Definizione di 8 colori predefiniti
|
||||
const predefinedColors = [
|
||||
"#ff0000", // Rosso
|
||||
"#0000ff", // Blu
|
||||
"#00ff00", // Verde
|
||||
"#01832cff", // Giallo
|
||||
"#ff00ff", // Magenta
|
||||
"#00ffff", // Ciano
|
||||
"#800080", // Viola
|
||||
"#ffa500", // Arancione
|
||||
];
|
||||
|
||||
$("#partsTableBody tr").each(function () {
|
||||
const partNumber = $(this).find(".part-number").val();
|
||||
const partDescription = $(this).find(".part-description").val();
|
||||
@@ -528,17 +533,56 @@ $(document).ready(function () {
|
||||
partDescription &&
|
||||
(showMixParts || !partDescription.startsWith("Mix"))
|
||||
) {
|
||||
const colorOptions = predefinedColors
|
||||
.map(
|
||||
(color) =>
|
||||
`<div class="color-option" style="background-color: ${color};" data-color="${color}"></div>`,
|
||||
)
|
||||
.join("");
|
||||
|
||||
const listItem = `
|
||||
<li class="list-group-item" data-part-number="${partNumber}">
|
||||
${partNumber} - ${partDescription}
|
||||
<div style="display: flex; align-items: center;">
|
||||
<button type="button" class="btn btn-success btn-sm add-to-mix-btn" style="padding: 0.1rem 0.3rem; font-size: 0.8rem;"><i class="fas fa-plus fa-xs"></i></button>
|
||||
<input type="color" class="part-color" value="${partColor}" style="margin-left: 5px;">
|
||||
<div class="color-picker-container">
|
||||
<div class="color-option selected-color" style="background-color: ${partColor}; margin-left: 5px;"></div>
|
||||
<div class="color-picker">${colorOptions}</div>
|
||||
</div>
|
||||
</div>
|
||||
</li>`;
|
||||
$("#partsList").append(listItem);
|
||||
}
|
||||
});
|
||||
|
||||
// Gestione del selettore colori personalizzato
|
||||
$(".selected-color").on("click", function (e) {
|
||||
e.stopPropagation();
|
||||
const $picker = $(this).siblings(".color-picker");
|
||||
$(".color-picker").not($picker).hide(); // Chiude altri selettori aperti
|
||||
$picker.toggle();
|
||||
});
|
||||
|
||||
$(".color-option").on("click", function (e) {
|
||||
e.stopPropagation();
|
||||
const $this = $(this);
|
||||
const color = $this.data("color");
|
||||
const $listItem = $this.closest("li");
|
||||
const partNumber = $listItem.data("part-number");
|
||||
partColors[partNumber] = color;
|
||||
$listItem.find(".selected-color").css("background-color", color);
|
||||
$this.closest(".color-picker").hide(); // Chiude il selettore dopo la scelta
|
||||
updateMarkers();
|
||||
markUnsaved();
|
||||
});
|
||||
|
||||
// Chiude il selettore se si clicca fuori
|
||||
$(document).on("click", function (e) {
|
||||
if (!$(e.target).closest(".color-picker-container").length) {
|
||||
$(".color-picker").hide();
|
||||
}
|
||||
});
|
||||
|
||||
updateMarkers();
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,58 @@
|
||||
<?php
|
||||
// File: test_auth.php
|
||||
ini_set('display_errors', '0');
|
||||
error_reporting(E_ALL);
|
||||
ini_set('log_errors', 1);
|
||||
|
||||
// Includi le dipendenze
|
||||
require_once dirname(__DIR__, 2) . '/vendor/autoload.php';
|
||||
require_once __DIR__ . '/class/VisualLimsApiClient.class.php';
|
||||
|
||||
header('Content-Type: application/json');
|
||||
|
||||
try {
|
||||
// Crea la cartella logsapi se non esiste
|
||||
$logDir = __DIR__ . '/logsapi';
|
||||
if (!is_dir($logDir)) {
|
||||
mkdir($logDir, 0755, true);
|
||||
}
|
||||
|
||||
// Istanzia il client API (autenticazione automatica tramite .env)
|
||||
$api = VisualLimsApiClient::getInstance();
|
||||
|
||||
// Esegui una chiamata di test per verificare l'autenticazione
|
||||
$endpoint = 'SchemaCustomField';
|
||||
$options = []; // Nessun filtro per il test
|
||||
$data = $api->get($endpoint, $options);
|
||||
|
||||
// Debug: salva URL usato
|
||||
$base_url = 'https://93.43.5.102/limsapi/api/odata/';
|
||||
$query = http_build_query($options);
|
||||
$full_url = $base_url . $endpoint . ($query ? '?' . $query : '');
|
||||
file_put_contents($logDir . '/last_auth_url.txt', $full_url . PHP_EOL, FILE_APPEND);
|
||||
|
||||
// Nota: getToken() è privato, quindi non possiamo accedervi direttamente
|
||||
// Supponiamo che l'autenticazione sia avvenuta correttamente se la GET ha successo
|
||||
$token = null; // Non possiamo accedere al token direttamente
|
||||
$auth_success = true; // La GET ha successo, quindi l'autenticazione funziona
|
||||
|
||||
// Salva un file di conferma dell'autenticazione
|
||||
$outputFile = $logDir . '/auth_token.json';
|
||||
file_put_contents($outputFile, json_encode(['auth_success' => true, 'token' => 'Not directly accessible (private method)'], JSON_PRETTY_PRINT));
|
||||
|
||||
// Risposta di successo
|
||||
echo json_encode([
|
||||
'success' => true,
|
||||
'message' => "Autenticazione completata con successo, dettagli salvati in {$outputFile}",
|
||||
'auth_success' => $auth_success,
|
||||
'schema_data' => $data // Dati di esempio dalla GET
|
||||
]);
|
||||
} catch (Exception $e) {
|
||||
// Log dell'errore
|
||||
file_put_contents($logDir . '/auth_error.log', date('Y-m-d H:i:s') . ' - ' . $e->getMessage() . PHP_EOL, FILE_APPEND);
|
||||
http_response_code(500);
|
||||
echo json_encode([
|
||||
'success' => false,
|
||||
'message' => 'Errore durante l\'autenticazione: ' . $e->getMessage()
|
||||
]);
|
||||
}
|
||||
@@ -1,7 +1,7 @@
|
||||
@if ($socialProviders)
|
||||
<?php $colSize = 12 / count($socialProviders); ?>
|
||||
<?php $colSize = 12 / count($socialProviders); ?>
|
||||
|
||||
<div class="row pb-3 pt-2">
|
||||
<div class="row pb-3 pt-2">
|
||||
@if (in_array('facebook', $socialProviders))
|
||||
<div class="col-{{ $colSize }} d-flex align-items-center justify-content-center">
|
||||
<a href="{{ url('auth/facebook/login') }}" class="btn-facebook">
|
||||
@@ -25,14 +25,6 @@
|
||||
</a>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
@if (in_array('azure', $socialProviders))
|
||||
<div class="col-{{ $colSize }} d-flex align-items-center justify-content-center">
|
||||
<a href="{{ url('auth/azure/login') }}" style="color: #0078d4;">
|
||||
<i class="fab fa-microsoft fa-2x"></i>
|
||||
</a>
|
||||
</div>
|
||||
@endif
|
||||
</div>
|
||||
|
||||
@endif
|
||||
-19
@@ -6203,25 +6203,6 @@ return array(
|
||||
'SebastianBergmann\\Type\\UnknownType' => $vendorDir . '/sebastian/type/src/type/UnknownType.php',
|
||||
'SebastianBergmann\\Type\\VoidType' => $vendorDir . '/sebastian/type/src/type/VoidType.php',
|
||||
'SebastianBergmann\\Version' => $vendorDir . '/sebastian/version/src/Version.php',
|
||||
'SocialiteProviders\\Azure\\AzureExtendSocialite' => $vendorDir . '/socialiteproviders/microsoft-azure/AzureExtendSocialite.php',
|
||||
'SocialiteProviders\\Azure\\Provider' => $vendorDir . '/socialiteproviders/microsoft-azure/Provider.php',
|
||||
'SocialiteProviders\\Azure\\User' => $vendorDir . '/socialiteproviders/microsoft-azure/User.php',
|
||||
'SocialiteProviders\\Manager\\Config' => $vendorDir . '/socialiteproviders/manager/src/Config.php',
|
||||
'SocialiteProviders\\Manager\\ConfigTrait' => $vendorDir . '/socialiteproviders/manager/src/ConfigTrait.php',
|
||||
'SocialiteProviders\\Manager\\Contracts\\ConfigInterface' => $vendorDir . '/socialiteproviders/manager/src/Contracts/ConfigInterface.php',
|
||||
'SocialiteProviders\\Manager\\Contracts\\Helpers\\ConfigRetrieverInterface' => $vendorDir . '/socialiteproviders/manager/src/Contracts/Helpers/ConfigRetrieverInterface.php',
|
||||
'SocialiteProviders\\Manager\\Contracts\\OAuth1\\ProviderInterface' => $vendorDir . '/socialiteproviders/manager/src/Contracts/OAuth1/ProviderInterface.php',
|
||||
'SocialiteProviders\\Manager\\Contracts\\OAuth2\\ProviderInterface' => $vendorDir . '/socialiteproviders/manager/src/Contracts/OAuth2/ProviderInterface.php',
|
||||
'SocialiteProviders\\Manager\\Exception\\InvalidArgumentException' => $vendorDir . '/socialiteproviders/manager/src/Exception/InvalidArgumentException.php',
|
||||
'SocialiteProviders\\Manager\\Exception\\MissingConfigException' => $vendorDir . '/socialiteproviders/manager/src/Exception/MissingConfigException.php',
|
||||
'SocialiteProviders\\Manager\\Helpers\\ConfigRetriever' => $vendorDir . '/socialiteproviders/manager/src/Helpers/ConfigRetriever.php',
|
||||
'SocialiteProviders\\Manager\\OAuth1\\AbstractProvider' => $vendorDir . '/socialiteproviders/manager/src/OAuth1/AbstractProvider.php',
|
||||
'SocialiteProviders\\Manager\\OAuth1\\Server' => $vendorDir . '/socialiteproviders/manager/src/OAuth1/Server.php',
|
||||
'SocialiteProviders\\Manager\\OAuth1\\User' => $vendorDir . '/socialiteproviders/manager/src/OAuth1/User.php',
|
||||
'SocialiteProviders\\Manager\\OAuth2\\AbstractProvider' => $vendorDir . '/socialiteproviders/manager/src/OAuth2/AbstractProvider.php',
|
||||
'SocialiteProviders\\Manager\\OAuth2\\User' => $vendorDir . '/socialiteproviders/manager/src/OAuth2/User.php',
|
||||
'SocialiteProviders\\Manager\\ServiceProvider' => $vendorDir . '/socialiteproviders/manager/src/ServiceProvider.php',
|
||||
'SocialiteProviders\\Manager\\SocialiteWasCalled' => $vendorDir . '/socialiteproviders/manager/src/SocialiteWasCalled.php',
|
||||
'Spatie\\Backtrace\\Arguments\\ArgumentReducers' => $vendorDir . '/spatie/backtrace/src/Arguments/ArgumentReducers.php',
|
||||
'Spatie\\Backtrace\\Arguments\\ProvidedArgument' => $vendorDir . '/spatie/backtrace/src/Arguments/ProvidedArgument.php',
|
||||
'Spatie\\Backtrace\\Arguments\\ReduceArgumentPayloadAction' => $vendorDir . '/spatie/backtrace/src/Arguments/ReduceArgumentPayloadAction.php',
|
||||
|
||||
Vendored
+1
-1
@@ -24,7 +24,6 @@ return array(
|
||||
'09f6b20656683369174dd6fa83b7e5fb' => $vendorDir . '/symfony/polyfill-uuid/bootstrap.php',
|
||||
'a1105708a18b76903365ca1c4aa61b02' => $vendorDir . '/symfony/translation/Resources/functions.php',
|
||||
'47e1160838b5e5a10346ac4084b58c23' => $vendorDir . '/laravel/prompts/src/helpers.php',
|
||||
'decc78cc4436b1292c6c0d151b19445c' => $vendorDir . '/phpseclib/phpseclib/phpseclib/bootstrap.php',
|
||||
'e39a8b23c42d4e1452234d762b03835a' => $vendorDir . '/ramsey/uuid/src/functions.php',
|
||||
'265b4faa2b3a9766332744949e83bf97' => $vendorDir . '/laravel/framework/src/Illuminate/Collections/helpers.php',
|
||||
'c7a3c339e7e14b60e06a2d7fcce9476b' => $vendorDir . '/laravel/framework/src/Illuminate/Events/functions.php',
|
||||
@@ -33,6 +32,7 @@ return array(
|
||||
'58571171fd5812e6e447dce228f52f4d' => $vendorDir . '/laravel/framework/src/Illuminate/Support/helpers.php',
|
||||
'6124b4c8570aa390c21fafd04a26c69f' => $vendorDir . '/myclabs/deep-copy/src/DeepCopy/deep_copy.php',
|
||||
'3bd81c9b8fcc150b69d8b63b4d2ccf23' => $vendorDir . '/spatie/flare-client-php/src/helpers.php',
|
||||
'decc78cc4436b1292c6c0d151b19445c' => $vendorDir . '/phpseclib/phpseclib/phpseclib/bootstrap.php',
|
||||
'ec07570ca5a812141189b1fa81503674' => $vendorDir . '/phpunit/phpunit/src/Framework/Assert/Functions.php',
|
||||
'801c31d8ed748cfa537fa45402288c95' => $vendorDir . '/psy/psysh/src/functions.php',
|
||||
'b84a5ba6d9a8ee8cf648b71c42c799b7' => $vendorDir . '/akaunting/laravel-setting/src/helpers.php',
|
||||
|
||||
Vendored
-2
@@ -60,8 +60,6 @@ return array(
|
||||
'Spatie\\FlareClient\\' => array($vendorDir . '/spatie/flare-client-php/src'),
|
||||
'Spatie\\ErrorSolutions\\' => array($vendorDir . '/spatie/error-solutions/src'),
|
||||
'Spatie\\Backtrace\\' => array($vendorDir . '/spatie/backtrace/src'),
|
||||
'SocialiteProviders\\Manager\\' => array($vendorDir . '/socialiteproviders/manager/src'),
|
||||
'SocialiteProviders\\Azure\\' => array($vendorDir . '/socialiteproviders/microsoft-azure'),
|
||||
'Ramsey\\Uuid\\' => array($vendorDir . '/ramsey/uuid/src'),
|
||||
'Ramsey\\Collection\\' => array($vendorDir . '/ramsey/collection/src'),
|
||||
'Psy\\' => array($vendorDir . '/psy/psysh/src'),
|
||||
|
||||
Vendored
+1
-30
@@ -25,7 +25,6 @@ class ComposerStaticInitc91cd9c5b1e6a9e8573a14b799ea9342
|
||||
'09f6b20656683369174dd6fa83b7e5fb' => __DIR__ . '/..' . '/symfony/polyfill-uuid/bootstrap.php',
|
||||
'a1105708a18b76903365ca1c4aa61b02' => __DIR__ . '/..' . '/symfony/translation/Resources/functions.php',
|
||||
'47e1160838b5e5a10346ac4084b58c23' => __DIR__ . '/..' . '/laravel/prompts/src/helpers.php',
|
||||
'decc78cc4436b1292c6c0d151b19445c' => __DIR__ . '/..' . '/phpseclib/phpseclib/phpseclib/bootstrap.php',
|
||||
'e39a8b23c42d4e1452234d762b03835a' => __DIR__ . '/..' . '/ramsey/uuid/src/functions.php',
|
||||
'265b4faa2b3a9766332744949e83bf97' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Collections/helpers.php',
|
||||
'c7a3c339e7e14b60e06a2d7fcce9476b' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Events/functions.php',
|
||||
@@ -34,6 +33,7 @@ class ComposerStaticInitc91cd9c5b1e6a9e8573a14b799ea9342
|
||||
'58571171fd5812e6e447dce228f52f4d' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Support/helpers.php',
|
||||
'6124b4c8570aa390c21fafd04a26c69f' => __DIR__ . '/..' . '/myclabs/deep-copy/src/DeepCopy/deep_copy.php',
|
||||
'3bd81c9b8fcc150b69d8b63b4d2ccf23' => __DIR__ . '/..' . '/spatie/flare-client-php/src/helpers.php',
|
||||
'decc78cc4436b1292c6c0d151b19445c' => __DIR__ . '/..' . '/phpseclib/phpseclib/phpseclib/bootstrap.php',
|
||||
'ec07570ca5a812141189b1fa81503674' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Assert/Functions.php',
|
||||
'801c31d8ed748cfa537fa45402288c95' => __DIR__ . '/..' . '/psy/psysh/src/functions.php',
|
||||
'b84a5ba6d9a8ee8cf648b71c42c799b7' => __DIR__ . '/..' . '/akaunting/laravel-setting/src/helpers.php',
|
||||
@@ -120,8 +120,6 @@ class ComposerStaticInitc91cd9c5b1e6a9e8573a14b799ea9342
|
||||
'Spatie\\FlareClient\\' => 19,
|
||||
'Spatie\\ErrorSolutions\\' => 22,
|
||||
'Spatie\\Backtrace\\' => 17,
|
||||
'SocialiteProviders\\Manager\\' => 27,
|
||||
'SocialiteProviders\\Azure\\' => 25,
|
||||
),
|
||||
'R' =>
|
||||
array (
|
||||
@@ -466,14 +464,6 @@ class ComposerStaticInitc91cd9c5b1e6a9e8573a14b799ea9342
|
||||
array (
|
||||
0 => __DIR__ . '/..' . '/spatie/backtrace/src',
|
||||
),
|
||||
'SocialiteProviders\\Manager\\' =>
|
||||
array (
|
||||
0 => __DIR__ . '/..' . '/socialiteproviders/manager/src',
|
||||
),
|
||||
'SocialiteProviders\\Azure\\' =>
|
||||
array (
|
||||
0 => __DIR__ . '/..' . '/socialiteproviders/microsoft-azure',
|
||||
),
|
||||
'Ramsey\\Uuid\\' =>
|
||||
array (
|
||||
0 => __DIR__ . '/..' . '/ramsey/uuid/src',
|
||||
@@ -7019,25 +7009,6 @@ class ComposerStaticInitc91cd9c5b1e6a9e8573a14b799ea9342
|
||||
'SebastianBergmann\\Type\\UnknownType' => __DIR__ . '/..' . '/sebastian/type/src/type/UnknownType.php',
|
||||
'SebastianBergmann\\Type\\VoidType' => __DIR__ . '/..' . '/sebastian/type/src/type/VoidType.php',
|
||||
'SebastianBergmann\\Version' => __DIR__ . '/..' . '/sebastian/version/src/Version.php',
|
||||
'SocialiteProviders\\Azure\\AzureExtendSocialite' => __DIR__ . '/..' . '/socialiteproviders/microsoft-azure/AzureExtendSocialite.php',
|
||||
'SocialiteProviders\\Azure\\Provider' => __DIR__ . '/..' . '/socialiteproviders/microsoft-azure/Provider.php',
|
||||
'SocialiteProviders\\Azure\\User' => __DIR__ . '/..' . '/socialiteproviders/microsoft-azure/User.php',
|
||||
'SocialiteProviders\\Manager\\Config' => __DIR__ . '/..' . '/socialiteproviders/manager/src/Config.php',
|
||||
'SocialiteProviders\\Manager\\ConfigTrait' => __DIR__ . '/..' . '/socialiteproviders/manager/src/ConfigTrait.php',
|
||||
'SocialiteProviders\\Manager\\Contracts\\ConfigInterface' => __DIR__ . '/..' . '/socialiteproviders/manager/src/Contracts/ConfigInterface.php',
|
||||
'SocialiteProviders\\Manager\\Contracts\\Helpers\\ConfigRetrieverInterface' => __DIR__ . '/..' . '/socialiteproviders/manager/src/Contracts/Helpers/ConfigRetrieverInterface.php',
|
||||
'SocialiteProviders\\Manager\\Contracts\\OAuth1\\ProviderInterface' => __DIR__ . '/..' . '/socialiteproviders/manager/src/Contracts/OAuth1/ProviderInterface.php',
|
||||
'SocialiteProviders\\Manager\\Contracts\\OAuth2\\ProviderInterface' => __DIR__ . '/..' . '/socialiteproviders/manager/src/Contracts/OAuth2/ProviderInterface.php',
|
||||
'SocialiteProviders\\Manager\\Exception\\InvalidArgumentException' => __DIR__ . '/..' . '/socialiteproviders/manager/src/Exception/InvalidArgumentException.php',
|
||||
'SocialiteProviders\\Manager\\Exception\\MissingConfigException' => __DIR__ . '/..' . '/socialiteproviders/manager/src/Exception/MissingConfigException.php',
|
||||
'SocialiteProviders\\Manager\\Helpers\\ConfigRetriever' => __DIR__ . '/..' . '/socialiteproviders/manager/src/Helpers/ConfigRetriever.php',
|
||||
'SocialiteProviders\\Manager\\OAuth1\\AbstractProvider' => __DIR__ . '/..' . '/socialiteproviders/manager/src/OAuth1/AbstractProvider.php',
|
||||
'SocialiteProviders\\Manager\\OAuth1\\Server' => __DIR__ . '/..' . '/socialiteproviders/manager/src/OAuth1/Server.php',
|
||||
'SocialiteProviders\\Manager\\OAuth1\\User' => __DIR__ . '/..' . '/socialiteproviders/manager/src/OAuth1/User.php',
|
||||
'SocialiteProviders\\Manager\\OAuth2\\AbstractProvider' => __DIR__ . '/..' . '/socialiteproviders/manager/src/OAuth2/AbstractProvider.php',
|
||||
'SocialiteProviders\\Manager\\OAuth2\\User' => __DIR__ . '/..' . '/socialiteproviders/manager/src/OAuth2/User.php',
|
||||
'SocialiteProviders\\Manager\\ServiceProvider' => __DIR__ . '/..' . '/socialiteproviders/manager/src/ServiceProvider.php',
|
||||
'SocialiteProviders\\Manager\\SocialiteWasCalled' => __DIR__ . '/..' . '/socialiteproviders/manager/src/SocialiteWasCalled.php',
|
||||
'Spatie\\Backtrace\\Arguments\\ArgumentReducers' => __DIR__ . '/..' . '/spatie/backtrace/src/Arguments/ArgumentReducers.php',
|
||||
'Spatie\\Backtrace\\Arguments\\ProvidedArgument' => __DIR__ . '/..' . '/spatie/backtrace/src/Arguments/ProvidedArgument.php',
|
||||
'Spatie\\Backtrace\\Arguments\\ReduceArgumentPayloadAction' => __DIR__ . '/..' . '/spatie/backtrace/src/Arguments/ReduceArgumentPayloadAction.php',
|
||||
|
||||
Vendored
-131
@@ -8107,137 +8107,6 @@
|
||||
],
|
||||
"install-path": "../sebastian/version"
|
||||
},
|
||||
{
|
||||
"name": "socialiteproviders/manager",
|
||||
"version": "v4.8.1",
|
||||
"version_normalized": "4.8.1.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/SocialiteProviders/Manager.git",
|
||||
"reference": "8180ec14bef230ec2351cff993d5d2d7ca470ef4"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/SocialiteProviders/Manager/zipball/8180ec14bef230ec2351cff993d5d2d7ca470ef4",
|
||||
"reference": "8180ec14bef230ec2351cff993d5d2d7ca470ef4",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"illuminate/support": "^8.0 || ^9.0 || ^10.0 || ^11.0 || ^12.0",
|
||||
"laravel/socialite": "^5.5",
|
||||
"php": "^8.1"
|
||||
},
|
||||
"require-dev": {
|
||||
"mockery/mockery": "^1.2",
|
||||
"phpunit/phpunit": "^9.0"
|
||||
},
|
||||
"time": "2025-02-24T19:33:30+00:00",
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"laravel": {
|
||||
"providers": [
|
||||
"SocialiteProviders\\Manager\\ServiceProvider"
|
||||
]
|
||||
}
|
||||
},
|
||||
"installation-source": "dist",
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"SocialiteProviders\\Manager\\": "src/"
|
||||
}
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"MIT"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Andy Wendt",
|
||||
"email": "andy@awendt.com"
|
||||
},
|
||||
{
|
||||
"name": "Anton Komarev",
|
||||
"email": "a.komarev@cybercog.su"
|
||||
},
|
||||
{
|
||||
"name": "Miguel Piedrafita",
|
||||
"email": "soy@miguelpiedrafita.com"
|
||||
},
|
||||
{
|
||||
"name": "atymic",
|
||||
"email": "atymicq@gmail.com",
|
||||
"homepage": "https://atymic.dev"
|
||||
}
|
||||
],
|
||||
"description": "Easily add new or override built-in providers in Laravel Socialite.",
|
||||
"homepage": "https://socialiteproviders.com",
|
||||
"keywords": [
|
||||
"laravel",
|
||||
"manager",
|
||||
"oauth",
|
||||
"providers",
|
||||
"socialite"
|
||||
],
|
||||
"support": {
|
||||
"issues": "https://github.com/socialiteproviders/manager/issues",
|
||||
"source": "https://github.com/socialiteproviders/manager"
|
||||
},
|
||||
"install-path": "../socialiteproviders/manager"
|
||||
},
|
||||
{
|
||||
"name": "socialiteproviders/microsoft-azure",
|
||||
"version": "5.2.0",
|
||||
"version_normalized": "5.2.0.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/SocialiteProviders/Microsoft-Azure.git",
|
||||
"reference": "453d62c9d7e3b3b76e94c913fb46e68a33347b16"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/SocialiteProviders/Microsoft-Azure/zipball/453d62c9d7e3b3b76e94c913fb46e68a33347b16",
|
||||
"reference": "453d62c9d7e3b3b76e94c913fb46e68a33347b16",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"ext-json": "*",
|
||||
"php": "^8.0",
|
||||
"socialiteproviders/manager": "^4.4"
|
||||
},
|
||||
"time": "2024-03-15T03:02:10+00:00",
|
||||
"type": "library",
|
||||
"installation-source": "dist",
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"SocialiteProviders\\Azure\\": ""
|
||||
}
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"MIT"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Chris Hemmings",
|
||||
"email": "chris@hemmin.gs"
|
||||
}
|
||||
],
|
||||
"description": "Microsoft Azure OAuth2 Provider for Laravel Socialite",
|
||||
"keywords": [
|
||||
"azure",
|
||||
"laravel",
|
||||
"microsoft",
|
||||
"oauth",
|
||||
"provider",
|
||||
"socialite"
|
||||
],
|
||||
"support": {
|
||||
"docs": "https://socialiteproviders.com/microsoft-azure",
|
||||
"issues": "https://github.com/socialiteproviders/providers/issues",
|
||||
"source": "https://github.com/socialiteproviders/providers"
|
||||
},
|
||||
"install-path": "../socialiteproviders/microsoft-azure"
|
||||
},
|
||||
{
|
||||
"name": "spatie/backtrace",
|
||||
"version": "1.6.2",
|
||||
|
||||
Vendored
+2
-20
@@ -3,7 +3,7 @@
|
||||
'name' => 'loshmis/vanguard',
|
||||
'pretty_version' => 'dev-main',
|
||||
'version' => 'dev-main',
|
||||
'reference' => '34d4dc86606bc95d9081b13c34f71f8e6cd5ff22',
|
||||
'reference' => '8cad59e3d60f189970968596f1958eb34e103ccd',
|
||||
'type' => 'project',
|
||||
'install_path' => __DIR__ . '/../../',
|
||||
'aliases' => array(),
|
||||
@@ -688,7 +688,7 @@
|
||||
'loshmis/vanguard' => array(
|
||||
'pretty_version' => 'dev-main',
|
||||
'version' => 'dev-main',
|
||||
'reference' => '34d4dc86606bc95d9081b13c34f71f8e6cd5ff22',
|
||||
'reference' => '8cad59e3d60f189970968596f1958eb34e103ccd',
|
||||
'type' => 'project',
|
||||
'install_path' => __DIR__ . '/../../',
|
||||
'aliases' => array(),
|
||||
@@ -1295,24 +1295,6 @@
|
||||
'aliases' => array(),
|
||||
'dev_requirement' => true,
|
||||
),
|
||||
'socialiteproviders/manager' => array(
|
||||
'pretty_version' => 'v4.8.1',
|
||||
'version' => '4.8.1.0',
|
||||
'reference' => '8180ec14bef230ec2351cff993d5d2d7ca470ef4',
|
||||
'type' => 'library',
|
||||
'install_path' => __DIR__ . '/../socialiteproviders/manager',
|
||||
'aliases' => array(),
|
||||
'dev_requirement' => false,
|
||||
),
|
||||
'socialiteproviders/microsoft-azure' => array(
|
||||
'pretty_version' => '5.2.0',
|
||||
'version' => '5.2.0.0',
|
||||
'reference' => '453d62c9d7e3b3b76e94c913fb46e68a33347b16',
|
||||
'type' => 'library',
|
||||
'install_path' => __DIR__ . '/../socialiteproviders/microsoft-azure',
|
||||
'aliases' => array(),
|
||||
'dev_requirement' => false,
|
||||
),
|
||||
'spatie/backtrace' => array(
|
||||
'pretty_version' => '1.6.2',
|
||||
'version' => '1.6.2.0',
|
||||
|
||||
Reference in New Issue
Block a user