App-Dochazka-CLI

 view release on metacpan or  search on metacpan

lib/App/Dochazka/CLI/Guide.pm  view on Meta::CPAN

=head3 Set employee secondary ID

To manually change an employee's secondary ID, do one of the following:

    EMPLOYEE_SPEC SEC_ID $SEC_ID
    EMPLOYEE_SPEC SET SEC_ID $SEC_ID

Example:

    EMPLOYEE=joe SET SEC_ID 4553


=head3 Set employee full name

To manually change an employee's full name, do one of the following:

    EMPLOYEE_SPEC FULLNAME $WHATEVER
    EMPLOYEE_SPEC SET FULLNAME $WHATEVER

Examples:

    EMPLOYEE=baird FULLNAME Joseph Baird
    EMPLOYEE=baird FULLNAME JUDr. Joseph Peacock Baird LLM, Esq.

Do not use any quotes in or around the full name.


=head3 Set employee password

To manually change an employee's password, do:

    EMPLOYEE_SPEC PASSWORD
    EMPLOYEE_SPEC SET PASSWORD

You will be asked to type in the new password twice. This updates the password
that Dochazka stores in the 'employees' table. Whether this has any effect on
the user's ability to log in depends on what authentication method is being
used and where the passwords for that method are stored.


=head2 Schedules

=head3 View all schedules (including disabled schedules)

All existing schedules can be dumped to the screen:

    SCHEDULES FETCH ALL

Note that this does not include disabled schedules. To include those in the
listing, use this command:

    SCHEDULES FETCH ALL DISABLED

=head3 View an individual schedule (by SID or SCODE)

If the SID or SCODE of a schedule is known, it can be looked up like so:

    SID=12 SHOW
    SCODE=SAMPLE SHOW

The first example looks up the schedule with SID 12, and the second looks
up the schedule with SCODE "SAMPLE".

=head3 Define a new schedule

The following commands can be used to "create" a schedule, i.e. define it and
save it in the database. The idea is to first build up the schedule in memory
and then, when this "working" schedule is complete, submit it to the REST
server.

=head4 View working schedule

To see the current state of the working schedule, do:

    SCHEDULE DUMP
    SCHEDULE MEMORY

=head4 Add a line to the working schedule

Each line of the working schedule corresponds to a time interval. Time
intervals are defined by specifying when they begin and end. Ordinarily,
this format should be sufficient:

    SCHEDULE MON 8:00-12:00

(This sets up a time interval that begins on Monday 8:00 a.m. and ends
at 12:00 noon that same day.)

This method might not work if the interval starts and ends on different days -
in which case we would use a different format:

    SCHEDULE MON 23:00 TUE 03:30
    SCHEDULE MON 23:00 - TUE 03:30

Note that it is possible for the working schedule to contain overlapping
or otherwise nonsensical intervals.

=head4 Quickly add identical intervals MON-FRI

If your schedule has the same intervals for all five days of the standard work
week (Monday through Friday), the process of defining the schedule can be
accelerated by using the keyword ALL instead of MON, TUE, WED, etc.

    SCHEDULE ALL 8:00-12:00
    SCHEDULE ALL 12:30-16:30

Example:

Dochazka(2015-04-08) root ADMIN> schedule all 8:00-12:00
[ MON 08:00, MON 12:00 )
[ TUE 08:00, TUE 12:00 )
[ WED 08:00, WED 12:00 )
[ THU 08:00, THU 12:00 )
[ FRI 08:00, FRI 12:00 )

Dochazka(2015-04-08) root ADMIN> schedule all 12:30-16:30
[ MON 08:00, MON 12:00 )
[ MON 12:30, MON 16:30 )
[ TUE 08:00, TUE 12:00 )
[ TUE 12:30, TUE 16:30 )
[ WED 08:00, WED 12:00 )



( run in 0.593 second using v1.01-cache-2.11-cpan-39bf76dae61 )