@ -2,22 +2,20 @@ import React from 'react';
|
|||||||
import Layout from "../components/layout";
|
import Layout from "../components/layout";
|
||||||
import FeedbackForm from "../components/reports/FeedbackForm";
|
import FeedbackForm from "../components/reports/FeedbackForm";
|
||||||
import { useTranslations } from 'next-intl';
|
import { useTranslations } from 'next-intl';
|
||||||
import ProtectedRoute from "../components/protectedRoute";
|
|
||||||
|
|
||||||
const ContactsPage = () => {
|
const ContactsPage = () => {
|
||||||
const t = useTranslations('common');
|
const t = useTranslations('common');
|
||||||
return (
|
return (
|
||||||
<Layout>
|
<Layout>
|
||||||
<ProtectedRoute>
|
<div className="mx-auto my-8 p-6 max-w-4xl bg-white rounded-lg shadow-md">
|
||||||
<div className="mx-auto my-8 p-6 max-w-4xl bg-white rounded-lg shadow-md">
|
<h1 className="text-2xl font-bold text-gray-800 mb-4">{t('appNameLong') - t('contacts')}</h1>
|
||||||
<h1 className="text-2xl font-bold text-gray-800 mb-4">{t('appNameLong') - t('contacts')}</h1>
|
<ul className="list-disc pl-5">
|
||||||
<ul className="list-disc pl-5">
|
<li className="text-gray-700 mb-2">Янко Ванчев - <a href="tel:+359878224467" className="text-blue-500 hover:text-blue-600">+359 878 22 44 67</a></li>
|
||||||
<li className="text-gray-700 mb-2">Янко Ванчев - <a href="tel:+359878224467" className="text-blue-500 hover:text-blue-600">+359 878 22 44 67</a></li>
|
<li className="text-gray-700">Крейг Смит - <a href="tel:+359878994573" className="text-blue-500 hover:text-blue-600">+359 878 994 573</a></li>
|
||||||
<li className="text-gray-700">Крейг Смит - <a href="tel:+359878994573" className="text-blue-500 hover:text-blue-600">+359 878 994 573</a></li>
|
</ul>
|
||||||
</ul>
|
<div className="text-gray-700 pl-4 py-5">Електронна поща: <a href="mailto:specialnosvidetelstvanesofia@gmail.com" className="text-blue-500 hover:text-blue-600">specialnosvidetelstvanesofia@gmail.com</a></div>
|
||||||
<div className="text-gray-700 pl-4 py-5">Електронна поща: <a href="mailto:specialnosvidetelstvanesofia@gmail.com" className="text-blue-500 hover:text-blue-600">specialnosvidetelstvanesofia@gmail.com</a></div>
|
|
||||||
|
|
||||||
{/* <div className="mt-6">
|
{/* <div className="mt-6">
|
||||||
<h3 className="text-lg font-semibold text-gray-800 mb-3">Социални мрежи</h3>
|
<h3 className="text-lg font-semibold text-gray-800 mb-3">Социални мрежи</h3>
|
||||||
<div className="flex space-x-4">
|
<div className="flex space-x-4">
|
||||||
<a href="#" className="text-blue-500 hover:text-blue-600">
|
<a href="#" className="text-blue-500 hover:text-blue-600">
|
||||||
@ -27,13 +25,13 @@ const ContactsPage = () => {
|
|||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
</div > */
|
</div > */
|
||||||
}
|
}
|
||||||
{/* <a href="https://t.me/mwHitnessing_bot" className="inline-flex items-center ml-4" target="_blank">
|
{/* <a href="https://t.me/mwHitnessing_bot" className="inline-flex items-center ml-4" target="_blank">
|
||||||
<img src="styles/icons/telegram-svgrepo-com.svg" alt="Телеграм" width="32" height="32" className="align-middle" />
|
<img src="styles/icons/telegram-svgrepo-com.svg" alt="Телеграм" width="32" height="32" className="align-middle" />
|
||||||
<span className="align-middle">Телеграм</span>
|
<span className="align-middle">Телеграм</span>
|
||||||
</a> */}
|
</a> */}
|
||||||
</div >
|
</div >
|
||||||
</ProtectedRoute>
|
|
||||||
</Layout >
|
</Layout >
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
@ -1,16 +1,13 @@
|
|||||||
import React from 'react';
|
import React from 'react';
|
||||||
import Layout from "../components/layout";
|
import Layout from "../components/layout";
|
||||||
import FeedbackForm from "../components/reports/FeedbackForm";
|
import FeedbackForm from "../components/reports/FeedbackForm";
|
||||||
import ProtectedRoute from "../components/protectedRoute";
|
|
||||||
|
|
||||||
const ContactsPage = () => {
|
const ContactsPage = () => {
|
||||||
return (
|
return (
|
||||||
<Layout>
|
<Layout>
|
||||||
<ProtectedRoute>
|
<div className="h-5/6 grid place-items-center">
|
||||||
<div className="h-5/6 grid place-items-center">
|
<FeedbackForm />
|
||||||
<FeedbackForm />
|
</div>
|
||||||
</div>
|
|
||||||
</ProtectedRoute>
|
|
||||||
</Layout >
|
</Layout >
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
import React, { useState } from 'react';
|
import React, { useState } from 'react';
|
||||||
import Layout from "../components/layout";
|
import Layout from "../components/layout";
|
||||||
import ProtectedRoute from "../components/protectedRoute";
|
|
||||||
|
|
||||||
const PDFViewerPage = () => {
|
const PDFViewerPage = () => {
|
||||||
const [language, setLanguage] = useState('bg'); // default language is Bulgarian
|
const [language, setLanguage] = useState('bg'); // default language is Bulgarian
|
||||||
@ -26,64 +25,61 @@ const PDFViewerPage = () => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Layout>
|
<Layout><script src="https://mozilla.github.io/pdf.js/dist/pdf.js"></script>
|
||||||
<ProtectedRoute>
|
<h1 className="text-3xl font-bold">Напътствия</h1>
|
||||||
<script src="https://mozilla.github.io/pdf.js/dist/pdf.js"></script>
|
<div className="guidelines-section mb-5 p-4 bg-gray-100 rounded-lg">
|
||||||
<h1 className="text-3xl font-bold">Напътствия</h1>
|
<h2 className="text-2xl font-semibold mb-3">Важни напътствия за службата</h2>
|
||||||
<div className="guidelines-section mb-5 p-4 bg-gray-100 rounded-lg">
|
<ol className="list-decimal list-inside">
|
||||||
<h2 className="text-2xl font-semibold mb-3">Важни напътствия за службата</h2>
|
<li><strong>Покани за Възпоменанието:</strong> За кампанията ще използваме покани без конкретен адрес. Ще насочваме хората към най-близкото за тях място, чрез сайта или като попълним поканата.</li>
|
||||||
<ol className="list-decimal list-inside">
|
|
||||||
<li><strong>Покани за Възпоменанието:</strong> За кампанията ще използваме покани без конкретен адрес. Ще насочваме хората към най-близкото за тях място, чрез сайта или като попълним поканата.</li>
|
|
||||||
|
|
||||||
<li><strong>Щандове:</strong> Предлагаме следното:
|
<li><strong>Щандове:</strong> Предлагаме следното:
|
||||||
<ul className="list-disc list-inside ml-4">
|
<ul className="list-disc list-inside ml-4">
|
||||||
<li>Да има известно разстояние между нас и щандовете. Целта е да оставим хората свободно да се доближат до количките и ако някой прояви интерес може да се приближим.</li>
|
<li>Да има известно разстояние между нас и щандовете. Целта е да оставим хората свободно да се доближат до количките и ако някой прояви интерес може да се приближим.</li>
|
||||||
<li>Когато сме двама или трима може да стоим заедно. Ако сме четирима би било хубаво да се разделим по двама на количка и количките да са на известно разстояние една от друга.</li>
|
<li>Когато сме двама или трима може да стоим заедно. Ако сме четирима би било хубаво да се разделим по двама на количка и количките да са на известно разстояние една от друга.</li>
|
||||||
</ul>
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
<li><strong>Безопасност:</strong> Нека се страем зад нас винаги да има защита или препятствие за недобронамерени хора.</li>
|
<li><strong>Безопасност:</strong> Нека се страем зад нас винаги да има защита или препятствие за недобронамерени хора.</li>
|
||||||
<li><strong>Плакати:</strong> Моля при придвижване на количките да слагате плакатите така, че илюстрацията да се вижда, когато калъфа е сложен. Целта е снимките да не се търкат в количката, защото се повреждат.</li>
|
<li><strong>Плакати:</strong> Моля при придвижване на количките да слагате плакатите така, че илюстрацията да се вижда, когато калъфа е сложен. Целта е снимките да не се търкат в количката, защото се повреждат.</li>
|
||||||
<li><strong>Литература:</strong> При проявен интерес на чужд език, използвайте списанията и трактатите на други езици в папките.</li>
|
<li><strong>Литература:</strong> При проявен интерес на чужд език, използвайте списанията и трактатите на други езици в папките.</li>
|
||||||
<li><strong>График:</strong> Моля да ни изпратите вашите предпочитания до 23-то число на месеца като използвате меню <a href='/dash'> Възможности</a></li>
|
<li><strong>График:</strong> Моля да ни изпратите вашите предпочитания до 23-то число на месеца като използвате меню <a href='/dash'> Възможности</a></li>
|
||||||
<li><strong>Случки:</strong> Ако сте имали хубави случки на количките, моля пишете ни.</li>
|
<li><strong>Случки:</strong> Ако сте имали хубави случки на количките, моля пишете ни.</li>
|
||||||
</ol>
|
</ol>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div style={{ width: '100%', height: 'calc(100vh - 100px)' }}> {/* Adjust the 100px based on your header/footer size */}
|
||||||
|
<div className="my-4 flex items-center">
|
||||||
|
{languages.map((lang, index) => (
|
||||||
|
<React.Fragment key={lang.code}>
|
||||||
|
{index > 0 && <div className="bg-gray-400 w-px h-6"></div>} {/* Vertical line separator */}
|
||||||
|
<button
|
||||||
|
onClick={() => setLanguage(lang.code)}
|
||||||
|
className={`text-lg py-2 px-4 ${language === lang.code ? 'bg-blue-500 text-white' : 'bg-gray-200 text-gray-800 hover:bg-blue-500 hover:text-white'} ${index === 0 ? 'rounded-l-full' : index === languages.length - 1 ? 'rounded-r-full' : ''}`}
|
||||||
|
>
|
||||||
|
{lang.label}
|
||||||
|
</button>
|
||||||
|
</React.Fragment>
|
||||||
|
))}
|
||||||
</div>
|
</div>
|
||||||
|
<p className="p-2 pb-5">
|
||||||
|
<a href={pdfFile} className="text-blue-600 hover:text-blue-800 visited:text-purple-600 underline" target='_blank'>
|
||||||
|
Свали Напътствията
|
||||||
|
</a>
|
||||||
|
</p>
|
||||||
|
|
||||||
<div style={{ width: '100%', height: 'calc(100vh - 100px)' }}> {/* Adjust the 100px based on your header/footer size */}
|
<div style={{ width: 'calc(100% - 1rem)', height: '100%', margin: '0 0' }}>
|
||||||
<div className="my-4 flex items-center">
|
<embed src={pdfFile} type="application/pdf" style={{ width: '100%', height: '100%' }} />
|
||||||
{languages.map((lang, index) => (
|
{/* <object data={pdfFile} type="application/pdf" page="2" style={{ width: '100%', height: '100%' }}>
|
||||||
<React.Fragment key={lang.code}>
|
|
||||||
{index > 0 && <div className="bg-gray-400 w-px h-6"></div>} {/* Vertical line separator */}
|
|
||||||
<button
|
|
||||||
onClick={() => setLanguage(lang.code)}
|
|
||||||
className={`text-lg py-2 px-4 ${language === lang.code ? 'bg-blue-500 text-white' : 'bg-gray-200 text-gray-800 hover:bg-blue-500 hover:text-white'} ${index === 0 ? 'rounded-l-full' : index === languages.length - 1 ? 'rounded-r-full' : ''}`}
|
|
||||||
>
|
|
||||||
{lang.label}
|
|
||||||
</button>
|
|
||||||
</React.Fragment>
|
|
||||||
))}
|
|
||||||
</div>
|
|
||||||
<p className="p-2 pb-5">
|
|
||||||
<a href={pdfFile} className="text-blue-600 hover:text-blue-800 visited:text-purple-600 underline" target='_blank'>
|
|
||||||
Свали Напътствията
|
|
||||||
</a>
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<div style={{ width: 'calc(100% - 1rem)', height: '100%', margin: '0 0' }}>
|
|
||||||
<embed src={pdfFile} type="application/pdf" style={{ width: '100%', height: '100%' }} />
|
|
||||||
{/* <object data={pdfFile} type="application/pdf" page="2" style={{ width: '100%', height: '100%' }}>
|
|
||||||
|
|
||||||
<p>Your browser does not support PDFs. Please download the PDF to view it: <a href={pdfFile}>Свали PDF файла</a>.</p>
|
<p>Your browser does not support PDFs. Please download the PDF to view it: <a href={pdfFile}>Свали PDF файла</a>.</p>
|
||||||
<p>Вашият браузър не поддържа PDFs файлове. Моля свалете файла за да го разгледате: <a href={pdfFile}>Свали PDF файла</a>.</p>
|
<p>Вашият браузър не поддържа PDFs файлове. Моля свалете файла за да го разгледате: <a href={pdfFile}>Свали PDF файла</a>.</p>
|
||||||
</object> */}
|
</object> */}
|
||||||
</div>
|
|
||||||
{/* <iframe src={`https://docs.google.com/gview?url=${baseUrl}${pdfFile}&embedded=true`} style={{ width: '100%', height: '100%' }} frameBorder="0"></iframe> */}
|
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</ProtectedRoute>
|
{/* <iframe src={`https://docs.google.com/gview?url=${baseUrl}${pdfFile}&embedded=true`} style={{ width: '100%', height: '100%' }} frameBorder="0"></iframe> */}
|
||||||
</Layout>
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</Layout >
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -3,7 +3,7 @@ import Layout from "../components/layout";
|
|||||||
import fs from 'fs';
|
import fs from 'fs';
|
||||||
import path from 'path';
|
import path from 'path';
|
||||||
import { url } from 'inspector';
|
import { url } from 'inspector';
|
||||||
import ProtectedRoute from "../components/protectedRoute";
|
import ProtectedRoute, { serverSideAuth } from "/components/protectedRoute";
|
||||||
import axiosInstance from '../src/axiosSecure';
|
import axiosInstance from '../src/axiosSecure';
|
||||||
import { UserRole } from "@prisma/client";
|
import { UserRole } from "@prisma/client";
|
||||||
|
|
||||||
@ -48,59 +48,56 @@ const PDFViewerPage = ({ pdfFiles }) => {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<Layout>
|
<Layout>
|
||||||
<ProtectedRoute>
|
<h1 className="text-3xl font-bold p-4 pt-8">Разрешителни</h1>
|
||||||
<h1 className="text-3xl font-bold p-4 pt-8">Разрешителни</h1>
|
<ProtectedRoute allowedRoles={[UserRole.ADMIN]} deniedMessage="">
|
||||||
<ProtectedRoute allowedRoles={[UserRole.ADMIN]} deniedMessage="">
|
<div className="border border-blue-500 p-4 rounded shadow-md">
|
||||||
<div className="border border-blue-500 p-4 rounded shadow-md">
|
<div className="mb-6">
|
||||||
<div className="mb-6">
|
<p className="text-lg mb-2">За да качите файл кликнете на бутона по-долу и изберете файл от вашия компютър.</p>
|
||||||
<p className="text-lg mb-2">За да качите файл кликнете на бутона по-долу и изберете файл от вашия компютър.</p>
|
<input type="file" onChange={handleFileUpload} className="block w-full text-sm text-gray-600
|
||||||
<input type="file" onChange={handleFileUpload} className="block w-full text-sm text-gray-600
|
|
||||||
file:mr-4 file:py-2 file:px-4
|
file:mr-4 file:py-2 file:px-4
|
||||||
file:border-0
|
file:border-0
|
||||||
file:text-sm file:font-semibold
|
file:text-sm file:font-semibold
|
||||||
file:bg-blue-500 file:text-white
|
file:bg-blue-500 file:text-white
|
||||||
hover:file:bg-blue-600"/>
|
hover:file:bg-blue-600"/>
|
||||||
</div>
|
|
||||||
<div>
|
|
||||||
<h3 className="text-lg font-semibold mb-2">Съществуващи файлове:</h3>
|
|
||||||
{files.length > 0 ? (
|
|
||||||
files.map((file, index) => (
|
|
||||||
<div key={index} className="flex items-center justify-between mb-2 p-2 hover:bg-blue-50 rounded">
|
|
||||||
<a href={file.url} className="text-blue-600 hover:text-blue-800 visited:text-purple-600 underline" target="_blank" rel="noopener noreferrer">
|
|
||||||
{file.name}
|
|
||||||
</a>
|
|
||||||
<button onClick={() => handleFileDelete(file.name)} className="ml-4 bg-red-500 hover:bg-red-700 text-white font-bold py-1 px-2 rounded focus:outline-none focus:ring-2 focus:ring-red-500 focus:ring-opacity-50">
|
|
||||||
изтрий
|
|
||||||
</button>
|
|
||||||
</div>
|
|
||||||
))
|
|
||||||
) : (
|
|
||||||
<p className="text-gray-500">Няма качени файлове.</p>
|
|
||||||
)}
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
|
<div>
|
||||||
</ProtectedRoute>
|
<h3 className="text-lg font-semibold mb-2">Съществуващи файлове:</h3>
|
||||||
|
{files.length > 0 ? (
|
||||||
<div style={{ width: '100%', height: 'calc(100vh - 100px)' }}> {/* Adjust the 100px based on your header/footer size */}
|
files.map((file, index) => (
|
||||||
{pdfFiles.map((file, index) => (
|
<div key={index} className="flex items-center justify-between mb-2 p-2 hover:bg-blue-50 rounded">
|
||||||
<> <p className="pt-2">
|
<a href={file.url} className="text-blue-600 hover:text-blue-800 visited:text-purple-600 underline" target="_blank" rel="noopener noreferrer">
|
||||||
<a href={file.url} className="text-blue-600 hover:text-blue-800 visited:text-purple-600 underline" target='_blank'>
|
{file.name}
|
||||||
Свали: {file.name}
|
</a>
|
||||||
</a>
|
<button onClick={() => handleFileDelete(file.name)} className="ml-4 bg-red-500 hover:bg-red-700 text-white font-bold py-1 px-2 rounded focus:outline-none focus:ring-2 focus:ring-red-500 focus:ring-opacity-50">
|
||||||
</p>
|
изтрий
|
||||||
<div style={{ width: 'calc(100% - 1rem)', height: '100%' }} className='py-2'>
|
</button>
|
||||||
< object data={file.url} type="application/pdf" style={{ width: '100%', height: '100%' }}>
|
</div>
|
||||||
<p>Вашият браузър не поддържа PDFs файлове. Моля свалете файла за да го разгледате: <a href={file.url}>Свали {file.name}</a>.</p>
|
))
|
||||||
<p>Your browser does not support PDFs. Please download the PDF to view it: <a href={file.url}> {file.name}</a>.</p>
|
) : (
|
||||||
</object>
|
<p className="text-gray-500">Няма качени файлове.</p>
|
||||||
</div>
|
)}
|
||||||
</>
|
</div>
|
||||||
))}
|
|
||||||
</div>
|
</div>
|
||||||
</ProtectedRoute>
|
|
||||||
</Layout >
|
|
||||||
|
|
||||||
|
</ProtectedRoute>
|
||||||
|
|
||||||
|
<div style={{ width: '100%', height: 'calc(100vh - 100px)' }}> {/* Adjust the 100px based on your header/footer size */}
|
||||||
|
{pdfFiles.map((file, index) => (
|
||||||
|
<> <p className="pt-2">
|
||||||
|
<a href={file.url} className="text-blue-600 hover:text-blue-800 visited:text-purple-600 underline" target='_blank'>
|
||||||
|
Свали: {file.name}
|
||||||
|
</a>
|
||||||
|
</p>
|
||||||
|
<div style={{ width: 'calc(100% - 1rem)', height: '100%' }} className='py-2'>
|
||||||
|
< object data={file.url} type="application/pdf" style={{ width: '100%', height: '100%' }}>
|
||||||
|
<p>Вашият браузър не поддържа PDFs файлове. Моля свалете файла за да го разгледате: <a href={file.url}>Свали {file.name}</a>.</p>
|
||||||
|
<p>Your browser does not support PDFs. Please download the PDF to view it: <a href={file.url}> {file.name}</a>.</p>
|
||||||
|
</object>
|
||||||
|
</div>
|
||||||
|
</>
|
||||||
|
))}
|
||||||
|
</div>
|
||||||
|
</Layout >
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user