-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
wijaya
committed
Apr 12, 2017
1 parent
a012a47
commit 2c62bda
Showing
23 changed files
with
1,594 additions
and
52 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
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
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,45 @@ | ||
<?php | ||
/** | ||
* Created by PhpStorm. | ||
* User: wijaya | ||
* Date: 12/04/2017 | ||
* Time: 13.46 | ||
*/ | ||
|
||
namespace ryan\controllers; | ||
|
||
|
||
use Slim\Http\Request; | ||
use Slim\Http\Response; | ||
|
||
class dokumenTender extends \ryan\main { | ||
protected $container; | ||
protected $penyelenggaraModels; | ||
protected $tenderModels; | ||
protected $userModels; | ||
protected $notifikasiModels; | ||
|
||
public function __construct(Container $container) { | ||
parent::__construct($container); | ||
$this->container = $container; | ||
$this->userModels = new \ryan\models\users($container); | ||
$this->penyelenggaraModels = new \ryan\models\penyelenggara($container); | ||
$this->tenderModels = new \ryan\models\tender($container); | ||
$this->notifikasiModels = new \ryan\models\notifikasi($container); | ||
} | ||
|
||
public function daftarBeritaTender(Request $req, Response $res, $args){ | ||
if ($req->isGet ()) { | ||
$this->view->registerFunction ('getNamaPenyelenggara', function ($id_penyelenggara) { | ||
$penyelenggara = $this->penyelenggaraModels->getPenyelenggara ($id_penyelenggara); | ||
|
||
return $penyelenggara[ 'nama_penyelenggara' ]; | ||
}); | ||
$beritaTender = $this->tenderModels->getBeritaTender (); | ||
$req = $req->withAttribute ('beritaTender', $beritaTender); | ||
|
||
return $this->view->render ("dokumen/daftar-berita", $req->getAttributes ()); | ||
} | ||
} | ||
|
||
} |
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,20 @@ | ||
<?php | ||
/** | ||
* Created by PhpStorm. | ||
* User: wijaya | ||
* Date: 12/04/2017 | ||
* Time: 13.46 | ||
*/ | ||
|
||
namespace ryan\models; | ||
|
||
|
||
class dokumenTender extends \ryan\main { | ||
|
||
protected $container; | ||
|
||
public function __construct($container) { | ||
parent::__construct($container); | ||
$this->container = $container; | ||
} | ||
} |
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 |
---|---|---|
@@ -1,39 +1,102 @@ | ||
<?php | ||
/** | ||
* Copyright (c) 2017. | ||
*/ | ||
|
||
// Group Login -> untuk authentifikasi | ||
$app->group('/auth', function () { | ||
|
||
// Halaman Login | ||
$this->get('-login', \ryan\controllers\login::class . ':loginPage')->setName('loginPage'); | ||
|
||
// Proses Login | ||
$this->post('-dologin', \ryan\controllers\login::class . ':doLogin')->setName('doLogin'); | ||
|
||
// Proses Logout | ||
$this->get('-logout', \ryan\controllers\login::class . ':doLogout')->setName('doLogout'); | ||
|
||
}); | ||
|
||
// Group Root | ||
$app->group('', function () { | ||
|
||
// Halaman Dashboard | ||
$this->get('/dashboard', \ryan\controllers\dashboard::class . ':dashboardPage')->setName('DashboardPage'); | ||
|
||
// Group Menu Berita Tender | ||
$this->group('/berita-tender', function () { | ||
|
||
// Halaman Daftar Semua Berita Tender | ||
$this->any('', \ryan\controllers\beritaTender::class . ':daftarBeritaTender')->setName('daftarBeritaTender'); | ||
|
||
// Halaman Untuk Menambah Berita Tender | ||
$this->any('/tambah', \ryan\controllers\beritaTender::class . ':tambahBeritaTender')->setName('tambahBeritaTender'); | ||
|
||
// Halaman untuk menampilkan detail berita tender | ||
$this->any('/detail/{id_tender}', \ryan\controllers\beritaTender::class . ':detailBeritaTender')->setName('detailBeritaTender'); | ||
|
||
$app->group ('/auth', function () { | ||
$this->get ('-login', \ryan\controllers\login::class . ':loginPage')->setName ('loginPage'); | ||
$this->post ('-dologin', \ryan\controllers\login::class . ':doLogin')->setName ('doLogin'); | ||
$this->get ('-logout', \ryan\controllers\login::class . ':doLogout')->setName ('doLogout'); | ||
}); | ||
|
||
$app->group ('', function () { | ||
$this->get ('/dashboard', \ryan\controllers\dashboard::class . ':dashboardPage')->setName ('DashboardPage'); | ||
$this->group('/berita-tender', function(){ | ||
$this->map(['GET', 'POST'], '', \ryan\controllers\beritaTender::class . ':daftarBeritaTender')->setName ('daftarBeritaTender'); | ||
$this->map(['GET', 'POST'], '/tambah', \ryan\controllers\beritaTender::class . ':tambahBeritaTender')->setName ('tambahBeritaTender'); | ||
$this->map(['GET', 'POST'], '/detail/{id_tender}', \ryan\controllers\beritaTender::class . ':detailBeritaTender')->setName ('detailBeritaTender'); | ||
//group menu RKS dan Berita Acara | ||
$this->group('/acara-rks', function () { | ||
|
||
// group rks | ||
$this->group('/rks', function () { | ||
|
||
// halaman daftar berita yang dapat di input rks | ||
$this->any('', \ryan\controllers\acaraRKS::class . ':beritaTenderRKS')->setName('daftarBeritaTenderRKS'); | ||
|
||
// halaman detail berita dan upload rks | ||
$this->any('/detail/{id_tender}', \ryan\controllers\acaraRKS::class . ':detailBeritaTenderRKS')->setName('detailBeritaTenderRKS'); | ||
|
||
}); | ||
|
||
$this->group('/approval', function(){ | ||
$this->group('/tender', function(){ | ||
$this->map(['GET', 'POST'], '/berita', \ryan\controllers\approval::class . ':beritaTender')->setName ('daftarApprovalBeritaTender'); | ||
$this->map(['GET', 'POST'], '/detail/{id_tender}[/{status}]', \ryan\controllers\approval::class . ':approvalBeritaTender')->setName ('approvalBeritaTender'); | ||
}); | ||
//group berita acara | ||
$this->group('/acara', function () { | ||
|
||
//halaman daftar berita yang dapat di input berita acara | ||
$this->any('', \ryan\controllers\acaraRKS::class . ':beritaTenderAcara')->setName('daftarBeritaTenderAcara'); | ||
// halaman detail berita dan upload berita acara | ||
$this->any('/detail/{id_tender}', \ryan\controllers\acaraRKS::class . ':detailBeritaTenderAcara')->setName('detailBeritaTenderAcara'); | ||
|
||
}); | ||
|
||
$this->group('/acara-RKS', function(){ | ||
$this->group('/RKS', function(){ | ||
$this->map(['GET', 'POST'], '', \ryan\controllers\acaraRKS::class . ':beritaTenderRKS')->setName ('daftarBeritaTenderRKS'); | ||
$this->map(['GET', 'POST'], '/detail/{id_tender}', \ryan\controllers\acaraRKS::class . ':detailBeritaTenderRKS')->setName ('detailBeritaTenderRKS'); | ||
}); | ||
}); | ||
|
||
//group approval | ||
$this->group('/approval', function () { | ||
|
||
$this->group('/tender', function () { | ||
|
||
$this->any('/berita', \ryan\controllers\approval::class . ':beritaTender')->setName('daftarApprovalBeritaTender'); | ||
|
||
$this->any('/detail/{id_tender}[/{status}]', \ryan\controllers\approval::class . ':approvalBeritaTender')->setName('approvalBeritaTender'); | ||
|
||
}); | ||
|
||
$this->group('/acara-rks', function () { | ||
|
||
$this->any('/berita', \ryan\controllers\approval::class . ':beritaTenderRKS')->setName('daftarApprovalRKSTender'); | ||
|
||
$this->any('/detail/{id_tender}[/{status}]', \ryan\controllers\approval::class . ':approvalBeritaTenderRKS')->setName('approvalRKSTender'); | ||
|
||
}); | ||
})->add( new \ryan\controllers\login($container)); | ||
|
||
$app->group('/api', function(){ | ||
$this->post ('/tambah-penyelenggara', \ryan\controllers\api::class . ':addPenyelenggara')->setName ('apiAddPenyelenggara'); | ||
$this->get ('/penyelenggara[/{id}]', \ryan\controllers\api::class . ':getPenyelenggara')->setName ('apiGetPenyelenggara'); | ||
$this->get ('/dokumen-master[/{id}]', \ryan\controllers\api::class . ':getDokumenMaster')->setName ('apiGetDokumenMaster'); | ||
$this->get ('/syarat-dokumen-tender[/{id}]', \ryan\controllers\api::class . ':getDokumenList')->setName ('apiGetDokumenTender'); | ||
$this->get ('/detail-berita-tender[/{id}]', \ryan\controllers\api::class . ':getDetailTender')->setName ('apiGetDetailBeritaTender'); | ||
|
||
}); | ||
|
||
})->add(new \ryan\controllers\login($container)); | ||
|
||
$app->group('/api', function () { | ||
|
||
$this->post('/tambah-penyelenggara', \ryan\controllers\api::class . ':addPenyelenggara')->setName('apiAddPenyelenggara'); | ||
|
||
$this->get('/penyelenggara[/{id}]', \ryan\controllers\api::class . ':getPenyelenggara')->setName('apiGetPenyelenggara'); | ||
|
||
$this->get('/dokumen-master[/{id}]', \ryan\controllers\api::class . ':getDokumenMaster')->setName('apiGetDokumenMaster'); | ||
|
||
$this->get('/syarat-dokumen-tender[/{id}]', \ryan\controllers\api::class . ':getDokumenList')->setName('apiGetDokumenTender'); | ||
|
||
$this->get('/detail-berita-tender[/{id}]', \ryan\controllers\api::class . ':getDetailTender')->setName('apiGetDetailBeritaTender'); | ||
|
||
}); | ||
|
Oops, something went wrong.