[web-devel] Payroll app

Njagi Mwaniki mwanikibusiness at gmail.com
Mon Feb 16 18:58:08 UTC 2015


I am wondering how to go about having users create user accounts and
then use those accounts to create payrolls. A payroll is a set of
payslips associated with a certain user. What I currently have is an
auth system that uses openID. I am thinking of associating a payroll and
subsequently the payslips in the payroll with the email address of the
currently logged in user but I am not sure how to go about that.

Second, I don't want to limit users to the kind of allowances and
deductions they can enter. So in the web form they are going to have a
button they can use to add fields of a key value pair for example one
can add an allowance field and add [House_allowance] [3000]. This will
be part of a payslip.
However, these extra fields can't be added to the Payslip type because
the additional fields are added through JS. So I shall have a separate
type `Extra` to store this map where `data Extra = Extra { Allowance::
[(Text, Int)], Deduction :: [Text, Int]}` I can convert this map to a
PersistentValue in GHCI but I have no idea how to represent it in the
config/models file. How can I show in my config/models that I want to
store this map in the DB and associate it with the relevant payslip?

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 949 bytes
Desc: OpenPGP digital signature
URL: <http://mail.haskell.org/pipermail/web-devel/attachments/20150216/5966d136/attachment.sig>


More information about the web-devel mailing list