task

CREATE-task# # -

FEATURE-000n-view-buying - porting to .org

[previously]

  1. [00:00] NEW task IN
    1. [] # 2919 - CREATE-task# # - ADD-FEATURE - view buying - port - ] porting the view / buying functionality into the .org version
    2. [*] reference example = # 2793 - CREATE-task# #  -FEATURE-4900-view-bio - porting to .org - currently the MyStuff/Bio feature is not functional
    3. [] TLDR - 'view buying' should show 'all'  'items' that have a status value of "Need" ( and a Priaaority value of "" )
    4. [] these items are then organized by the warehouse, inventory and itemgroup that they appear in, aka bio_by_project, [*] based on view_priority (actually uses db viewPriority 
    5. []
    6. [*] repurposing this task, ORIG = PROCESS misc - tasks that, ON = 2019-09-19, content moved to today
  2. [00:00] NEW task IN - prj-022 - ISSUE-001
    1. [x] # # - FEATURE view/buying - server error on page load
    2. [x] ISSUE-001 - error of @Session VS Session
  3. [00:00] NEW task IN
    1. [x] EDIT PAGE - view buying - save copy of original/current version to deprecate
  4. [00:00] NEW Task IN - database
    1. [x] EDIT db - .org - added new view_buying view, as per sql below
    2. [x] EDIT db - dons - added new view_buying, renamed orig table as prev_view_buying, ] delete ?
    3. []
  5. [00:00] NEW task IN - UPDATES
    1. [x] added isAuthenticated check on 'display' "edit links toolbar",
    2. [x] moved view/task link to taskName VS in "edit links toolbar",
    3. [*] use of code inside code block, example nested if statement, 2nd if requres @{  ... } wrapper
  6. >[00:00] NEW task IN - CLOSE
    1. [x] REM OVEd - case statement for cases based on IF called from plan, see below
  7. [00:00] NEW task IN - *
    1. [x] not seeing issue-002 - database view_buying
    2. [x] not seeing issue-003 - view missing required column
    3. [x] not seeing issue-005 - headings with no content
  8. [] [00:00] NEW task IN -  stats bar - location and style
    1. [x] used NEW statsBarBio AS example
    2. [x] in NEW LOCATION = relocated it to directly below navHeader, [x] removed current style of "statsbar" (used absolute postioning),
    3. [x] created AS _statsBarBuying = itemsCount, itemsTotalCOST,
  9. [00:00] NEW task IN - refactor
    1. [x] removed unused vars
    2. [x] re ordered vars
    3. [x] renamed vars
    4. [] notes in source comments
  10. [] NEW task IN - add view for single warehouse by name
    1. [x] add case "warehouse" where we can get view_buying for just a single warehouse
    2. [x] add 4th parameter as warehouse name
    3. [x] http://sospep.org/view/buying/warehouse/Want/1/nations
  11. [00:00] NEW task IN - review
    1. [] dont seem to see/find any documentation for view/buying OR view/selling
    2. []

  1. [] >[00:00] NEW task IN - ISSUE-007 - stats bar functionality
    1. []  # # - [] stats bar - functionality -
    2. [x] moved 'statsBar' into '/Shared' as partial page, call RenderPage,
    3. [] ERROR re: - var doesnt exist in this context, RESOLUTION: changed varName to Page.varName
      1. [] even after changing to Page["var"] property
      2. [] PROBLEM WAS - shared page is rendered BEFORE values are caculated. Values are calculated in the display list items loop. Page is rendered at the top. This is why was previously using
      3. [] RESOLUTION =
      4. [1] return prev, render component after display loop, then re position  (update from :using absolute position, to: ] reposition with script ] reposition with css)
      5. [] https://stackoverflow.com/questions/104953/position-an-html-element-relative-to-its-container-using-css
      6. [2] call js method - ] write vars to input hidden, ] call js method, updateStatsBar(), ] write js method updateStatsBar, -uses hidden input vars to update statsbar # values
    4. [] ERROR re: type passed into arg, when calling the calculateCompletedPercentage helper method
  2.  [] [00:00] NEW task IN - git commit & merge
    1. [x] commit -m = {"ADD-FEATURE - bio - porting feature functionality from original sospep.com version"}
    2. [x] git local commited branch(ADD-FEATURE-bio)
    3. [x] merged branch into master

[currently]

  1.  [00:00] NEW task IN
    1. [] # # -

[next]

  1. [00:00] NEW task IN TODO
    1. [x] content is left aligned -
    2. [] heading styles -
    3. [x] stats bar - location
    4. [x] stats bar - style
    5. [i] stats bar - functionality
    6. [x] why are 'heading's that have no content displaying -
    7. [i] database - update VIEW on OTHER DATABAseS, - [x] public [x] dons, [] ewa, [] other(s) ,
  2.  [00:00] NEW task IN
    1. [] # # - CREATE-task# # -
    2. [] bio - all
    3. ===
    4. [] bio - by calendar
    5. [] bio - by plan/document
    6. [] bio - by taskgroup
    7. ===
    8. [] bio - by period - ( day, month, week, quarter, )
    9. [] bio - by period - custom

[reference]

  1. [*] sospep public - # 4900 - feature definition

query

SELECT * FROM `view_p1` WHERE priority = -5 and status = 'Completed'

SELECT * FROM view_buying WHERE status = Want || NEED ||

and priority =

 

create view



[] rewriting view_priorities as view BUYING

CREATE VIEW view_buying AS SELECT items.*, itemcategories.id_itemCategory, itemcategories.name_itemCategory, itemcategories.parent_id AS parent_id_itemCategory, inventories.id_inventory, inventories.name_inventory, inventories.parent_id AS parent_id_inventory, warehouses.id_warehouse, warehouses.name_warehouse
FROM items
JOIN itemcategories ON items.parent_id = itemcategories.id_itemCategory
JOIN inventories ON itemcategories.parent_id = inventories.id_inventory
JOIN warehouses ON inventories.parent_id = warehouses.id_warehouse;

 


displaying groups
- EDITed code on parent_id
- TO  if (plan.parent_id_plan == calendar.id_calendar){

create query

[] my groups - using order by in query to get dessired grouping, WORKS but very slow 

SELECT * FROM view_p1 WHERE priority=@0 && status=@1 ORDER by name_calendar ASC, name_plan ASC, name_taskgroup ASC
SELECT * FROM view_p1 WHERE priority= -1 && status='Completed' ORDER by name_calendar ASC, name_plan ASC, name_taskgroup ASC;

[] 2019-10-30
[] FIX ISSUE - ERROR missing bracket
[] TEST appears to be in div displayList
[] removed some razor comments
[] bracket matching, i think i found and eliminated the extra
[] TEST = PASS BUT - page loads, BUT no results

[] FIX ISSUE = no results display on page
[] CAUSE - suspect = view on database wasn't created properly
[] TRY = 
[] RESOLUTION - created new view ,
[]

[] logic blocks from view buying

// LOGIC BL 1 - to build qry's IF called from viewCalendar's
    if (planId=="000")
    { // put code here for CAL
        if (String.IsNullOrEmpty(status1))
            {
              selectQuery = "select * from tasks where parent_id IN (select id_taskgroup from taskgroups where parent_id IN (select id_plan from plans where parent_id=@0))";
              var tasks=db.Query(selectQuery,Parent);
              msg ="planId= 000 and no status";
              Page["tasks"] = tasks;
            }     
           
        if (!String.IsNullOrEmpty(status1))
            {
               // EX selectQuery= "SELECT * FROM tasks WHERE parent_id IN (SELECT id_taskgroup from taskgroups where parent_id=@0 ) && status IN(@1) ORDER by name_task ASC";
                selectQuery = "select * from tasks where parent_id IN (select id_taskgroup from taskgroups where parent_id IN (select id_plan from plans where parent_id=@0)) && status IN(@1) ";
                var tasks= db.Query(selectQuery,parent_id, status1);
                msg ="parentid 000 and HAS status";
                Page["tasks"] = tasks;
            }            
    }
   
    // LOGIC BL 2 - to build qry IF called from viewPlan's
    if (parent_id=="000")
    {  
        // WORKs -this means 1] we dont know the tgr id bc this page is being called from a higher level, ie PLAN or CAL
        // msg ="test IF tgr is 000 YES it is, the PLAN Id is: "+planId;
        // - this means 1] we dont know the plan id bc this page is being called from a higher level ie CAL
    
            //TRY 002 will just add IF statement and use selectQry1 IF */
            if (String.IsNullOrEmpty(status1))
            {
                selectQuery= "SELECT * FROM tasks WHERE parent_id IN (SELECT id_taskgroup from taskgroups where parent_id=@0 ) && status IN('Completed','To-Do','In-Process') ORDER by name_task ASC";
                // selectQuery= "SELECT * FROM tasks WHERE parent_id IN (SELECT id_taskgroup from taskgroups where parent_id=@0 ) ORDER by name_task ASC";
                var tasks=db.Query(selectQuery,planId);
                msg ="parentid 000 and no status";
                Page["tasks"] = tasks;
            }     
   
            if (!String.IsNullOrEmpty(status1))
            {
                  selectQuery= "SELECT * FROM tasks WHERE parent_id IN (SELECT id_taskgroup from taskgroups where parent_id=@0 ) && status IN(@1) ORDER by name_task ASC";
                var tasks= db.Query(selectQuery,planId, status1);
                msg ="parentid 000 and HAS status";
                Page["tasks"] = tasks;
            }
    }
   
    // LOGIC BL 3 - to build qry's IF called from viewTaskGroups
    if (!String.IsNullOrEmpty(status1) && parent_id !="000" && planId !="000")
        {
         selectQuery = "SELECT * FROM tasks WHERE parent_id=@0 && status IN(@1) ORDER by name_task ASC";
        // REV fea 001
        // selectQuery = "SELECT * FROM tasks WHERE parent_id IN(@0) && status IN(@1) ORDER by name_task ASC"; // NOT WORKING PRB with params
        // try ### subqry
        // selectQuery= "SELECT * FROM tasks WHERE parent_id IN (SELECT id_taskgroup from taskgroups where parent_id=@0 ) && status IN(@1) ORDER by name_task ASC";
        var tasks= db.Query(selectQuery,parent_id, status1);
        msg ="parentid NOT 000 and HAS status" ;
        Page["tasks"] = tasks;
        }
       
       
    /*
    // LOGIC BL 0044 - to build qry's IF called from viewTaskGroups and NOT from search page
    if (String.IsNullOrEmpty(status1) && parent_id !="000" && planId !="000" && Request["qry"].IsEmpty()){
        //selectQuery= "SELECT * FROM view_priority";
        selectQuery= "SELECT * FROM view_priority WHERE priority=@0 and parent_id=@1";
        // var tasks=db.Query(selectQuery,parent_id,-2);
        var tasks=db.Query(selectQuery,Priority,parent_id);
       
        // var sqlQ= "select name_taskgroup from taskgroups where id_taskgroup=parent_id"
       
        //var sqlQcalendars="select * from calendars";
        //var sqlQcalendars= "SELECT id_calendar,name_calendar from view_priority GROUP BY id_calendar ORDER BY name_calendar ASC";
        var sqlQcalendars= "SELECT id_calendar,name_calendar,id_plan,name_plan,id_taskgroup,name_taskgroup from view_priority GROUP BY id_calendar ORDER BY name_calendar ASC";
        var sqlQplans= "SELECT id_plan,name_plan,plan_parent_id from view_priority GROUP BY id_plan ORDER BY name_plan ASC";
        var sqlQtaskgroups= "SELECT id_taskgroup,name_taskgroup, parent_id_taskgroup from view_priority GROUP BY id_taskgroup ORDER BY name_taskgroup ASC";
        // var sqlQgroups = "SELECT id_taskgroup,name_taskgroup FROM view_priority GROUP BY id_taskgroup";  
        var calendars=db.Query(sqlQcalendars);
        var plans = db.Query(sqlQplans);
        var taskgroups = db.Query(sqlQtaskgroups);
       
        Page["tasks"] = tasks;
        Page["calendars"]= calendars;
        Page["plans"] = plans;
        Page["taskgroups"]=taskgroups;
       
        msg ="HELLO WORLD! FROM status=Null, parentid !='000' and planId !='000' && Request['qry'].IsEmpty ";
    }
    */
 
    // LOGIC - BL 005 -
    // Feature - 802 - Search Events by Feild MODIFIED for viewPriority IN Taskgroup/
    // if (!Request["qry"].IsEmpty()){
Details Photos Edit more

Details

ID: 2919

NAME: REVIEW-api-indeed

DESCRIPTION: jobs listing site, curates jobs from multiple sources in multiple countries, has revenue stream for content publishers,

START DATE TIME: 2013-10-12 08:02:54

EST DURATION: 01:00:00

END DATE TIME: 2013-10-12 09:02:54

STATUS: To-Do

PRIORITY: -5

OWNER ID: 75

Content Photos Edit more

photos

photos for this task

actions

Agenda Email task SMS task Priorities