ProgrammersTestTaska-1-1 (1)

Embed Size (px)

Citation preview

  • 8/13/2019 ProgrammersTestTaska-1-1 (1)

    1/3

    1. Create MySQL DB with following tables:items

    item_id name brand_id

    model_id date_added

    brands

    brand_id name

    models

    model_id brand_id name

    2. Create following pages and functions:Items pageWill contain table with list of items and button for Add New item.Listing table will have following columns:

    ID Name Brand Model

    Date Added Actions

    Actions will be: Edit | DeleteData columns need to be sortable, listing need to have pagination showing 10 entries per page.Delete link will trigger confirmation dialog and if user confirms will remove item.Edit link and Add New button will show popover with edit item form and Save and Cancelbuttons

    Form fields: Name (input, required) Amount (input, required, numeric) Brand (select, required) Model (select, optional, populated with models associated with selected Brand select)

    On save - validate from, add / save item and close popover.

  • 8/13/2019 ProgrammersTestTaska-1-1 (1)

    2/3

    Brands pageWill contain table with list of brands and button for Add New brand.Listing table will have following columns:

    ID Name Items Count (count of items with this brand) Models Count (count of models with this brand) Actions

    Actions will be: Edit | DeleteColumns need to be sortable, listing need to have pagination showing 10 entries per page.Delete link will trigger confirmation dialog and if user confirms will remove brand and associateditems and models.

    Edit link and Add New button will show popover with edit brand form and Save and CancelbuttonsForm fields:

    Name (input, required)On save - validate from, add / save brand and close popover.

    Models page

    Will contain table with list of models and button for Add New model.Listing table will have following columns:

    ID Name Brand Items Count (count of items with this model) Actions

    Actions will be: Edit | Delete

    Columns need to be sortable, listing need to have pagination showing 10 entries per page.Delete link will trigger confirmation dialog and if user confirms will remove brand and associateditems.Edit link and Add New button will show popover with edit model form and Save and CancelbuttonsForm fields:

  • 8/13/2019 ProgrammersTestTaska-1-1 (1)

    3/3

    Name (input, required) Brand (select, required)

    On save - validate from, add / save model and close popover.

    Each of pages will have navigation: Items, Brands, Models. Highlight current page.

    3. Requirements

    Do the described functions on fresh recent CI installation. Make sure to follow MVC pattern. Use ActiveRecord for DB queries. Do comments in code. Use jQuery and jQueryUI as js framework. Listing tables sorting and pagination need to happen without page refresh (loaded with

    ajax or dynamically generated with js).

    Make Items page to be installation default page. Fill DB with sample data, at least: 25 items, 5 brands and 10 models. Attach archive with complete code sources and DB dump (structure and data).