From d21f6ba14c8e15a5d0d44f82bea35c9e89eabbb9 Mon Sep 17 00:00:00 2001 From: George Halkiadakis Date: Wed, 31 May 2023 03:39:24 +0300 Subject: manage petitions; in progress --- public/app/controllers/Office.php | 32 ++++++++++++++++++++++---------- 1 file changed, 22 insertions(+), 10 deletions(-) (limited to 'public/app/controllers/Office.php') diff --git a/public/app/controllers/Office.php b/public/app/controllers/Office.php index a876f6c..83135de 100644 --- a/public/app/controllers/Office.php +++ b/public/app/controllers/Office.php @@ -112,7 +112,6 @@ class Office { - ## ------------------------------------------------------------------------- ## PETITION FORMS ## secretarial support / serve forms for teachers' requests and applications ## ------------------------------------------------------------------------- @@ -265,11 +264,8 @@ class Office { - ## ------------------------------------------------------------------------- - ## - ## PETITION SUBMITS + ## PETITION SUBMIT ## handle submits of forms - ## ## ------------------------------------------------------------------------- @@ -309,11 +305,30 @@ class Office { + + ## LIST PETITIONS ## ------------------------------------------------------------------------- - ## + + + public static function user_petitions() + { + $manager = new App_manager(); // use APP Manager + // to get the requester's user_id + + $list = Content_model::user_petitions( + $manager->getUserToken()->getUser()->getID() // user-id + ); + + Render::json([ + 'success' => true, + 'data' => $list + ]); + } + + + ## TICKET METHODS (create, remove) ## tickets eliminate CSRF attacks - ## ## ------------------------------------------------------------------------- /** create_ticket @@ -369,10 +384,7 @@ class Office { - ## ------------------------------------------------------------------------- - ## ## ADMIN METHODS (insert, updated etc.) - ## ## ------------------------------------------------------------------------- -- cgit v1.2.3