Leadásra kész
This commit is contained in:
@@ -8,18 +8,17 @@ use Illuminate\Support\Facades\Auth;
|
|||||||
|
|
||||||
class WcController extends Controller
|
class WcController extends Controller
|
||||||
{
|
{
|
||||||
|
public function __construct()
|
||||||
|
{
|
||||||
|
$this->middleware('auth:api')->only(['store', 'destroy']);
|
||||||
|
}
|
||||||
|
|
||||||
public function index()
|
public function index()
|
||||||
{
|
{
|
||||||
$mosdok = WcAdatok::with('kerulet')->get();
|
$mosdok = WcAdatok::with('kerulet')->get();
|
||||||
return response()->json($mosdok);
|
return response()->json($mosdok);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function __construct()
|
|
||||||
{
|
|
||||||
$this->middleware('auth:api')->only(['store', 'destroy']);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
public function store(Request $request)
|
public function store(Request $request)
|
||||||
{
|
{
|
||||||
$validatedData = $request->validate([
|
$validatedData = $request->validate([
|
||||||
|
|||||||
BIN
PeePal_Dokumentacio_2024-2025.pdf
Normal file
BIN
PeePal_Dokumentacio_2024-2025.pdf
Normal file
Binary file not shown.
@@ -9,7 +9,6 @@ export function AuthProvider({ children }) {
|
|||||||
const API_URL = 'http://localhost:8000/api';
|
const API_URL = 'http://localhost:8000/api';
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
// Check if user is logged in on page load
|
|
||||||
const token = localStorage.getItem('token');
|
const token = localStorage.getItem('token');
|
||||||
if (token) {
|
if (token) {
|
||||||
fetchUserData(token);
|
fetchUserData(token);
|
||||||
|
|||||||
@@ -26,7 +26,6 @@ export default function Regisztracio() {
|
|||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
setErrors({});
|
setErrors({});
|
||||||
|
|
||||||
// Basic validation
|
|
||||||
const newErrors = {};
|
const newErrors = {};
|
||||||
if (!formData.nev) newErrors.nev = 'A név megadása kötelező';
|
if (!formData.nev) newErrors.nev = 'A név megadása kötelező';
|
||||||
if (!formData.email) newErrors.email = 'Az email megadása kötelező';
|
if (!formData.email) newErrors.email = 'Az email megadása kötelező';
|
||||||
|
|||||||
@@ -150,9 +150,11 @@ export default function HozzaadForm() {
|
|||||||
type="text"
|
type="text"
|
||||||
value={nyitva}
|
value={nyitva}
|
||||||
onChange={(e) => setNyitva(e.target.value)}
|
onChange={(e) => setNyitva(e.target.value)}
|
||||||
|
pattern="^((([0-1]?[0-9])|(2[0-3])):[0-5][0-9])-(?:(24:00)|(([0-1]?[0-9]|2[0-3]):[0-5][0-9]))$"
|
||||||
className="w-full px-4 py-2 border rounded-lg focus:outline-none focus:ring-2 focus:ring-blue-500"
|
className="w-full px-4 py-2 border rounded-lg focus:outline-none focus:ring-2 focus:ring-blue-500"
|
||||||
placeholder="Nyitvatartás (Óra:Perc-Óra:Perc)"
|
placeholder="Nyitvatartás (Óra:Perc-Óra:Perc)"
|
||||||
/>
|
/>
|
||||||
|
{errors.nyitva && <p className="text-red-600 text-sm">{errors.nyitva}</p>}
|
||||||
|
|
||||||
<fieldset className="mt-4">
|
<fieldset className="mt-4">
|
||||||
<legend className="block text-gray-700">Akadálymentes:</legend>
|
<legend className="block text-gray-700">Akadálymentes:</legend>
|
||||||
|
|||||||
Reference in New Issue
Block a user