-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Finishing monitoring create page (now renamed as daily achievement …
…sub menu) - Fix database design and model relationship - Add daily achievement assert on monitoring feature test
- Loading branch information
Showing
15 changed files
with
171 additions
and
87 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
<?php | ||
|
||
namespace App\Models\Concerns\Achievement; | ||
|
||
use App\Models\User; | ||
use Illuminate\Database\Eloquent\Relations\BelongsTo; | ||
|
||
/** | ||
* @property int|null $user_id Foreign key of \App\Models\User. | ||
* @property-read \App\Models\User|null $user | ||
* | ||
* @see \App\Models\Achievement | ||
*/ | ||
trait Relation | ||
{ | ||
/** | ||
* Define an inverse one-to-one or many relationship with \App\Models\User. | ||
* | ||
* @return \Illuminate\Database\Eloquent\Relations\BelongsTo | ||
*/ | ||
public function user(): BelongsTo | ||
{ | ||
return $this->belongsTo(User::class); | ||
} | ||
|
||
/** | ||
* Return \App\Models\User model relation value. | ||
* | ||
* @return \App\Models\User|null | ||
*/ | ||
public function getUserRelationValue(): ?User | ||
{ | ||
return $this->getRelationValue('user'); | ||
} | ||
|
||
/** | ||
* Set \App\Models\User model relation value. | ||
* | ||
* @param \App\Models\User $user | ||
* @return $this | ||
*/ | ||
public function setUserRelationValue(User $user) | ||
{ | ||
$this->user()->associate($user); | ||
|
||
return $this; | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
41 changes: 41 additions & 0 deletions
41
resources/views/monitoring/daily-achievement/create.blade.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
@extends('layouts.admin') | ||
|
||
@section('content') | ||
<section class="section"> | ||
<div class="section-header"> | ||
<h1>@lang('Create') Input Pencapaian Harian</h1> | ||
|
||
<div class="section-header-breadcrumb"> | ||
<div class="breadcrumb-item"> | ||
<a href="{{ route('monitoring.index') }}"> | ||
<i class="fas @lang('icon.monitoring')"></i> <span>@lang('menu.monitoring')</span> | ||
</a> | ||
</div> | ||
|
||
<div class="breadcrumb-item"> | ||
<a href="{{ route('monitoring.daily-achievement.index') }}"> | ||
<span>Input Pencapaian Harian</span> | ||
</a> | ||
</div> | ||
|
||
<div class="breadcrumb-item"> | ||
<a href="{{ route('monitoring.daily-achievement.create') }}"> | ||
<span>@lang('Create')</span> | ||
</a> | ||
</div> | ||
</div> | ||
</div> | ||
|
||
<form action=""> | ||
@csrf | ||
|
||
<div class="section-body"> | ||
<div class="card"> | ||
<div class="card-body"> | ||
|
||
</div> | ||
</div> | ||
</div> | ||
</form> | ||
</section> | ||
@endsection |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.