From 68808a388a61c7a778494739fe0150651a09ea66 Mon Sep 17 00:00:00 2001
From: Syndamia
Date: Sat, 3 Apr 2021 09:58:18 +0300
Subject: Implemented a simple login page for (admin) dashboard and skeleton of
dashboard controller and view
---
src/views/dashboard.php | 1 +
1 file changed, 1 insertion(+)
create mode 100644 src/views/dashboard.php
(limited to 'src/views/dashboard.php')
diff --git a/src/views/dashboard.php b/src/views/dashboard.php
new file mode 100644
index 0000000..86c393a
--- /dev/null
+++ b/src/views/dashboard.php
@@ -0,0 +1 @@
+Dashboard works!
--
cgit v1.3.1-26-gb76a
From 1856de8c22af1a762961547f042891d5b6f9455c Mon Sep 17 00:00:00 2001
From: Syndamia
Date: Sat, 3 Apr 2021 10:36:27 +0300
Subject: Added skeleton of edit offer and implemented edit and delete buttons
in dashboard offers
---
src/controllers/DashboardController.php | 14 ++++++++++++++
src/controllers/DashboardLoginController.php | 8 ++++++--
src/controllers/EditOfferController.php | 5 +++++
src/views/dashboard.php | 17 ++++++++++++++++-
src/views/edit-offer.php | 1 +
5 files changed, 42 insertions(+), 3 deletions(-)
create mode 100644 src/controllers/EditOfferController.php
create mode 100644 src/views/edit-offer.php
(limited to 'src/views/dashboard.php')
diff --git a/src/controllers/DashboardController.php b/src/controllers/DashboardController.php
index 84beb14..7c01efa 100644
--- a/src/controllers/DashboardController.php
+++ b/src/controllers/DashboardController.php
@@ -1,8 +1,22 @@
Dashboard works!
+id} {$job->title}
+
+
+
";
+ }
+?>
diff --git a/src/views/edit-offer.php b/src/views/edit-offer.php
new file mode 100644
index 0000000..957fc3d
--- /dev/null
+++ b/src/views/edit-offer.php
@@ -0,0 +1 @@
+Works!
--
cgit v1.3.1-26-gb76a
From fcab2fc159a64c0c5dc9f6181a7bbca2f331acf6 Mon Sep 17 00:00:00 2001
From: Syndamia
Date: Sat, 3 Apr 2021 11:04:23 +0300
Subject: Implemented get, put and delete requests for edit offer controller;
Implemented edit-offer view
---
src/controllers/EditOfferController.php | 25 +++++++++++++++++++++++++
src/views/dashboard.php | 2 +-
src/views/edit-offer.php | 25 ++++++++++++++++++++++++-
3 files changed, 50 insertions(+), 2 deletions(-)
(limited to 'src/views/dashboard.php')
diff --git a/src/controllers/EditOfferController.php b/src/controllers/EditOfferController.php
index 950b6dc..ae49c5b 100644
--- a/src/controllers/EditOfferController.php
+++ b/src/controllers/EditOfferController.php
@@ -1,5 +1,30 @@
id = $_POST['id'];
+ JobOffer::updateFromDB($newJobOffer);
+
+ DashboardController::get();
+ }
+
+ public static function delete() {
+ JobOffer::deleteFromDB($_POST['jobId']);
+
+ DashboardController::get();
+ }
}
diff --git a/src/views/dashboard.php b/src/views/dashboard.php
index b1b648c..2312419 100644
--- a/src/views/dashboard.php
+++ b/src/views/dashboard.php
@@ -2,7 +2,7 @@
foreach($jobs as $job) {
echo "{$job->id} {$job->title}
diff --git a/src/views/edit-offer.php b/src/views/edit-offer.php
index 957fc3d..b9fb464 100644
--- a/src/views/edit-offer.php
+++ b/src/views/edit-offer.php
@@ -1 +1,24 @@
-Works!
+
--
cgit v1.3.1-26-gb76a
From 1180687f951cbb0ebf1b2fd9e22df5b2a20fea9b Mon Sep 17 00:00:00 2001
From: Syndamia
Date: Sat, 3 Apr 2021 11:34:24 +0300
Subject: Made job offers show all info
---
src/controllers/DashboardController.php | 6 ++++++
src/controllers/LandingController.php | 6 ++++++
src/views/dashboard.php | 2 +-
src/views/landing.php | 2 +-
4 files changed, 14 insertions(+), 2 deletions(-)
(limited to 'src/views/dashboard.php')
diff --git a/src/controllers/DashboardController.php b/src/controllers/DashboardController.php
index 5bd26d4..548f60b 100644
--- a/src/controllers/DashboardController.php
+++ b/src/controllers/DashboardController.php
@@ -1,11 +1,17 @@
id] = $company->name;
+ }
include "views/dashboard.php";
}
diff --git a/src/controllers/LandingController.php b/src/controllers/LandingController.php
index aa28505..ffa8644 100644
--- a/src/controllers/LandingController.php
+++ b/src/controllers/LandingController.php
@@ -1,10 +1,16 @@
id] = $company->name;
+ }
include "views/landing.php";
}
}
diff --git a/src/views/dashboard.php b/src/views/dashboard.php
index 2312419..9060317 100644
--- a/src/views/dashboard.php
+++ b/src/views/dashboard.php
@@ -1,6 +1,6 @@
id} {$job->title}
+ echo "{$job->id} {$job->title} {$job->description} " . self::$companies[$job->companyId] . " {$job->salary}