356 Commits

Author SHA1 Message Date
Erik Thuning
df796f6564 Consistency changes to handle dropped users being present in the system
Printing the users' names as unknown in various places, and excluding
purged users from autocomplete suggestions
2025-09-25 15:04:53 +02:00
Erik Thuning
d981f6d190 Updating the algorithm for dropping users
Users who have taken actions in the system are now never dropped
automcatically. For the moment the actual dropping logic is commented out
so consequences for production can be checked beforehand
2025-09-25 14:45:05 +02:00
Erik Thuning
dbe4d459ad Started storing which user extended a loan 2025-09-23 16:59:33 +02:00
Erik Thuning
57cb0b0076 Implemented automatic removal of old users' PII.
This entailed adding a new routine in include/Cron.php that checks for old
users and purges their username and notes.

As part of this some other changes were necessary:
 - Introduced a creation time for users, so it's possible to distinguish
   between an old user with no loans and a new user with no loans.
 - The user.name field in the database now allows null values.
2025-09-23 16:46:32 +02:00
Erik Thuning
efe9718d8c Ldap object must be instantiated before call to user_init() 2025-09-08 11:22:36 +02:00
Erik Thuning
88862b25bc Removed dead code 2025-03-18 14:40:08 +01:00
Erik Thuning
c8e3ff0212 Reworked loan display to accommodate loan notes
Loans are no longer displayed as a unified table, but instead each loan
gets a "card" that contains the relevant data for the loan.

This has had a fairly major html/css re-work as a side effect. Most views are
now structured with two div-based columns so as to avoid the large blank areas
that pure grid can lead to when elements are very different in height.
2025-03-18 13:39:48 +01:00
Erik Thuning
afb3020a34 Added support for notes on events.
As of yet the notes get saved but never displayed anywhere.
2025-03-14 15:26:07 +01:00
Erik Thuning
63ccad38c8 Implemented tracking of who initiated an event. 2025-03-14 14:12:28 +01:00
Erik Thuning
ee082de50a Added simple database evolutions to ease future database changes 2025-03-14 13:09:45 +01:00
Erik Thuning
e640c24515 FIX: Initiating a loan from a product no longer requires the user to already exist.
Loans created on the checkout page and the product page used different
functions to look up users, causing inconsistent behaviour. Now both use the
"advanced" user lookup that will initialize users that don't currently exist
in the system.
2025-03-13 14:49:34 +01:00
Erik Thuning
e953f6c7a5 Made the loan length preset buttons configurable in config.php
Supported length keywords are day, week, month and year. The plural forms
are also valid. There may be minor differences in the semantics of
the time string between the preset list and the default length setting,
due to the default length being computed by php's Date object,
while the preset list is computed in javascript on the client side.
2025-03-13 14:36:37 +01:00
Erik Thuning
16f48cd28d Made the deafult loan length configurable in config.php 2025-03-13 11:27:43 +01:00
Erik Thuning
d4cf2498fe FIX: bad method name 2024-11-14 15:49:49 +01:00
Erik Thuning
62b8c853f5 Products now get sorted in alphabetical name order in most (all?) views 2024-11-14 15:44:04 +01:00
Erik Thuning
9db001a635 Fixed a typo 2024-03-11 10:03:53 +01:00
Erik Thuning
8cf081a9d1 Underscores in info field names are now changed to spaces when rendered.
Not an ideal solution since underscores now can't be used in field names,
but since it's PHP's POST handling getting in the way it'll have to do.
2024-03-08 16:40:55 +01:00
Erik Thuning
45f80a0855 Moved entitlement handling into the application.
Any user who can log in via SSO but doesn't have one of the required
entitlements will only ever see a listing of their own loans.
2024-02-29 15:44:19 +01:00
Erik Thuning
22608f1aa7 Added a page intended for users to view their own loans.
Also added serial numbers to loan listings for users.
2024-02-29 14:48:37 +01:00
Erik Thuning
c51bd1a60a Renamed history_table and related fragments to loan_table 2024-02-28 11:32:53 +01:00
Erik Thuning
ff079abb9c Found more strings to translate 2024-02-28 11:08:04 +01:00
Erik Thuning
d770138159 Fixed a typo 2024-02-28 10:54:46 +01:00
Erik Thuning
bf696127a9 Reworked email lookup logic on CheckoutPage,
so a user will be automatically created if their email address exists in sukat but doesn't have a corresponding boka user yet.
2024-02-27 15:49:52 +01:00
Erik Thuning
b2ff35a6d9 Found even more untranslated strings! 2024-02-27 15:19:30 +01:00
Erik Thuning
c6a7af0639 Cleaned up trailing whitespace 2024-02-27 13:59:59 +01:00
Erik Thuning
deb47f94d3 Eliminated a warning due to attempting to index into null 2024-02-27 13:49:42 +01:00
Erik Thuning
362ee182cb Found some untranslated strings 2024-02-27 13:35:35 +01:00
Erik Thuning
212c34d779 Discarded products are now displayed in a read-only format.
Also added a fragment for a public view of a product
2024-02-26 17:22:26 +01:00
Erik Thuning
a91923ad18 Renamed product_detail fragments to product_match
in order to disambiguate with actual detail views
2024-02-26 16:10:59 +01:00
Erik Thuning
07128568ca Renamed the fragment product_form to product_details
in preparation for readonly public views
2024-02-26 15:14:41 +01:00
Erik Thuning
437ec951bd Past inventories used to list all current products,
not just the ones that existed at the time of inventory. Fixed.
2024-02-26 13:10:50 +01:00
Erik Thuning
746ad28545 Implemented internationalization.
Let's see how many strings have been missed.
2024-02-26 13:10:13 +01:00
Erik Thuning
5c199783c2 Added error handling for missing attributes in ldap lookups 2024-02-26 12:39:11 +01:00
Erik Thuning
60982069f6 Apparently final private is pointless, who knew 2024-02-21 16:31:51 +01:00
Erik Thuning
048cfb3ee2 match is a keyword in php8, so renamed the match() function accordingly 2024-02-21 11:37:35 +01:00
Erik Thuning
7cb0b1ea57 Updated the Cron.php email logic to use configurable fragments instead of hardcoded text 2024-02-14 10:48:01 +01:00
Erik Thuning
0ae6b11c21 Indentation fix 2024-02-09 16:18:23 +01:00
Erik Thuning
af39340b4b Updated the scrapping emails to include a lot more detail. 2024-02-09 16:17:59 +01:00
Erik Thuning
2f6cc432b1 Missed using the configured subject prefix in a spot 2024-02-08 16:36:35 +01:00
Erik Thuning
4f8bc9486d Fixed the inventory registry field not trimming whitespace 2024-02-08 15:38:54 +01:00
Erik Thuning
1f33f73938 Implemented notification emails when discarding products. 2024-02-08 15:34:04 +01:00
Erik Thuning
019725dade Missed replacing a placeholder in the product_form fragment 2024-02-08 13:39:09 +01:00
root
d3e6ee7ab2 Fixed too many fields showing up when creating a new product 2023-03-08 10:05:44 +01:00
Erik Thuning
a7d961c4d3 If a product was checked out and immediately returned, an empty email receipt was being sent. Fixed. 2023-01-13 16:14:41 +01:00
Erik Thuning
b10bf1eed8 Added ability to check out a product from the product page directly 2023-01-11 11:11:42 +01:00
Erik Thuning
fa46874ae3 Mail notifications get pushed forward in time when a new loan is created if there is a pending notification.
This way the user can add multiple loans over time without the notification getting sent prematurely.
2023-01-11 10:43:57 +01:00
Erik Thuning
9307604aa0 Implemented receipts for loan extensions 2022-07-27 13:53:18 +02:00
Erik Thuning
1b8c2e1e18 Corrected a database field name 2022-07-27 13:52:54 +02:00
Erik Thuning
ae8b73cb88 Trim whitespace from serials when checking out and returning products 2022-07-27 13:15:06 +02:00
Erik Thuning
4e9e5b93af Added a function to get the latest loan extension.
Broke receipt queueing into a function.
Changed $this->id to $this->get_id() for the sake of consistency.
2022-07-27 11:06:49 +02:00