This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import { Component } from '@angular/core'; | |
| import { IonicPage, Platform, NavController, NavParams, AlertController, ActionSheetController, ModalController } from 'ionic-angular'; | |
| import { WorkItem, Task } from '../../commons/types'; | |
| @IonicPage() | |
| @Component({ | |
| selector: 'page-task-list', | |
| templateUrl: 'task-list.html', | |
| }) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <ion-header> | |
| <ion-navbar color="primary"> | |
| <ion-title>Work Item: {{workitem.title}}</ion-title> | |
| <ion-buttons end> | |
| <button ion-button icon-only (click)="addItem()"> | |
| <ion-icon name="add-circle"> | |
| </ion-icon> | |
| </button> | |
| </ion-buttons> | |
| </ion-navbar> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import { Component } from '@angular/core'; | |
| import { IonicPage, NavController, AlertController, Platform, Keyboard } from 'ionic-angular'; | |
| import { WorkItem } from '../../commons/types'; | |
| import { WorkItemModel } from '../../models/workitem-model'; | |
| import { UUID } from 'angular2-uuid'; | |
| @IonicPage() | |
| @Component({ | |
| selector: 'page-home', |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <ion-content padding> | |
| <ion-list no-lines> | |
| <ion-item-sliding #slidingItem *ngFor="let workitem of workitems"> | |
| <button ion-item (click)="viewWorkItem(workitem)"> | |
| {{workitem.title}}<span text-right> <ion-badge>{{workitem.tasks.length}}</ion-badge> items</span> | |
| </button> | |
| <ion-item-options icon-top> | |
| <button ion-button color="light" (click)="updateWorkItem(slidingItem, workitem)"> | |
| <ion-icon name="clipboard"></ion-icon>Edit | |
| </button> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <ion-header> | |
| <ion-navbar color="primary" > | |
| <ion-title> | |
| Work Items | |
| </ion-title> | |
| <ion-buttons end> | |
| <button ion-button icon-only (click)="addWorkItem()"> | |
| <ion-icon name="add-circle"></ion-icon> | |
| </button> | |
| </ion-buttons> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import { Schedule } from '../commons/types'; | |
| export class ScheduleModel implements Schedule { | |
| constructor(public id: string, public start: Date, public end: Date) { } | |
| updatePeriod(start: Date, end: Date) { | |
| this.start = start; | |
| this.end = end; | |
| } | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var WorkItemModel = (function () { | |
| function WorkItemModel(id, title, tasks) { | |
| this.id = id; | |
| this.title = title; | |
| this.tasks = []; | |
| } | |
| WorkItemModel.prototype.update = function (title) { | |
| this.title = title; | |
| }; | |
| WorkItemModel.prototype.addTask = function (task) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import { WorkItem, Task } from '../commons/types'; | |
| export class WorkItemModel implements WorkItem { | |
| public tasks: Task[] = []; | |
| constructor(public id: string, public title: string, tasks: Task[]) { } | |
| update(title: string): void { | |
| this.title = title; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| interface Period { | |
| start: Date; | |
| end: Date; | |
| updatePeriod(start: Date, end: Date); | |
| } | |
| export interface TimeTracker extends Period { | |
| id: string; | |
| detail: string; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| @IonicPage() | |
| @Component({ | |
| selector: 'page-home', | |
| templateUrl: 'home.html' | |
| }) | |
| export class HomePage { |