GithubHelp home page GithubHelp logo

mejorua-smartphone-angular's Introduction

MejorUA Smartphone client with angular

Rewrite of the client in angular

Tasks

  • Issues::Update

  • Notify issues

    • Add user visual feedback and maybe redirection to map or issue details of generated issue
  • IssueDetailView - Migrating from issue.view approach in the IssueBO service to raw data access (issue.models.X.Y), and doing the mapping (Ex: modelState2viewCSS) in view instead of in the service, exposing those modelState2viewCSS and so throught the controller to view. This avoids some update problems, reliying on angular bindings instead

  • BUG - On notify issue view, if backbutton to map is used, map modes crashes, and issue markers disappear

  • Issue change state

  • Issue List/Map filtering

  • IssueMap view

  • Users: Implement collaborators, resolvers, and resolver groups

  • Filters: Generic filtering system, {Resolver} filters list, {ResolverGroup} filters list (shared with all members)

  • Contact info: {Resolvers} & {ResolversGroup} contact info needed to resolve the action demanded

  • Materials list for rooms and activities

  • {User.collaborator} - Feedback once issue is resolved in form of satisfaction of the results (boolena, or 1-5stars, 1-10 points, list of "feelings about" like, acceptable, needs get better) Inspired by customer feedback from Salesforce service (https://www.youtube.com/watch?v=H9fR_kuJp2w#t=74)

Research

  • Check Salesforce videos to get inspiration:https://www.salesforce.com/eu/form/demo/conf/demo-overview.jsp
  • IssueDAO - IssueCollection - Smart update after adding items
    • Now after post (via IssueDAO.add()) we fetch all the issues again. It would be interesting getting just the issue posted by a new request, or from de post response
      • Restangular.collection.post response returns a promise. Maybe if API returns the added item it could be retrieved from there, or at least the id of the added item, so we can perform a single request

mejorua-smartphone-angular's People

Contributors

elmesa avatar

Stargazers

 avatar

Watchers

 avatar

mejorua-smartphone-angular's Issues

BUG - MapBO - Only one marker for room allowed

Problem

Markers are indexed by its SIGUA room id, so multiple markers on the same room overwrite the previous.

IssueList behaves well because iterates over IssueBO.issues list

Solution

Change MapBO.markers.issues index name to issue id or "SIGUA id + '-'+ issue id"

IssueList - Adapt to new IssueTarget

Tasks

  1. [DONE] IssueBO - Solve "var self" BUG.
    • "sellf" var is a "this" var substitute to avoid "this" behaviour on callbacks and other scenarios where "this" changes from the IssueBO to other values.
    • "self" implementantion behaves now as a Java "static" var
    • TODO: Change closure so the "self" var is binded to each instance, instead of shared between them (On IssueBO.create() )
    • [DONE] Updated IssueBO service
      • IssueBO.create() instantiates the individual IssueBO defined as a subclass of IssueBO service solving the "self" var scope problem
    • [DONE] Fix probrems related to the new IssueBO implementation
  2. [DONE] IssueListController - Generate $scope.targetText[] withholding the issuie target text to show
  3. [DONE] IssueListView - Print target text using $scope.targetText[issue.id]

Issue binded to UA room element

Tasks

  1. [DONE] Issue notify - Fetch room elements
  2. [DONE] Issue notify - Populate "term" dropdown menu with the elements fetched
    • value as element: typeId + "-" + id
    • Show element spanish description
  3. [DONE] On submit - Generate IssueBO.models.issue.target from view data and submit

Issue binded to UA room characteristic

Tasks

  1. [DONE] Refactor - UAPI access to its own service
  2. [DONE] Refactor - UGE room data fetch and room id's mappings to its own service
  3. [DONE] RoomCharacteristicsDAO - Fetch room characteristics
  4. [DONE] RoomCharacteristicsDAO - Parse fetched data into:
    • this.characteristic: Hashmap<String,{RoomCharacteristic} with all the characteristics indexed by it's id.
    • this.room: Hashmap<String,String[]> Mapping SIGUA room id's with a indexes array of characteristics present in that room
  5. [DONE] Issue notify - Populate "term" dropdown menu with the characteristics fetched
    • Show characteristics spanish description
  6. On submit - Generate IssueBO.models.issue.target from view data and submit

IssueDetailView - Show new IssueTarget correctly

Tasks

  1. [DONE] IssueBO - implement .getTargetText() that generates the text for the target of the issue depending on it's type
    • UAElements require get the description from RoomElementsDAOService
    • Generic descriptions come bundle with the remote Issue.target
    • UACharacteristics not implemented yet, so they are unsuported
  2. [DONE] IssueDetailView - Show the IssueBO.view.targetText generated

IssueMap - Adapt to new IssueTarget

Tasks

  1. [DONE] IssueBO - Generate a "targetTextIndex" {HashMap<String,String>} which indexes target text by SIGUA id. Obtained with a promise based method because it needs remote data procesed.
  2. [DONE] IssueMapController - Get targetTextIndex from IssueBO service, bind it to $scope.targetTextIndex and upate markers ($scope.map.markersUpdate)
  3. [DONE] MapBO - On "markersUpdate()" set marker popup target text using angular expresions binding to $scope.targetTextIndex[SIGUAid]

BUG on #4 .3 - Leaflet angular directive - Markers expressions get unbinded

While solving #4 .3
* IssueMap - Adapt to new IssueTarget
* MapBO - On "markersUpdate()" set marker popup target text using angular expresions binding to $scope.targetTextIndex[SIGUAid]

Explanation

On first markersUpdate() - Binding is OK

In the IssueMap view initially angular expresions are being binded OK. As a "test" expresion proofs
* Having a " $scope.test = "test" " showing correctly in the markers popup

This happens after the first MapBO.markersUptade() done after IssueDAO.getAll because of this event subscription at MapBO::((IssueDAO.observer.subscribe("fetch", this.markersUpdate)

On second markersUpdate() - Binding 🪲 FAILS 🪲

But once a second update occurs, once the object targetTextIndex is generated
* Once remote data about target elements by RoomsElementsDAO is fetched and processed by IssueBO.getTargetTextIndex

Code that triggers the second update after receiving the desired data

IssueBO.getTargetTextIndex().then(function(targetTextIndex) {
    $scope.targetTextIndex = targetTextIndex;
    $scope.map.markersUpdate();
});

🪲 Buggy result 🪲

Then the markers popup text get unbinded, failing to show, not only the expected targetText, but also the previously shown correctly "$scope.test" data.

The popup prints "{{test}}" instead of just "test" or nothing. Same result as when the marker parameter "getMessageScope" was wrong.

When there's scope but the variable is undefined it shows just nothing (Not this scenario)

So: Binding goes wrong, or the whole scope is lost in some way

Updates

02/04/2015 18:11

  • Changing from notify mode and coming back to standard mode fixes the binding. Maybe it's related to $.apply(). In the past i had some trouble with leaflet directive and modifying active tiles which werent updated unless a $.apply() on controller (ANTIPATTERN) was included at the modifier method.

Fix

Removed the second markersUpdate at https://github.com/ElMesa/mejorua-smartphone-angular/blob/master/app/scripts/controllers/issuemap.js#L28

It was unnecessary because the angular binding already updates the targetText info once it is accesible.

This second update didn't got applied correctly and was the source of the bug.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.