Skip to content

Commit

Permalink
released
Browse files Browse the repository at this point in the history
  • Loading branch information
oetiker committed Jul 16, 2021
1 parent 1d7b0eb commit b5efacb
Show file tree
Hide file tree
Showing 14 changed files with 118 additions and 101 deletions.
5 changes: 5 additions & 0 deletions CHANGES
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
0.5.6 2021-07-16 10:07:32 +0200 Tobias Oetiker <[email protected]>

- in multibooking do NOT list partial bookings under problems but still only
book this with bestEffort

0.5.5 2021-07-15 18:24:10 +0200 Tobias Oetiker <[email protected]>

- more german
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
0.5.5
0.5.6

2 changes: 1 addition & 1 deletion cpanfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
requires 'CallBackery';
requires 'CallBackery', '>=0.38.11';
requires 'Mojo::SQLite', '>= 3.006';
requires 'Email::MIME';
requires 'Email::Sender';
Expand Down
12 changes: 12 additions & 0 deletions deploy-beta.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#!/bin/sh
set -e
V=$(cat VERSION)
echo $V $(date +"%Y-%m-%d %H:%M:%S %z") $(git config user.name) '<'$(git config user.email)'>' >> CHANGES.new
echo >> CHANGES.new
echo ' -' >> CHANGES.new
echo >> CHANGES.new
cat CHANGES >> CHANGES.new && mv CHANGES.new CHANGES
$EDITOR CHANGES
./bootstrap
make dist
cat kuickres-$V.tar.gz | ssh kuicksa@freddie 'tar zxf -;cd kuickres-'$V';./configure --prefix=$HOME/opt/kuickres-beta;make install;$HOME/start-beta.sh'
2 changes: 1 addition & 1 deletion deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@ cat CHANGES >> CHANGES.new && mv CHANGES.new CHANGES
$EDITOR CHANGES
./bootstrap
make dist
cat kuickres-$V.tar.gz | ssh kuicksa@freddie 'tar zxf -;cd kuickres-'$V';./configure --prefix=$HOME/opt/kuickres-beta;make install;$HOME/start-beta.sh'
cat kuickres-$V.tar.gz | ssh kuicksa@freddie 'tar zxf -;cd kuickres-'$V';./configure --prefix=$HOME/opt/kuickres;make install;$HOME/start.sh'
25 changes: 24 additions & 1 deletion lib/Kuickres.pm
Original file line number Diff line number Diff line change
Expand Up @@ -275,5 +275,28 @@ INSERT INTO usercat (usercat_name,usercat_rule_json)
VALUES
('Plain','{"futureBookingDays": 60,"maxEquipmentPointsPerBooking": 3,"maxBookingHoursPerDay": 4,"equipmentList":["test_a"]}');
ALTER TABLE cbuser ADD cbuser_usercat INTEGER NOT NULL default 1 REFERENCES usercat(usercat_id);
COMMIT;
PRAGMA foreign_keys=off;
BEGIN;
ALTER TABLE cbuser ADD cbuser_usercat INTEGER NOT NULL DEFAULT 1;
CREATE TABLE cbuser_new (
cbuser_id INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
cbuser_login TEXT UNIQUE,
cbuser_family TEXT,
cbuser_given TEXT,
cbuser_password TEXT NOT NULL,
cbuser_note TEXT,
cbuser_calendar_tag TEXT,
cbuser_pin INTEGER DEFAULT (substr(random() || '0000000',3,7)),
cbuser_usercat INTEGER NOT NULL default 1 REFERENCES usercat(usercat_id)
);
INSERT INTO cbuser_new SELECT * from cbuser;
DROP TABLE cbuser;
ALTER TABLE cbuser_new RENAME to cbuser;
COMMIT;
PRAGMA foreign_keys=on;
BEGIN;
8 changes: 4 additions & 4 deletions lib/Kuickres/Controller/LocationApi.pm
Original file line number Diff line number Diff line change
Expand Up @@ -86,14 +86,14 @@ SQL_END
sub get_signage {
my $c = shift->openapi->valid_input or return;
my $lid = $c->param('locationId');
my $res = $c->db->query(<<'SQL_END',time,time+2*24*3600,$lid)->hashes;
my $res = $c->db->query(<<'SQL_END',{ type=>SQL_INTEGER, value=>time},{type=>SQL_INTEGER, value=>time+2*24*3600},{type=>SQL_INTEGER,value => $lid})->hashes;
SELECT booking.*,cbuser_login,cbuser_family,cbuser_given,room.*,location.* FROM booking
JOIN cbuser ON booking_cbuser = cbuser_id
JOIN room ON booking_room = room_id
JOIN location ON room_location = location_id
WHERE booking_start_ts > CAST(? AS INTEGER)
AND booking_start_ts < CAST(? AS INTEGER)
AND room_location = CAST(? AS INTEGER)
WHERE booking_start_ts > ?
AND booking_start_ts < ?
AND room_location = ?
ORDER BY booking_start_ts
SQL_END
# warn dumper $res;
Expand Down
7 changes: 2 additions & 5 deletions lib/Kuickres/GuiPlugin/MultiBookingForm.pm
Original file line number Diff line number Diff line change
Expand Up @@ -309,6 +309,7 @@ has actionCfg => sub {
my $bad = "Die folgenden Reservationen konnten nicht erzeugt werden: <ul>";

for my $prob (@$problems) {
next unless $prob; #skip silent problems
$bad .= "<li>$prob->{key}<ul>"
. join("\n",map {"<li>Überlappend $_</li>"} @{$prob->{overlaps}})
. join("\n",map {"<li>$_</li>"} @{$prob->{issues}})
Expand Down Expand Up @@ -532,12 +533,8 @@ sub multiBook ($self,$recId,$room,$start,$end,$rule) {
push @success, "$id - $key"
. (@overlapEq ? " ".trm("(Ohne: %1!)",join(', ',@overlapEq)) : '');
if(@overlapEq) {
push @problem, {
key => $key,
overlaps => [],
issues => [(@overlapEq ? trm("Ohne: %1!",join(', ',@overlapEq)) : '')],
push @problem, ''; # a silent problem marker
};
}
}
else {
push @problem, {
Expand Down
30 changes: 13 additions & 17 deletions share/de.po
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: kuickres 0.0.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2021-07-15 18:25+0200\n"
"POT-Creation-Date: 2021-07-16 11:24+0200\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <[email protected]>\n"
Expand All @@ -22,12 +22,12 @@ msgid "%1 is required"
msgstr "%1 ist erforderlich"

#: lib/Kuickres/GuiPlugin/Booking.pm:315
#: lib/Kuickres/GuiPlugin/MultiBookingForm.pm:365
#: lib/Kuickres/GuiPlugin/MultiBookingForm.pm:366
#: lib/Kuickres/GuiPlugin/BookingForm.pm:455
msgid "%d.%m.%Y"
msgstr ""

#: lib/Kuickres/GuiPlugin/MultiBookingForm.pm:533
#: lib/Kuickres/GuiPlugin/MultiBookingForm.pm:534
msgid "(Ohne: %1!)"
msgstr ""

Expand All @@ -41,7 +41,7 @@ msgid ""
"passwords/quickguide\">Standford Password Policy</a>"
msgstr ""

#: /home/oetiker/checkouts/kuickres/thirdparty/lib/perl5/CallBackery/qooxdoo/../Controller/RpcService.pm:422
#: /home/oetiker/checkouts/kuickres/thirdparty/lib/perl5/CallBackery/qooxdoo/../Controller/RpcService.pm:423
#: /home/oetiker/checkouts/kuickres/thirdparty/lib/perl5/CallBackery/qooxdoo/../Controller/RpcService.pm:500
msgid "Access Denied"
msgstr ""
Expand Down Expand Up @@ -88,7 +88,7 @@ msgstr "Raum Hinzufügen"
msgid "Add User"
msgstr "Konto hinzufügen"

#: lib/Kuickres/GuiPlugin/MultiBookingForm.pm:389
#: lib/Kuickres/GuiPlugin/MultiBookingForm.pm:390
#: lib/Kuickres/GuiPlugin/UserCatForm.pm:167
msgid "Add UserCat"
msgstr "UserCategory hinzufügen"
Expand Down Expand Up @@ -180,7 +180,7 @@ msgstr "Neues Konto Erstellen"
msgid "Created"
msgstr "Erzeugt"

#: /home/oetiker/checkouts/kuickres/thirdparty/lib/perl5/CallBackery/qooxdoo/../Controller/RpcService.pm:442
#: /home/oetiker/checkouts/kuickres/thirdparty/lib/perl5/CallBackery/qooxdoo/../Controller/RpcService.pm:443
#: /home/oetiker/checkouts/kuickres/thirdparty/lib/perl5/CallBackery/qooxdoo/../Controller/RpcService.pm:517
msgid "Data Decoding Problem %1"
msgstr "Datendekodierungsproblem %1"
Expand Down Expand Up @@ -453,7 +453,7 @@ msgstr ""
msgid "Id"
msgstr ""

#: lib/Kuickres/GuiPlugin/MultiBookingForm.pm:510
#: lib/Kuickres/GuiPlugin/MultiBookingForm.pm:511
msgid "Internal error with eq removal"
msgstr ""

Expand Down Expand Up @@ -600,10 +600,6 @@ msgstr "Kein Benutzer gewählt"
msgid "Note"
msgstr "Bemerkung"

#: lib/Kuickres/GuiPlugin/MultiBookingForm.pm:538
msgid "Ohne: %1!"
msgstr ""

#: lib/Kuickres/GuiPlugin/Location.pm:59
msgid "Opening Hours"
msgstr "Öffnungszeiten"
Expand Down Expand Up @@ -659,7 +655,7 @@ msgstr "Die Passworte müssen übereinstimmen."
msgid "Phone number 07x xxx xxxx expected"
msgstr "Telefonnummer 07x xxx xxxx erwartet"

#: /home/oetiker/checkouts/kuickres/thirdparty/lib/perl5/CallBackery/qooxdoo/../Controller/RpcService.pm:427
#: /home/oetiker/checkouts/kuickres/thirdparty/lib/perl5/CallBackery/qooxdoo/../Controller/RpcService.pm:428
#: /home/oetiker/checkouts/kuickres/thirdparty/lib/perl5/CallBackery/qooxdoo/../Controller/RpcService.pm:507
msgid "Plugin Name missing"
msgstr "Plugin Name fehlt"
Expand Down Expand Up @@ -708,7 +704,7 @@ msgstr ""
#: lib/Kuickres/GuiPlugin/LocationForm.pm:146
#: lib/Kuickres/GuiPlugin/UserForm.pm:225
#: lib/Kuickres/GuiPlugin/EquipmentForm.pm:143
#: lib/Kuickres/GuiPlugin/MultiBookingForm.pm:388
#: lib/Kuickres/GuiPlugin/MultiBookingForm.pm:389
#: lib/Kuickres/GuiPlugin/UserCatForm.pm:166
#: lib/Kuickres/GuiPlugin/BookingForm.pm:474
#: /home/oetiker/checkouts/kuickres/thirdparty/lib/perl5/CallBackery/qooxdoo/../GuiPlugin/UserForm.pm:204
Expand Down Expand Up @@ -805,7 +801,7 @@ msgstr ""
msgid "Unknown email address"
msgstr "Unbekannte eMail Adresse"

#: /home/oetiker/checkouts/kuickres/thirdparty/lib/perl5/CallBackery/qooxdoo/../Controller/RpcService.pm:433
#: /home/oetiker/checkouts/kuickres/thirdparty/lib/perl5/CallBackery/qooxdoo/../Controller/RpcService.pm:434
msgid "Upload Missing"
msgstr "Upload fehlt"

Expand Down Expand Up @@ -911,13 +907,13 @@ msgid "email address in use"
msgstr "eMail Adresse schon in Gebrauch"

#: lib/Kuickres/GuiPlugin/EquipmentForm.pm:184
#: lib/Kuickres/GuiPlugin/MultiBookingForm.pm:433
#: lib/Kuickres/GuiPlugin/MultiBookingForm.pm:434
#: lib/Kuickres/GuiPlugin/UserCatForm.pm:205
msgid "no selection found"
msgstr "Kein Auswahl gefunden"

#: lib/Kuickres/GuiPlugin/EquipmentForm.pm:176
#: lib/Kuickres/GuiPlugin/MultiBookingForm.pm:422
#: lib/Kuickres/GuiPlugin/MultiBookingForm.pm:423
msgid "no selection->room_id found"
msgstr ""

Expand Down Expand Up @@ -945,7 +941,7 @@ msgstr "Das gewählte Feld ist unbekannt."
msgid "type a your new password"
msgstr "tippen sie ihr Passwort"

#: lib/Kuickres/GuiPlugin/MultiBookingForm.pm:456
#: lib/Kuickres/GuiPlugin/MultiBookingForm.pm:457
msgid "unknown user configured in rule"
msgstr "Unbekannter user in der Rule"

Expand Down
28 changes: 12 additions & 16 deletions share/en.po
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@ msgid "%1 is required"
msgstr ""

#: lib/Kuickres/GuiPlugin/Booking.pm:315
#: lib/Kuickres/GuiPlugin/MultiBookingForm.pm:365
#: lib/Kuickres/GuiPlugin/MultiBookingForm.pm:366
#: lib/Kuickres/GuiPlugin/BookingForm.pm:455
msgid "%d.%m.%Y"
msgstr ""

#: lib/Kuickres/GuiPlugin/MultiBookingForm.pm:533
#: lib/Kuickres/GuiPlugin/MultiBookingForm.pm:534
msgid "(Ohne: %1!)"
msgstr ""

Expand All @@ -23,7 +23,7 @@ msgid ""
"passwords/quickguide\">Standford Password Policy</a>"
msgstr ""

#: /home/oetiker/checkouts/kuickres/thirdparty/lib/perl5/CallBackery/qooxdoo/../Controller/RpcService.pm:422
#: /home/oetiker/checkouts/kuickres/thirdparty/lib/perl5/CallBackery/qooxdoo/../Controller/RpcService.pm:423
#: /home/oetiker/checkouts/kuickres/thirdparty/lib/perl5/CallBackery/qooxdoo/../Controller/RpcService.pm:500
msgid "Access Denied"
msgstr ""
Expand Down Expand Up @@ -70,7 +70,7 @@ msgstr ""
msgid "Add User"
msgstr ""

#: lib/Kuickres/GuiPlugin/MultiBookingForm.pm:389
#: lib/Kuickres/GuiPlugin/MultiBookingForm.pm:390
#: lib/Kuickres/GuiPlugin/UserCatForm.pm:167
msgid "Add UserCat"
msgstr ""
Expand Down Expand Up @@ -162,7 +162,7 @@ msgstr ""
msgid "Created"
msgstr ""

#: /home/oetiker/checkouts/kuickres/thirdparty/lib/perl5/CallBackery/qooxdoo/../Controller/RpcService.pm:442
#: /home/oetiker/checkouts/kuickres/thirdparty/lib/perl5/CallBackery/qooxdoo/../Controller/RpcService.pm:443
#: /home/oetiker/checkouts/kuickres/thirdparty/lib/perl5/CallBackery/qooxdoo/../Controller/RpcService.pm:517
msgid "Data Decoding Problem %1"
msgstr ""
Expand Down Expand Up @@ -429,7 +429,7 @@ msgstr ""
msgid "Id"
msgstr ""

#: lib/Kuickres/GuiPlugin/MultiBookingForm.pm:510
#: lib/Kuickres/GuiPlugin/MultiBookingForm.pm:511
msgid "Internal error with eq removal"
msgstr ""

Expand Down Expand Up @@ -576,10 +576,6 @@ msgstr ""
msgid "Note"
msgstr ""

#: lib/Kuickres/GuiPlugin/MultiBookingForm.pm:538
msgid "Ohne: %1!"
msgstr ""

#: lib/Kuickres/GuiPlugin/Location.pm:59
msgid "Opening Hours"
msgstr ""
Expand Down Expand Up @@ -629,7 +625,7 @@ msgstr ""
msgid "Phone number 07x xxx xxxx expected"
msgstr ""

#: /home/oetiker/checkouts/kuickres/thirdparty/lib/perl5/CallBackery/qooxdoo/../Controller/RpcService.pm:427
#: /home/oetiker/checkouts/kuickres/thirdparty/lib/perl5/CallBackery/qooxdoo/../Controller/RpcService.pm:428
#: /home/oetiker/checkouts/kuickres/thirdparty/lib/perl5/CallBackery/qooxdoo/../Controller/RpcService.pm:507
msgid "Plugin Name missing"
msgstr ""
Expand Down Expand Up @@ -678,7 +674,7 @@ msgstr ""
#: lib/Kuickres/GuiPlugin/LocationForm.pm:146
#: lib/Kuickres/GuiPlugin/UserForm.pm:225
#: lib/Kuickres/GuiPlugin/EquipmentForm.pm:143
#: lib/Kuickres/GuiPlugin/MultiBookingForm.pm:388
#: lib/Kuickres/GuiPlugin/MultiBookingForm.pm:389
#: lib/Kuickres/GuiPlugin/UserCatForm.pm:166
#: lib/Kuickres/GuiPlugin/BookingForm.pm:474
#: /home/oetiker/checkouts/kuickres/thirdparty/lib/perl5/CallBackery/qooxdoo/../GuiPlugin/UserForm.pm:204
Expand Down Expand Up @@ -775,7 +771,7 @@ msgstr ""
msgid "Unknown email address"
msgstr ""

#: /home/oetiker/checkouts/kuickres/thirdparty/lib/perl5/CallBackery/qooxdoo/../Controller/RpcService.pm:433
#: /home/oetiker/checkouts/kuickres/thirdparty/lib/perl5/CallBackery/qooxdoo/../Controller/RpcService.pm:434
msgid "Upload Missing"
msgstr ""

Expand Down Expand Up @@ -878,13 +874,13 @@ msgid "email address in use"
msgstr ""

#: lib/Kuickres/GuiPlugin/EquipmentForm.pm:184
#: lib/Kuickres/GuiPlugin/MultiBookingForm.pm:433
#: lib/Kuickres/GuiPlugin/MultiBookingForm.pm:434
#: lib/Kuickres/GuiPlugin/UserCatForm.pm:205
msgid "no selection found"
msgstr ""

#: lib/Kuickres/GuiPlugin/EquipmentForm.pm:176
#: lib/Kuickres/GuiPlugin/MultiBookingForm.pm:422
#: lib/Kuickres/GuiPlugin/MultiBookingForm.pm:423
msgid "no selection->room_id found"
msgstr ""

Expand Down Expand Up @@ -912,6 +908,6 @@ msgstr ""
msgid "type a your new password"
msgstr ""

#: lib/Kuickres/GuiPlugin/MultiBookingForm.pm:456
#: lib/Kuickres/GuiPlugin/MultiBookingForm.pm:457
msgid "unknown user configured in rule"
msgstr ""
Loading

0 comments on commit b5efacb

Please sign in to comment.