We need to know if a company is in a "trial" status. There will be 2 phases to this project.
Phase 1 will construct the fields. Phase 2 will be to create the cron job that will automatically check for expired trial periods and mark the "trial_status" boolean to false.
On the Company model, create:
- trial_status = BooleanField
- trial_start = DateField(default=date.today()
- trial_end = DateField(default=date.today() + relativedelta(months=1))
Expose those fields through the api's that feed the front-end Company Profile.
The Company Profile already has error handling done through the backend and those errors will be exposed on the front-end (although this is currently a ticket in progress).
For now, we should check that:
- trial_start and trial_end are both dates either today or in the future.
- trial_end should be later than trial_start
Add fields as shown here: http://note.io/1ANSnCv
The date fields can stay active even if the trial_status is unchecked, they do not need to enable / disable depending on the trial_status.
The trial_end field should adjust to +1 month of whatever date is set in trial_start onchange of trial_start. So if trial_start is modified, update trial_end, evne if it has been previously set (just make sure the UI properly updates onchange).
There is a calendar widget here: http://note.io/1cBgzfI. Please use that one.