tcedi / tcedi-ovms

T.C.E.D.I. Open Visitors Management System
Apache License 2.0
23 stars 10 forks source link

Disable Printing #7

Open Entimp opened 1 year ago

Entimp commented 1 year ago

Hi, I'm comfortable editing PHP to an extent but am not best placed to edit and create code.

I am deploying this branch of TCEDI for a small charity I work for, in order to simply track staff and visitors on location at our office location. We do not require printing of badges.

Is there a simple edit I can make to turn this function off?

tcedi commented 1 year ago

Hello,

How visitors or staff members are going to sign out/leave? Is the receptionist going to manage that for them? Maybe you don't need to track when the visitors or staff members leave the facility.

To avoid printing of badges, there are several possibilities...

Without any change to the code (not ideal, but it should work) you could try to:

  1. Print to a PDF printer like CUPS-PDF (no physical printing, but file "printing"/generation);
  2. Print to a non-existing IPP printer or a CUPS server which does not share any printer.

With slight changes to the code (choose only one of them):

  1. In the file 'printbadge.php', you could simply comment the line $ipp->printJob(); (quick and dirty);
  2. In the file 'process.php' and in the ECMA script/javascript function 'badgeload(ID)', you could set 'page' variable to 'main.php' instead of the current value which begins with 'printbadge.php?language=...' (quick and dirty). With this change, the page for printing the badge won't even be shown.

If you can tell me a little bit more about your use case, maybe I could add a Badgeless mode to dev015 branch...

Best Regards, J-D.

Entimp commented 1 year ago

Hi J-D

Appreciate you taking the time to respond and take on board my thoughts.

I worked on your fork over the weekend from home, and thus did not have access to the office network to set up the printer. I may have a look at setting this up this week and seeing where it goes.

That aside, we have a single office location with four floors. Our use case will be as follows, and may give you some thoughts/ideas for how you continue the project. The way I intend to use this solutions is as follows:

Possible ideas:

Really appreciate your response, there is no rush on anything my end... like with most charities - all processes are done by committee so it will be ages before I get sign off to implement anything.

I am going to try your suggestions re php edits when I in the office and will report back with thoughts if I have any.

Again, thank you.

E

Entimp commented 1 year ago

Update... I have got it all to a point where it is functional, still need to edit some of the admin language but happy to let you have a look. Would rather not make it public - anyway I can send you a link if you are interested?

tcedi commented 1 year ago

Hello Entimp,

Thank you for having shared some details about your use case!

It might be interesting to integrate several points that you've listed to the project... Some features on the roadmap are related to a fire register.

Any contribution is welcome! So for sure, I am interested... Why would you rather not make it public? Do you use external libraries with incompatible licenses in the changes you've written? Do you need a written approval from the charity you work for in order to be able to publish the changes you've made under Apache-2.0 license?

In any case, thank you for your update and your interest in the project!

Best Regards, J-D