From d0b81cc2282f9731a7a17fdd83e23fda99ec9091 Mon Sep 17 00:00:00 2001 From: Nafies Luthfi Date: Mon, 2 Jul 2018 17:44:38 +0800 Subject: [PATCH] Add job dates information section on job detail page --- resources/lang/de/job.php | 5 +++++ resources/lang/de/time.php | 1 + resources/lang/en/job.php | 5 +++++ resources/lang/en/time.php | 1 + resources/lang/id/job.php | 5 +++++ resources/lang/id/time.php | 1 + resources/views/jobs/partials/job-dates.blade.php | 22 ++++++++++++++++++++++ resources/views/jobs/show.blade.php | 1 + 8 files changed, 41 insertions(+) create mode 100644 resources/views/jobs/partials/job-dates.blade.php diff --git a/resources/lang/de/job.php b/resources/lang/de/job.php index 44eb826..f0c33c1 100644 --- a/resources/lang/de/job.php +++ b/resources/lang/de/job.php @@ -14,6 +14,11 @@ return [ 'tasks_count' => 'Beschäftigungsanzahl', 'empty' => 'Beschäftigungsliste ist leer.', 'back_to_index' => 'zurück zur Beschäftigungsliste', + 'starts' => 'Starts', + 'ends' => 'Ends', + 'target' => 'Target', + 'actual' => 'Actual', + 'duration' => 'Duration', // Actions 'create' => 'Neue Beschäftigung anlegen', diff --git a/resources/lang/de/time.php b/resources/lang/de/time.php index 2e18c53..f7aaf84 100644 --- a/resources/lang/de/time.php +++ b/resources/lang/de/time.php @@ -1,6 +1,7 @@ 'Day(s)', 'date' => 'Datum', 'month' => 'Monat', diff --git a/resources/lang/en/job.php b/resources/lang/en/job.php index b62b7da..3b5c936 100644 --- a/resources/lang/en/job.php +++ b/resources/lang/en/job.php @@ -14,6 +14,11 @@ return [ 'tasks_count' => 'Tasks Count', 'empty' => 'Job list is empty.', 'back_to_index' => 'Back to Job List', + 'starts' => 'Starts', + 'ends' => 'Ends', + 'target' => 'Target', + 'actual' => 'Actual', + 'duration' => 'Duration', // Actions 'create' => 'Create new Job', diff --git a/resources/lang/en/time.php b/resources/lang/en/time.php index 7d728c9..5237be3 100644 --- a/resources/lang/en/time.php +++ b/resources/lang/en/time.php @@ -1,6 +1,7 @@ 'Day(s)', 'date' => 'Date', 'month' => 'Month', diff --git a/resources/lang/id/job.php b/resources/lang/id/job.php index 4ee7636..92d4e52 100644 --- a/resources/lang/id/job.php +++ b/resources/lang/id/job.php @@ -14,6 +14,11 @@ return [ 'tasks_count' => 'Jumlah Task', 'empty' => 'Belum ada Job', 'back_to_index' => 'Kembali ke daftar Job', + 'starts' => 'Mulai', + 'ends' => 'Selesai', + 'target' => 'Target', + 'actual' => 'Aktual', + 'duration' => 'Durasi', // Actions 'create' => 'Input Job Baru', diff --git a/resources/lang/id/time.php b/resources/lang/id/time.php index 2aa0f31..d66cf40 100644 --- a/resources/lang/id/time.php +++ b/resources/lang/id/time.php @@ -1,6 +1,7 @@ 'Hari', 'date' => 'Tanggal', 'month' => 'Bulan', diff --git a/resources/views/jobs/partials/job-dates.blade.php b/resources/views/jobs/partials/job-dates.blade.php new file mode 100644 index 0000000..40e3605 --- /dev/null +++ b/resources/views/jobs/partials/job-dates.blade.php @@ -0,0 +1,22 @@ + + + + + + + + + + + + + + + + + + + + + +
 {{ __('job.starts') }}{{ __('job.ends') }}{{ __('job.duration') }}
{{ __('job.target') }}{{ $job->target_start_date }}{{ $job->target_end_date }}{{ Carbon::parse($job->target_start_date)->diffInDays(Carbon::parse($job->target_end_date), false) }} {{ __('time.days') }}
{{ __('job.actual') }}{{ $job->actual_start_date }}{{ $job->actual_end_date }}{{ Carbon::parse($job->actual_start_date)->diffInDays(Carbon::parse($job->actual_end_date), false) }} {{ __('time.days') }}
diff --git a/resources/views/jobs/show.blade.php b/resources/views/jobs/show.blade.php index 27038f7..051d4b2 100755 --- a/resources/views/jobs/show.blade.php +++ b/resources/views/jobs/show.blade.php @@ -22,6 +22,7 @@ @include('jobs.partials.job-show')
+ @include('jobs.partials.job-dates') @include('jobs.partials.job-tasks-operation')