Compare commits
10 Commits
28aafb06aa
...
66243863e4
| Author | SHA1 | Date | |
|---|---|---|---|
| 66243863e4 | |||
| dfead23a53 | |||
| ccf89a1cd4 | |||
| c3e5b151b0 | |||
| 5c7f9b3b03 | |||
| f2fa8e46e9 | |||
| 0ee583c662 | |||
| 55f001f1cc | |||
| 85cb0102d5 | |||
| d971884207 |
3
.env.flyhope
Normal file
3
.env.flyhope
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
REACT_APP_PHP_ROOT = "http://flyhope.de/dog/php-dog/"
|
||||||
|
REACT_APP_WWW_ROOT = "http://flyhope.de/dog/"
|
||||||
|
|
||||||
@ -1,2 +1,3 @@
|
|||||||
REACT_APP_PHP_ROOT = "https://hope-fly.de/dog/php-dog/"
|
REACT_APP_PHP_ROOT = "https://hope-fly.de/dog/php-dog/"
|
||||||
REACT_APP_WWW_ROOT = "https://hope-fly.de/dog/"
|
REACT_APP_WWW_ROOT = "https://hope-fly.de/dog/"
|
||||||
|
|
||||||
|
|||||||
3
.env.serv_nc
Normal file
3
.env.serv_nc
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
REACT_APP_PHP_ROOT = "http://89.58.26.239/dog/php-dog/"
|
||||||
|
REACT_APP_WWW_ROOT = "http://89.58.26.239/dog/"
|
||||||
|
|
||||||
66
docs/dog.sql
66
docs/dog.sql
@ -1,66 +0,0 @@
|
|||||||
-- phpMyAdmin SQL Dump
|
|
||||||
-- version 5.2.0
|
|
||||||
-- https://www.phpmyadmin.net/
|
|
||||||
--
|
|
||||||
-- Host: localhost
|
|
||||||
-- Erstellungszeit: 17. Dez 2022 um 00:33
|
|
||||||
-- Server-Version: 10.4.27-MariaDB
|
|
||||||
-- PHP-Version: 8.1.12
|
|
||||||
|
|
||||||
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
|
|
||||||
START TRANSACTION;
|
|
||||||
SET time_zone = "+00:00";
|
|
||||||
|
|
||||||
|
|
||||||
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
|
|
||||||
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
|
|
||||||
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
|
|
||||||
/*!40101 SET NAMES utf8mb4 */;
|
|
||||||
|
|
||||||
--
|
|
||||||
-- Datenbank: `k200835_dog`
|
|
||||||
--
|
|
||||||
|
|
||||||
-- --------------------------------------------------------
|
|
||||||
|
|
||||||
--
|
|
||||||
-- Tabellenstruktur für Tabelle `dogs`
|
|
||||||
--
|
|
||||||
|
|
||||||
CREATE TABLE `dogs` (
|
|
||||||
`id` int(11) NOT NULL,
|
|
||||||
`email` varchar(255) NOT NULL,
|
|
||||||
`qr_id` char(31) NOT NULL,
|
|
||||||
`name` varchar(255) NOT NULL DEFAULT '',
|
|
||||||
`password` varchar(255) NOT NULL,
|
|
||||||
`phone` varchar(255) NOT NULL DEFAULT '',
|
|
||||||
`qr_code` varchar(255) DEFAULT NULL,
|
|
||||||
`picture` varchar(255) DEFAULT NULL
|
|
||||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
|
||||||
|
|
||||||
--
|
|
||||||
-- Indizes der exportierten Tabellen
|
|
||||||
--
|
|
||||||
|
|
||||||
--
|
|
||||||
-- Indizes für die Tabelle `dogs`
|
|
||||||
--
|
|
||||||
ALTER TABLE `dogs`
|
|
||||||
ADD PRIMARY KEY (`id`),
|
|
||||||
ADD UNIQUE KEY `index_qr_id` (`qr_id`),
|
|
||||||
ADD UNIQUE KEY `index_email` (`email`);
|
|
||||||
|
|
||||||
--
|
|
||||||
-- AUTO_INCREMENT für exportierte Tabellen
|
|
||||||
--
|
|
||||||
|
|
||||||
--
|
|
||||||
-- AUTO_INCREMENT für Tabelle `dogs`
|
|
||||||
--
|
|
||||||
ALTER TABLE `dogs`
|
|
||||||
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;
|
|
||||||
COMMIT;
|
|
||||||
|
|
||||||
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
|
|
||||||
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
|
|
||||||
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
|
|
||||||
@ -1,76 +0,0 @@
|
|||||||
-- phpMyAdmin SQL Dump
|
|
||||||
-- version 5.1.3
|
|
||||||
-- https://www.phpmyadmin.net/
|
|
||||||
--
|
|
||||||
-- Host: 10.35.232.188:3306
|
|
||||||
-- Erstellungszeit: 29. Dez 2022 um 20:55
|
|
||||||
-- Server-Version: 8.0.31
|
|
||||||
-- PHP-Version: 7.4.32
|
|
||||||
|
|
||||||
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
|
|
||||||
START TRANSACTION;
|
|
||||||
SET time_zone = "+00:00";
|
|
||||||
|
|
||||||
|
|
||||||
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
|
|
||||||
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
|
|
||||||
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
|
|
||||||
/*!40101 SET NAMES utf8mb4 */;
|
|
||||||
|
|
||||||
--
|
|
||||||
-- Datenbank: `k200835_dog`
|
|
||||||
--
|
|
||||||
|
|
||||||
-- --------------------------------------------------------
|
|
||||||
|
|
||||||
--
|
|
||||||
-- Tabellenstruktur für Tabelle `dogs`
|
|
||||||
--
|
|
||||||
|
|
||||||
CREATE TABLE `dogs` (
|
|
||||||
`id` int NOT NULL,
|
|
||||||
`email` varchar(255) COLLATE utf8mb3_unicode_ci NOT NULL,
|
|
||||||
`qr_id` char(31) COLLATE utf8mb3_unicode_ci NOT NULL,
|
|
||||||
`name` varchar(255) COLLATE utf8mb3_unicode_ci NOT NULL DEFAULT '',
|
|
||||||
`password` varchar(255) COLLATE utf8mb3_unicode_ci NOT NULL,
|
|
||||||
`phone` varchar(255) COLLATE utf8mb3_unicode_ci NOT NULL DEFAULT '',
|
|
||||||
`qr_code` varchar(255) COLLATE utf8mb3_unicode_ci DEFAULT NULL,
|
|
||||||
`picture` varchar(255) COLLATE utf8mb3_unicode_ci DEFAULT NULL
|
|
||||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci;
|
|
||||||
|
|
||||||
--
|
|
||||||
-- Daten für Tabelle `dogs`
|
|
||||||
--
|
|
||||||
|
|
||||||
INSERT INTO `dogs` (`id`, `email`, `qr_id`, `name`, `password`, `phone`, `qr_code`, `picture`) VALUES
|
|
||||||
(4, 'a@q.q', 'r0hhpZ', 'ddddd', '$2y$10$kQWHhEr9m3w5BfqRMN0WauUBI.OaRR86X8lssTlOX5UnMOTdqEKOa', '', NULL, NULL),
|
|
||||||
(5, 'conny.rankl@web.de', 'm7MdMK', 'Melly', '$2y$10$2WscecdKZv73sl2E1cdg5OKNGpfDzSRyrQeu8ebZIgIiLexztgbHa', '+49 171 7328974', '/m7MdMK/7a0LA4ZlWVXYhPArDRU8.png', '/m7MdMK/eywPirFAyg9jSIvoK4KZ.jpg'),
|
|
||||||
(11, 'p.para@gmx.de', 'YQiwEB', 'Conny', '$2y$10$/W.2pZLhhxoW7j6M5KcXJ.HWDJBc98fpapTaWm9hxKXYfA5YZiinK', '+49 179 5035966', '/YQiwEB/PbygxRtUBkhQrekdIdER.png', '/YQiwEB/8w0iUcSKM0bvSmC8i6cL.png'),
|
|
||||||
(12, 'eva-maria-cat@web.de', '17dg43', 'Bonny', '$2y$10$AsTXWioe5pyMNqAPN8DoJuovIkkfZkYci2Z5VG3a9uf545jbCqUta', '+49 171 7923900', '/17dg43/0GH7skrnnzBYUDuIIybR.png', '/17dg43/GmFlF0nh7GU02wNuIFcX.jpg');
|
|
||||||
|
|
||||||
--
|
|
||||||
-- Indizes der exportierten Tabellen
|
|
||||||
--
|
|
||||||
|
|
||||||
--
|
|
||||||
-- Indizes für die Tabelle `dogs`
|
|
||||||
--
|
|
||||||
ALTER TABLE `dogs`
|
|
||||||
ADD PRIMARY KEY (`id`),
|
|
||||||
ADD UNIQUE KEY `index_qr_id` (`qr_id`),
|
|
||||||
ADD UNIQUE KEY `index_email` (`email`);
|
|
||||||
|
|
||||||
--
|
|
||||||
-- AUTO_INCREMENT für exportierte Tabellen
|
|
||||||
--
|
|
||||||
|
|
||||||
--
|
|
||||||
-- AUTO_INCREMENT für Tabelle `dogs`
|
|
||||||
--
|
|
||||||
ALTER TABLE `dogs`
|
|
||||||
MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=13;
|
|
||||||
COMMIT;
|
|
||||||
|
|
||||||
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
|
|
||||||
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
|
|
||||||
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
|
|
||||||
132
docs/k200835_dog.sql
Normal file
132
docs/k200835_dog.sql
Normal file
@ -0,0 +1,132 @@
|
|||||||
|
-- phpMyAdmin SQL Dump
|
||||||
|
-- version 5.1.3
|
||||||
|
-- https://www.phpmyadmin.net/
|
||||||
|
--
|
||||||
|
-- Host: 10.35.232.188:3306
|
||||||
|
-- Erstellungszeit: 28. Feb 2023 um 23:17
|
||||||
|
-- Server-Version: 8.0.32
|
||||||
|
-- PHP-Version: 7.4.33
|
||||||
|
|
||||||
|
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
|
||||||
|
START TRANSACTION;
|
||||||
|
SET time_zone = "+00:00";
|
||||||
|
|
||||||
|
|
||||||
|
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
|
||||||
|
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
|
||||||
|
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
|
||||||
|
/*!40101 SET NAMES utf8mb4 */;
|
||||||
|
|
||||||
|
--
|
||||||
|
-- Datenbank: `k200835_dog`
|
||||||
|
--
|
||||||
|
|
||||||
|
-- --------------------------------------------------------
|
||||||
|
|
||||||
|
--
|
||||||
|
-- Tabellenstruktur für Tabelle `contact_emails`
|
||||||
|
--
|
||||||
|
|
||||||
|
CREATE TABLE `contact_emails` (
|
||||||
|
`id` int NOT NULL,
|
||||||
|
`dogs_id` int NOT NULL,
|
||||||
|
`from_email` varchar(255) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
|
||||||
|
`msg` varchar(1023) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
|
||||||
|
`created` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP
|
||||||
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;
|
||||||
|
|
||||||
|
--
|
||||||
|
-- Daten für Tabelle `contact_emails`
|
||||||
|
--
|
||||||
|
|
||||||
|
INSERT INTO `contact_emails` (`id`, `dogs_id`, `from_email`, `msg`, `created`) VALUES
|
||||||
|
(20, 14, 'p.hoppe@gmx.de', 'Jo josef', '2023-02-10 00:23:16'),
|
||||||
|
(21, 11, 'x@hope-para.de', 'sdsdsdsdsd', '2023-02-20 14:39:52'),
|
||||||
|
(22, 4, 'p.hoppe@gmx.de', 'sssss', '2023-02-27 11:46:56');
|
||||||
|
|
||||||
|
-- --------------------------------------------------------
|
||||||
|
|
||||||
|
--
|
||||||
|
-- Tabellenstruktur für Tabelle `dogs`
|
||||||
|
--
|
||||||
|
|
||||||
|
CREATE TABLE `dogs` (
|
||||||
|
`id` int NOT NULL,
|
||||||
|
`email` varchar(255) COLLATE utf8mb3_unicode_ci NOT NULL,
|
||||||
|
`qr_id` char(31) COLLATE utf8mb3_unicode_ci NOT NULL,
|
||||||
|
`name` varchar(255) COLLATE utf8mb3_unicode_ci NOT NULL DEFAULT '',
|
||||||
|
`password` varchar(255) COLLATE utf8mb3_unicode_ci NOT NULL,
|
||||||
|
`phone` varchar(255) COLLATE utf8mb3_unicode_ci NOT NULL DEFAULT '',
|
||||||
|
`qr_width_cm` decimal(5,3) NOT NULL DEFAULT '2.400',
|
||||||
|
`qr_height_cm` decimal(5,3) NOT NULL DEFAULT '3.700',
|
||||||
|
`qr_fontsize` smallint NOT NULL DEFAULT '100',
|
||||||
|
`qr_visible_items` tinyint NOT NULL DEFAULT '7',
|
||||||
|
`qr_item_sequence` smallint NOT NULL DEFAULT '123',
|
||||||
|
`qr_code` varchar(255) COLLATE utf8mb3_unicode_ci DEFAULT NULL,
|
||||||
|
`picture` varchar(255) COLLATE utf8mb3_unicode_ci DEFAULT NULL,
|
||||||
|
`pwtoken` varchar(31) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci DEFAULT NULL,
|
||||||
|
`pwt_time` datetime DEFAULT NULL
|
||||||
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci;
|
||||||
|
|
||||||
|
--
|
||||||
|
-- Daten für Tabelle `dogs`
|
||||||
|
--
|
||||||
|
|
||||||
|
INSERT INTO `dogs` (`id`, `email`, `qr_id`, `name`, `password`, `phone`, `qr_width_cm`, `qr_height_cm`, `qr_fontsize`, `qr_visible_items`, `qr_item_sequence`, `qr_code`, `picture`, `pwtoken`, `pwt_time`) VALUES
|
||||||
|
(4, 'a@q.q', 'r0hhpZ', 'dddddaa', '$2y$10$kQWHhEr9m3w5BfqRMN0WauUBI.OaRR86X8lssTlOX5UnMOTdqEKOa', '8888888888', '2.400', '3.700', 110, 7, 123, '/r0hhpZ/TvkmuvJPiot9VFI8vVkm.png', '/r0hhpZ/29tpdCSammHXrCKrBxyQ.png', NULL, NULL),
|
||||||
|
(5, 'conny.rankl@web.de', 'm7MdMK', 'Melly', '$2y$10$2WscecdKZv73sl2E1cdg5OKNGpfDzSRyrQeu8ebZIgIiLexztgbHa', '+49 171 7328974', '2.400', '3.700', 100, 7, 123, '/m7MdMK/A8fd7A4eKBizfwmcKWDZ.png', '/m7MdMK/45kijmZnCxA3SokB1Z8a.jpg', NULL, NULL),
|
||||||
|
(11, 'p.para@gmx.de', 'YQiwEB', 'Conny', '$2y$10$U5DXObAjyf5TxqVUMGT2euw7v7t2uNCWswSRUUQ6l3oq9Vk44tARe', '+49 179 5035966', '2.400', '3.700', 100, 7, 123, '/YQiwEB/Fi3eVHjUW8grFDh2O1ZV.png', '/YQiwEB/8w0iUcSKM0bvSmC8i6cL.png', NULL, NULL),
|
||||||
|
(12, 'eva-maria-cat@web.de', '17dg43', 'Bonny', '$2y$10$AsTXWioe5pyMNqAPN8DoJuovIkkfZkYci2Z5VG3a9uf545jbCqUta', '+49 171 7923900', '2.400', '3.700', 100, 7, 123, '/17dg43/0GH7skrnnzBYUDuIIybR.png', '/17dg43/GmFlF0nh7GU02wNuIFcX.jpg', NULL, NULL),
|
||||||
|
(14, 'x@hope-para.de', 'D4O1aH', 'Josef', '$2y$10$g0FbTtmjX/sK3Uj1owXDrO2vIsYfcVW/bq8EIPfkS9nEd8lZY8fG2', '0123 456789', '2.400', '3.700', 100, 7, 123, '/D4O1aH/Pky1kjndY4rUhU6ZXxvU.png', '/D4O1aH/gW06nnKfS1vlOkxIPxES.png', NULL, NULL),
|
||||||
|
(15, 'p.hoppe@gmx.de', '4ZYMvA', 'Robert', '$2y$10$Obiy2keQLxA04iFZpiL2fOawbCUQS6Cj9NnHy/GnVdpLbny6zyBli', '89898989', '2.400', '3.700', 100, 7, 123, '/4ZYMvA/s0I5nhHNQJA09BRvXXZO.png', '/4ZYMvA/fidQuIifNGGhVJGfFkqG.jpg', NULL, NULL);
|
||||||
|
|
||||||
|
--
|
||||||
|
-- Indizes der exportierten Tabellen
|
||||||
|
--
|
||||||
|
|
||||||
|
--
|
||||||
|
-- Indizes für die Tabelle `contact_emails`
|
||||||
|
--
|
||||||
|
ALTER TABLE `contact_emails`
|
||||||
|
ADD PRIMARY KEY (`id`),
|
||||||
|
ADD KEY `FK_dogs_id` (`dogs_id`);
|
||||||
|
|
||||||
|
--
|
||||||
|
-- Indizes für die Tabelle `dogs`
|
||||||
|
--
|
||||||
|
ALTER TABLE `dogs`
|
||||||
|
ADD PRIMARY KEY (`id`),
|
||||||
|
ADD UNIQUE KEY `index_qr_id` (`qr_id`),
|
||||||
|
ADD UNIQUE KEY `index_email` (`email`),
|
||||||
|
ADD UNIQUE KEY `ui_pwtoken` (`pwtoken`);
|
||||||
|
|
||||||
|
--
|
||||||
|
-- AUTO_INCREMENT für exportierte Tabellen
|
||||||
|
--
|
||||||
|
|
||||||
|
--
|
||||||
|
-- AUTO_INCREMENT für Tabelle `contact_emails`
|
||||||
|
--
|
||||||
|
ALTER TABLE `contact_emails`
|
||||||
|
MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=23;
|
||||||
|
|
||||||
|
--
|
||||||
|
-- AUTO_INCREMENT für Tabelle `dogs`
|
||||||
|
--
|
||||||
|
ALTER TABLE `dogs`
|
||||||
|
MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=16;
|
||||||
|
|
||||||
|
--
|
||||||
|
-- Constraints der exportierten Tabellen
|
||||||
|
--
|
||||||
|
|
||||||
|
--
|
||||||
|
-- Constraints der Tabelle `contact_emails`
|
||||||
|
--
|
||||||
|
ALTER TABLE `contact_emails`
|
||||||
|
ADD CONSTRAINT `FK_dogs_id` FOREIGN KEY (`dogs_id`) REFERENCES `dogs` (`id`) ON DELETE CASCADE ON UPDATE CASCADE;
|
||||||
|
COMMIT;
|
||||||
|
|
||||||
|
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
|
||||||
|
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
|
||||||
|
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
|
||||||
2327
package-lock.json
generated
2327
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
27
package.json
27
package.json
@ -3,21 +3,12 @@
|
|||||||
"version": "0.1.0",
|
"version": "0.1.0",
|
||||||
"private": true,
|
"private": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@craco/craco": "^7.0.0",
|
"@mantine/core": "^5.10.5",
|
||||||
"@dnd-kit/core": "^6.0.7",
|
"@mantine/dropzone": "^5.10.5",
|
||||||
"@emotion/react": "^11.10.5",
|
|
||||||
"@ionic/cli": "^6.20.8",
|
|
||||||
"@ionic/react": "^6.5.4",
|
|
||||||
"@mantine/core": "^5.10.3",
|
|
||||||
"@mantine/dropzone": "^5.10.3",
|
|
||||||
"@mantine/form": "^5.10.3",
|
"@mantine/form": "^5.10.3",
|
||||||
"@mantine/hooks": "^5.10.3",
|
"@mantine/hooks": "^5.10.5",
|
||||||
"@mantine/notifications": "^5.10.3",
|
"@mantine/modals": "^5.10.5",
|
||||||
"@radix-ui/react-icons": "^1.1.1",
|
"@mantine/notifications": "^5.10.5",
|
||||||
"@tabler/icons": "^2.4.0",
|
|
||||||
"@testing-library/jest-dom": "^5.16.5",
|
|
||||||
"@testing-library/react": "^13.4.0",
|
|
||||||
"@testing-library/user-event": "^13.5.0",
|
|
||||||
"@types/jest": "^27.5.2",
|
"@types/jest": "^27.5.2",
|
||||||
"@types/node": "^16.18.9",
|
"@types/node": "^16.18.9",
|
||||||
"@types/react": "^18.0.26",
|
"@types/react": "^18.0.26",
|
||||||
@ -26,20 +17,16 @@
|
|||||||
"bootstrap": "^5.2.3",
|
"bootstrap": "^5.2.3",
|
||||||
"env-cmd": "^10.1.0",
|
"env-cmd": "^10.1.0",
|
||||||
"feather-icons": "^4.29.0",
|
"feather-icons": "^4.29.0",
|
||||||
"ionicons": "^6.1.3",
|
|
||||||
"qr-code-styling": "^1.6.0-rc.1",
|
"qr-code-styling": "^1.6.0-rc.1",
|
||||||
"react": "^18.2.0",
|
"react": "^18.2.0",
|
||||||
"react-beautiful-dnd": "^13.1.1",
|
"react-beautiful-dnd": "^13.1.1",
|
||||||
"react-dom": "^18.2.0",
|
"react-dom": "^18.2.0",
|
||||||
"react-feather": "^2.0.10",
|
"react-feather": "^2.0.10",
|
||||||
"react-hot-toast": "^2.4.0",
|
|
||||||
"react-repeatable": "^2.0.1",
|
|
||||||
"react-router-dom": "^6.4.5",
|
"react-router-dom": "^6.4.5",
|
||||||
"react-scripts": "^5.0.1",
|
"react-scripts": "^5.0.1",
|
||||||
"swr": "^2.0.2",
|
"swr": "^2.0.2",
|
||||||
"typescript": "^4.9.4",
|
"typescript": "^4.9.4",
|
||||||
"use-fit-text": "^2.4.0",
|
"zustand": "^4.3.5"
|
||||||
"web-vitals": "^2.1.4"
|
|
||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"start": "react-scripts start",
|
"start": "react-scripts start",
|
||||||
@ -48,6 +35,8 @@
|
|||||||
"eject": "react-scripts eject",
|
"eject": "react-scripts eject",
|
||||||
"build:local": "env-cmd -f .env.local npm run build",
|
"build:local": "env-cmd -f .env.local npm run build",
|
||||||
"build:hope-fly": "env-cmd -f .env.hope-fly npm run build",
|
"build:hope-fly": "env-cmd -f .env.hope-fly npm run build",
|
||||||
|
"build:flyhope": "env-cmd -f .env.flyhope npm run build",
|
||||||
|
"build:serv_nc": "env-cmd -f .env.serv_nc npm run build",
|
||||||
"postbuild:local": "cp -vrRT ./build/. /opt/lampp/htdocs/dog/",
|
"postbuild:local": "cp -vrRT ./build/. /opt/lampp/htdocs/dog/",
|
||||||
"___postbuild:hope-fly": "cp ./src/.htaccess ./build"
|
"___postbuild:hope-fly": "cp ./src/.htaccess ./build"
|
||||||
},
|
},
|
||||||
|
|||||||
@ -3,10 +3,17 @@ class Database
|
|||||||
{
|
{
|
||||||
|
|
||||||
// CHANGE THE DB INFO ACCORDING TO YOUR DATABASE
|
// CHANGE THE DB INFO ACCORDING TO YOUR DATABASE
|
||||||
//private $db_host = 'localhost';
|
// private $db_host = 'localhost';
|
||||||
private $db_host = '10.35.232.188:3306';
|
// // private $db_host = '10.35.232.188:3306';
|
||||||
private $db_name = 'k200835_dog';
|
// private $db_name = 'k200835_dog';
|
||||||
private $db_username = 'k200835_user_dog';
|
// private $db_username = 'k200835_user_dog';
|
||||||
|
// private $db_password = 'X0pEiBsXN3RLazGhQVvP';
|
||||||
|
|
||||||
|
/// netcup server
|
||||||
|
/// name of the docker container
|
||||||
|
private $db_host = 'mysql';
|
||||||
|
private $db_name = 'dog';
|
||||||
|
private $db_username = 'user_dog';
|
||||||
private $db_password = 'X0pEiBsXN3RLazGhQVvP';
|
private $db_password = 'X0pEiBsXN3RLazGhQVvP';
|
||||||
|
|
||||||
public function dbConnection()
|
public function dbConnection()
|
||||||
|
|||||||
@ -179,5 +179,15 @@ function getDogByQrId($qr_id, $conn, $fields = null)
|
|||||||
}
|
}
|
||||||
return $returnData;
|
return $returnData;
|
||||||
}
|
}
|
||||||
|
function deleteDir($dir)
|
||||||
|
{
|
||||||
|
foreach(glob($dir . '/*') as $file)
|
||||||
|
{
|
||||||
|
if(!is_dir($file))
|
||||||
|
{
|
||||||
|
unlink($file);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return rmdir($dir);
|
||||||
|
}
|
||||||
?>
|
?>
|
||||||
|
|||||||
72
php/php-dog/deleteProfil.php
Normal file
72
php/php-dog/deleteProfil.php
Normal file
@ -0,0 +1,72 @@
|
|||||||
|
<?php
|
||||||
|
// error_reporting(E_ALL);
|
||||||
|
// ini_set("display_errors", 1);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
header("Access-Control-Allow-Origin: *");
|
||||||
|
header("Access-Control-Allow-Headers: access");
|
||||||
|
header("Access-Control-Allow-Methods: POST");
|
||||||
|
header("Content-Type: application/json; charset=UTF-8");
|
||||||
|
header("Access-Control-Allow-Headers: Content-Type, Access-Control-Allow-Headers, Authorization, X-Requested-With");
|
||||||
|
|
||||||
|
session_start();
|
||||||
|
|
||||||
|
require __DIR__.'/classes/Database.php';
|
||||||
|
require __DIR__.'/classes/lib.php';
|
||||||
|
|
||||||
|
$db_connection = new Database();
|
||||||
|
$conn = $db_connection->dbConnection();
|
||||||
|
|
||||||
|
$data = json_decode(file_get_contents("php://input"));
|
||||||
|
|
||||||
|
//IF REQUEST METHOD IS NOT EQUAL TO POST
|
||||||
|
if($_SERVER["REQUEST_METHOD"] != "POST")
|
||||||
|
{
|
||||||
|
$returnData = new CMsg(0,404,'Page Not Found! REQUEST_METHOD');
|
||||||
|
echo $returnData->jsonarray();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
$returnData = new CMsg(0);
|
||||||
|
|
||||||
|
if(
|
||||||
|
!isset($data->qr_id)
|
||||||
|
|| !isset($data->qr_id)
|
||||||
|
)
|
||||||
|
{
|
||||||
|
$fields = ['fields' => ['qr_id']];
|
||||||
|
$returnData = new CMsg(0, 422, 'Please Fill in all Required Fields!', $fields);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
$qr_id = $data->qr_id;
|
||||||
|
$stmt = $conn->prepare("DELETE FROM `dogs` WHERE `qr_id`=?");
|
||||||
|
$stmt->execute([$qr_id]);
|
||||||
|
|
||||||
|
if($stmt->rowCount())
|
||||||
|
{
|
||||||
|
if(deleteDir('../uploads/' . $qr_id))
|
||||||
|
{
|
||||||
|
$returnData = new CMsg(1, 200, 'Profile deleted!');
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$returnData = new CMsg(0, 500, 'Can\'t delete Directory: '.
|
||||||
|
'../uploads/' . $qr_id);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$returnData = new CMsg(0, 500, 'Can\'t delete Profil in Database');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch(PDOException $e)
|
||||||
|
{
|
||||||
|
$returnData = new CMsg(0,500,"deleteProfil ".$e->getMessage());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
echo $returnData->jsonarray();
|
||||||
|
return;
|
||||||
@ -1,4 +1,9 @@
|
|||||||
<?php
|
<?php
|
||||||
|
// error_reporting(E_ALL);
|
||||||
|
// ini_set("display_errors", 1);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
header("Access-Control-Allow-Origin: *");
|
header("Access-Control-Allow-Origin: *");
|
||||||
header("Access-Control-Allow-Headers: access");
|
header("Access-Control-Allow-Headers: access");
|
||||||
header("Access-Control-Allow-Methods: POST");
|
header("Access-Control-Allow-Methods: POST");
|
||||||
|
|||||||
11
src/App.css
11
src/App.css
@ -12,11 +12,6 @@
|
|||||||
justify-content: center;
|
justify-content: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
.margin
|
|
||||||
{
|
|
||||||
margin: 10px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.prevUplImg
|
.prevUplImg
|
||||||
{
|
{
|
||||||
display: flex;
|
display: flex;
|
||||||
@ -32,7 +27,11 @@ img
|
|||||||
background: #ffffff;
|
background: #ffffff;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.mantine-FileInput-input
|
||||||
|
{
|
||||||
|
min-width: 300px;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
|
||||||
@media print
|
@media print
|
||||||
{
|
{
|
||||||
|
|||||||
@ -30,11 +30,15 @@ import
|
|||||||
import { NotificationsProvider } from '@mantine/notifications';
|
import { NotificationsProvider } from '@mantine/notifications';
|
||||||
import { notificationAlert, notificationError, notificationSuccess } from './services/Notifications';
|
import { notificationAlert, notificationError, notificationSuccess } from './services/Notifications';
|
||||||
import DogNavbar from './components/DogNavbar';
|
import DogNavbar from './components/DogNavbar';
|
||||||
|
import PasswordChange from './components/PasswordChange';
|
||||||
|
import { eNotif, useNotificationStore } from "./services/NotificationStore";
|
||||||
|
|
||||||
const App: React.FC = () =>
|
const App: React.FC = () =>
|
||||||
{
|
{
|
||||||
const {data, error, isLoading, mutate} = useSWR("/user", getUser);
|
const {data, error, isLoading, mutate} = useSWR("/user", getUser);
|
||||||
const [opened, setOpened] = useState(false);
|
const [opened, setOpened] = useState(false);
|
||||||
|
const { AddNotification } = useNotificationStore();
|
||||||
|
|
||||||
|
|
||||||
console.log('App getUser');
|
console.log('App getUser');
|
||||||
console.log(data);
|
console.log(data);
|
||||||
@ -46,6 +50,7 @@ const App: React.FC = () =>
|
|||||||
mutate();
|
mutate();
|
||||||
notificationSuccess('Abgemeldet!');
|
notificationSuccess('Abgemeldet!');
|
||||||
console.log('userLogout');
|
console.log('userLogout');
|
||||||
|
AddNotification({type: eNotif.success, msg: 'Logout erfolgreich!'});
|
||||||
|
|
||||||
window.location.href = '/dog/';
|
window.location.href = '/dog/';
|
||||||
}
|
}
|
||||||
@ -85,7 +90,7 @@ const App: React.FC = () =>
|
|||||||
padding={0}
|
padding={0}
|
||||||
fixed
|
fixed
|
||||||
navbarOffsetBreakpoint="sm"
|
navbarOffsetBreakpoint="sm"
|
||||||
navbar={<DogNavbar hidden={!opened} hasUser={user ? true : false} onLogout={userLogout}/>}
|
navbar={<DogNavbar qr_id={user ? user.qr_id : null} hidden={!opened} hasUser={user ? true : false} onLogout={userLogout}/>}
|
||||||
|
|
||||||
header={
|
header={
|
||||||
<Header height={'44px'} p="md" className='w-16 bg-orange-500'>
|
<Header height={'44px'} p="md" className='w-16 bg-orange-500'>
|
||||||
@ -117,6 +122,7 @@ const App: React.FC = () =>
|
|||||||
<Route path="/pwreset/:pwtoken" element={<PasswordReset/>} />
|
<Route path="/pwreset/:pwtoken" element={<PasswordReset/>} />
|
||||||
<Route path="/wantnewpw" element={<WantNewPw/>} />
|
<Route path="/wantnewpw" element={<WantNewPw/>} />
|
||||||
{user && <Route path="/upload" element={<FileUpload/>} />}
|
{user && <Route path="/upload" element={<FileUpload/>} />}
|
||||||
|
{user && <Route path="/chngpw" element={<PasswordChange/>} />}
|
||||||
{user && <Route path="/profil" element={<Profil/>} />}
|
{user && <Route path="/profil" element={<Profil/>} />}
|
||||||
</Routes>
|
</Routes>
|
||||||
</AppShell>
|
</AppShell>
|
||||||
|
|||||||
@ -26,11 +26,6 @@ input[type=email], select, textarea
|
|||||||
padding-right: 4px;
|
padding-right: 4px;
|
||||||
}
|
}
|
||||||
|
|
||||||
div.flexCenter
|
|
||||||
{
|
|
||||||
display: flex;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Style the label to display next to the inputs */
|
/* Style the label to display next to the inputs */
|
||||||
.flexCenter label
|
.flexCenter label
|
||||||
{
|
{
|
||||||
@ -110,8 +105,3 @@ div.flexCenter
|
|||||||
align-items: center;
|
align-items: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
.textArea
|
|
||||||
{
|
|
||||||
height: 100px;
|
|
||||||
}
|
|
||||||
|
|
||||||
@ -1,11 +0,0 @@
|
|||||||
.Dog
|
|
||||||
.Content
|
|
||||||
{
|
|
||||||
font-weight: bold;
|
|
||||||
margin: 5px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.text
|
|
||||||
{
|
|
||||||
margin: 5px;
|
|
||||||
}
|
|
||||||
@ -3,7 +3,6 @@ import { ReactNode } from 'react'
|
|||||||
import { useParams } from "react-router-dom";
|
import { useParams } from "react-router-dom";
|
||||||
import Img from './Img';
|
import Img from './Img';
|
||||||
import DogNameTxt from './DogNameTxt';
|
import DogNameTxt from './DogNameTxt';
|
||||||
import './Dog.css';
|
|
||||||
import {getDog} from '../services/PhpApi'
|
import {getDog} from '../services/PhpApi'
|
||||||
import useSWR from 'swr';
|
import useSWR from 'swr';
|
||||||
|
|
||||||
|
|||||||
@ -79,7 +79,7 @@ export default function DogContactForm(
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<div className="flexCenter">
|
<div className="flex flexCenter">
|
||||||
<div className="containerForm">
|
<div className="containerForm">
|
||||||
<form className="formForm" id='idForm' onSubmit={submitForm}>
|
<form className="formForm" id='idForm' onSubmit={submitForm}>
|
||||||
<div className="rowForm">
|
<div className="rowForm">
|
||||||
|
|||||||
@ -6,14 +6,14 @@ export default function DogNameTxt(
|
|||||||
{name: string, email: string, phone: string, qr_id: string}) {
|
{name: string, email: string, phone: string, qr_id: string}) {
|
||||||
return (
|
return (
|
||||||
<div>
|
<div>
|
||||||
<p className='text'>Hallo ich bin
|
<p className='m-1'>Hallo ich bin
|
||||||
<p className='Content'>{name}!</p>
|
<p className='m-1 font-bold'>{name}!</p>
|
||||||
</p>
|
</p>
|
||||||
<DogContactForm toEmail={email} name={name} qr_id={qr_id} />
|
<DogContactForm toEmail={email} name={name} qr_id={qr_id} />
|
||||||
<p className='text'>
|
<p className='m-1'>
|
||||||
oder ruf
|
oder ruf
|
||||||
<div className='neben'>
|
<div className='neben'>
|
||||||
<div className='Content'>{phone}</div>
|
<div className='m-1 font-bold'>{phone}</div>
|
||||||
an,
|
an,
|
||||||
</div>
|
</div>
|
||||||
damit ich schnell wieder Heim komme.
|
damit ich schnell wieder Heim komme.
|
||||||
|
|||||||
4
src/components/DogNavbar.css
Normal file
4
src/components/DogNavbar.css
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
button.mantine-8nr514
|
||||||
|
{
|
||||||
|
background-color: red;
|
||||||
|
}
|
||||||
@ -1,8 +1,12 @@
|
|||||||
import { Navbar, Text } from '@mantine/core'
|
import { Navbar, Text } from '@mantine/core'
|
||||||
import * as Icons from 'react-feather';
|
import * as Icons from 'react-feather';
|
||||||
import React from 'react'
|
import React, { useState } from 'react'
|
||||||
import { Link } from 'react-router-dom'
|
import { Link } from 'react-router-dom'
|
||||||
|
import { ModalsProvider, openConfirmModal } from '@mantine/modals';
|
||||||
|
import './DogNavbar.css';
|
||||||
|
import { deleteProfil } from '../services/PhpApi';
|
||||||
|
import { notificationError, notificationSuccess } from '../services/Notifications';
|
||||||
|
import { ResponseT } from '../context/UserContext';
|
||||||
|
|
||||||
const NaveBarIcon = ({ icon, href, text = 'tooltip 💡'}: {icon: JSX.Element, href: string, text: string}) =>
|
const NaveBarIcon = ({ icon, href, text = 'tooltip 💡'}: {icon: JSX.Element, href: string, text: string}) =>
|
||||||
(
|
(
|
||||||
@ -19,10 +23,43 @@ const NaveBarIcon = ({ icon, href, text = 'tooltip 💡'}: {icon: JSX.Element, h
|
|||||||
|
|
||||||
const Divider = () => <hr className="sidebar-hr" />;
|
const Divider = () => <hr className="sidebar-hr" />;
|
||||||
|
|
||||||
|
const openDeleteModal = (qr_id: string | null) =>
|
||||||
|
openConfirmModal({
|
||||||
|
title: 'Account löschen!',
|
||||||
|
centered: true,
|
||||||
|
children: (
|
||||||
|
<Text size="sm">
|
||||||
|
Wirklich Dein Profil löschen? Alle Daten gehen verloren und können nicht
|
||||||
|
wiederhergestellt werden!
|
||||||
|
</Text>
|
||||||
|
),
|
||||||
|
labels: { confirm: 'Account löschen', cancel: "Behalten, nicht löschen" },
|
||||||
|
onCancel: () => console.log('Cancel'),
|
||||||
|
onConfirm: () =>
|
||||||
|
{
|
||||||
|
console.log('Confirmed');
|
||||||
|
if(qr_id)
|
||||||
|
{
|
||||||
|
const data = deleteProfil({qr_id: qr_id}) as ResponseT;
|
||||||
|
if(data.success)
|
||||||
|
{
|
||||||
|
notificationSuccess('Profil gelöscht!');
|
||||||
|
}
|
||||||
|
else if(!data.success && data.message)
|
||||||
|
{
|
||||||
|
notificationError(data.message);
|
||||||
|
}
|
||||||
|
window.location.href = '/dog/';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
function DogNavbar({hasUser, hidden, onLogout}:{hasUser: boolean, hidden: boolean, onLogout: () => void})
|
function DogNavbar({hasUser, qr_id, hidden, onLogout}:
|
||||||
|
{hasUser: boolean, qr_id: string | null, hidden: boolean, onLogout: () => void})
|
||||||
{
|
{
|
||||||
return (
|
return (
|
||||||
|
<>
|
||||||
|
<ModalsProvider labels={{ confirm: 'Submit', cancel: 'Cancel' }}>
|
||||||
<Navbar className="fixed top-11 left-0 w-16 h-[90%] flex flex-col
|
<Navbar className="fixed top-11 left-0 w-16 h-[90%] flex flex-col
|
||||||
bg-orange-500"
|
bg-orange-500"
|
||||||
|
|
||||||
@ -47,6 +84,11 @@ function DogNavbar({hasUser, hidden, onLogout}:{hasUser: boolean, hidden: boolea
|
|||||||
<NaveBarIcon icon={<Icons.Grid size={32}/>} href={'/qr'} text={'QrCode drucken'} />
|
<NaveBarIcon icon={<Icons.Grid size={32}/>} href={'/qr'} text={'QrCode drucken'} />
|
||||||
}
|
}
|
||||||
</Navbar.Section>
|
</Navbar.Section>
|
||||||
|
<Navbar.Section>
|
||||||
|
{hasUser &&
|
||||||
|
<NaveBarIcon icon={<Icons.Repeat size={32}/>} href={'/chngpw'} text={'Passwort ändern'} />
|
||||||
|
}
|
||||||
|
</Navbar.Section>
|
||||||
<Navbar.Section className='InputForm' >
|
<Navbar.Section className='InputForm' >
|
||||||
{hasUser &&
|
{hasUser &&
|
||||||
<div onClick={(e)=>{onLogout()}}>
|
<div onClick={(e)=>{onLogout()}}>
|
||||||
@ -57,14 +99,16 @@ function DogNavbar({hasUser, hidden, onLogout}:{hasUser: boolean, hidden: boolea
|
|||||||
<Divider/>
|
<Divider/>
|
||||||
<Navbar.Section className='InputForm' >
|
<Navbar.Section className='InputForm' >
|
||||||
{hasUser &&
|
{hasUser &&
|
||||||
<div onClick={(e)=>{onLogout()}}>
|
<div onClick={() => openDeleteModal(qr_id)}>
|
||||||
<NaveBarIcon icon={<Icons.UserMinus size={32}/>} href={''} text={'Account löschen'}/>
|
<NaveBarIcon icon={<Icons.UserMinus size={32}/>} href={''} text={'Account löschen'}/>
|
||||||
</div>
|
</div>
|
||||||
}
|
}
|
||||||
</Navbar.Section>
|
</Navbar.Section>
|
||||||
<Divider/>
|
<Divider/>
|
||||||
<Navbar.Section><Text className='text-xs' component={Link} variant='link' to='/impressum'>Impressum</Text></Navbar.Section>
|
<Navbar.Section><Text className='text-xs' component={Link} variant='link' to='/impressum'>Impressum</Text></Navbar.Section>
|
||||||
</Navbar> )
|
</Navbar>
|
||||||
|
</ModalsProvider>
|
||||||
|
</> )
|
||||||
}
|
}
|
||||||
|
|
||||||
export default DogNavbar
|
export default DogNavbar
|
||||||
|
|||||||
@ -1,10 +0,0 @@
|
|||||||
import { Link } from 'react-router-dom';
|
|
||||||
import './Footer.css';
|
|
||||||
|
|
||||||
function Footer2() {
|
|
||||||
return (
|
|
||||||
<div className="noprint"><Link to={'./Impressum'}>Impressum</Link></div>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
export default Footer2;
|
|
||||||
@ -1,6 +0,0 @@
|
|||||||
.logout
|
|
||||||
{
|
|
||||||
display: flex;
|
|
||||||
flex-direction: row;
|
|
||||||
justify-content: flex-end;
|
|
||||||
}
|
|
||||||
@ -1,25 +0,0 @@
|
|||||||
import './Header.css';
|
|
||||||
import '../App.css';
|
|
||||||
import './InputForm.css';
|
|
||||||
import {logOut} from '../services/PhpApi'
|
|
||||||
import { notificationSuccess } from '../services/Notifications';
|
|
||||||
|
|
||||||
|
|
||||||
function Header2()
|
|
||||||
{
|
|
||||||
const logOutForm = () =>
|
|
||||||
{
|
|
||||||
logOut();
|
|
||||||
notificationSuccess("logged out!");
|
|
||||||
|
|
||||||
window.location.href = '/dog/';
|
|
||||||
}
|
|
||||||
|
|
||||||
return (
|
|
||||||
<div className='logout InputForm'>
|
|
||||||
<button onClick={logOutForm}>Logout</button>
|
|
||||||
</div>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
export default Header2;
|
|
||||||
@ -1,14 +0,0 @@
|
|||||||
// import React, { useContext } from 'react'
|
|
||||||
// import { UserCtx, UserCtxT } from '../context/UserContext';
|
|
||||||
|
|
||||||
export default function Home() {
|
|
||||||
// const {user} = useContext<UserCtxT | null>(UserCtx) as UserCtxT;
|
|
||||||
// return (
|
|
||||||
// <div>
|
|
||||||
// <h1>Home</h1>
|
|
||||||
// <div>Logged in als:</div>
|
|
||||||
// <div>{user?.email}</div>
|
|
||||||
|
|
||||||
// </div>
|
|
||||||
// )
|
|
||||||
}
|
|
||||||
@ -3,8 +3,8 @@ import React from 'react';
|
|||||||
const ImpressTxt = () =>
|
const ImpressTxt = () =>
|
||||||
{
|
{
|
||||||
return (
|
return (
|
||||||
<>
|
<div className='flex flex-row justify-center' >
|
||||||
<div className='mehrspaltig'>
|
<div className='text-xs w-7/12'>
|
||||||
<p><span className="underline">Angaben gem. § 5 TMG:</span></p>
|
<p><span className="underline">Angaben gem. § 5 TMG:</span></p>
|
||||||
<p> </p>
|
<p> </p>
|
||||||
<p>Dipl.-Ing. Peter Hoppe</p>
|
<p>Dipl.-Ing. Peter Hoppe</p>
|
||||||
@ -13,7 +13,7 @@ const ImpressTxt = () =>
|
|||||||
<p> </p>
|
<p> </p>
|
||||||
<p><span className="underline">Kontaktaufnahme:</span></p>
|
<p><span className="underline">Kontaktaufnahme:</span></p>
|
||||||
<p> </p>
|
<p> </p>
|
||||||
<p>E-Mail:</p>
|
<p>E-Mail: dog@hope-fly.de</p>
|
||||||
<p> </p>
|
<p> </p>
|
||||||
<p><strong>Haftungsausschluss - Disclaimer:</strong></p>
|
<p><strong>Haftungsausschluss - Disclaimer:</strong></p>
|
||||||
<p> </p>
|
<p> </p>
|
||||||
@ -41,7 +41,7 @@ const ImpressTxt = () =>
|
|||||||
die Webseiten Dritter, die außerhalb unseres Verantwortungsbereichs liegen, würde eine Haftungsverpflichtung
|
die Webseiten Dritter, die außerhalb unseres Verantwortungsbereichs liegen, würde eine Haftungsverpflichtung
|
||||||
ausschließlich in dem Fall nur bestehen, wenn wir von den Inhalten Kenntnis erlangen und es uns technisch möglich
|
ausschließlich in dem Fall nur bestehen, wenn wir von den Inhalten Kenntnis erlangen und es uns technisch möglich
|
||||||
und zumutbar wäre, die Nutzung im Falle rechtswidriger Inhalte zu verhindern.</p>
|
und zumutbar wäre, die Nutzung im Falle rechtswidriger Inhalte zu verhindern.</p>
|
||||||
<p>Diese Haftungsausschlusserklärung gilt auch innerhalb des eigenen Internetauftrittes „<em>Name Ihrer Domain</em>“
|
<p>Diese Haftungsausschlusserklärung gilt auch innerhalb des eigenen Internetauftrittes „<em>hope-fly.de</em>“
|
||||||
gesetzten Links und Verweise von Fragestellern, Blogeinträgern, Gästen des Diskussionsforums. Für illegale,
|
gesetzten Links und Verweise von Fragestellern, Blogeinträgern, Gästen des Diskussionsforums. Für illegale,
|
||||||
fehlerhafte oder unvollständige Inhalte und insbesondere für Schäden, die aus der Nutzung oder Nichtnutzung
|
fehlerhafte oder unvollständige Inhalte und insbesondere für Schäden, die aus der Nutzung oder Nichtnutzung
|
||||||
solcherart dargestellten Informationen entstehen, haftet allein der Diensteanbieter der Seite, auf welche verwiesen
|
solcherart dargestellten Informationen entstehen, haftet allein der Diensteanbieter der Seite, auf welche verwiesen
|
||||||
@ -64,7 +64,7 @@ const ImpressTxt = () =>
|
|||||||
<p>Dieses <a href="http://www.jurarat.de/muster-impressum">Impressum</a> wurde freundlicherweise von www.jurarat.de zur
|
<p>Dieses <a href="http://www.jurarat.de/muster-impressum">Impressum</a> wurde freundlicherweise von www.jurarat.de zur
|
||||||
Verfügung gestellt.</p>
|
Verfügung gestellt.</p>
|
||||||
</div>
|
</div>
|
||||||
</>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
export default ImpressTxt;
|
export default ImpressTxt;
|
||||||
|
|||||||
@ -1,12 +0,0 @@
|
|||||||
.underline
|
|
||||||
{
|
|
||||||
text-decoration: underline;
|
|
||||||
}
|
|
||||||
|
|
||||||
.mehrspaltig
|
|
||||||
{
|
|
||||||
column-count: 2;
|
|
||||||
column-gap: 10em;
|
|
||||||
column-rule-style: double;
|
|
||||||
height: 400vh;
|
|
||||||
}
|
|
||||||
@ -1,6 +1,5 @@
|
|||||||
import React from 'react';
|
import React from 'react';
|
||||||
import ImpressTxt from './ImpressTxt';
|
import ImpressTxt from './ImpressTxt';
|
||||||
import './Impressum.css'
|
|
||||||
|
|
||||||
const Impressum = () =>
|
const Impressum = () =>
|
||||||
{
|
{
|
||||||
|
|||||||
@ -5,6 +5,7 @@ import {getUser, loginUser} from '../services/PhpApi'
|
|||||||
import useSWR from 'swr';
|
import useSWR from 'swr';
|
||||||
import { PasswordInput, Stack, TextInput } from '@mantine/core';
|
import { PasswordInput, Stack, TextInput } from '@mantine/core';
|
||||||
import { notificationAlert, notificationError, notificationSuccess } from '../services/Notifications';
|
import { notificationAlert, notificationError, notificationSuccess } from '../services/Notifications';
|
||||||
|
//import { eNotif, useNotificationStore } from "../services/NotificationStore";
|
||||||
|
|
||||||
|
|
||||||
const Login = () =>
|
const Login = () =>
|
||||||
@ -15,6 +16,7 @@ const Login = () =>
|
|||||||
});
|
});
|
||||||
// only for redirect
|
// only for redirect
|
||||||
const {data, error, isLoading, mutate} = useSWR("/login", getUser);
|
const {data, error, isLoading, mutate} = useSWR("/login", getUser);
|
||||||
|
// const { AddNotification, DeleteNotification, queue } = useNotificationStore();
|
||||||
//const navigate = useNavigate();
|
//const navigate = useNavigate();
|
||||||
console.log('Login getUser');
|
console.log('Login getUser');
|
||||||
console.log(data);
|
console.log(data);
|
||||||
@ -32,12 +34,34 @@ const Login = () =>
|
|||||||
|
|
||||||
if(data.success)
|
if(data.success)
|
||||||
{
|
{
|
||||||
|
// AddNotification({type: eNotif.success, msg: 'Login erfolgreich!'});
|
||||||
window.location.href = '/dog/';
|
window.location.href = '/dog/';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// if(queue.length > 0)
|
||||||
|
// {
|
||||||
|
// console.log('queue');
|
||||||
|
// console.log(queue);
|
||||||
|
// const not = queue[queue.length-1];
|
||||||
|
|
||||||
|
// switch (not.type) {
|
||||||
|
// case eNotif.success:
|
||||||
|
// notificationSuccess(not.msg);
|
||||||
|
// break;
|
||||||
|
// case eNotif.error:
|
||||||
|
// notificationError(not.msg);
|
||||||
|
// break;
|
||||||
|
// case eNotif.alert:
|
||||||
|
// default:
|
||||||
|
// notificationAlert(not.msg);
|
||||||
|
// }
|
||||||
|
// DeleteNotification();
|
||||||
|
// }
|
||||||
|
|
||||||
|
|
||||||
const onChangeInput = (e: React.FormEvent<HTMLInputElement>) =>
|
const onChangeInput = (e: React.FormEvent<HTMLInputElement>) =>
|
||||||
{
|
{
|
||||||
if(e.currentTarget.type === 'email' || e.currentTarget.type === 'password')
|
//if(e.currentTarget.type === 'email' || e.currentTarget.type === 'password' || e.currentTarget.type === 'text')
|
||||||
{
|
{
|
||||||
setFormData({
|
setFormData({
|
||||||
...formData,
|
...formData,
|
||||||
@ -61,6 +85,7 @@ const Login = () =>
|
|||||||
{
|
{
|
||||||
notificationSuccess(logResp.message);
|
notificationSuccess(logResp.message);
|
||||||
mutate(); // update swr
|
mutate(); // update swr
|
||||||
|
window.location.href = '/dog/';
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
105
src/components/PasswordChange.tsx
Normal file
105
src/components/PasswordChange.tsx
Normal file
@ -0,0 +1,105 @@
|
|||||||
|
import React, { useState } from 'react';
|
||||||
|
import { Link } from 'react-router-dom';
|
||||||
|
import { passwordReset, getUser } from '../services/PhpApi';
|
||||||
|
import useSWR from 'swr';
|
||||||
|
import './InputForm.css';
|
||||||
|
import { notificationError, notificationSuccess } from '../services/Notifications';
|
||||||
|
import { PasswordInput } from '@mantine/core';
|
||||||
|
|
||||||
|
export default function PasswordChange()
|
||||||
|
{
|
||||||
|
const [formData, setFormData] = useState({
|
||||||
|
password1:'',
|
||||||
|
password2:''
|
||||||
|
});
|
||||||
|
|
||||||
|
const { data, error, isLoading } = useSWR('pwchange', getUser);
|
||||||
|
if (error) return (<div>failed to load</div>);
|
||||||
|
if (isLoading) return (<div>loading...</div>);
|
||||||
|
|
||||||
|
const onChangeInput = (e: React.FormEvent<HTMLInputElement> ) => {
|
||||||
|
setFormData({
|
||||||
|
...formData,
|
||||||
|
[e.currentTarget.name]:e.currentTarget.value
|
||||||
|
})
|
||||||
|
|
||||||
|
//console.log(e.currentTarget.value);
|
||||||
|
}
|
||||||
|
|
||||||
|
if(!data.success)
|
||||||
|
{
|
||||||
|
notificationError('Kein Benutzer?!');
|
||||||
|
}
|
||||||
|
|
||||||
|
const submitForm = async (e: React.FormEvent<HTMLFormElement>) =>
|
||||||
|
{
|
||||||
|
e.preventDefault();
|
||||||
|
|
||||||
|
if(!Object.values(formData).every(val => val.trim() !== ''))
|
||||||
|
{
|
||||||
|
notificationError('Bitte alle Felder ausfüllen!');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if(formData.password1 !== formData.password2)
|
||||||
|
{
|
||||||
|
notificationError('Bitte 2mal das gleiche Passwort eingeben!');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
const sendData = new FormData();
|
||||||
|
const values = Object.values(formData);
|
||||||
|
const keys = Object.keys(formData);
|
||||||
|
|
||||||
|
for (const key of keys)
|
||||||
|
{
|
||||||
|
const index = keys.indexOf(key);
|
||||||
|
sendData.append(key, values[index]);
|
||||||
|
}
|
||||||
|
|
||||||
|
sendData.append('id', data.data.id);
|
||||||
|
|
||||||
|
const dataRes = await passwordReset(sendData);
|
||||||
|
if(dataRes.success)
|
||||||
|
{
|
||||||
|
notificationSuccess('Erfolgreich Passwort geändert!');
|
||||||
|
e.currentTarget?.reset();
|
||||||
|
}
|
||||||
|
else if(!dataRes.success && dataRes.message)
|
||||||
|
{
|
||||||
|
notificationError(dataRes.message);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return (
|
||||||
|
<div className='InputForm'>
|
||||||
|
<h2>Passwort ändern!</h2>
|
||||||
|
<div className='frameCenter'>
|
||||||
|
<div className='frame'>
|
||||||
|
<form onSubmit={submitForm}>
|
||||||
|
<PasswordInput className='IF_pw'
|
||||||
|
sx = {{ maxWidth: '80vw', minWidth: '30vw', width: '300px' }}
|
||||||
|
label = 'Passwort:'
|
||||||
|
name="password1"
|
||||||
|
onChange={onChangeInput}
|
||||||
|
placeholder="Passwort"
|
||||||
|
id="password1"
|
||||||
|
value={formData.password1}
|
||||||
|
required/>
|
||||||
|
<PasswordInput className='IF_pw'
|
||||||
|
sx = {{ maxWidth: '80vw', minWidth: '30vw', width: '300px' }}
|
||||||
|
label = 'Passwort wiederholen:'
|
||||||
|
name="password2"
|
||||||
|
onChange={onChangeInput}
|
||||||
|
placeholder="Passwort bestätigen"
|
||||||
|
id="password2"
|
||||||
|
value={formData.password2}
|
||||||
|
required/>
|
||||||
|
<button type="submit" >Passwort setzen!</button>
|
||||||
|
<div className="bottom-link"><Link to="/login">Login</Link></div>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
)
|
||||||
|
}
|
||||||
@ -4,6 +4,7 @@ import { passwordReset, getPwToken } from '../services/PhpApi';
|
|||||||
import useSWR from 'swr';
|
import useSWR from 'swr';
|
||||||
import './InputForm.css';
|
import './InputForm.css';
|
||||||
import { notificationError, notificationSuccess } from '../services/Notifications';
|
import { notificationError, notificationSuccess } from '../services/Notifications';
|
||||||
|
import { PasswordInput } from '@mantine/core';
|
||||||
|
|
||||||
export default function PasswordReset()
|
export default function PasswordReset()
|
||||||
{
|
{
|
||||||
@ -25,13 +26,15 @@ export default function PasswordReset()
|
|||||||
...formData,
|
...formData,
|
||||||
[e.currentTarget.name]:e.currentTarget.value
|
[e.currentTarget.name]:e.currentTarget.value
|
||||||
})
|
})
|
||||||
|
|
||||||
|
//console.log(e.currentTarget.value);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!data.success)
|
if(!data.success)
|
||||||
{
|
{
|
||||||
return(
|
return(
|
||||||
<div >
|
<div >
|
||||||
<h2>Email nicht mehr gültig!</h2>
|
<h2>Link nicht mehr gültig!</h2>
|
||||||
</div>
|
</div>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
@ -82,15 +85,25 @@ export default function PasswordReset()
|
|||||||
<div className='frameCenter'>
|
<div className='frameCenter'>
|
||||||
<div className='frame'>
|
<div className='frame'>
|
||||||
<form onSubmit={submitForm}>
|
<form onSubmit={submitForm}>
|
||||||
<div className='neben'>
|
<PasswordInput className='IF_pw'
|
||||||
<label htmlFor="password1">Passwort: </label>
|
sx = {{ maxWidth: '80vw', minWidth: '30vw', width: '300px' }}
|
||||||
<input type="password" name="password1" onChange={onChangeInput} placeholder="Neues Passwort" id="password1" value={formData.password1} required />
|
label = 'Passwort:'
|
||||||
</div>
|
name="password1"
|
||||||
<div className='neben'>
|
onChange={onChangeInput}
|
||||||
<label htmlFor="password2">Passwort wiederholen: </label>
|
placeholder="Passwort"
|
||||||
<input type="password" name="password2" onChange={onChangeInput} placeholder="Neues Passwort wiederholen!" id="password2" value={formData.password2} required />
|
id="password1"
|
||||||
</div>
|
value={formData.password1}
|
||||||
<button type="submit" >Passwort </button>
|
required/>
|
||||||
|
<PasswordInput className='IF_pw'
|
||||||
|
sx = {{ maxWidth: '80vw', minWidth: '30vw', width: '300px' }}
|
||||||
|
label = 'Passwort wiederholen:'
|
||||||
|
name="password2"
|
||||||
|
onChange={onChangeInput}
|
||||||
|
placeholder="Passwort bestätigen"
|
||||||
|
id="password2"
|
||||||
|
value={formData.password2}
|
||||||
|
required/>
|
||||||
|
<button type="submit" >Passwort setzen!</button>
|
||||||
<div className="bottom-link"><Link to="/login">Login</Link></div>
|
<div className="bottom-link"><Link to="/login">Login</Link></div>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -1,4 +0,0 @@
|
|||||||
button.QRakt
|
|
||||||
{
|
|
||||||
max-width: 80%;
|
|
||||||
}
|
|
||||||
@ -6,9 +6,9 @@ import {getProfilData, updateDog} from '../services/PhpApi';
|
|||||||
import CreateQr from '../services/CreateQr';
|
import CreateQr from '../services/CreateQr';
|
||||||
import Img from './Img';
|
import Img from './Img';
|
||||||
import './InputForm.css';
|
import './InputForm.css';
|
||||||
import './Profil.css';
|
|
||||||
import { TextInput } from '@mantine/core';
|
import { TextInput } from '@mantine/core';
|
||||||
import { notificationError, notificationSuccess } from '../services/Notifications';
|
import { notificationAlert, notificationError, notificationSuccess } from '../services/Notifications';
|
||||||
|
//import { eNotif, useNotificationStore } from "../services/NotificationStore";
|
||||||
|
|
||||||
type TFormData =
|
type TFormData =
|
||||||
{
|
{
|
||||||
@ -35,6 +35,7 @@ function Profil()
|
|||||||
// data ist dogdata, logindata holt sich getProfilData.php aus $_SESSION
|
// data ist dogdata, logindata holt sich getProfilData.php aus $_SESSION
|
||||||
|
|
||||||
const WWW_ROOT: string = process.env.REACT_APP_WWW_ROOT!;
|
const WWW_ROOT: string = process.env.REACT_APP_WWW_ROOT!;
|
||||||
|
// const { DeleteNotification, queue } = useNotificationStore();
|
||||||
|
|
||||||
|
|
||||||
if (error) return (<div>failed to load</div>);
|
if (error) return (<div>failed to load</div>);
|
||||||
@ -52,6 +53,26 @@ function Profil()
|
|||||||
console.log('Profil user');
|
console.log('Profil user');
|
||||||
console.log(user);
|
console.log(user);
|
||||||
|
|
||||||
|
// if(queue.length > 0)
|
||||||
|
// {
|
||||||
|
// console.log('queue');
|
||||||
|
// console.log(queue);
|
||||||
|
// const not = queue[queue.length-1];
|
||||||
|
|
||||||
|
// switch (not.type) {
|
||||||
|
// case eNotif.success:
|
||||||
|
// notificationSuccess(not.msg);
|
||||||
|
// break;
|
||||||
|
// case eNotif.error:
|
||||||
|
// notificationError(not.msg);
|
||||||
|
// break;
|
||||||
|
// case eNotif.alert:
|
||||||
|
// default:
|
||||||
|
// notificationAlert(not.msg);
|
||||||
|
// }
|
||||||
|
// DeleteNotification();
|
||||||
|
// }
|
||||||
|
|
||||||
if(data.data.qr_code === null && document.getElementById("canvas") != null)
|
if(data.data.qr_code === null && document.getElementById("canvas") != null)
|
||||||
{
|
{
|
||||||
// qrcode generieren und in der Datenbank speichern
|
// qrcode generieren und in der Datenbank speichern
|
||||||
@ -176,11 +197,11 @@ function Profil()
|
|||||||
<div className='frameCenter'>
|
<div className='frameCenter'>
|
||||||
<div className='frame'>
|
<div className='frame'>
|
||||||
<div className='neben'>
|
<div className='neben'>
|
||||||
<div className='margin'>
|
<div className='m-2'>
|
||||||
{data.data && <Img pth={data.data.picture} className=''/>}
|
{data.data && <Img pth={data.data.picture} className=''/>}
|
||||||
<Link to={'/upload'}>Bild ändern</Link>
|
<Link to={'/upload'}>Bild ändern</Link>
|
||||||
</div>
|
</div>
|
||||||
<div className='margin'>
|
<div className='m-2'>
|
||||||
<Link to={'/' + data.data.qr_id}>{WWW_ROOT + data.data.qr_id}</Link>
|
<Link to={'/' + data.data.qr_id}>{WWW_ROOT + data.data.qr_id}</Link>
|
||||||
{data.data && <Img pth={data.data.qr_code} className=''/>}
|
{data.data && <Img pth={data.data.qr_code} className=''/>}
|
||||||
<button onClick={qr_refresh}>QR aktualisieren</button>
|
<button onClick={qr_refresh}>QR aktualisieren</button>
|
||||||
|
|||||||
@ -48,27 +48,6 @@ img
|
|||||||
background: #fff;
|
background: #fff;
|
||||||
}
|
}
|
||||||
|
|
||||||
.qrCode____
|
|
||||||
{
|
|
||||||
align-items: center;
|
|
||||||
display: flex;
|
|
||||||
flex-direction: column;
|
|
||||||
height: 3.7cm;
|
|
||||||
justify-content: space-evenly;
|
|
||||||
background: #fff;
|
|
||||||
width: 2.4cm;
|
|
||||||
}
|
|
||||||
|
|
||||||
.beschreibung
|
|
||||||
{
|
|
||||||
font-size: x-small;
|
|
||||||
}
|
|
||||||
|
|
||||||
.vert
|
|
||||||
{
|
|
||||||
flex-direction: row-reverse;
|
|
||||||
}
|
|
||||||
|
|
||||||
.spinBtn
|
.spinBtn
|
||||||
{
|
{
|
||||||
display: flex;
|
display: flex;
|
||||||
@ -83,24 +62,6 @@ img
|
|||||||
border-width: 1px;
|
border-width: 1px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.order1
|
|
||||||
{
|
|
||||||
order: 1;
|
|
||||||
}
|
|
||||||
.order2
|
|
||||||
{
|
|
||||||
order: 2;
|
|
||||||
}
|
|
||||||
.order3
|
|
||||||
{
|
|
||||||
order: 3;
|
|
||||||
}
|
|
||||||
|
|
||||||
.list-container
|
|
||||||
{
|
|
||||||
margin-top: 10px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.list-item
|
.list-item
|
||||||
{
|
{
|
||||||
display:flex;
|
display:flex;
|
||||||
@ -110,16 +71,6 @@ img
|
|||||||
cursor:move;
|
cursor:move;
|
||||||
}
|
}
|
||||||
|
|
||||||
.printButton, .saveButton
|
|
||||||
{
|
|
||||||
margin-bottom: 20px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.qr-input
|
|
||||||
{
|
|
||||||
width: 55px;
|
|
||||||
}
|
|
||||||
|
|
||||||
@media print
|
@media print
|
||||||
{
|
{
|
||||||
.qrSettings
|
.qrSettings
|
||||||
|
|||||||
@ -116,10 +116,10 @@ export default function Qr()
|
|||||||
<div className='qrCode__'>SCAN ME</div>
|
<div className='qrCode__'>SCAN ME</div>
|
||||||
<Img pth={dog.qr_code} className='qrCodeImg'/>
|
<Img pth={dog.qr_code} className='qrCodeImg'/>
|
||||||
</div>
|
</div>
|
||||||
<div className='qrCode vert frame' style={{ height : dog.qr_height_cm + 'cm', width : dog.qr_width_cm + 'cm', fontSize: dog.qr_fontsize + '%' }}>
|
<div className='qrCode flex-row-reverse frame' style={{ height : dog.qr_height_cm + 'cm', width : dog.qr_width_cm + 'cm', fontSize: dog.qr_fontsize + '%' }}>
|
||||||
{((dog.qr_visible_items & 0b100) > 0) && <div className={`vertFont order${getItemOrderNumber(100)}`}>{dog.name}</div>}
|
{((dog.qr_visible_items & 0b100) > 0) && <div className={`vertFont order-${getItemOrderNumber(100)}`}>{dog.name}</div>}
|
||||||
{((dog.qr_visible_items & 0b010) > 0) && <div className={`vertFont order${getItemOrderNumber(10)}`}>{dog.phone}</div>}
|
{((dog.qr_visible_items & 0b010) > 0) && <div className={`vertFont order-${getItemOrderNumber(10)}`}>{dog.phone}</div>}
|
||||||
{((dog.qr_visible_items & 0b001) > 0) && <div className={`vertFont order${getItemOrderNumber(1)}`}>{dog.email}</div>}
|
{((dog.qr_visible_items & 0b001) > 0) && <div className={`vertFont order-${getItemOrderNumber(1)}`}>{dog.email}</div>}
|
||||||
</div>
|
</div>
|
||||||
</div>);
|
</div>);
|
||||||
}
|
}
|
||||||
@ -329,8 +329,8 @@ export default function Qr()
|
|||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<div>Reihenfolge</div>
|
<div>Reihenfolge</div>
|
||||||
<div className='beschreibung'>Ändern durch Drag'n Drop</div>
|
<div className='text-xs'>Ändern durch Drag'n Drop</div>
|
||||||
<div className="list-container">
|
<div className="mt-2">
|
||||||
<DndList
|
<DndList
|
||||||
dragEndHandler={callBackDragEnd}
|
dragEndHandler={callBackDragEnd}
|
||||||
dataprops={dndList.current}
|
dataprops={dndList.current}
|
||||||
@ -340,8 +340,8 @@ export default function Qr()
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div className='column InputForm'>
|
<div className='column InputForm'>
|
||||||
<button id="saveButton" className='saveButton' onClick={saveHandler} >Werte sichern</button>
|
<button id="saveButton" className='mb-5' onClick={saveHandler} >Werte sichern</button>
|
||||||
<button id="printButton" className='printButton' onClick={printHandler} >QR-Code drucken</button>
|
<button id="printButton" className='mb-5' onClick={printHandler} >QR-Code drucken</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div className='flex flex-row flex-wrap justify-center'>
|
<div className='flex flex-row flex-wrap justify-center'>
|
||||||
|
|||||||
@ -5,7 +5,7 @@
|
|||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
<div class="flexCenter">
|
<div class="flex">
|
||||||
|
|
||||||
<div class="containerForm">
|
<div class="containerForm">
|
||||||
<div style="position: fixed; z-index: 9999; inset: 16px; pointer-events: none;"></div>
|
<div style="position: fixed; z-index: 9999; inset: 16px; pointer-events: none;"></div>
|
||||||
@ -31,7 +31,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="rowForm">
|
<div class="rowForm">
|
||||||
<div class="col-30"><label for="msg">Nachricht</label></div>
|
<div class="col-30"><label for="msg">Nachricht</label></div>
|
||||||
<div class="col-70"><textarea class="textArea" id="msg" name="msg"
|
<div class="col-70"><textarea class="h-16" id="msg" name="msg"
|
||||||
placeholder="Ich habe Ursula gefunden! Bitte rufen Sie mich an, Telefon:(bitte angeben...)"
|
placeholder="Ich habe Ursula gefunden! Bitte rufen Sie mich an, Telefon:(bitte angeben...)"
|
||||||
required=""></textarea></div>
|
required=""></textarea></div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
30
src/services/NotificationStore.ts
Normal file
30
src/services/NotificationStore.ts
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
import { EnumDeclaration, EnumType } from 'typescript'
|
||||||
|
import { create } from 'zustand'
|
||||||
|
|
||||||
|
export enum eNotif
|
||||||
|
{
|
||||||
|
success = 0,
|
||||||
|
error,
|
||||||
|
alert
|
||||||
|
}
|
||||||
|
|
||||||
|
export type TNotification =
|
||||||
|
{
|
||||||
|
type: eNotif;
|
||||||
|
msg: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
interface State
|
||||||
|
{
|
||||||
|
queue: TNotification[],
|
||||||
|
AddNotification(n: TNotification): void,
|
||||||
|
DeleteNotification(): void
|
||||||
|
}
|
||||||
|
|
||||||
|
export const useNotificationStore = create<State>((set) => (
|
||||||
|
{
|
||||||
|
queue: [],
|
||||||
|
AddNotification: (not: TNotification) => set((state) => ({queue: [...state.queue, not]})),
|
||||||
|
DeleteNotification: () => set((state) => ({queue: [...state.queue.splice(-1)]}))
|
||||||
|
}));
|
||||||
|
|
||||||
@ -299,6 +299,21 @@ export const wantNewPw = async ({email}:{email: string}) =>
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export const deleteProfil = async ({qr_id}:{qr_id: string}) =>
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
const {data} = await Axios.post('deleteProfil.php', {qr_id});
|
||||||
|
console.log('Api deleteProfil');
|
||||||
|
console.log(data);
|
||||||
|
return data;
|
||||||
|
}
|
||||||
|
catch(err)
|
||||||
|
{
|
||||||
|
return {success:0, message:'Password Request Server Error!'};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// export const sleep = (ms: number) =>
|
// export const sleep = (ms: number) =>
|
||||||
// {
|
// {
|
||||||
|
|||||||
Reference in New Issue
Block a user