Skip to content

Commit 71aeefe

Browse files
authored
Merge pull request #454 from dbarzin/dev
Dev
2 parents 3e127f2 + f45d93b commit 71aeefe

File tree

6 files changed

+103
-40
lines changed

6 files changed

+103
-40
lines changed

database/migrations/2025_05_27_152856_change_actions.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,9 @@ public function up()
3030
$table->integer('type')->nullable(false)->change();
3131
});
3232
}
33+
Schema::table('actions', function (Blueprint $table) {
34+
$table->integer('progress')->nullable()->after('type');
35+
});
3336
}
3437

3538
public function down()
@@ -46,5 +49,8 @@ public function down()
4649
$table->string('type')->nullable()->change();
4750
});
4851
}
52+
Schema::table('actions', function (Blueprint $table) {
53+
$table->dropColumn('progress');
54+
});
4955
}
5056
};

database/schema/mysql-schema.sql

Lines changed: 78 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
/*M!999999\- enable the sandbox mode */
12
/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
23
/*!40103 SET TIME_ZONE='+00:00' */;
34
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
@@ -6,7 +7,7 @@
67
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
78
DROP TABLE IF EXISTS `action_measure`;
89
/*!40101 SET @saved_cs_client = @@character_set_client */;
9-
/*!40101 SET character_set_client = utf8 */;
10+
/*!40101 SET character_set_client = utf8mb4 */;
1011
CREATE TABLE `action_measure` (
1112
`action_id` int(10) unsigned NOT NULL,
1213
`measure_id` int(10) unsigned NOT NULL,
@@ -18,7 +19,7 @@ CREATE TABLE `action_measure` (
1819
/*!40101 SET character_set_client = @saved_cs_client */;
1920
DROP TABLE IF EXISTS `action_user`;
2021
/*!40101 SET @saved_cs_client = @@character_set_client */;
21-
/*!40101 SET character_set_client = utf8 */;
22+
/*!40101 SET character_set_client = utf8mb4 */;
2223
CREATE TABLE `action_user` (
2324
`action_id` int(10) unsigned NOT NULL,
2425
`user_id` bigint(20) unsigned NOT NULL,
@@ -30,11 +31,11 @@ CREATE TABLE `action_user` (
3031
/*!40101 SET character_set_client = @saved_cs_client */;
3132
DROP TABLE IF EXISTS `actions`;
3233
/*!40101 SET @saved_cs_client = @@character_set_client */;
33-
/*!40101 SET character_set_client = utf8 */;
34+
/*!40101 SET character_set_client = utf8mb4 */;
3435
CREATE TABLE `actions` (
3536
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
3637
`reference` varchar(32) DEFAULT NULL,
37-
`type` varchar(32) DEFAULT NULL,
38+
`type` int(11) NOT NULL,
3839
`criticity` int(11) NOT NULL,
3940
`status` int(11) NOT NULL,
4041
`scope` varchar(32) DEFAULT NULL,
@@ -55,7 +56,7 @@ CREATE TABLE `actions` (
5556
/*!40101 SET character_set_client = @saved_cs_client */;
5657
DROP TABLE IF EXISTS `attributes`;
5758
/*!40101 SET @saved_cs_client = @@character_set_client */;
58-
/*!40101 SET character_set_client = utf8 */;
59+
/*!40101 SET character_set_client = utf8mb4 */;
5960
CREATE TABLE `attributes` (
6061
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
6162
`name` varchar(255) NOT NULL,
@@ -66,9 +67,25 @@ CREATE TABLE `attributes` (
6667
UNIQUE KEY `tags_name_unique` (`name`)
6768
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
6869
/*!40101 SET character_set_client = @saved_cs_client */;
70+
DROP TABLE IF EXISTS `audit_logs`;
71+
/*!40101 SET @saved_cs_client = @@character_set_client */;
72+
/*!40101 SET character_set_client = utf8mb4 */;
73+
CREATE TABLE `audit_logs` (
74+
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
75+
`description` text NOT NULL,
76+
`subject_id` int(10) unsigned DEFAULT NULL,
77+
`subject_type` varchar(255) DEFAULT NULL,
78+
`user_id` int(10) unsigned DEFAULT NULL,
79+
`properties` text DEFAULT NULL,
80+
`host` varchar(45) DEFAULT NULL,
81+
`created_at` timestamp NULL DEFAULT NULL,
82+
`updated_at` timestamp NULL DEFAULT NULL,
83+
PRIMARY KEY (`id`)
84+
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
85+
/*!40101 SET character_set_client = @saved_cs_client */;
6986
DROP TABLE IF EXISTS `control_measure`;
7087
/*!40101 SET @saved_cs_client = @@character_set_client */;
71-
/*!40101 SET character_set_client = utf8 */;
88+
/*!40101 SET character_set_client = utf8mb4 */;
7289
CREATE TABLE `control_measure` (
7390
`control_id` int(10) unsigned NOT NULL,
7491
`measure_id` int(10) unsigned NOT NULL,
@@ -80,7 +97,7 @@ CREATE TABLE `control_measure` (
8097
/*!40101 SET character_set_client = @saved_cs_client */;
8198
DROP TABLE IF EXISTS `control_user`;
8299
/*!40101 SET @saved_cs_client = @@character_set_client */;
83-
/*!40101 SET character_set_client = utf8 */;
100+
/*!40101 SET character_set_client = utf8mb4 */;
84101
CREATE TABLE `control_user` (
85102
`control_id` int(10) unsigned NOT NULL,
86103
`user_id` bigint(20) unsigned NOT NULL,
@@ -90,9 +107,21 @@ CREATE TABLE `control_user` (
90107
CONSTRAINT `user_id_fk_304958543` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE ON UPDATE NO ACTION
91108
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
92109
/*!40101 SET character_set_client = @saved_cs_client */;
110+
DROP TABLE IF EXISTS `control_user_group`;
111+
/*!40101 SET @saved_cs_client = @@character_set_client */;
112+
/*!40101 SET character_set_client = utf8mb4 */;
113+
CREATE TABLE `control_user_group` (
114+
`control_id` int(10) unsigned NOT NULL,
115+
`user_group_id` int(10) unsigned NOT NULL,
116+
KEY `control_user_group_control_id_foreign` (`control_id`),
117+
KEY `control_user_group_user_group_id_foreign` (`user_group_id`),
118+
CONSTRAINT `control_user_group_control_id_foreign` FOREIGN KEY (`control_id`) REFERENCES `controls` (`id`),
119+
CONSTRAINT `control_user_group_user_group_id_foreign` FOREIGN KEY (`user_group_id`) REFERENCES `user_groups` (`id`)
120+
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
121+
/*!40101 SET character_set_client = @saved_cs_client */;
93122
DROP TABLE IF EXISTS `controls`;
94123
/*!40101 SET @saved_cs_client = @@character_set_client */;
95-
/*!40101 SET character_set_client = utf8 */;
124+
/*!40101 SET character_set_client = utf8mb4 */;
96125
CREATE TABLE `controls` (
97126
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
98127
`name` varchar(255) NOT NULL,
@@ -112,7 +141,6 @@ CREATE TABLE `controls` (
112141
`next_id` int(10) unsigned DEFAULT NULL,
113142
`standard` varchar(255) DEFAULT NULL,
114143
`attributes` varchar(1024) DEFAULT NULL,
115-
`site` varchar(255) DEFAULT NULL,
116144
`scope` varchar(32) DEFAULT NULL,
117145
`status` int(11) NOT NULL DEFAULT 0,
118146
PRIMARY KEY (`id`),
@@ -122,7 +150,7 @@ CREATE TABLE `controls` (
122150
/*!40101 SET character_set_client = @saved_cs_client */;
123151
DROP TABLE IF EXISTS `documents`;
124152
/*!40101 SET @saved_cs_client = @@character_set_client */;
125-
/*!40101 SET character_set_client = utf8 */;
153+
/*!40101 SET character_set_client = utf8mb4 */;
126154
CREATE TABLE `documents` (
127155
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
128156
`control_id` int(10) unsigned NOT NULL,
@@ -139,7 +167,7 @@ CREATE TABLE `documents` (
139167
/*!40101 SET character_set_client = @saved_cs_client */;
140168
DROP TABLE IF EXISTS `domains`;
141169
/*!40101 SET @saved_cs_client = @@character_set_client */;
142-
/*!40101 SET character_set_client = utf8 */;
170+
/*!40101 SET character_set_client = utf8mb4 */;
143171
CREATE TABLE `domains` (
144172
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
145173
`framework` varchar(255) DEFAULT NULL,
@@ -152,7 +180,7 @@ CREATE TABLE `domains` (
152180
/*!40101 SET character_set_client = @saved_cs_client */;
153181
DROP TABLE IF EXISTS `measures`;
154182
/*!40101 SET @saved_cs_client = @@character_set_client */;
155-
/*!40101 SET character_set_client = utf8 */;
183+
/*!40101 SET character_set_client = utf8mb4 */;
156184
CREATE TABLE `measures` (
157185
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
158186
`domain_id` int(10) unsigned NOT NULL,
@@ -175,7 +203,7 @@ CREATE TABLE `measures` (
175203
/*!40101 SET character_set_client = @saved_cs_client */;
176204
DROP TABLE IF EXISTS `migrations`;
177205
/*!40101 SET @saved_cs_client = @@character_set_client */;
178-
/*!40101 SET character_set_client = utf8 */;
206+
/*!40101 SET character_set_client = utf8mb4 */;
179207
CREATE TABLE `migrations` (
180208
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
181209
`migration` varchar(255) NOT NULL,
@@ -185,7 +213,7 @@ CREATE TABLE `migrations` (
185213
/*!40101 SET character_set_client = @saved_cs_client */;
186214
DROP TABLE IF EXISTS `oauth_access_tokens`;
187215
/*!40101 SET @saved_cs_client = @@character_set_client */;
188-
/*!40101 SET character_set_client = utf8 */;
216+
/*!40101 SET character_set_client = utf8mb4 */;
189217
CREATE TABLE `oauth_access_tokens` (
190218
`id` varchar(100) NOT NULL,
191219
`user_id` bigint(20) unsigned DEFAULT NULL,
@@ -202,7 +230,7 @@ CREATE TABLE `oauth_access_tokens` (
202230
/*!40101 SET character_set_client = @saved_cs_client */;
203231
DROP TABLE IF EXISTS `oauth_auth_codes`;
204232
/*!40101 SET @saved_cs_client = @@character_set_client */;
205-
/*!40101 SET character_set_client = utf8 */;
233+
/*!40101 SET character_set_client = utf8mb4 */;
206234
CREATE TABLE `oauth_auth_codes` (
207235
`id` varchar(100) NOT NULL,
208236
`user_id` bigint(20) unsigned NOT NULL,
@@ -216,7 +244,7 @@ CREATE TABLE `oauth_auth_codes` (
216244
/*!40101 SET character_set_client = @saved_cs_client */;
217245
DROP TABLE IF EXISTS `oauth_clients`;
218246
/*!40101 SET @saved_cs_client = @@character_set_client */;
219-
/*!40101 SET character_set_client = utf8 */;
247+
/*!40101 SET character_set_client = utf8mb4 */;
220248
CREATE TABLE `oauth_clients` (
221249
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
222250
`user_id` bigint(20) unsigned DEFAULT NULL,
@@ -235,7 +263,7 @@ CREATE TABLE `oauth_clients` (
235263
/*!40101 SET character_set_client = @saved_cs_client */;
236264
DROP TABLE IF EXISTS `oauth_personal_access_clients`;
237265
/*!40101 SET @saved_cs_client = @@character_set_client */;
238-
/*!40101 SET character_set_client = utf8 */;
266+
/*!40101 SET character_set_client = utf8mb4 */;
239267
CREATE TABLE `oauth_personal_access_clients` (
240268
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
241269
`client_id` bigint(20) unsigned NOT NULL,
@@ -246,7 +274,7 @@ CREATE TABLE `oauth_personal_access_clients` (
246274
/*!40101 SET character_set_client = @saved_cs_client */;
247275
DROP TABLE IF EXISTS `oauth_refresh_tokens`;
248276
/*!40101 SET @saved_cs_client = @@character_set_client */;
249-
/*!40101 SET character_set_client = utf8 */;
277+
/*!40101 SET character_set_client = utf8mb4 */;
250278
CREATE TABLE `oauth_refresh_tokens` (
251279
`id` varchar(100) NOT NULL,
252280
`access_token_id` varchar(100) NOT NULL,
@@ -258,7 +286,7 @@ CREATE TABLE `oauth_refresh_tokens` (
258286
/*!40101 SET character_set_client = @saved_cs_client */;
259287
DROP TABLE IF EXISTS `password_resets`;
260288
/*!40101 SET @saved_cs_client = @@character_set_client */;
261-
/*!40101 SET character_set_client = utf8 */;
289+
/*!40101 SET character_set_client = utf8mb4 */;
262290
CREATE TABLE `password_resets` (
263291
`email` varchar(255) NOT NULL,
264292
`token` varchar(255) NOT NULL,
@@ -268,7 +296,7 @@ CREATE TABLE `password_resets` (
268296
/*!40101 SET character_set_client = @saved_cs_client */;
269297
DROP TABLE IF EXISTS `personal_access_tokens`;
270298
/*!40101 SET @saved_cs_client = @@character_set_client */;
271-
/*!40101 SET character_set_client = utf8 */;
299+
/*!40101 SET character_set_client = utf8mb4 */;
272300
CREATE TABLE `personal_access_tokens` (
273301
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
274302
`tokenable_type` varchar(255) NOT NULL,
@@ -285,9 +313,33 @@ CREATE TABLE `personal_access_tokens` (
285313
KEY `personal_access_tokens_tokenable_type_tokenable_id_index` (`tokenable_type`,`tokenable_id`)
286314
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
287315
/*!40101 SET character_set_client = @saved_cs_client */;
316+
DROP TABLE IF EXISTS `user_groups`;
317+
/*!40101 SET @saved_cs_client = @@character_set_client */;
318+
/*!40101 SET character_set_client = utf8mb4 */;
319+
CREATE TABLE `user_groups` (
320+
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
321+
`name` varchar(255) NOT NULL,
322+
`description` text DEFAULT NULL,
323+
`created_at` timestamp NULL DEFAULT NULL,
324+
`updated_at` timestamp NULL DEFAULT NULL,
325+
PRIMARY KEY (`id`)
326+
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
327+
/*!40101 SET character_set_client = @saved_cs_client */;
328+
DROP TABLE IF EXISTS `user_user_group`;
329+
/*!40101 SET @saved_cs_client = @@character_set_client */;
330+
/*!40101 SET character_set_client = utf8mb4 */;
331+
CREATE TABLE `user_user_group` (
332+
`user_id` bigint(20) unsigned NOT NULL,
333+
`user_group_id` int(10) unsigned NOT NULL,
334+
KEY `user_user_group_user_id_foreign` (`user_id`),
335+
KEY `user_user_group_user_group_id_foreign` (`user_group_id`),
336+
CONSTRAINT `user_user_group_user_group_id_foreign` FOREIGN KEY (`user_group_id`) REFERENCES `user_groups` (`id`),
337+
CONSTRAINT `user_user_group_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`)
338+
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
339+
/*!40101 SET character_set_client = @saved_cs_client */;
288340
DROP TABLE IF EXISTS `users`;
289341
/*!40101 SET @saved_cs_client = @@character_set_client */;
290-
/*!40101 SET character_set_client = utf8 */;
342+
/*!40101 SET character_set_client = utf8mb4 */;
291343
CREATE TABLE `users` (
292344
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
293345
`login` varchar(255) NOT NULL,
@@ -314,6 +366,7 @@ CREATE TABLE `users` (
314366
/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
315367
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
316368

369+
/*M!999999\- enable the sandbox mode */
317370
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (1,'2014_10_12_000000_create_users_table',1);
318371
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (2,'2014_10_12_100000_create_password_resets_table',1);
319372
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (3,'2019_07_28_175941_create_domains_table',1);
@@ -343,3 +396,7 @@ INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (54,'2016_06_01_000
343396
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (55,'2016_06_01_000004_create_oauth_clients_table',2);
344397
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (56,'2016_06_01_000005_create_oauth_personal_access_clients_table',2);
345398
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (61,'2024_11_06_123808_add_actions',3);
399+
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (62,'2025_02_04_064646_create_audit_logs_table',4);
400+
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (63,'2025_02_05_121035_cleanup',4);
401+
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (64,'2025_04_29_123908_add_user_group',4);
402+
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (65,'2025_05_27_152856_change_actions',4);

public/build/assets/app-CbUqJ3MC.css

Lines changed: 0 additions & 6 deletions
This file was deleted.

public/build/manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"resources/css/app.css": {
3-
"file": "assets/app-CbUqJ3MC.css",
3+
"file": "assets/app-DA_77Gar.css",
44
"src": "resources/css/app.css",
55
"isEntry": true
66
},

resources/css/app.css

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,3 +33,7 @@ input[type="file"] {
3333
border: 1px solid #C0C0C0;
3434

3535
}
36+
37+
a.no-underline:hover {
38+
text-decoration: none;
39+
}

resources/views/layout.blade.php

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -239,35 +239,37 @@
239239
@yield('title')
240240
</div>
241241
</div>
242-
243242
<ul class="app-bar-menu ml-auto">
244-
245-
<a href="/bob/index?attribute=none&period=0&scope=none&domain=0&status=2">
243+
<a href="/bob/index?attribute=none&period=0&scope=none&domain=0&status=2" class="no-underline">
246244
<span class="mif-mail-outline mif-2x"></span>
247245
@if (Session::get("planed_controls_this_month_count")!=null)
248246
<span class="badge bg-green fg-white mt-2 mr-1">{{Session::get("planed_controls_this_month_count")}}</span>
247+
@else
248+
&nbsp;
249249
@endif
250250
</a>
251-
<a href="/bob/index?attribute=none&period=99&scope=none&domain=0&status=1&late=1">
251+
<a href="/bob/index?attribute=none&period=99&scope=none&domain=0&status=1&late=1" class="no-underline">
252252
<span class="mif-notifications mif-2x"></span>
253253
@if (Session::get("late_controls_count")!=null)
254254
<span class="badge bg-red fg-white mt-2 mr-1">{{Session::get("late_controls_count")}}</span>
255+
@else
256+
&nbsp;
255257
@endif
256258
</a>
257-
<a href="/actions">
259+
<a href="/actions" class="no-underline">
258260
<span class="mif-flag mif-2x"></span>
259261
@if (Session::get("action_plans_count")!=null)
260262
<span class="badge bg-blue fg-white mt-2 mr-1">{{Session::get("action_plans_count")}}</span>
263+
@else
264+
&nbsp;
261265
@endif
262266
</a>
267+
<a href="/users/{{ Auth::User()->id }}/edit" class="no-underline">
268+
<span class="mif-person mif-2x"></span>
269+
<span class="badge bg-black fg-white mt-2 mr-1">{{ Auth::User()->initiales() }}</span>
270+
</a>
263271
<li>
264-
<a href="/users/{{ Auth::User()->id }}/edit">
265-
<span class="mif-person mif-2x"></span>
266-
<span class="badge bg-black fg-white mt-2 mr-1">{{ Auth::User()->initiales() }}</span>
267-
</a>
268-
</li>
269-
<li>
270-
<a href="/about">
272+
<a href="/about" class="no-underline">
271273
<span class="mif-help-outline mif-2x"></span>
272274
</a>
273275
</li>

0 commit comments

Comments
 (0)