Browse Source

Add project fetures export html version 2 and update laravel 5.5.20

pull/1/head
Nafies Luthfi 8 years ago
parent
commit
705cf1302c
  1. 14
      app/Http/Controllers/Projects/ProjectsController.php
  2. 54
      app/Http/Requests/Features/CreateRequest.php
  3. 2
      app/helpers.php
  4. 2
      composer.json
  5. 138
      composer.lock
  6. 76
      resources/lang/id/app.php
  7. 85
      resources/lang/id/project.php
  8. 58
      resources/views/projects/features-export-html-2.blade.php
  9. 7
      resources/views/projects/features.blade.php

14
app/Http/Controllers/Projects/ProjectsController.php

@ -20,7 +20,7 @@ class ProjectsController extends Controller
public function index(Request $request)
{
$status = null;
$status = null;
$statusId = $request->get('status');
if ($statusId) {
$status = $this->repo->getStatusName($statusId);
@ -51,8 +51,8 @@ class ProjectsController extends Controller
public function edit($projectId)
{
$project = $this->repo->requireById($projectId);
$statuses = getProjectStatusesList();
$project = $this->repo->requireById($projectId);
$statuses = getProjectStatusesList();
$customers = $this->repo->getCustomersList();
return view('projects.edit', compact('project', 'statuses', 'customers'));
}
@ -84,7 +84,7 @@ class ProjectsController extends Controller
public function features($projectId)
{
$project = $this->repo->requireById($projectId);
$project = $this->repo->requireById($projectId);
$features = $this->repo->getProjectFeatures($projectId);
return view('projects.features', compact('project', 'features'));
}
@ -98,8 +98,8 @@ class ProjectsController extends Controller
public function featuresExport(Request $request, $projectId, $exportType = 'excel')
{
$featureType = $request->get('feature_type', 1);
$project = $this->repo->requireById($projectId);
$features = $this->repo->getProjectFeatures($projectId, $featureType);
$project = $this->repo->requireById($projectId);
$features = $this->repo->getProjectFeatures($projectId, $featureType);
if ($exportType == 'excel') {
return view('projects.features-export-excel', compact('project', 'features'));
@ -116,7 +116,7 @@ class ProjectsController extends Controller
});
})->download('xls');
} else {
return view('projects.features-export-html', compact('project', 'features'));
return view('projects.features-export-html-2', compact('project', 'features'));
}
}

54
app/Http/Requests/Features/CreateRequest.php

@ -5,33 +5,33 @@ namespace App\Http\Requests\Features;
use App\Entities\Projects\Project;
use App\Http\Requests\Request;
class CreateRequest extends Request {
class CreateRequest extends Request
{
/**
* Determine if the user is authorized to make this request.
*
* @return bool
*/
public function authorize()
{
$project = Project::findOrFail($this->segment(2));
return auth()->user()->can('manage_features', $project);
}
/**
* Determine if the user is authorized to make this request.
*
* @return bool
*/
public function authorize()
{
$project = Project::findOrFail($this->segment(2));
return auth()->user()->can('manage_features', $project);
}
/**
* Get the validation rules that apply to the request.
*
* @return array
*/
public function rules()
{
return [
'name' => 'required|max:60',
'price' => 'string',
'worker_id' => 'required|numeric',
'type_id' => 'required|numeric',
'description' => 'max:255',
];
}
/**
* Get the validation rules that apply to the request.
*
* @return array
*/
public function rules()
{
return [
'name' => 'required|max:60',
'price' => 'nullable|numeric',
'worker_id' => 'required|numeric',
'type_id' => 'required|numeric',
'description' => 'max:255',
];
}
}

2
app/helpers.php

@ -12,7 +12,7 @@ function formatNo($number)
function formatRp($number)
{
if ($number == 0) {return '-';}
if ($number == 0) {return 'Rp. 0';}
if ($number < 0) {
return '- Rp. ' . formatNo(abs($number));
}

2
composer.json

@ -29,7 +29,7 @@
"fzaninotto/faker": "~1.4",
"johnkary/phpunit-speedtrap": "dev-master",
"laravel/browser-kit-testing": "^2.0",
"luthfi/simple-crud-generator": "^0.1.2",
"luthfi/simple-crud-generator": "^0.1.4",
"mockery/mockery": "0.9.*",
"phpunit/phpunit": "~6.0"
},

138
composer.lock

@ -4,7 +4,7 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file",
"This file is @generated automatically"
],
"content-hash": "d7f0b843dffbe069e2c3e5877590b926",
"content-hash": "d928c9a4baae735117c0522c493bbc12",
"packages": [
{
"name": "backup-manager/backup-manager",
@ -753,16 +753,16 @@
},
{
"name": "laravel/framework",
"version": "v5.5.14",
"version": "v5.5.20",
"source": {
"type": "git",
"url": "https://github.com/laravel/framework.git",
"reference": "26c700eb79e5bb55b59df2c495c9c71f16f43302"
"reference": "ce0019d22a83b1b240330ea4115ae27a4d75d79c"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/laravel/framework/zipball/26c700eb79e5bb55b59df2c495c9c71f16f43302",
"reference": "26c700eb79e5bb55b59df2c495c9c71f16f43302",
"url": "https://api.github.com/repos/laravel/framework/zipball/ce0019d22a83b1b240330ea4115ae27a4d75d79c",
"reference": "ce0019d22a83b1b240330ea4115ae27a4d75d79c",
"shasum": ""
},
"require": {
@ -803,7 +803,6 @@
"illuminate/database": "self.version",
"illuminate/encryption": "self.version",
"illuminate/events": "self.version",
"illuminate/exception": "self.version",
"illuminate/filesystem": "self.version",
"illuminate/hashing": "self.version",
"illuminate/http": "self.version",
@ -845,7 +844,7 @@
"nexmo/client": "Required to use the Nexmo transport (~1.0).",
"pda/pheanstalk": "Required to use the beanstalk queue driver (~3.0).",
"predis/predis": "Required to use the redis cache and queue drivers (~1.0).",
"pusher/pusher-php-server": "Required to use the Pusher broadcast driver (~2.0).",
"pusher/pusher-php-server": "Required to use the Pusher broadcast driver (~3.0).",
"symfony/css-selector": "Required to use some of the crawler integration testing tools (~3.3).",
"symfony/dom-crawler": "Required to use most of the crawler integration testing tools (~3.3).",
"symfony/psr-http-message-bridge": "Required to psr7 bridging features (~1.0)."
@ -881,7 +880,7 @@
"framework",
"laravel"
],
"time": "2017-10-03T17:41:03+00:00"
"time": "2017-11-07T14:24:50+00:00"
},
{
"name": "laravelcollective/html",
@ -1305,7 +1304,7 @@
},
{
"name": "mtdowling/cron-expression",
"version": "v1.2.0",
"version": "v1.2.1",
"source": {
"type": "git",
"url": "https://github.com/mtdowling/cron-expression.git",
@ -1402,16 +1401,16 @@
},
{
"name": "nikic/php-parser",
"version": "v3.1.1",
"version": "v3.1.2",
"source": {
"type": "git",
"url": "https://github.com/nikic/PHP-Parser.git",
"reference": "a1e8e1a30e1352f118feff1a8481066ddc2f234a"
"reference": "08131e7ff29de6bb9f12275c7d35df71f25f4d89"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/a1e8e1a30e1352f118feff1a8481066ddc2f234a",
"reference": "a1e8e1a30e1352f118feff1a8481066ddc2f234a",
"url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/08131e7ff29de6bb9f12275c7d35df71f25f4d89",
"reference": "08131e7ff29de6bb9f12275c7d35df71f25f4d89",
"shasum": ""
},
"require": {
@ -1449,7 +1448,7 @@
"parser",
"php"
],
"time": "2017-09-02T17:10:46+00:00"
"time": "2017-11-04T11:48:34+00:00"
},
{
"name": "paragonie/random_compat",
@ -2482,16 +2481,16 @@
},
{
"name": "symfony/polyfill-mbstring",
"version": "v1.5.0",
"version": "v1.6.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/polyfill-mbstring.git",
"reference": "7c8fae0ac1d216eb54349e6a8baa57d515fe8803"
"reference": "2ec8b39c38cb16674bbf3fea2b6ce5bf117e1296"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/7c8fae0ac1d216eb54349e6a8baa57d515fe8803",
"reference": "7c8fae0ac1d216eb54349e6a8baa57d515fe8803",
"url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/2ec8b39c38cb16674bbf3fea2b6ce5bf117e1296",
"reference": "2ec8b39c38cb16674bbf3fea2b6ce5bf117e1296",
"shasum": ""
},
"require": {
@ -2503,7 +2502,7 @@
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "1.5-dev"
"dev-master": "1.6-dev"
}
},
"autoload": {
@ -2537,20 +2536,20 @@
"portable",
"shim"
],
"time": "2017-06-14T15:44:48+00:00"
"time": "2017-10-11T12:05:26+00:00"
},
{
"name": "symfony/polyfill-php56",
"version": "v1.5.0",
"version": "v1.6.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/polyfill-php56.git",
"reference": "e85ebdef569b84e8709864e1a290c40f156b30ca"
"reference": "265fc96795492430762c29be291a371494ba3a5b"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/polyfill-php56/zipball/e85ebdef569b84e8709864e1a290c40f156b30ca",
"reference": "e85ebdef569b84e8709864e1a290c40f156b30ca",
"url": "https://api.github.com/repos/symfony/polyfill-php56/zipball/265fc96795492430762c29be291a371494ba3a5b",
"reference": "265fc96795492430762c29be291a371494ba3a5b",
"shasum": ""
},
"require": {
@ -2560,7 +2559,7 @@
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "1.5-dev"
"dev-master": "1.6-dev"
}
},
"autoload": {
@ -2593,20 +2592,20 @@
"portable",
"shim"
],
"time": "2017-06-14T15:44:48+00:00"
"time": "2017-10-11T12:05:26+00:00"
},
{
"name": "symfony/polyfill-util",
"version": "v1.5.0",
"version": "v1.6.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/polyfill-util.git",
"reference": "67925d1cf0b84bd234a83bebf26d4eb281744c6d"
"reference": "6e719200c8e540e0c0effeb31f96bdb344b94176"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/polyfill-util/zipball/67925d1cf0b84bd234a83bebf26d4eb281744c6d",
"reference": "67925d1cf0b84bd234a83bebf26d4eb281744c6d",
"url": "https://api.github.com/repos/symfony/polyfill-util/zipball/6e719200c8e540e0c0effeb31f96bdb344b94176",
"reference": "6e719200c8e540e0c0effeb31f96bdb344b94176",
"shasum": ""
},
"require": {
@ -2615,7 +2614,7 @@
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "1.5-dev"
"dev-master": "1.6-dev"
}
},
"autoload": {
@ -2645,7 +2644,7 @@
"polyfill",
"shim"
],
"time": "2017-07-05T15:09:33+00:00"
"time": "2017-10-11T12:05:26+00:00"
},
{
"name": "symfony/process",
@ -3302,16 +3301,16 @@
},
{
"name": "luthfi/simple-crud-generator",
"version": "0.1.2",
"version": "0.1.4",
"source": {
"type": "git",
"url": "https://github.com/nafiesl/SimpleCrudGenerator.git",
"reference": "bef1109473c7a4a3c3ea71de1b64f5e246c04074"
"reference": "68bce39cd9d39af6b08e3b1dec78492fd81ec505"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/nafiesl/SimpleCrudGenerator/zipball/bef1109473c7a4a3c3ea71de1b64f5e246c04074",
"reference": "bef1109473c7a4a3c3ea71de1b64f5e246c04074",
"url": "https://api.github.com/repos/nafiesl/SimpleCrudGenerator/zipball/68bce39cd9d39af6b08e3b1dec78492fd81ec505",
"reference": "68bce39cd9d39af6b08e3b1dec78492fd81ec505",
"shasum": ""
},
"require": {
@ -3357,10 +3356,10 @@
],
"description": "A simple CRUD generator for Laravel 5.5.",
"support": {
"source": "https://github.com/nafiesl/SimpleCrudGenerator/tree/0.1.2",
"source": "https://github.com/nafiesl/SimpleCrudGenerator/tree/master",
"issues": "https://github.com/nafiesl/SimpleCrudGenerator/issues"
},
"time": "2017-10-28T06:34:09+00:00"
"time": "2017-11-07T14:45:00+00:00"
},
{
"name": "maximebf/debugbar",
@ -3490,37 +3489,40 @@
},
{
"name": "myclabs/deep-copy",
"version": "1.6.1",
"version": "1.7.0",
"source": {
"type": "git",
"url": "https://github.com/myclabs/DeepCopy.git",
"reference": "8e6e04167378abf1ddb4d3522d8755c5fd90d102"
"reference": "3b8a3a99ba1f6a3952ac2747d989303cbd6b7a3e"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/8e6e04167378abf1ddb4d3522d8755c5fd90d102",
"reference": "8e6e04167378abf1ddb4d3522d8755c5fd90d102",
"url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/3b8a3a99ba1f6a3952ac2747d989303cbd6b7a3e",
"reference": "3b8a3a99ba1f6a3952ac2747d989303cbd6b7a3e",
"shasum": ""
},
"require": {
"php": ">=5.4.0"
"php": "^5.6 || ^7.0"
},
"require-dev": {
"doctrine/collections": "1.*",
"phpunit/phpunit": "~4.1"
"doctrine/collections": "^1.0",
"doctrine/common": "^2.6",
"phpunit/phpunit": "^4.1"
},
"type": "library",
"autoload": {
"psr-4": {
"DeepCopy\\": "src/DeepCopy/"
}
},
"files": [
"src/DeepCopy/deep_copy.php"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"description": "Create deep copies (clones) of your objects",
"homepage": "https://github.com/myclabs/DeepCopy",
"keywords": [
"clone",
"copy",
@ -3528,7 +3530,7 @@
"object",
"object graph"
],
"time": "2017-04-12T18:52:22+00:00"
"time": "2017-10-19T19:58:43+00:00"
},
{
"name": "phar-io/manifest",
@ -3843,16 +3845,16 @@
},
{
"name": "phpunit/php-code-coverage",
"version": "5.2.2",
"version": "5.2.3",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/php-code-coverage.git",
"reference": "8ed1902a57849e117b5651fc1a5c48110946c06b"
"reference": "8e1d2397d8adf59a3f12b2878a3aaa66d1ab189d"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/8ed1902a57849e117b5651fc1a5c48110946c06b",
"reference": "8ed1902a57849e117b5651fc1a5c48110946c06b",
"url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/8e1d2397d8adf59a3f12b2878a3aaa66d1ab189d",
"reference": "8e1d2397d8adf59a3f12b2878a3aaa66d1ab189d",
"shasum": ""
},
"require": {
@ -3861,7 +3863,7 @@
"php": "^7.0",
"phpunit/php-file-iterator": "^1.4.2",
"phpunit/php-text-template": "^1.2.1",
"phpunit/php-token-stream": "^1.4.11 || ^2.0",
"phpunit/php-token-stream": "^2.0",
"sebastian/code-unit-reverse-lookup": "^1.0.1",
"sebastian/environment": "^3.0",
"sebastian/version": "^2.0.1",
@ -3903,7 +3905,7 @@
"testing",
"xunit"
],
"time": "2017-08-03T12:40:43+00:00"
"time": "2017-11-03T13:47:33+00:00"
},
{
"name": "phpunit/php-file-iterator",
@ -4093,16 +4095,16 @@
},
{
"name": "phpunit/phpunit",
"version": "6.4.2",
"version": "6.4.4",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/phpunit.git",
"reference": "ae6e2e062ff55263c7b04374c190aca45872b26a"
"reference": "562f7dc75d46510a4ed5d16189ae57fbe45a9932"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/ae6e2e062ff55263c7b04374c190aca45872b26a",
"reference": "ae6e2e062ff55263c7b04374c190aca45872b26a",
"url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/562f7dc75d46510a4ed5d16189ae57fbe45a9932",
"reference": "562f7dc75d46510a4ed5d16189ae57fbe45a9932",
"shasum": ""
},
"require": {
@ -4173,7 +4175,7 @@
"testing",
"xunit"
],
"time": "2017-10-15T06:16:19+00:00"
"time": "2017-11-08T11:26:09+00:00"
},
{
"name": "phpunit/phpunit-mock-objects",
@ -4281,30 +4283,30 @@
},
{
"name": "sebastian/comparator",
"version": "2.0.2",
"version": "2.1.0",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/comparator.git",
"reference": "ae068fede81d06e7bb9bb46a367210a3d3e1fe6a"
"reference": "1174d9018191e93cb9d719edec01257fc05f8158"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/ae068fede81d06e7bb9bb46a367210a3d3e1fe6a",
"reference": "ae068fede81d06e7bb9bb46a367210a3d3e1fe6a",
"url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/1174d9018191e93cb9d719edec01257fc05f8158",
"reference": "1174d9018191e93cb9d719edec01257fc05f8158",
"shasum": ""
},
"require": {
"php": "^7.0",
"sebastian/diff": "^2.0",
"sebastian/exporter": "^3.0"
"sebastian/exporter": "^3.1"
},
"require-dev": {
"phpunit/phpunit": "^6.0"
"phpunit/phpunit": "^6.4"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "2.0.x-dev"
"dev-master": "2.1.x-dev"
}
},
"autoload": {
@ -4335,13 +4337,13 @@
}
],
"description": "Provides the functionality to compare PHP values for equality",
"homepage": "http://www.github.com/sebastianbergmann/comparator",
"homepage": "https://github.com/sebastianbergmann/comparator",
"keywords": [
"comparator",
"compare",
"equality"
],
"time": "2017-08-03T07:14:59+00:00"
"time": "2017-11-03T07:16:52+00:00"
},
{
"name": "sebastian/diff",

76
resources/lang/id/app.php

@ -2,49 +2,49 @@
return [
// Labels
'table_no' => '#',
'no' => 'Tidak',
'label' => 'Label',
'action' => 'Pilihan',
'welcome' => 'Selamat Datang',
'to' => 'Kepada',
'from' => 'Dari',
'active' => 'Aktif',
'in_active' => 'Non Aktif',
'table_no' => '#',
'no' => 'Tidak',
'label' => 'Label',
'action' => 'Pilihan',
'welcome' => 'Selamat Datang',
'to' => 'Kepada',
'from' => 'Dari',
'active' => 'Aktif',
'in_active' => 'Non Aktif',
'show_detail_title' => 'Lihat detail :type :name',
'status' => 'Status',
'total' => 'Total',
'count' => 'Jumlah',
'status' => 'Status',
'total' => 'Total',
'count' => 'Jumlah',
// Action
'add' => 'Tambah',
'submit' => 'Submit',
'update' => 'Simpan Perubahan',
'delete' => 'Hapus',
'back' => 'Kembali',
'cancel' => 'Batal',
'reset' => 'Reset',
'show' => 'Lihat Detail',
'edit' => 'Edit',
'print' => 'Cetak',
'search' => 'Cari',
'filter' => 'Filter',
'pick' => 'Pilih',
'close' => 'Tutup',
'add' => 'Tambah',
'submit' => 'Submit',
'update' => 'Simpan Perubahan',
'delete' => 'Hapus',
'back' => 'Kembali',
'cancel' => 'Batal',
'reset' => 'Reset',
'show' => 'Lihat Detail',
'edit' => 'Edit',
'print' => 'Cetak',
'search' => 'Cari',
'filter' => 'Filter',
'pick' => 'Pilih',
'close' => 'Tutup',
'delete_confirm_button' => 'Ya, silakan hapus!',
'delete_confirm' => 'Anda yakin ingin menghapus?',
'change_photo' => 'Ganti Foto',
'done' => 'Selesai',
'delete_confirm' => 'Anda yakin ingin menghapus?',
'change_photo' => 'Ganti Foto',
'done' => 'Selesai',
// Attributes
'name' => 'Nama',
'notes' => 'Catatan',
'name' => 'Nama',
'notes' => 'Catatan',
'description' => 'Deskripsi',
'code' => 'Kode',
'date' => 'Tanggal',
'time' => 'Jam',
'created_at' => 'Dibuat pada',
'created_by' => 'Oleh',
'start_date' => 'Tanggal Mulai',
'end_date' => 'Tanggal Selesai',
'code' => 'Kode',
'date' => 'Tanggal',
'time' => 'Jam',
'created_at' => 'Dibuat pada',
'created_by' => 'Oleh',
'start_date' => 'Tanggal Mulai',
'end_date' => 'Tanggal Selesai',
];

85
resources/lang/id/project.php

@ -2,28 +2,28 @@
return [
// Labels
'project' => 'Project',
'projects' => 'Daftar Project',
'work_duration' => 'Durasi',
'cash_in_total' => 'Total Pemasukan',
'cash_out_total' => 'Total Pengeluaran',
'search' => 'Cari Project',
'found' => 'Project ditemukan',
'not_found' => 'Project tidak ditemukan',
'empty' => 'Belum ada Project',
'back_to_index' => 'Kembali ke daftar Project',
'project' => 'Project',
'projects' => 'Daftar Project',
'work_duration' => 'Durasi',
'cash_in_total' => 'Total Pemasukan',
'cash_out_total' => 'Total Pengeluaran',
'search' => 'Cari Project',
'found' => 'Project ditemukan',
'not_found' => 'Project tidak ditemukan',
'empty' => 'Belum ada Project',
'back_to_index' => 'Kembali ke daftar Project',
// Actions
'create' => 'Input Project Baru',
'created' => 'Input Project baru telah berhasil.',
'show' => 'Detail Project',
'edit' => 'Edit Project',
'update' => 'Update Project',
'updated' => 'Update data Project telah berhasil.',
'delete' => 'Hapus Project',
'deleted' => 'Hapus data Project telah berhasil.',
'undeleted' => 'Data Project gagal dihapus.',
'show_features' => 'Lihat Fitur',
'create' => 'Input Project Baru',
'created' => 'Input Project baru telah berhasil.',
'show' => 'Detail Project',
'edit' => 'Edit Project',
'update' => 'Update Project',
'updated' => 'Update data Project telah berhasil.',
'delete' => 'Hapus Project',
'deleted' => 'Hapus data Project telah berhasil.',
'undeleted' => 'Data Project gagal dihapus.',
'show_features' => 'Lihat Fitur',
'features_export_html' => 'Export HTML',
'features_export_excel' => 'Export Excel',
@ -31,30 +31,31 @@ return [
'sort_features' => 'Urutkan Prioritas Fitur',
// Attributes
'name' => 'Nama Project',
'description' => 'Deskripsi Project',
'start_date' => 'Tanggal Mulai',
'end_date' => 'Tanggal Selesai',
'proposal_date' => 'Tanggal Proposal',
'project_value' => 'Nilai Project',
'proposal_value' => 'Nilai Proposal',
'name' => 'Nama Project',
'description' => 'Deskripsi Project',
'start_date' => 'Tanggal Mulai',
'end_date' => 'Tanggal Selesai',
'proposal_date' => 'Tanggal Proposal',
'project_value' => 'Nilai Project',
'proposal_value' => 'Nilai Proposal',
// Relations
'files' => 'List Dokumen',
'features' => 'Daftar Item Pekerjaan',
'cost_proposal' => 'Pengajuan Biaya',
'invoices' => 'List Invoice',
'customer' => 'Customer',
'worker' => 'Pekerja',
'subscriptions' => 'Langganan',
'status' => 'Status Project',
'payments' => 'Pembayaran',
'files' => 'List Dokumen',
'features' => 'Daftar Item Pekerjaan',
'no_features' => 'Belum ada Item Pekerjaan',
'cost_proposal' => 'Pengajuan Biaya',
'invoices' => 'List Invoice',
'customer' => 'Customer',
'worker' => 'Pekerja',
'subscriptions' => 'Langganan',
'status' => 'Status Project',
'payments' => 'Pembayaran',
// Statuses
'planned' => 'Planned',
'progress' => 'Progress',
'done' => 'Done',
'closed' => 'Closed',
'canceled' => 'Canceled',
'on_hold' => 'On Hold',
'planned' => 'Planned',
'progress' => 'Progress',
'done' => 'Done',
'closed' => 'Closed',
'canceled' => 'Canceled',
'on_hold' => 'On Hold',
];

58
resources/views/projects/features-export-html-2.blade.php

@ -0,0 +1,58 @@
<?php
// $filename = str_slug(trans('project.features') . '-' . $project->name) . '.xls';
// header("Content-Disposition: attachment; filename=\"$filename\"");
// header("Content-Type: application/vnd.ms-excel");
?>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
{{-- <meta http-equiv="X-UA-Compatible" content="IE=edge"> --}}
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>{{ trans('project.features') }} {{ $project->name }}</title>
{!! Html::style('assets/css/app.s.css') !!}
</head>
<body style="font-family:'Liberation Serif';font-size: 16px;">
<div class="container">
<h1 class="page-header text-center">{{ trans('project.features') }} {{ $project->name }}</h1>
@foreach($features as $key => $feature)
<h2 class="feature-title">{{ ++$key }}. {{ $feature->name }}</h2>
<p style="padding-left: 30px">{!! nl2br($feature->description) !!}</p>
@if ($feature->tasks->count())
<div style="padding-left: 30px">
<h3>Sub Fitur</h3>
@foreach($feature->tasks as $taskKey => $task)
<h4>{{ ++$taskKey }}) {{ $task->name }}</h4>
<p style="padding-left: 21px">{!! nl2br($task->description) !!}</p>
@endforeach
</div>
@endif
@endforeach
<h1 class="page-header text-center">{{ trans('project.cost_proposal') }}</h1>
<table width="100%" class="table table-condensed table-bordered">
<tbody>
<tr>
<th class="text-center">{{ trans('app.table_no') }}</th>
<th>{{ trans('feature.name') }}</th>
<th class="text-center">{{ trans('feature.price') }}</th>
</tr>
@foreach($features as $key => $feature)
<tr>
<td class="text-center">{{ 1 + $key }}</td>
<td>{{ $feature->name }}</td>
<td class="text-right">{{ formatRp($feature->price) }}</td>
</tr>
@endforeach
</tbody>
<tfoot>
<tr>
<th class="text-right" colspan="2">Total</th>
<th class="text-right">{{ formatRp($features->sum('price')) }}</th>
</tr>
</tfoot>
</table>
</div>
</body>
</html>

7
resources/views/projects/features.blade.php

@ -15,6 +15,12 @@
@include('projects.partials.nav-tabs')
@if ($features->isEmpty())
<p>{{ trans('project.no_features') }},
{{ link_to_route('features.create', trans('feature.create'), [$project->id]) }}.
</p>
@else
@foreach($features->groupBy('type_id') as $key => $groupedFeatures)
<div id="project-features" class="panel panel-default table-responsive">
@ -97,6 +103,7 @@
</div>
@endforeach
@endif
@endsection
@if (request('action') == 'sort_features')

Loading…
Cancel
Save