diff --git a/app/Entities/Payments/PaymentsRepository.php b/app/Entities/Payments/PaymentsRepository.php index 01f8e0b..3ec3682 100755 --- a/app/Entities/Payments/PaymentsRepository.php +++ b/app/Entities/Payments/PaymentsRepository.php @@ -16,11 +16,18 @@ class PaymentsRepository extends BaseRepository parent::__construct($model); } - public function getAll($q) + public function getPayments($queryStrings) { return $this->model->orderBy('date','desc') - ->whereHas('project', function($query) use ($q) { - $query->where('name', 'like', '%' . $q . '%'); + ->whereHas('project', function($query) use ($queryStrings) { + if (isset($queryStrings['q'])) { + $query->where('name', 'like', '%' . $queryStrings['q'] . '%'); + } + }) + ->where(function ($query) use ($queryStrings) { + if (isset($queryStrings['customer_id'])) { + $query->where('customer_id', $queryStrings['customer_id']); + } }) ->with('customer','project') ->whereOwnerId(auth()->id()) diff --git a/app/Http/Controllers/PaymentsController.php b/app/Http/Controllers/PaymentsController.php index d32bb10..0f8a1ed 100755 --- a/app/Http/Controllers/PaymentsController.php +++ b/app/Http/Controllers/PaymentsController.php @@ -19,9 +19,9 @@ class PaymentsController extends Controller { $this->repo = $repo; } - public function index(Request $req) + public function index(Request $request) { - $payments = $this->repo->getAll($req->get('q')); + $payments = $this->repo->getPayments($request->only('customer_id')); return view('payments.index',compact('payments')); } diff --git a/resources/lang/id/feature.php b/resources/lang/id/feature.php index ac5d56a..162685b 100644 --- a/resources/lang/id/feature.php +++ b/resources/lang/id/feature.php @@ -20,7 +20,7 @@ return [ 'description' => 'Deskripsi', 'progress' => 'Progress', 'worker' => 'Pekerja', - 'price' => 'Nilai Fitur', + 'price' => 'Biaya Pengerjaan', 'type' => 'Jenis Fitur', 'tasks' => 'Daftar Task', 'price_total' => 'Nilai Fitur Total', diff --git a/resources/lang/id/project.php b/resources/lang/id/project.php index a34a33c..a0cdf12 100644 --- a/resources/lang/id/project.php +++ b/resources/lang/id/project.php @@ -23,10 +23,6 @@ return [ 'cash_in_total' => 'Total Pemasukan', 'cash_out_total' => 'Total Pengeluaran', 'customer' => 'Customer', - 'features' => 'Daftar Fitur', - 'features_export_html' => 'Export HTML', - 'features_export_excel' => 'Export Excel', - 'features_export_progress_excel' => 'Export Progress', 'subscriptions' => 'Langganan', 'worker' => 'Pekerja', 'status' => 'Status Project', @@ -38,5 +34,11 @@ return [ 'back_to_index' => 'Kembali ke daftar Project', // Attribute - 'files' => 'List Dokumen', + 'files' => 'List Dokumen', + 'features' => 'Daftar Item Pekerjaan', + + // Actions + 'features_export_html' => 'Export HTML', + 'features_export_excel' => 'Export Excel', + 'features_export_progress_excel' => 'Export Progress', ]; \ No newline at end of file diff --git a/resources/views/features/show.blade.php b/resources/views/features/show.blade.php index f4d7987..a94c401 100755 --- a/resources/views/features/show.blade.php +++ b/resources/views/features/show.blade.php @@ -7,6 +7,7 @@
| {{ trans('app.description') }} | |
|---|---|
| {{ trans('subscription.project') }} | ++ {{ link_to_route('projects.subscriptions', $subscription->project->name, [$subscription->project_id], ['target' => '_blank']) }} + | +
| {{ trans('subscription.remark') }} | {!! nl2br($subscription->remark) !!} |