import { Day, SchadulerOption, Column, Row, Point, Cell, Item } from "sigma-ng/schaduler"; export class SchadulerPivotOption { public dayCount: number = 15; public dayStart: number = 1; public weekDays: Day[] = Day.PersianCollection; } export class SchadulerPivot { public position: Point = new Point(0, 0); public options: SchadulerOption = new SchadulerOption; public dayOptions: SchadulerPivotOption = new SchadulerPivotOption; public title: string; public columns: Column[] = []; public rows: Row[] = []; public get SelectedCell(): Cell { if (this.position.y > -1 && this.position.y < this.rows.length) { if (this.position.x > -1 && this.position.x < this.rows[this.position.y].cells.length) { return this.rows[this.position.y].cells[this.position.x]; } } return null; } public get SelectedItem(): Item { return this.SelectedCell.value; } }