Page 1 of 1

Query Vs Get/Local storage

Posted: Sat Jun 28, 2014 12:45 am
by Matthew Pickard

Hello,

I am putting the final touches on my time tracking app and I am trying to get a button to only be visible IF there are no "start - end" combination for that day. I need to keep it open for multiple shifts worked in one day. My question is can I just query the data base for that combo and trigger the visibility component property?

Also, I need to build a list from the combined punches to display on the main Use screen.

Public Link:
http://appery.io/app/mobile-frame?src...

Login:
SN -matt
PW - matt

I'm sure I am asking a lot, but I'm not 100% certain of which path to take. If I use local storage I might be to store the button click, but then I would need to factor in if the session token expires the app would need to "reset".

Another concern is this is for a company in California and would need to implement Daylight savings...


Query Vs Get/Local storage

Posted: Sat Jun 28, 2014 6:36 am
by Alena Prykhodko

Hello,

[quote:] I am trying to get a button to only be visible IF there are no "start - end" combination for that day. I need to keep it open for multiple shifts worked in one day. My question is can I just query the data base for that combo and trigger the visibility component property? [/quote]

Yes, but if you need this on different pages you will need to replicate action for all pages separately.

Also you can hide it with JS based on the query result.

pre Apperyio( "component_name" ).hide();/pre


Query Vs Get/Local storage

Posted: Mon Jun 30, 2014 3:05 am
by Matthew Pickard

And to make it show again would be:

Apperyio("component_name").show();

Is that correct?


Query Vs Get/Local storage

Posted: Mon Jun 30, 2014 3:16 am
by Alena Prykhodko

Yes.


Query Vs Get/Local storage

Posted: Mon Jun 30, 2014 4:23 am
by Matthew Pickard

Thank you.