How can i do this ?

rodeokid

Member
Hi, i am using fabrik to build a complete ERP system for our plant, where each employees will have to fill form during their shift.
I am building forms right now and everything is going smooth so far. Planning to start live test somewhere during the spring season,

But now i am in front of a problem, and not sure what could be the solution...

What i need to achieve is this: employees will fill their form during their shift, so form will be open for 8 hours, and they will save it from time to time...no problem. But we have QC (quality control) employees who have to check everything and make sure all standards are respected. Right now they have a section for them on employees paper form... but with the ERP system, employees will log on their Joomla session and fill their own form... but we would like the QC agent to be able to fill a section in their form, like we do now on paper.
How can i achieve this without asking the employees to log out, QC log in, fill section, log out, employees log in... it's impossible.
So i thought of a button where the QC would press, and a popup would ask name and password, if ok, then a QC group is shown in form with QC agent name and timestamp, plus a couple of field element. Once filled, the QC agent just press Apply on form, and the employees is still log in his form, but this section is now read only for him.

If you have any other suggestion on how to have Employee B fill a section on Employee A's form without logging him out, i would like to hear it...i am open for suggestions cause this is a must for us.

Thanks !

rodeokid
 
Last edited:
I'd probably do it with "related data".

So you have a separate table for the QC data, which has a join to the employ table.

However ... are you saying the QC folk use the same session, ie. literally the same computer / browser / page as the employee?

-- hugh
 
Yes that's what bugs me... QC agent walks in the plant and visit each workstation (about 9-10), so they must use the open form of the employee and add infos to the QC section of the form.
I thought about the related data and to create a new table, but that brings me back to my first question...how to log the QC agent, without logging out the employee on each workstation ?

For a basic workaround that could be a good alternative, i was thinking of a way to add a button, and when you press on it, it only ask for a password, if correct, taht brings up the QC section on form, so only those with that password would be able to add QC infos.

I f someone could only point me with a way to make a field that check password validity and show related groups if correct... that would be great.

Cause the more i think about logging in QC agent, the more i think it would be a big problem with session cookies...

Thanks in advance.

rodeokid
 
Yup, logging someone in and out wouldn't be feasible. You'd have to save the form, log out, log back in, edit the form, save the form, log out, log back in again, edit the form. Not an optimal work flow.

I can't really think of a "secure" way of doing this. Hiding / showing on the same form, even with some ad-hoc "password" button would be trivial to work round (ctrl-shift-I, click on the hidden div, show it).

And I would have thought that an important part of a QC audit trail would be knowing which QC person added anything?

-- hugh
 
Yes for QC audit trail i need to have the QC agent infos in form...so right now what i did is add a group open for all employee, and the first element is a field element (password type to show only stars when typing).. i do not add this element value to database, and i use javascript action to hide all the others element of this group unless user type the right verification code in first field.
So our CQ agent use the employee's computer, click on the QC tab, enter the verification code in first field, if correct, all the others elements are shown (included a dropdown with all QC agents name so he must choose his own name), he fill them correctly, and by pressing Apply button, the form is reloaded so javascript hide again the elements cause the code is not saved in database.

For now it is a good solution, and the best part is that for audit reason i have to show the QC parts in PDF for inspector, and yes they show correctly.

Thanks for advice on security, but we are not opening this for anybody but our 50-55 employees, and i can say without a doubt that nobody here know how to show a hidden field,...lolll believe me... and it would not be a big security issue anyway, i just don't want average people to change QC parts value if they don't have to.
 
Last edited:
OK i know that placeholders are not available in javascript but i would like that our QC director could change the verification code whenever he wants too, so i started a new list with only 1 element (verification code), and only the director have access to this list, so he can change it from time to time. Works fine.

But how could i tell my code element to check that table's element instead of the hardcoded javascript code i wrote in the definition of the element ?

Thanks

rodeokid
 
You'll have to write a little "user AJAX". Take a look at the comments in ./components/com_fabrik/user_ajax_example.php.

-- hugh
 
We are in need of some funding.
More details.

Thank you.

Members online

No members online now.
Back
Top