This a single-page web app for viewing and manipulating the
daily schedule of people for a business like a restaurant or a
multi-restaurant theme park. It evolved from a very stupid simple
bash script but ultimately I thought it would be easier to spend
weeks and months to rewrite it in html/javascript rather than
trying to teach my coworkers how to use termux and emacs on
a phone. They're not computer people, just regular people.
So after 3 re-writes, it seems to be mostly in a workable form
but with bugs and stupids a-plenty I'm sure.
The UI is organized as an area with expandable controls, kinda
like menus, and the whole control area can be collapsed down to
the date to make a more printable page. In the "file" controls there
is a text box where you can paste text of the daily schedule copied
from paycor.com (previous versions worked with data from
whentowork.com) -- but note that the parser uses a hard-coded
key based on our company name which is present in the text so
the program will not be usable as-is for this function without
modification for the specific paycor client.
Once it's loaded with data, the app should provide intuitive editing,
sorting, filtering and writing little text notes attached to persons or locations. There is also an experimental section allowing
customization of extra fields in the personnel data beyond the
required 5 fields which are: location, position, name, start time,
end time.
You can use this link to see the program in action upon a fictious
set of people and locations:
https://luser-dr00g.github.io/cm-pc.html?q=data+for+Friday+July+1%2C+2023%0Acustom+fields%3A+%5B%7B%22here%22%3A%22clickbox%22%7D%2C%7B%22notes%22%3A%22text%22%7D%5D%0Astation+notes%3A+%7B%7D%0ADesk+Concierge%0A%09M.+Myster%0910%3Aam-5%3A30pm%09%09%
0AFood+Service+Corkscrew+Bar%0A%09Screwball+Sam+McKenzie%0910am-6pm%09%09%0AFood+Service+Even+Sillier+Place+Job%0A%09Firstname+Lastname%099%3A30am-4pm%09%09%0AFood+Service+Pie+in+the+Sky+FOH%0A%09Daisy+Dukes%099%3A30am-4pm%09%09%0A%09Kandoo+Candide%093pm-
6pm%09%09%0AFood+Service+Pie+in+the+Sky+BOH%0A%09Piper+Prawne%099%3A30am-4pm%09%09%0A%09Someother+Name%093pm-6pm%09%09%0AOperations+Floor+walker%0A%09Pied+Piermont%0911am-4pm%09%09%0ARetail+Gift+Shop%0A%09Matron+Marms%099am-6pm%09%09%0AServices+
Groundskeeping%0A%09That+old+dude%095pm-5%3A15pm%09%09
The code is viewable from github.
The html/css/javascript is in one file:
https://github.com/luser-dr00g/luser-dr00g.github.io/blob/ebe90e12ce13df2ffd96385552f744dc9430d7c7/cm-pc.html
and the separate components:
https://github.com/luser-dr00g/luser-dr00g.github.io/blob/ebe90e12ce13df2ffd96385552f744dc9430d7c7/click.js
https://github.com/luser-dr00g/luser-dr00g.github.io/blob/ebe90e12ce13df2ffd96385552f744dc9430d7c7/more.js
https://github.com/luser-dr00g/luser-dr00g.github.io/blob/ebe90e12ce13df2ffd96385552f744dc9430d7c7/tabs.js
zip (whole project, more than these files):
https://github.com/luser-dr00g/luser-dr00g.github.io/archive/ebe90e12ce13df2ffd96385552f744dc9430d7c7.zip
The code is organized (loosely) around the MVVC design.
A few global variables hold the "Model" data. The output()
function renders this data into HTML structures populated
with event handlers. Any event handler which wants to alter the
model has to call one of the Model's interface functions
which first creates an Undo/Redo record for the change
and then does a Redo (albeit for the first time this time).
So, it's my attempt to do an MVC design but with all Procedural
Programming. There's barely any OO except for using a class
to make a web component like you have to do. I have a sense
that maybe I've been avoiding OO too much and judicious
sprinkling of it might help.
Any critique or other comments welcome, even from Julio.
Earlier versions of the web components have been
discussed in previous threads started by me.
--
Additional sentence that is very curt and declarative.
--- SoupGate-Win32 v1.05
* Origin: fsxNet Usenet Gateway (21:1/5)