Skip to content

Instantly share code, notes, and snippets.

@michaelmr
Last active August 29, 2015 14:18
Show Gist options
  • Save michaelmr/e5604053aee63c574f1c to your computer and use it in GitHub Desktop.
Save michaelmr/e5604053aee63c574f1c to your computer and use it in GitHub Desktop.
Updated version for models and specification of inputs for some controllers
//Views conventions
views = [
login,
dashboard,
issues,
issue-detail
issue-map,
issue-client
]
where i is a value between 0..views.length - 1
template: '$views[i]$-template.html'
controller: '$views[i]$Controller as LowercaseWithoutDashes($views[i]$)'
url:'/$views[i]$'
//Services conventions
Services:
Users: angular.resource.IResourceService,
Clients: angular.resource.IResourceService,
Issues: angular.resource.IResourceService
//Application Teachnical Assistance Management Software
//Initial Views description
// Login View
// List Issues: sort by status and date
// Issue Detail: shows detailed info for an Issue
// Dashboard: shows number of issues pending to solve .
// Red- More than one day without attention. issues Open
// Yellow - current day without attention. issues Open
// Purple- More than one day without attention. issues Pending
// Orange- More than one day without attention. issues Pending
// Map View : shows technical user location and client location for specific issue
// Client View: shows info related to client
module ModelsDefinitions
{
export enum StatusOptions {
Open=0,
Close=1,
Pending=2
}
export interface Location {
latitude: string;
longitude: string;
}
export interface User {
userName: string;
password:string;
location: Location;
}
export interface Issue {
status: StatusOptions;
client:Client;
assignee: User;
assignationDate: Date;
creationDate: Date;
dateLastModification: Date;
info:string;
comments: string;
}
export interface Client {
name:string;
address:string;
location: Location;
}
}
//Map View Controller
class IssueMapController {
constructor(user:User, client:Client) {
}
//Client View Controller
class IssueClientController {
constructor(client:Client) {
}
//Issue Detail Controller
class IssueDetailController {
constructor(issue:Issue)
}
//Issues Controller
class IssuesController {
constructor(issues:Array<Issue>)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment