@@ -14,7 +14,7 @@ |
||
14 | 14 | */ |
15 | 15 | public function up() |
16 | 16 | { |
17 | - Schema::create('user_role_permissions', function (Blueprint $table) { |
|
17 | + Schema::create('user_role_permissions', function(Blueprint $table) { |
|
18 | 18 | $table->increments('id'); |
19 | 19 | $table->integer('role_id')->unsigned(); |
20 | 20 | $table->integer('perm_type_id')->unsigned(); |
@@ -16,7 +16,7 @@ discard block |
||
16 | 16 | */ |
17 | 17 | public function up() |
18 | 18 | { |
19 | - Schema::create('user_role_types', function (Blueprint $table) { |
|
19 | + Schema::create('user_role_types', function(Blueprint $table) { |
|
20 | 20 | $table->increments('role_id'); |
21 | 21 | $table->text('name'); |
22 | 22 | $table->text('description'); |
@@ -26,10 +26,10 @@ discard block |
||
26 | 26 | |
27 | 27 | // Insert default data |
28 | 28 | DB::table('user_role_types')->insert([ |
29 | - ['role_id' => 1, 'name' => 'Installer', 'description' => 'All Access Administrator', 'allow_edit' => 0, 'created_at' => Carbon::now(), 'updated_at' => Carbon::now()], |
|
30 | - ['role_id' => 2, 'name' => 'Administrator', 'description' => 'System Administrator', 'allow_edit' => 0, 'created_at' => Carbon::now(), 'updated_at' => Carbon::now()], |
|
31 | - ['role_id' => 3, 'name' => 'Reports', 'description' => 'User who can run reports', 'allow_edit' => 0, 'created_at' => Carbon::now(), 'updated_at' => Carbon::now()], |
|
32 | - ['role_id' => 4, 'name' => 'Tech', 'description' => 'Standard User', 'allow_edit' => 0, 'created_at' => Carbon::now(), 'updated_at' => Carbon::now()], |
|
29 | + ['role_id' => 1, 'name' => 'Installer', 'description' => 'All Access Administrator', 'allow_edit' => 0, 'created_at' => Carbon::now(), 'updated_at' => Carbon::now()], |
|
30 | + ['role_id' => 2, 'name' => 'Administrator', 'description' => 'System Administrator', 'allow_edit' => 0, 'created_at' => Carbon::now(), 'updated_at' => Carbon::now()], |
|
31 | + ['role_id' => 3, 'name' => 'Reports', 'description' => 'User who can run reports', 'allow_edit' => 0, 'created_at' => Carbon::now(), 'updated_at' => Carbon::now()], |
|
32 | + ['role_id' => 4, 'name' => 'Tech', 'description' => 'Standard User', 'allow_edit' => 0, 'created_at' => Carbon::now(), 'updated_at' => Carbon::now()], |
|
33 | 33 | ]); |
34 | 34 | |
35 | 35 | // Update the users table to include the 'user_role' column |
@@ -35,8 +35,7 @@ |
||
35 | 35 | // Update the users table to include the 'user_role' column |
36 | 36 | if(!Schema::hasColumn('users', 'role_id')) |
37 | 37 | { |
38 | - Schema::table('users', function(Blueprint $table) |
|
39 | - { |
|
38 | + Schema::table('users', function(Blueprint $table) { |
|
40 | 39 | $table->integer('role_id')->unsigned()->after('user_id')->default(4); |
41 | 40 | $table->foreign('role_id')->references('role_id')->on('user_role_types')->onUpdate('cascade'); |
42 | 41 | }); |
@@ -15,7 +15,7 @@ discard block |
||
15 | 15 | */ |
16 | 16 | public function up() |
17 | 17 | { |
18 | - Schema::create('user_role_permission_types', function (Blueprint $table) { |
|
18 | + Schema::create('user_role_permission_types', function(Blueprint $table) { |
|
19 | 19 | $table->increments('perm_type_id'); |
20 | 20 | $table->text('description'); |
21 | 21 | $table->timestamps(); |
@@ -23,17 +23,17 @@ discard block |
||
23 | 23 | |
24 | 24 | // Insert default data |
25 | 25 | DB::table('user_role_permission_types')->insert([ |
26 | - ['perm_type_id' => 1, 'description' => 'Manage Users', 'created_at' => Carbon::now(), 'updated_at' => Carbon::now()], |
|
27 | - ['perm_type_id' => 2, 'description' => 'Manage User Roles', 'created_at' => Carbon::now(), 'updated_at' => Carbon::now()], |
|
28 | - ['perm_type_id' => 3, 'description' => 'Run Reports', 'created_at' => Carbon::now(), 'updated_at' => Carbon::now()], |
|
29 | - ['perm_type_id' => 4, 'description' => 'Add Customer', 'created_at' => Carbon::now(), 'updated_at' => Carbon::now()], |
|
30 | - ['perm_type_id' => 5, 'description' => 'Manage Customers', 'created_at' => Carbon::now(), 'updated_at' => Carbon::now()], |
|
31 | - ['perm_type_id' => 6, 'description' => 'Deactivate Customer', 'created_at' => Carbon::now(), 'updated_at' => Carbon::now()], |
|
32 | - ['perm_type_id' => 7, 'description' => 'Use File Links', 'created_at' => Carbon::now(), 'updated_at' => Carbon::now()], |
|
33 | - ['perm_type_id' => 8, 'description' => 'Create Tech Tip', 'created_at' => Carbon::now(), 'updated_at' => Carbon::now()], |
|
34 | - ['perm_type_id' => 9, 'description' => 'Edit Tech Tip', 'created_at' => Carbon::now(), 'updated_at' => Carbon::now()], |
|
35 | - ['perm_type_id' => 10, 'description' => 'Delete Tech Tip', 'created_at' => Carbon::now(), 'updated_at' => Carbon::now()], |
|
36 | - ['perm_type_id' => 11, 'description' => 'Manage Equipment', 'created_at' => Carbon::now(), 'updated_at' => Carbon::now()], |
|
26 | + ['perm_type_id' => 1, 'description' => 'Manage Users', 'created_at' => Carbon::now(), 'updated_at' => Carbon::now()], |
|
27 | + ['perm_type_id' => 2, 'description' => 'Manage User Roles', 'created_at' => Carbon::now(), 'updated_at' => Carbon::now()], |
|
28 | + ['perm_type_id' => 3, 'description' => 'Run Reports', 'created_at' => Carbon::now(), 'updated_at' => Carbon::now()], |
|
29 | + ['perm_type_id' => 4, 'description' => 'Add Customer', 'created_at' => Carbon::now(), 'updated_at' => Carbon::now()], |
|
30 | + ['perm_type_id' => 5, 'description' => 'Manage Customers', 'created_at' => Carbon::now(), 'updated_at' => Carbon::now()], |
|
31 | + ['perm_type_id' => 6, 'description' => 'Deactivate Customer', 'created_at' => Carbon::now(), 'updated_at' => Carbon::now()], |
|
32 | + ['perm_type_id' => 7, 'description' => 'Use File Links', 'created_at' => Carbon::now(), 'updated_at' => Carbon::now()], |
|
33 | + ['perm_type_id' => 8, 'description' => 'Create Tech Tip', 'created_at' => Carbon::now(), 'updated_at' => Carbon::now()], |
|
34 | + ['perm_type_id' => 9, 'description' => 'Edit Tech Tip', 'created_at' => Carbon::now(), 'updated_at' => Carbon::now()], |
|
35 | + ['perm_type_id' => 10, 'description' => 'Delete Tech Tip', 'created_at' => Carbon::now(), 'updated_at' => Carbon::now()], |
|
36 | + ['perm_type_id' => 11, 'description' => 'Manage Equipment', 'created_at' => Carbon::now(), 'updated_at' => Carbon::now()], |
|
37 | 37 | ]); |
38 | 38 | } |
39 | 39 |
@@ -36,13 +36,13 @@ discard block |
||
36 | 36 | // Determine if a user can see the Administration Nav Link |
37 | 37 | public function seeAdminLink(User $user) |
38 | 38 | { |
39 | - if ($this->isInstaller($user)) |
|
39 | + if($this->isInstaller($user)) |
|
40 | 40 | { |
41 | 41 | return true; |
42 | 42 | } |
43 | 43 | |
44 | 44 | $data = UserRolePermissions::with('UserRolePermissionTypes') |
45 | - ->whereHas('UserRolePermissionTypes', function ($query) { |
|
45 | + ->whereHas('UserRolePermissionTypes', function($query) { |
|
46 | 46 | $query->where('description', 'Manage Users') |
47 | 47 | ->orWhere('description', 'Manage User Roles') |
48 | 48 | ->orWhere('description', 'Manage Customers') |
@@ -53,7 +53,7 @@ discard block |
||
53 | 53 | ->get(); |
54 | 54 | |
55 | 55 | $allow = $data->isEmpty() ? 'false' : 'true'; |
56 | - \Log::debug('User ' . $user->full_name . ' is trying to access admin link. Result - ' . $allow); |
|
56 | + \Log::debug('User '.$user->full_name.' is trying to access admin link. Result - '.$allow); |
|
57 | 57 | |
58 | 58 | return $data->isEmpty() ? false : true; |
59 | 59 | } |
@@ -68,7 +68,7 @@ discard block |
||
68 | 68 | } |
69 | 69 | |
70 | 70 | $data = UserRolePermissions::with('UserRolePermissionTypes') |
71 | - ->whereHas('UserRolePermissionTypes', function ($query) use ($task) { |
|
71 | + ->whereHas('UserRolePermissionTypes', function($query) use ($task) { |
|
72 | 72 | $query->where('description', $task); |
73 | 73 | }) |
74 | 74 | ->where('role_id', $user->role_id) |
@@ -76,7 +76,7 @@ discard block |
||
76 | 76 | ->get(); |
77 | 77 | |
78 | 78 | $allow = $data->isEmpty() ? 'false' : 'true'; |
79 | - \Log::debug('User '.$user->full_name.' is trying to access '.$task.'. Result - ' . $allow); |
|
79 | + \Log::debug('User '.$user->full_name.' is trying to access '.$task.'. Result - '.$allow); |
|
80 | 80 | |
81 | 81 | return $data->isEmpty() ? false : true; |
82 | 82 | } |
@@ -135,14 +135,14 @@ discard block |
||
135 | 135 | // Validate the hash token |
136 | 136 | $user = UserInitialize::where('token', $hash)->get(); |
137 | 137 | |
138 | - if ($user->isEmpty()) { |
|
139 | - Log::debug('Route ' . Route::currentRouteName() . ' visited by User ID-' . Auth::user()->user_id); |
|
140 | - Log::warning('Visitor at IP Address ' . \Request::ip() . ' tried to access invalid initialize hash - ' . $hash); |
|
138 | + if($user->isEmpty()) { |
|
139 | + Log::debug('Route '.Route::currentRouteName().' visited by User ID-'.Auth::user()->user_id); |
|
140 | + Log::warning('Visitor at IP Address '.\Request::ip().' tried to access invalid initialize hash - '.$hash); |
|
141 | 141 | return abort(404); |
142 | 142 | } |
143 | 143 | |
144 | - Log::debug('Route ' . Route::currentRouteName() . ' visited.'); |
|
145 | - Log::debug('Link Hash -' . $hash); |
|
144 | + Log::debug('Route '.Route::currentRouteName().' visited.'); |
|
145 | + Log::debug('Link Hash -'.$hash); |
|
146 | 146 | return view('account.initializeUser', ['hash' => $hash]); |
147 | 147 | } |
148 | 148 | |
@@ -151,9 +151,9 @@ discard block |
||
151 | 151 | { |
152 | 152 | // Verify that the link matches the assigned email address |
153 | 153 | $valid = UserInitialize::where('token', $hash)->first(); |
154 | - if (empty($valid)) { |
|
155 | - Log::debug('Route ' . Route::currentRouteName() . ' visited by User ID-' . Auth::user()->user_id); |
|
156 | - Log::warning('Visitor at IP Address ' . \Request::ip() . ' tried to submit an invalid User Initialization link - ' . $hash); |
|
154 | + if(empty($valid)) { |
|
155 | + Log::debug('Route '.Route::currentRouteName().' visited by User ID-'.Auth::user()->user_id); |
|
156 | + Log::warning('Visitor at IP Address '.\Request::ip().' tried to submit an invalid User Initialization link - '.$hash); |
|
157 | 157 | return abort(404); |
158 | 158 | } |
159 | 159 | |
@@ -186,8 +186,8 @@ discard block |
||
186 | 186 | Auth::loginUsingID($userData->user_id); |
187 | 187 | |
188 | 188 | // Redirect the user to the dashboard |
189 | - Log::debug('Route ' . Route::currentRouteName() . ' visited by User ID-' . Auth::user()->user_id); |
|
190 | - Log::debug('Initialize Data - ' . $request->toArray()); |
|
189 | + Log::debug('Route '.Route::currentRouteName().' visited by User ID-'.Auth::user()->user_id); |
|
190 | + Log::debug('Initialize Data - '.$request->toArray()); |
|
191 | 191 | Log::notice('User has setup account', ['user_id' => $userData->user_id]); |
192 | 192 | return redirect(route('dashboard')); |
193 | 193 | } |
@@ -135,7 +135,8 @@ discard block |
||
135 | 135 | // Validate the hash token |
136 | 136 | $user = UserInitialize::where('token', $hash)->get(); |
137 | 137 | |
138 | - if ($user->isEmpty()) { |
|
138 | + if ($user->isEmpty()) |
|
139 | + { |
|
139 | 140 | Log::debug('Route ' . Route::currentRouteName() . ' visited by User ID-' . Auth::user()->user_id); |
140 | 141 | Log::warning('Visitor at IP Address ' . \Request::ip() . ' tried to access invalid initialize hash - ' . $hash); |
141 | 142 | return abort(404); |
@@ -151,7 +152,8 @@ discard block |
||
151 | 152 | { |
152 | 153 | // Verify that the link matches the assigned email address |
153 | 154 | $valid = UserInitialize::where('token', $hash)->first(); |
154 | - if (empty($valid)) { |
|
155 | + if (empty($valid)) |
|
156 | + { |
|
155 | 157 | Log::debug('Route ' . Route::currentRouteName() . ' visited by User ID-' . Auth::user()->user_id); |
156 | 158 | Log::warning('Visitor at IP Address ' . \Request::ip() . ' tried to submit an invalid User Initialization link - ' . $hash); |
157 | 159 | return abort(404); |
@@ -20,7 +20,7 @@ |
||
20 | 20 | $table->longText('comment'); |
21 | 21 | $table->timestamps(); |
22 | 22 | $table->foreign('tip_id')->references('tip_id')->on('tech_tips')->onUpdate('cascade')->onDelete('cascade'); |
23 | - $table->foreign('user_id')->references('user_id')->on('users')->onUpdate('cascade'); // TODO - add this key in v5 updates if it does not exist |
|
23 | + $table->foreign('user_id')->references('user_id')->on('users')->onUpdate('cascade'); // TODO - add this key in v5 updates if it does not exist |
|
24 | 24 | }); |
25 | 25 | } |
26 | 26 |
@@ -181,12 +181,18 @@ discard block |
||
181 | 181 | |
182 | 182 | // Good to go - update user password |
183 | 183 | $roleArr = []; |
184 | - foreach ($roles as $role) { |
|
185 | - if ($role->role_id == 1 && Auth::user()->role_id != 1) { |
|
184 | + foreach ($roles as $role) |
|
185 | + { |
|
186 | + if ($role->role_id == 1 && Auth::user()->role_id != 1) |
|
187 | + { |
|
186 | 188 | continue; |
187 | - } else if ($role->role_id == 2 && Auth::user()->role_id > 1) { |
|
189 | + } |
|
190 | + else if ($role->role_id == 2 && Auth::user()->role_id > 1) |
|
191 | + { |
|
188 | 192 | continue; |
189 | - } else { |
|
193 | + } |
|
194 | + else |
|
195 | + { |
|
190 | 196 | // $roleArr[$role->role_id] = $role->name; |
191 | 197 | $roleArr[] = [ |
192 | 198 | 'value' => $role->role_id, |
@@ -275,17 +281,20 @@ discard block |
||
275 | 281 | $user = User::find($request->user_id); |
276 | 282 | |
277 | 283 | // Verify this is a valid user ID |
278 | - if (!$user) { |
|
284 | + if (!$user) |
|
285 | + { |
|
279 | 286 | $success = false; |
280 | 287 | $reason = 'Cannot find user with this ID'; |
281 | 288 | } |
282 | 289 | // Make sure that the user is not trying to deactivate someone with more permissions |
283 | - else if ($user->role_id < Auth::user()->role_id) { |
|
290 | + else if ($user->role_id < Auth::user()->role_id) |
|
291 | + { |
|
284 | 292 | $success = false; |
285 | 293 | $reason = 'You cannot change password for a user with higher permissions that you. If this user has locked themselves out, have then use the reset link on the login page.'; |
286 | 294 | } |
287 | 295 | // Good to go - update user password |
288 | - else { |
|
296 | + else |
|
297 | + { |
|
289 | 298 | // Update the user data |
290 | 299 | $user->update( |
291 | 300 | [ |
@@ -30,7 +30,7 @@ discard block |
||
30 | 30 | public function __construct() |
31 | 31 | { |
32 | 32 | $this->middleware('auth')->except('initializeUser', 'submitInitializeUser'); |
33 | - $this->middleware(function ($request, $next) { |
|
33 | + $this->middleware(function($request, $next) { |
|
34 | 34 | $this->authorize('hasAccess', 'Manage Users'); |
35 | 35 | return $next($request); |
36 | 36 | }); |
@@ -39,12 +39,12 @@ discard block |
||
39 | 39 | // Show the list of current users to edit |
40 | 40 | public function index() |
41 | 41 | { |
42 | - $userList = new UserCollection(User::with(['UserLogins' => function ($query) { |
|
42 | + $userList = new UserCollection(User::with(['UserLogins' => function($query) { |
|
43 | 43 | $query->latest()->limit(1); |
44 | 44 | }])->get() |
45 | 45 | /** @scrutinizer ignore-call */ |
46 | 46 | ->makeVisible('user_id')); |
47 | - $route = 'admin.user.edit'; |
|
47 | + $route = 'admin.user.edit'; |
|
48 | 48 | |
49 | 49 | return view('admin.userIndex', [ |
50 | 50 | 'userList' => $userList, |
@@ -106,7 +106,7 @@ discard block |
||
106 | 106 | { |
107 | 107 | // Validate the new user form |
108 | 108 | $request->validate([ |
109 | - 'role' => 'required|numeric', // TODO - add validation rule - is in user roles table |
|
109 | + 'role' => 'required|numeric', // TODO - add validation rule - is in user roles table |
|
110 | 110 | 'username' => 'required|unique:users|regex:/^[a-zA-Z0-9_]*$/', |
111 | 111 | 'first_name' => 'required', |
112 | 112 | 'last_name' => 'required', |
@@ -147,7 +147,7 @@ discard block |
||
147 | 147 | // List all inactive users |
148 | 148 | public function show($type) |
149 | 149 | { |
150 | - $route = ''; |
|
150 | + $route = ''; |
|
151 | 151 | |
152 | 152 | if($type !== 'inactive') |
153 | 153 | { |
@@ -171,17 +171,17 @@ discard block |
||
171 | 171 | $user = new UserResource(User::findOrFail($id)); |
172 | 172 | |
173 | 173 | // Make sure that the user is not trying to deactivate someone with more permissions |
174 | - if ($user->role_id < Auth::user()->role_id) |
|
174 | + if($user->role_id < Auth::user()->role_id) |
|
175 | 175 | { |
176 | 176 | return abort(403); |
177 | 177 | } |
178 | 178 | |
179 | 179 | // Good to go - update user password |
180 | 180 | $roleArr = []; |
181 | - foreach ($roles as $role) { |
|
182 | - if ($role->role_id == 1 && Auth::user()->role_id != 1) { |
|
181 | + foreach($roles as $role) { |
|
182 | + if($role->role_id == 1 && Auth::user()->role_id != 1) { |
|
183 | 183 | continue; |
184 | - } else if ($role->role_id == 2 && Auth::user()->role_id > 1) { |
|
184 | + } else if($role->role_id == 2 && Auth::user()->role_id > 1) { |
|
185 | 185 | continue; |
186 | 186 | } else { |
187 | 187 | // $roleArr[$role->role_id] = $role->name; |
@@ -192,7 +192,7 @@ discard block |
||
192 | 192 | } |
193 | 193 | } |
194 | 194 | |
195 | - Log::debug('Route ' . Route::currentRouteName() . ' visited by User ID-' . Auth::user()->user_id); |
|
195 | + Log::debug('Route '.Route::currentRouteName().' visited by User ID-'.Auth::user()->user_id); |
|
196 | 196 | return view('admin.userEdit', [ |
197 | 197 | 'roles' => $roleArr, |
198 | 198 | 'user' => $user-> |
@@ -231,7 +231,7 @@ discard block |
||
231 | 231 | // Update the user data |
232 | 232 | $user = User::findOrFail($id); |
233 | 233 | |
234 | - if ($user->role_id < Auth::user()->role_id) |
|
234 | + if($user->role_id < Auth::user()->role_id) |
|
235 | 235 | { |
236 | 236 | return abort(403); |
237 | 237 | } |
@@ -274,12 +274,12 @@ discard block |
||
274 | 274 | $user = User::find($request->user_id); |
275 | 275 | |
276 | 276 | // Verify this is a valid user ID |
277 | - if (!$user) { |
|
277 | + if(!$user) { |
|
278 | 278 | $success = false; |
279 | 279 | $reason = 'Cannot find user with this ID'; |
280 | 280 | } |
281 | 281 | // Make sure that the user is not trying to deactivate someone with more permissions |
282 | - else if ($user->role_id < Auth::user()->role_id) { |
|
282 | + else if($user->role_id < Auth::user()->role_id) { |
|
283 | 283 | $success = false; |
284 | 284 | $reason = 'You cannot change password for a user with higher permissions that you. If this user has locked themselves out, have then use the reset link on the login page.'; |
285 | 285 | } |
@@ -292,11 +292,11 @@ discard block |
||
292 | 292 | 'password_expires' => $nextChange |
293 | 293 | ]); |
294 | 294 | $success = true; |
295 | - $reason = 'Password for ' . $user->full_name . ' successfully reset.'; |
|
295 | + $reason = 'Password for '.$user->full_name.' successfully reset.'; |
|
296 | 296 | } |
297 | 297 | |
298 | - Log::debug('Route ' . Route::currentRouteName() . ' visited by User ID-' . Auth::user()->user_id); |
|
299 | - Log::notice('User ID-' . $request->user_id . ' password chagned by ' . Auth::user()->user_id, [ |
|
298 | + Log::debug('Route '.Route::currentRouteName().' visited by User ID-'.Auth::user()->user_id); |
|
299 | + Log::notice('User ID-'.$request->user_id.' password chagned by '.Auth::user()->user_id, [ |
|
300 | 300 | 'success' => $success, |
301 | 301 | 'reason' => $reason, |
302 | 302 | ]); |
@@ -15,7 +15,7 @@ discard block |
||
15 | 15 | public function __construct() |
16 | 16 | { |
17 | 17 | $this->middleware('auth'); |
18 | - $this->middleware(function ($request, $next) { |
|
18 | + $this->middleware(function($request, $next) { |
|
19 | 19 | $this->authorize('hasAccess', 'Manage Equipment'); |
20 | 20 | return $next($request); |
21 | 21 | }); |
@@ -121,7 +121,7 @@ discard block |
||
121 | 121 | SystemCategories::find($id)->delete(); |
122 | 122 | return response()->json(['success' => true, 'reason' => 'Category Successfully Deleted']); |
123 | 123 | } |
124 | - catch (\Illuminate\Database\QueryException $e) |
|
124 | + catch(\Illuminate\Database\QueryException $e) |
|
125 | 125 | { |
126 | 126 | return response()->json(['success' => false, 'reason' => 'Category still in use. You must delete all systems attached to this category first.']); |
127 | 127 | } |
@@ -77,7 +77,8 @@ |
||
77 | 77 | // Delete an existing category - note this will fail if the category has systems assigned to it |
78 | 78 | public function destroy($id) |
79 | 79 | { |
80 | - try { |
|
80 | + try |
|
81 | + { |
|
81 | 82 | SystemCategories::find($id)->delete(); |
82 | 83 | return response()->json(['success' => true, 'reason' => 'Category Successfully Deleted']); |
83 | 84 | } |
@@ -21,7 +21,7 @@ |
||
21 | 21 | // Database primary key |
22 | 22 | protected $primaryKey = 'user_id'; |
23 | 23 | |
24 | - protected $appends = [ 'full_name' ]; |
|
24 | + protected $appends = ['full_name']; |
|
25 | 25 | protected $casts = [ |
26 | 26 | 'created_at' => 'datetime:M d, Y', |
27 | 27 | 'updated_at' => 'datetime:M d, Y', |