mirror of
https://github.com/atlanticbiomedical/biomedjs.git
synced 2025-07-02 00:47:26 -04:00
sync
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@ -73,6 +73,7 @@ header {
|
||||
font-weight: 500;
|
||||
color: #999999;
|
||||
margin: 0;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
}
|
||||
|
||||
@ -160,6 +161,42 @@ header {
|
||||
}
|
||||
}
|
||||
|
||||
.users {
|
||||
th, td {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.group-start {
|
||||
border-left: 1px solid #dddddd;
|
||||
}
|
||||
|
||||
.name, .email { text-align: left; white-space: nowrap; }
|
||||
|
||||
.false {
|
||||
.icon {
|
||||
.icon-remove;
|
||||
}
|
||||
}
|
||||
|
||||
.true {
|
||||
background-color: #DFF0D8 !important;
|
||||
|
||||
.icon {
|
||||
.icon-ok;
|
||||
}
|
||||
}
|
||||
|
||||
.new {
|
||||
background-color: #49cced;
|
||||
color: white;
|
||||
font-size: 10px;
|
||||
padding: 2px 5px;
|
||||
margin: 2px;
|
||||
.border-radius(2px);
|
||||
vertical-align: middle;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
.axis path,
|
||||
@ -248,6 +285,7 @@ header {
|
||||
|
||||
.tech-label {
|
||||
float: left;
|
||||
width: 140px;
|
||||
}
|
||||
|
||||
.enteries {
|
||||
|
BIN
public/img/select2-spinner.gif
Normal file
BIN
public/img/select2-spinner.gif
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.8 KiB |
BIN
public/img/select2.png
Normal file
BIN
public/img/select2.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 613 B |
BIN
public/img/select2x2.png
Normal file
BIN
public/img/select2x2.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 845 B |
@ -22,8 +22,9 @@ angular.module('biomed', ['biomed.filters', 'biomed.services', 'biomed.directive
|
||||
data = data.replace(PROTECTION_PREFIX, '');
|
||||
if (JSON_START.test(data) && JSON_END.test(data)) {
|
||||
data = JSON.parse(data, function(key, val) {
|
||||
if (DATE_MATCHER.test(val))
|
||||
return new Date(val);
|
||||
if (DATE_MATCHER.test(val)) {
|
||||
return new moment(val).zone(-5).toDate();
|
||||
}
|
||||
return val;
|
||||
})
|
||||
}
|
||||
@ -68,6 +69,15 @@ angular.module('biomed', ['biomed.filters', 'biomed.services', 'biomed.directive
|
||||
templateUrl: '/partials/workorders/edit.html',
|
||||
controller: biomed.WorkorderEditCtrl
|
||||
})
|
||||
.when('/techs/:id', {
|
||||
templateUrl: '/partials/techs/schedule.html',
|
||||
controller: biomed.TechScheduleCtrl
|
||||
})
|
||||
.when('/admin', {
|
||||
templateUrl: '/partials/users/index.html',
|
||||
controller: biomed.UsersIndexCtrl,
|
||||
reloadOnSearch: false
|
||||
})
|
||||
.otherwise({
|
||||
redirectTo: '/schedule'
|
||||
});
|
||||
|
@ -1,5 +1,29 @@
|
||||
biomed.AccountCtrl = function($scope, Account) {
|
||||
$scope.account = Account.get();
|
||||
|
||||
biomed.TechScheduleCtrl = function($scope, $routeParams, $location, Schedule, Users, LocationBinder) {
|
||||
|
||||
if (!$scope.date) {
|
||||
$scope.date = new Date();
|
||||
}
|
||||
|
||||
Users.index({userid: $routeParams.id}, function(result) {
|
||||
$scope.tech = result[0];
|
||||
});
|
||||
|
||||
$scope.$watch('date', updateDate);
|
||||
|
||||
$scope.onEntryClick = function(entry) {
|
||||
$location.path('/workorders/' + entry.workorder._id);
|
||||
};
|
||||
|
||||
function updateDate() {
|
||||
Schedule.index({
|
||||
tech: $routeParams.id,
|
||||
start: $scope.date.toJSON(),
|
||||
end: moment($scope.date).add('days', 7).toDate().toJSON()
|
||||
}, function(result) {
|
||||
$scope.schedule = result;
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
biomed.ScheduleIndexCtrl = function($scope, $location, Users, Schedule, LocationBinder) {
|
||||
@ -64,6 +88,90 @@ biomed.SchedulePmsCtrl = function($scope, Clients) {
|
||||
$scope.$watch('month', filter);
|
||||
};
|
||||
|
||||
biomed.UsersIndexCtrl = function($scope, $filter, $routeParams, $location, Users, LocationBinder) {
|
||||
$scope.loading = true;
|
||||
|
||||
$scope.account.$then(function(value) {
|
||||
if (!$scope.accountHasPermission('system.admin'))
|
||||
return $location.path('/');
|
||||
});
|
||||
|
||||
|
||||
var allData = Users.details(function() {
|
||||
$scope.loading = false;
|
||||
$scope.filter();
|
||||
});
|
||||
|
||||
var filteredData = [];
|
||||
var index = 0;
|
||||
var initialPageSize = 100;
|
||||
var pageSize = 5;
|
||||
|
||||
$scope.canLoad = true;
|
||||
$scope.$watch('query', function() {
|
||||
$scope.filter();
|
||||
});
|
||||
|
||||
LocationBinder($scope, ['query']);
|
||||
|
||||
$scope.filter = function() {
|
||||
filteredData = $filter('filter')(allData, $scope.query);
|
||||
index = initialPageSize;
|
||||
$scope.canLoad = true;
|
||||
$scope.users = filteredData.slice(0, initialPageSize);
|
||||
};
|
||||
|
||||
$scope.addItems = function() {
|
||||
$scope.users = $scope.users.concat(filteredData.slice(index, index + pageSize));
|
||||
index += pageSize;
|
||||
$scope.canLoad = index < filteredData.length;
|
||||
};
|
||||
|
||||
function save(user) {
|
||||
if ('_id' in user) {
|
||||
Users.update({id: user._id}, user, function(result) {
|
||||
angular.copy(result, user);
|
||||
});
|
||||
} else {
|
||||
Users.create(user, function(result) {
|
||||
angular.copy(result, user);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
$scope.toggleGroup = function(user, group) {
|
||||
var index = user.groups.indexOf(group);
|
||||
if (index > -1)
|
||||
user.groups.splice(index, 1);
|
||||
else
|
||||
user.groups.push(group);
|
||||
|
||||
save(user);
|
||||
}
|
||||
|
||||
$scope.checkGroup = function(user, group) {
|
||||
return $.inArray(group, user.groups) > -1;
|
||||
};
|
||||
|
||||
$scope.togglePerm = function(user, perm) {
|
||||
var index = user.perms.indexOf(perm);
|
||||
if (index > -1)
|
||||
user.perms.splice(index, 1);
|
||||
else
|
||||
user.perms.push(perm);
|
||||
|
||||
save(user);
|
||||
};
|
||||
|
||||
$scope.checkPerm = function(user, perm) {
|
||||
return $.inArray(perm, user.perms) > -1;
|
||||
};
|
||||
|
||||
$scope.isNew = function(user) {
|
||||
return !('_id' in user);
|
||||
};
|
||||
};
|
||||
|
||||
biomed.ClientIndexCtrl = function($scope, $filter, $routeParams, Clients, LocationBinder) {
|
||||
$scope.loading = true;
|
||||
|
||||
@ -295,13 +403,21 @@ biomed.WorkorderIndexCtrl = function($scope, $filter, $routeParams, Workorders,
|
||||
|
||||
biomed.WorkorderAddCtrl = function($scope, $location, Workorders, Schedule, Clients, Users) {
|
||||
|
||||
$scope.emailsOptions = {
|
||||
'multiple': true,
|
||||
'simple_tags': true,
|
||||
'tags': [],
|
||||
'formatNoMatches': function() { return 'Type an e-mail address and press return to add it.'; }
|
||||
};
|
||||
|
||||
$scope.group = 'all';
|
||||
$scope.model = {};
|
||||
$scope.picker = {
|
||||
start: '09:00:00',
|
||||
end: '17:00:00'
|
||||
startTime: '09:00:00',
|
||||
endTime: '09:45:00'
|
||||
};
|
||||
$scope.picker.date = new Date();
|
||||
$scope.picker.startDate = new Date();
|
||||
$scope.picker.endDate = new Date();
|
||||
|
||||
var search = $location.search();
|
||||
|
||||
@ -311,6 +427,13 @@ biomed.WorkorderAddCtrl = function($scope, $location, Workorders, Schedule, Clie
|
||||
$scope.model.maintenanceType = search.type;
|
||||
|
||||
$scope.workorderType = 'pm';
|
||||
} else if (search.workorderType == "meeting") {
|
||||
$scope.model.reason = "Meeting";
|
||||
$scope.workorderType = 'meeting';
|
||||
|
||||
if (search.clientId) {
|
||||
$scope.model.client = search.clientId;
|
||||
}
|
||||
} else {
|
||||
if (search.clientId) {
|
||||
$scope.model.client = search.clientId;
|
||||
@ -334,23 +457,94 @@ biomed.WorkorderAddCtrl = function($scope, $location, Workorders, Schedule, Clie
|
||||
$scope.clients = result;
|
||||
});
|
||||
|
||||
$scope.$watch('picker.date', function() {
|
||||
function convertToDate(date, time) {
|
||||
return moment(moment(date).format('YYYY-MM-DD') + 'T' + time).toDate();
|
||||
}
|
||||
|
||||
function datesOverlap() {
|
||||
var start = convertToDate($scope.picker.startDate, $scope.picker.startTime);
|
||||
var end = convertToDate($scope.picker.endDate, $scope.picker.endTime);
|
||||
return start >= end;
|
||||
}
|
||||
|
||||
function updateDuration() {
|
||||
var start = convertToDate($scope.picker.startDate, $scope.picker.startTime);
|
||||
var end = convertToDate($scope.picker.endDate, $scope.picker.endTime);
|
||||
|
||||
var duration = moment.duration(end - start);
|
||||
|
||||
var days = duration.days()
|
||||
var hours = duration.hours();
|
||||
var minutes = duration.minutes();
|
||||
|
||||
var result = "";
|
||||
|
||||
if (days == 1) {
|
||||
result += "1 Day ";
|
||||
}
|
||||
if (days > 1) {
|
||||
result += days + " Days ";
|
||||
}
|
||||
if (hours == 1) {
|
||||
result += "1 Hour ";
|
||||
}
|
||||
if (hours > 1) {
|
||||
result += hours + " Hours ";
|
||||
}
|
||||
if (minutes > 0) {
|
||||
result += minutes + " Minutes";
|
||||
}
|
||||
|
||||
$scope.picker.duration = result;
|
||||
}
|
||||
|
||||
|
||||
$scope.$watch('picker.startDate', function() {
|
||||
Schedule.index({
|
||||
date: $scope.picker.date.toJSON()
|
||||
date: $scope.picker.startDate.toJSON()
|
||||
}, function(result) {
|
||||
$scope.schedule = result;
|
||||
});
|
||||
|
||||
if (datesOverlap()) {
|
||||
$scope.picker.endDate = $scope.picker.startDate;
|
||||
}
|
||||
updateDuration();
|
||||
});
|
||||
|
||||
$scope.save = function() {
|
||||
$scope.$watch('picker.endDate', function() {
|
||||
if (datesOverlap()) {
|
||||
$scope.picker.startDate = $scope.picker.endDate;
|
||||
}
|
||||
updateDuration();
|
||||
});
|
||||
|
||||
$scope.$watch('picker.startTime', function() {
|
||||
$scope.picker.endTime = moment($scope.picker.startTime, "HH:mm:ss").add('minutes', 45).format("HH:mm:ss");
|
||||
$scope.picker.endDate = $scope.picker.startDate;
|
||||
updateDuration();
|
||||
});
|
||||
|
||||
$scope.$watch('picker.endTime', function() {
|
||||
if (datesOverlap()) {
|
||||
$scope.picker.startTime = moment($scope.picker.endTime, "HH:mm:ss").subtract('minutes', 15).format("HH:mm:ss");
|
||||
}
|
||||
updateDuration();
|
||||
});
|
||||
|
||||
$scope.save = function(notify) {
|
||||
var picker = $scope.picker;
|
||||
var model = $scope.model;
|
||||
|
||||
var date = moment(picker.date).format('YYYY-MM-DD');
|
||||
var startDate = moment(picker.startDate).format('YYYY-MM-DD');
|
||||
var endDate = moment(picker.endDate).format('YYYY-MM-DD');
|
||||
|
||||
model.status = 'scheduled';
|
||||
model.scheduling = {};
|
||||
model.scheduling.start = moment(date + 'T' + picker.start).toDate();
|
||||
model.scheduling.end = moment(date + 'T' + picker.end).toDate();
|
||||
model.scheduling.start = moment(startDate + 'T' + picker.startTime).toDate();
|
||||
model.scheduling.end = moment(endDate + 'T' + picker.endTime).toDate();
|
||||
|
||||
model._notify = notify;
|
||||
|
||||
Workorders.create(model, function(result) {
|
||||
$location.path("/workorders/" + result._id);
|
||||
@ -368,6 +562,14 @@ biomed.WorkorderAddCtrl = function($scope, $location, Workorders, Schedule, Clie
|
||||
var criteria = {};
|
||||
|
||||
Users.index(criteria, function(result) {
|
||||
result.sort(function(a,b) {
|
||||
var r = a.name.first.localeCompare(b.name.first);
|
||||
if (r == 0) {
|
||||
r = a.name.last.localeCompare(b.name.last);
|
||||
}
|
||||
return r;
|
||||
});
|
||||
|
||||
$scope.allUsers = result;
|
||||
|
||||
$scope.usersMap = {};
|
||||
@ -379,6 +581,13 @@ biomed.WorkorderAddCtrl = function($scope, $location, Workorders, Schedule, Clie
|
||||
}
|
||||
|
||||
biomed.WorkorderEditCtrl = function($scope, $routeParams, Workorders, Schedule, Users) {
|
||||
$scope.emailsOptions = {
|
||||
'multiple': true,
|
||||
'simple_tags': true,
|
||||
'tags': [],
|
||||
'formatNoMatches': function() { return 'Type an e-mail address and press return to add it.'; }
|
||||
};
|
||||
|
||||
$scope.group = 'all';
|
||||
$scope.route = $routeParams;
|
||||
$scope.loading = true;
|
||||
@ -390,8 +599,13 @@ biomed.WorkorderEditCtrl = function($scope, $routeParams, Workorders, Schedule,
|
||||
|
||||
$scope.master = Workorders.get($routeParams, function() {
|
||||
$scope.loading = false;
|
||||
|
||||
if ($scope.master.reason == "Meeting") {
|
||||
$scope.workorderType = "meeting";
|
||||
}
|
||||
});
|
||||
|
||||
$scope.emails = createController();
|
||||
$scope.status = createController();
|
||||
$scope.remarks = createController();
|
||||
$scope.scheduling = createSchedulingController();
|
||||
@ -410,7 +624,9 @@ biomed.WorkorderEditCtrl = function($scope, $routeParams, Workorders, Schedule,
|
||||
$scope.editing = true;
|
||||
}
|
||||
},
|
||||
save: function() {
|
||||
save: function(notify) {
|
||||
controller.model._notify = notify;
|
||||
|
||||
Workorders.update({id: $scope.master._id}, controller.model);
|
||||
angular.copy(controller.model, $scope.master);
|
||||
controller.visible = false;
|
||||
@ -434,9 +650,11 @@ biomed.WorkorderEditCtrl = function($scope, $routeParams, Workorders, Schedule,
|
||||
if (!$scope.editing) {
|
||||
angular.copy($scope.master, controller.model);
|
||||
|
||||
controller.date = moment(controller.model.scheduling.start).startOf('day').toDate();
|
||||
controller.start = moment(controller.model.scheduling.start).format('HH:mm:ss');
|
||||
controller.end = moment(controller.model.scheduling.end).format('HH:mm:ss');
|
||||
controller.startDate = moment(controller.model.scheduling.start).startOf('day').toDate();
|
||||
controller.endDate = moment(controller.model.scheduling.end).startOf('day').toDate();
|
||||
|
||||
controller.startTime = moment(controller.model.scheduling.start).format('HH:mm:ss');
|
||||
controller.endTime = moment(controller.model.scheduling.end).format('HH:mm:ss');
|
||||
|
||||
controller.techs = controller.model.techs.map(function(t) { return t._id; });
|
||||
|
||||
@ -444,13 +662,17 @@ biomed.WorkorderEditCtrl = function($scope, $routeParams, Workorders, Schedule,
|
||||
$scope.editing = true;
|
||||
}
|
||||
},
|
||||
save: function() {
|
||||
var date = moment(controller.date).format('YYYY-MM-DD');
|
||||
controller.model.scheduling.start = moment(date + 'T' + controller.start).toDate();
|
||||
controller.model.scheduling.end = moment(date + 'T' + controller.end).toDate();
|
||||
save: function(notify) {
|
||||
var startDate = moment(controller.startDate).format('YYYY-MM-DD');
|
||||
var endDate = moment(controller.endDate).format('YYYY-MM-DD');
|
||||
|
||||
controller.model.scheduling.start = moment(startDate + 'T' + controller.startTime).toDate();
|
||||
controller.model.scheduling.end = moment(endDate + 'T' + controller.endTime).toDate();
|
||||
|
||||
controller.model.techs = controller.techs.map(function(t) { return $scope.usersMap[t]; });
|
||||
|
||||
controller.model._notify = notify;
|
||||
|
||||
Workorders.update({id: $scope.master._id}, controller.model);
|
||||
angular.copy(controller.model, $scope.master);
|
||||
controller.visible = false;
|
||||
@ -466,15 +688,80 @@ biomed.WorkorderEditCtrl = function($scope, $routeParams, Workorders, Schedule,
|
||||
};
|
||||
|
||||
|
||||
$scope.$watch('scheduling.date', function() {
|
||||
function convertToDate(date, time) {
|
||||
return moment(moment(date).format('YYYY-MM-DD') + 'T' + time).toDate();
|
||||
}
|
||||
|
||||
function datesOverlap() {
|
||||
var start = convertToDate($scope.scheduling.startDate, $scope.scheduling.startTime);
|
||||
var end = convertToDate($scope.scheduling.endDate, $scope.scheduling.endTime);
|
||||
return start >= end;
|
||||
}
|
||||
|
||||
function updateDuration() {
|
||||
var start = convertToDate($scope.scheduling.startDate, $scope.scheduling.startTime);
|
||||
var end = convertToDate($scope.scheduling.endDate, $scope.scheduling.endTime);
|
||||
|
||||
var duration = moment.duration(end - start);
|
||||
|
||||
var days = duration.days()
|
||||
var hours = duration.hours();
|
||||
var minutes = duration.minutes();
|
||||
|
||||
var result = "";
|
||||
|
||||
if (days == 1) {
|
||||
result += "1 Day ";
|
||||
}
|
||||
if (days > 1) {
|
||||
result += days + " Days ";
|
||||
}
|
||||
if (hours == 1) {
|
||||
result += "1 Hour ";
|
||||
}
|
||||
if (hours > 1) {
|
||||
result += hours + " Hours ";
|
||||
}
|
||||
if (minutes > 0) {
|
||||
result += minutes + " Minutes";
|
||||
}
|
||||
|
||||
$scope.scheduling.duration = result;
|
||||
}
|
||||
|
||||
$scope.$watch('scheduling.startDate', function() {
|
||||
Schedule.index({
|
||||
date: $scope.scheduling.date.toJSON()
|
||||
date: $scope.scheduling.startDate.toJSON()
|
||||
}, function(result) {
|
||||
$scope.scheduling.schedule = result;
|
||||
});
|
||||
|
||||
if (datesOverlap()) {
|
||||
$scope.scheduling.endDate = $scope.scheduling.startDate;
|
||||
}
|
||||
updateDuration();
|
||||
});
|
||||
|
||||
$scope.$watch('scheduling.endDate', function() {
|
||||
if (datesOverlap()) {
|
||||
$scope.scheduling.startDate = $scope.scheduling.endDate;
|
||||
}
|
||||
updateDuration();
|
||||
});
|
||||
|
||||
$scope.$watch('scheduling.startTime', function() {
|
||||
$scope.scheduling.endTime = moment($scope.scheduling.startTime, "HH:mm:ss").add('minutes', 45).format("HH:mm:ss");
|
||||
$scope.scheduling.endDate = $scope.scheduling.startDate;
|
||||
updateDuration();
|
||||
});
|
||||
|
||||
$scope.$watch('scheduling.endTime', function() {
|
||||
if (datesOverlap()) {
|
||||
$scope.scheduling.startTime = moment($scope.scheduling.endTime, "HH:mm:ss").subtract('minutes', 15).format("HH:mm:ss");
|
||||
}
|
||||
updateDuration();
|
||||
});
|
||||
|
||||
return controller;
|
||||
}
|
||||
|
||||
@ -488,6 +775,14 @@ biomed.WorkorderEditCtrl = function($scope, $routeParams, Workorders, Schedule,
|
||||
var criteria = {};
|
||||
|
||||
Users.index(criteria, function(result) {
|
||||
result.sort(function(a,b) {
|
||||
var r = a.name.first.localeCompare(b.name.first);
|
||||
if (r == 0) {
|
||||
r = a.name.last.localeCompare(b.name.last);
|
||||
}
|
||||
return r;
|
||||
});
|
||||
|
||||
$scope.allUsers = result;
|
||||
|
||||
$scope.usersMap = {};
|
||||
@ -499,7 +794,7 @@ biomed.WorkorderEditCtrl = function($scope, $routeParams, Workorders, Schedule,
|
||||
};
|
||||
|
||||
|
||||
biomed.PageCtrl = function($scope, $dialog) {
|
||||
biomed.PageCtrl = function($scope, $dialog, Account) {
|
||||
$scope.opts = {
|
||||
backdrop: true,
|
||||
keyboard: true,
|
||||
@ -514,6 +809,17 @@ biomed.PageCtrl = function($scope, $dialog) {
|
||||
var d = $dialog.dialog($scope.opts);
|
||||
d.open();
|
||||
};
|
||||
|
||||
$scope.accountHasPermission = function(perm) {
|
||||
console.log($scope);
|
||||
if ($scope.account && $scope.account.perms) {
|
||||
return $scope.account.perms.indexOf(perm) > -1;
|
||||
}
|
||||
|
||||
return false;
|
||||
};
|
||||
|
||||
$scope.account = Account.get();
|
||||
};
|
||||
|
||||
biomed.MessagesCtrl = function($scope, dialog, Users, Messages) {
|
||||
|
@ -168,16 +168,16 @@ angular.module('biomed.directives', [])
|
||||
}
|
||||
|
||||
// Use native interface for touch devices
|
||||
if(isTouch && element.prop('type') === 'text') {
|
||||
// if(isTouch && element.prop('type') === 'text') {
|
||||
//
|
||||
// element.prop('type', 'date');
|
||||
// element.on('change', function(ev) {
|
||||
// scope.$apply(function () {
|
||||
// controller.$setViewValue(moment(element.val()).toDate());
|
||||
// });
|
||||
// });
|
||||
|
||||
element.prop('type', 'date');
|
||||
element.on('change', function(ev) {
|
||||
scope.$apply(function () {
|
||||
controller.$setViewValue(moment(element.val()).toDate());
|
||||
});
|
||||
});
|
||||
|
||||
} else {
|
||||
// } else {
|
||||
|
||||
// If we have a controller (i.e. ngModelController) then wire it up
|
||||
if(controller) {
|
||||
@ -208,7 +208,7 @@ angular.module('biomed.directives', [])
|
||||
forceParse: attrs.forceParse || false
|
||||
});
|
||||
|
||||
}
|
||||
// }
|
||||
|
||||
// Support add-on
|
||||
var component = element.siblings('[data-toggle="datepicker"]');
|
||||
@ -219,8 +219,143 @@ angular.module('biomed.directives', [])
|
||||
}
|
||||
};
|
||||
})
|
||||
.directive('techpicker', function() {
|
||||
.directive('techschedule', function() {
|
||||
return {
|
||||
restrict: 'E',
|
||||
scope: {
|
||||
schedule: '=',
|
||||
date: '=',
|
||||
onEntryClick: '&'
|
||||
},
|
||||
templateUrl: '/partials/techSchedule.html',
|
||||
replace: true,
|
||||
link: function($scope, element, attrs) {
|
||||
var x, rangeDate, rangeStart, rangeEnd;
|
||||
|
||||
function setupScale() {
|
||||
x = d3.scale.linear()
|
||||
.range([0, 100])
|
||||
.domain([420, 1320])
|
||||
.clamp(true);
|
||||
}
|
||||
|
||||
setupScale();
|
||||
|
||||
var color = d3.scale.category20();
|
||||
var hourWidth = 100 / 15;
|
||||
|
||||
$scope.hourMarkers = [];
|
||||
for (var i = 7; i < 22; i++) {
|
||||
$scope.hourMarkers.push({
|
||||
date: moment({ hour: i }).toDate(),
|
||||
style: {
|
||||
left: x(i * 60) + '%',
|
||||
width: hourWidth + '%'
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
$scope.$watch('schedule', function(newVal, oldVal) {
|
||||
generateDate();
|
||||
});
|
||||
|
||||
$scope.$watch('date', function(newVal, oldVal) {
|
||||
setupScale();
|
||||
});
|
||||
|
||||
function generateDate() {
|
||||
var range = moment($scope.date);
|
||||
var data = {};
|
||||
|
||||
for (var i = 0; i < 7; i++) {
|
||||
var day = range.clone().add(i, 'days');
|
||||
var key = day.format('MM-DD-YYYY');
|
||||
var label = day.format('ddd MMM Do YYYY');
|
||||
|
||||
data[key] = {
|
||||
label: label,
|
||||
values: []
|
||||
};
|
||||
}
|
||||
|
||||
var c = 0;
|
||||
|
||||
angular.forEach($scope.schedule, function(workorder) {
|
||||
var start = moment(workorder.scheduling.start);
|
||||
var startMinutes = start.diff(start.clone().startOf('day'), 'minutes');
|
||||
|
||||
var end = moment(workorder.scheduling.end);
|
||||
var endMinutes = end.diff(end.clone().startOf('day'), 'minutes');
|
||||
|
||||
var length = end.diff(start, 'days') + 1;
|
||||
|
||||
console.log('length: ' + length + ' start: ' + startMinutes + ' end: ' + endMinutes);
|
||||
|
||||
var backgroundColor = color(c++);
|
||||
|
||||
for (var i = 0; i < length; i++) {
|
||||
var adjStart, adjEnd;
|
||||
|
||||
var key = start.clone().add(i, 'days').format('MM-DD-YYYY');
|
||||
|
||||
if (i == 0) {
|
||||
adjStart = startMinutes;
|
||||
} else {
|
||||
adjStart = 420;
|
||||
}
|
||||
|
||||
if (i == length - 1) {
|
||||
adjEnd = endMinutes;
|
||||
} else {
|
||||
adjEnd = 1320;
|
||||
}
|
||||
|
||||
if (data[key]) {
|
||||
data[key].values.push({
|
||||
style: {
|
||||
backgroundColor: color(c),
|
||||
left: x(adjStart) + '%',
|
||||
width: (x(adjEnd) - x(adjStart)) + '%'
|
||||
},
|
||||
workorder: workorder
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
return;
|
||||
|
||||
angular.forEach(workorder.techs, function(tech) {
|
||||
var key = tech.name.first + ' ' + tech.name.last;
|
||||
|
||||
if (!data[key])
|
||||
return;
|
||||
|
||||
var start = moment(workorder.scheduling.start);
|
||||
var end = moment(workorder.scheduling.end);
|
||||
|
||||
data[key].values.push({
|
||||
style: {
|
||||
backgroundColor: color(key),
|
||||
left: x(start) + "%",
|
||||
width: (x(end) - x(start)) + "%"
|
||||
},
|
||||
workorder: workorder
|
||||
});
|
||||
})
|
||||
});
|
||||
|
||||
$scope.data = data;
|
||||
}
|
||||
}
|
||||
};
|
||||
})
|
||||
.filter('pretty', function() {
|
||||
return function(input) {
|
||||
return "\n" + angular.toJson(input, true);
|
||||
}
|
||||
})
|
||||
.directive('techpicker', function() {
|
||||
return {
|
||||
restrict: 'E',
|
||||
scope: {
|
||||
@ -232,24 +367,31 @@ angular.module('biomed.directives', [])
|
||||
templateUrl: '/partials/techPicker.html',
|
||||
replace: true,
|
||||
link: function($scope, element, attrs) {
|
||||
var timePickerParser = d3.time.format('%I:%M%p');
|
||||
|
||||
var rangeStart = timePickerParser.parse('7:00am');
|
||||
var rangeEnd = timePickerParser.parse('10:00pm');
|
||||
var x, rangeDate, rangeStart, rangeEnd;
|
||||
|
||||
var x = d3.time.scale()
|
||||
.range([0, 100])
|
||||
.domain([rangeStart, rangeEnd]);
|
||||
function setupScale() {
|
||||
rangeDate = moment($scope.date).startOf('day');
|
||||
|
||||
rangeStart = moment(rangeDate).add('hours', 7);
|
||||
rangeEnd = moment(rangeDate).add('hours', 22);
|
||||
|
||||
x = d3.time.scale()
|
||||
.range([0, 100])
|
||||
.domain([rangeStart.toDate(), rangeEnd.toDate()])
|
||||
.clamp(true);
|
||||
}
|
||||
|
||||
setupScale();
|
||||
|
||||
var color = d3.scale.category20();
|
||||
|
||||
var totalHours = moment.duration(moment(rangeEnd) - moment(rangeStart)).hours();
|
||||
var totalHours = moment.duration(rangeEnd - rangeStart).hours();
|
||||
var hourWidth = 100 / totalHours;
|
||||
|
||||
$scope.hourMarkers = [];
|
||||
for (var i = 0; i < totalHours; i++) {
|
||||
var date = moment(rangeStart).add('hours', i).toDate();
|
||||
|
||||
$scope.hourMarkers.push({
|
||||
date: date,
|
||||
style: {
|
||||
@ -267,6 +409,10 @@ angular.module('biomed.directives', [])
|
||||
generateDate();
|
||||
});
|
||||
|
||||
$scope.$watch('date', function(newVal, oldVal) {
|
||||
setupScale();
|
||||
});
|
||||
|
||||
function generateDate() {
|
||||
var data = {};
|
||||
|
||||
@ -275,7 +421,10 @@ angular.module('biomed.directives', [])
|
||||
angular.forEach($scope.users, function(user) {
|
||||
var key = user.name.first + ' ' + user.name.last;
|
||||
labels.push(key);
|
||||
data[key] = [];
|
||||
data[key] = {
|
||||
id: user._id,
|
||||
values: []
|
||||
};
|
||||
});
|
||||
|
||||
labels.sort();
|
||||
@ -285,13 +434,13 @@ angular.module('biomed.directives', [])
|
||||
angular.forEach(workorder.techs, function(tech) {
|
||||
var key = tech.name.first + ' ' + tech.name.last;
|
||||
|
||||
if (!data[key])
|
||||
return;
|
||||
if (!data[key])
|
||||
return;
|
||||
|
||||
var start = moment(workorder.scheduling.start).year(1900).month(0).date(1).toDate();
|
||||
var end = moment(workorder.scheduling.end).year(1900).month(0).date(1).toDate();
|
||||
var start = moment(workorder.scheduling.start);
|
||||
var end = moment(workorder.scheduling.end);
|
||||
|
||||
data[key].push({
|
||||
data[key].values.push({
|
||||
style: {
|
||||
backgroundColor: color(key),
|
||||
left: x(start) + "%",
|
||||
@ -306,7 +455,224 @@ angular.module('biomed.directives', [])
|
||||
}
|
||||
};
|
||||
})
|
||||
.directive('uiSelect2', function ($timeout) {
|
||||
.value('uiSelect2Config', {})
|
||||
.directive('uiSelect2', ['uiSelect2Config', '$timeout', function (uiSelect2Config, $timeout) {
|
||||
var options = {};
|
||||
if (uiSelect2Config) {
|
||||
angular.extend(options, uiSelect2Config);
|
||||
}
|
||||
return {
|
||||
require: 'ngModel',
|
||||
priority: 1,
|
||||
compile: function (tElm, tAttrs) {
|
||||
var watch,
|
||||
repeatOption,
|
||||
repeatAttr,
|
||||
isSelect = tElm.is('select'),
|
||||
isMultiple = angular.isDefined(tAttrs.multiple);
|
||||
|
||||
// Enable watching of the options dataset if in use
|
||||
if (tElm.is('select')) {
|
||||
repeatOption = tElm.find( 'optgroup[ng-repeat], optgroup[data-ng-repeat], option[ng-repeat], option[data-ng-repeat]');
|
||||
|
||||
if (repeatOption.length) {
|
||||
repeatAttr = repeatOption.attr('ng-repeat') || repeatOption.attr('data-ng-repeat');
|
||||
watch = jQuery.trim(repeatAttr.split('|')[0]).split(' ').pop();
|
||||
}
|
||||
}
|
||||
|
||||
return function (scope, elm, attrs, controller) {
|
||||
// instance-specific options
|
||||
var opts = angular.extend({}, options, scope.$eval(attrs.uiSelect2));
|
||||
|
||||
/*
|
||||
Convert from Select2 view-model to Angular view-model.
|
||||
*/
|
||||
var convertToAngularModel = function(select2_data) {
|
||||
var model;
|
||||
if (opts.simple_tags) {
|
||||
model = [];
|
||||
angular.forEach(select2_data, function(value, index) {
|
||||
model.push(value.id);
|
||||
});
|
||||
} else {
|
||||
model = select2_data;
|
||||
}
|
||||
return model;
|
||||
};
|
||||
|
||||
/*
|
||||
Convert from Angular view-model to Select2 view-model.
|
||||
*/
|
||||
var convertToSelect2Model = function(angular_data) {
|
||||
var model = [];
|
||||
if (!angular_data) {
|
||||
return model;
|
||||
}
|
||||
|
||||
if (opts.simple_tags) {
|
||||
model = [];
|
||||
angular.forEach(
|
||||
angular_data,
|
||||
function(value, index) {
|
||||
model.push({'id': value, 'text': value});
|
||||
});
|
||||
} else {
|
||||
model = angular_data;
|
||||
}
|
||||
return model;
|
||||
};
|
||||
|
||||
if (isSelect) {
|
||||
// Use <select multiple> instead
|
||||
delete opts.multiple;
|
||||
delete opts.initSelection;
|
||||
} else if (isMultiple) {
|
||||
opts.multiple = true;
|
||||
}
|
||||
if (controller) {
|
||||
// Watch the model for programmatic changes
|
||||
scope.$watch(tAttrs.ngModel, function(current, old) {
|
||||
if (!current) {
|
||||
return;
|
||||
}
|
||||
if (current === old) {
|
||||
return;
|
||||
}
|
||||
blah();
|
||||
// controller.$render();
|
||||
}, true);
|
||||
|
||||
var blah = controller.$render = function () {
|
||||
if (isSelect) {
|
||||
elm.select2('val', controller.$viewValue);
|
||||
} else {
|
||||
if (opts.multiple) {
|
||||
var viewValue = controller.$viewValue;
|
||||
if (angular.isString(viewValue)) {
|
||||
viewValue = viewValue.split(',');
|
||||
}
|
||||
elm.select2(
|
||||
'data', convertToSelect2Model(viewValue));
|
||||
} else {
|
||||
if (angular.isObject(controller.$viewValue)) {
|
||||
elm.select2('data', controller.$viewValue);
|
||||
} else if (!controller.$viewValue) {
|
||||
elm.select2('data', null);
|
||||
} else {
|
||||
elm.select2('val', controller.$viewValue);
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
// Watch the options dataset for changes
|
||||
if (watch) {
|
||||
scope.$watch(watch, function (newVal, oldVal, scope) {
|
||||
if (angular.equals(newVal, oldVal)) {
|
||||
return;
|
||||
}
|
||||
// Delayed so that the options have time to be rendered
|
||||
$timeout(function () {
|
||||
elm.select2('val', controller.$viewValue);
|
||||
// Refresh angular to remove the superfluous option
|
||||
elm.trigger('change');
|
||||
if(newVal && !oldVal && controller.$setPristine) {
|
||||
controller.$setPristine(true);
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
// Update valid and dirty statuses
|
||||
controller.$parsers.push(function (value) {
|
||||
var div = elm.prev();
|
||||
div
|
||||
.toggleClass('ng-invalid', !controller.$valid)
|
||||
.toggleClass('ng-valid', controller.$valid)
|
||||
.toggleClass('ng-invalid-required', !controller.$valid)
|
||||
.toggleClass('ng-valid-required', controller.$valid)
|
||||
.toggleClass('ng-dirty', controller.$dirty)
|
||||
.toggleClass('ng-pristine', controller.$pristine);
|
||||
return value;
|
||||
});
|
||||
|
||||
if (!isSelect) {
|
||||
// Set the view and model value and update the angular template manually for the ajax/multiple select2.
|
||||
elm.bind("change", function (e) {
|
||||
e.stopImmediatePropagation();
|
||||
|
||||
if (scope.$$phase || scope.$root.$$phase) {
|
||||
return;
|
||||
}
|
||||
scope.$apply(function () {
|
||||
controller.$setViewValue(
|
||||
convertToAngularModel(elm.select2('data')));
|
||||
});
|
||||
});
|
||||
|
||||
if (opts.initSelection) {
|
||||
var initSelection = opts.initSelection;
|
||||
opts.initSelection = function (element, callback) {
|
||||
initSelection(element, function (value) {
|
||||
var isPristine = controller.$pristine;
|
||||
controller.$setViewValue(convertToAngularModel(value));
|
||||
callback(value);
|
||||
if (isPristine) {
|
||||
controller.$setPristine();
|
||||
}
|
||||
elm.prev().toggleClass('ng-pristine', controller.$pristine);
|
||||
});
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
elm.bind("$destroy", function() {
|
||||
elm.select2("destroy");
|
||||
});
|
||||
|
||||
attrs.$observe('disabled', function (value) {
|
||||
elm.select2('enable', !value);
|
||||
});
|
||||
|
||||
attrs.$observe('readonly', function (value) {
|
||||
elm.select2('readonly', !!value);
|
||||
});
|
||||
|
||||
if (attrs.ngMultiple) {
|
||||
scope.$watch(attrs.ngMultiple, function(newVal) {
|
||||
attrs.$set('multiple', !!newVal);
|
||||
elm.select2(opts);
|
||||
});
|
||||
}
|
||||
|
||||
// Initialize the plugin late so that the injected DOM does not disrupt the template compiler
|
||||
$timeout(function () {
|
||||
elm.select2(opts);
|
||||
|
||||
// Set initial value - I'm not sure about this but it seems to need to be there
|
||||
elm.select2('data', controller.$modelValue);
|
||||
// important!
|
||||
controller.$render();
|
||||
|
||||
// Not sure if I should just check for !isSelect OR if I should check for 'tags' key
|
||||
if (!opts.initSelection && !isSelect) {
|
||||
var isPristine = controller.$pristine;
|
||||
controller.$setViewValue(
|
||||
convertToAngularModel(elm.select2('data'))
|
||||
);
|
||||
if (isPristine) {
|
||||
controller.$setPristine();
|
||||
}
|
||||
elm.prev().toggleClass('ng-pristine', controller.$pristine);
|
||||
}
|
||||
});
|
||||
};
|
||||
}
|
||||
};
|
||||
}])
|
||||
.directive('uiSelect2-old', function ($timeout) {
|
||||
var options = {};
|
||||
|
||||
return {
|
||||
@ -421,4 +787,4 @@ angular.module('biomed.directives', [])
|
||||
};
|
||||
}
|
||||
};
|
||||
});
|
||||
});
|
||||
|
@ -12,5 +12,13 @@ angular.module('biomed.filters', [])
|
||||
return function(time) {
|
||||
return moment(time).format('h:mma');
|
||||
};
|
||||
})
|
||||
.filter('email', function() {
|
||||
return function(email) {
|
||||
var parts = email.split("@", 2);
|
||||
if (parts[1].toLowerCase() == "atlanticbiomedical.com")
|
||||
return parts[0] + "@";
|
||||
else
|
||||
return email;
|
||||
}
|
||||
});
|
||||
|
||||
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
@ -25,9 +25,13 @@ angular.module('biomed.services', [])
|
||||
});
|
||||
})
|
||||
.factory("Users", function($resource) {
|
||||
return $resource('/api/users', { },
|
||||
return $resource('/api/users/:id/:cmd',
|
||||
{ id: "@id", cmd: "@cmd" },
|
||||
{
|
||||
index: { method: 'GET', isArray: true },
|
||||
details: { method: 'GET', params: { cmd: 'details' }, isArray: true },
|
||||
create: { method: 'POST', params: {} },
|
||||
update: { method: 'POST', params: { id: 0 } },
|
||||
});
|
||||
})
|
||||
.factory("Schedule", function($resource) {
|
||||
@ -112,4 +116,4 @@ angular.module('biomed.services', [])
|
||||
});
|
||||
});
|
||||
}
|
||||
});
|
||||
});
|
||||
|
@ -6,7 +6,8 @@
|
||||
<header ng-hide="loading">
|
||||
<h1>{{master.name}}</h1>
|
||||
<p class="lead">{{master.identifier}}</p>
|
||||
<a href="/workorders/add?clientId={{master._id}}">Create new Workorder</a>
|
||||
<a class="btn btn-primary" href="/workorders/add?clientId={{master._id}}">Create new Workorder</a>
|
||||
<a class="btn" href="/workorders/add?workorderType=meeting&clientId={{master._id}}">Create new Meeting</a>
|
||||
</header>
|
||||
<div ng-hide="loading" class="tabbable">
|
||||
<div class="tab-content">
|
||||
@ -214,7 +215,7 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-section">
|
||||
<div class="form-section" ng-show="accountHasPermission('system.admin')">
|
||||
<div class="section-label">Other</div>
|
||||
<div class="section-container">
|
||||
<button ng-click="other.destroy()" type="button" class="btn btn-danger">Remove client</button>
|
||||
@ -289,21 +290,33 @@
|
||||
<table class="biomed-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th style="width: 10%">Device ID</th>
|
||||
<th style="width: 15%">Device</th>
|
||||
<th style="width: 15%">Make</th>
|
||||
<th style="width: 15%">Model</th>
|
||||
<th style="width: 15%">Serial No.</th>
|
||||
<th style="width: 7%">Device ID</th>
|
||||
<th style="width: 6%">Device</th>
|
||||
<th style="width: 5%">Make</th>
|
||||
<th style="width: 5%">Model</th>
|
||||
<th style="width: 5%">Serial No.</th>
|
||||
<th style="width: 8%">Purchase Date</th>
|
||||
<th style="width: 6%">Warranty Expiration</th>
|
||||
<th style="width: 8%">PM Test</th>
|
||||
<th style="width: 4%">Room #</th>
|
||||
<th style="width: 4%">PO Number</th>
|
||||
<th style="width: 4%">Move to</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr ng-hide="tags.length"><td colspan="4" class="table-message">There is no information to display.</td></tr>
|
||||
<tr ng-hide="tags.length"><td colspan="11" class="table-message">There is no information to display.</td></tr>
|
||||
<tr ng-repeat="tag in tags">
|
||||
<td><a href="http://n.atlb.co/{{tag._id}}">{{tag.data.clientDeviceId}} - (Tag:{{tag._id}})</a></td>
|
||||
<td>{{tag.data.device}}</td>
|
||||
<td>{{tag.data.make}}</td>
|
||||
<td>{{tag.data.model}}</td>
|
||||
<td>{{tag.data.serialNumber}}</td>
|
||||
<td>{{tag.data.purchaseDate}}</td>
|
||||
<td>{{tag.data.deviceWarrantyExpiration}}</td>
|
||||
<td>{{tag.data.test}}</td>
|
||||
<td>{{tag.data.roomNumber}}</td>
|
||||
<td>{{tag.data.poNumber}}</td>
|
||||
<td>{{tag.data.MoveTo}}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
@ -355,6 +368,6 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<b>Notice:</b>
|
||||
<p>Changes to the notes for a client does not automatically update every workorder that currently exists for the client. Only new workorders will contain the changed / updated notes. If you need to update the notes for a specific workorder you should go to the work order and re-save the workorder. This will push the updated notes to the techs calendar.</p>
|
||||
</div>
|
||||
|
@ -70,6 +70,6 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button ng-click="send()" class="btn btn-primary" >Send</button>
|
||||
<button ng-click="send()" class="btn btn-primary">Send</button>
|
||||
<button ng-click="cancel()" class="btn" >Cancel</button>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -9,7 +9,8 @@
|
||||
<div class="span12">
|
||||
<div class="toolbelt">
|
||||
<a href="/workorders/add" class="btn btn-primary">Create new Workorder</a>
|
||||
<a href="/schedule/pms" class="btn btn-primary">View PMs</a>
|
||||
<a href="/workorders/add?workorderType=meeting" class="btn">Create new Meeting</a>
|
||||
<a href="/schedule/pms" class="btn">View PMs</a>
|
||||
<div class="pull-right">
|
||||
<span class="toolbelt-text">Group: </span>
|
||||
<div class="input-append">
|
||||
@ -31,4 +32,4 @@
|
||||
date="date"
|
||||
on-entry-click="onEntryClick(entry)"></techpicker>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -12,9 +12,9 @@
|
||||
</div>
|
||||
</div>
|
||||
<div ng-repeat="(name, values) in data" class="tech">
|
||||
<div class="tech-label">{{name}}</div>
|
||||
<div class="tech-label"><a href="/techs/{{values.id}}">{{name}}</a></div>
|
||||
<div class="enteries">
|
||||
<div ng-repeat="entry in values" ng-style="entry.style" class="entry" ng-click="onEntryClick({entry: entry})" title="{{entry.workorder.client.name}} ({{entry.workorder.client.identifier}}) - {{entry.workorder.client.address.city}}">{{entry.workorder.client.identifier}}</div>
|
||||
<div ng-repeat="entry in values.values" ng-style="entry.style" class="entry" ng-click="onEntryClick({entry: entry})" title="{{entry.workorder.client.name}} ({{entry.workorder.client.identifier}}) - {{entry.workorder.client.address.city}}">{{entry.workorder.client.identifier}}</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
20
public/partials/techSchedule.html
Normal file
20
public/partials/techSchedule.html
Normal file
@ -0,0 +1,20 @@
|
||||
<div class="techpicker">
|
||||
<div class="hour-labels">
|
||||
<div ng-repeat="hour in hourMarkers" class="hour-label" ng-style="hour.style">
|
||||
{{ hour.date | date:'h a'}}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="schedule">
|
||||
<div class="hour-markers">
|
||||
<div ng-repeat="hour in hourMarkers" class="marker" ng-style="hour.style">
|
||||
<div class="half-hour-marker"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div ng-repeat="(name, values) in data" class="tech">
|
||||
<div class="tech-label text-right">{{values.label}}</div>
|
||||
<div class="enteries">
|
||||
<div ng-repeat="entry in values.values" ng-style="entry.style" class="entry" ng-click="onEntryClick({entry: entry})" title="{{entry.workorder.client.name}} ({{entry.workorder.client.identifier}}) - {{entry.workorder.client.address.city}}">{{entry.workorder.client.identifier}}</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
24
public/partials/techs/schedule.html
Normal file
24
public/partials/techs/schedule.html
Normal file
@ -0,0 +1,24 @@
|
||||
<ul class="breadcrumb">
|
||||
<li><a href="/clients"><i class="icon-calendar"></i> Schedule</a><li>
|
||||
</ul>
|
||||
<header>
|
||||
<h1>Schedule for {{tech.name.first}} {{tech.name.last}}</h1>
|
||||
</header>
|
||||
|
||||
<div class="row-fluid">
|
||||
<div class="span12">
|
||||
<div class="toolbelt">
|
||||
<div class="pull-right"
|
||||
<span class="toolbelt-text">Date: </span>
|
||||
<div class="input-append">
|
||||
<input ng-model="date" datepicker type="text" class="input-medium">
|
||||
<span class="add-on"><i class="icon-calendar"></i></span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<techschedule
|
||||
schedule="schedule"
|
||||
date="date"
|
||||
on-entry-click="onEntryClick(entry)"></techschedule>
|
||||
</div>
|
||||
</div>
|
61
public/partials/users/index.html
Normal file
61
public/partials/users/index.html
Normal file
@ -0,0 +1,61 @@
|
||||
<ul class="breadcrumb">
|
||||
<li><a href="/users"><i class="icon-briefcase"></i> Admin</a><li>
|
||||
</ul>
|
||||
<header>
|
||||
<h1>Admin</h1>
|
||||
</header>
|
||||
|
||||
<div class="row-fluid">
|
||||
<div class="span12">
|
||||
<div class="toolbelt">
|
||||
<div class="pull-right">
|
||||
<span class="toolbelt-text">Search:</span>
|
||||
<div class="input-append">
|
||||
<input type="text" ng-model="query" class="input-large" placeholder="Search">
|
||||
<span class="add-on"><i class="icon-search"></i></span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<table class="biomed-table users" infinite-scroll="addItems()" can-load="canLoad" threshold="300">
|
||||
<thead>
|
||||
<tr>
|
||||
<th colspan="2"></th>
|
||||
<th colspan="5">Groups</th>
|
||||
<th colspan="4">Permissions</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th style="width: 15%">Name</th>
|
||||
<th style="width: 7%">E-Mail</th>
|
||||
<th style="width: 5%" class="group-start">All</th>
|
||||
<th style="width: 5%">Biomed</th>
|
||||
<th style="width: 5%">Ice</th>
|
||||
<th style="width: 5%">Others</th>
|
||||
<th style="width: 5%">Sales</th>
|
||||
<th style="width: 5%" class="group-start">Portal</th>
|
||||
<th style="width: 5%">Tags</th>
|
||||
<th style="width: 5%">Messages</th>
|
||||
<th style="width: 5%">Admin</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr ng-show="loading"><td colspan="11" class="table-loading"><i class="loader"></i></td></tr>
|
||||
<tr ng-hide="loading || users.length"><td colspan="11" class="table-message">There is no information to display.</td></tr>
|
||||
<tr ng-hide="loading" ng-repeat="user in users">
|
||||
<td class="name">{{user.name.first}} {{user.name.last}} <span class="new" ng-show="isNew(user)">NEW</span></td>
|
||||
<td class="email"><a href="mailto:{{user.email}}">{{user.email | email}}</a></td>
|
||||
|
||||
<td class="group-start {{ checkGroup(user, 'all') }}"><a ng-click="toggleGroup(user, 'all')"><i ng-class="{ 'icon-ok': checkGroup(user, 'all'), 'icon-remove': !checkGroup(user, 'all')}"></i></a></td>
|
||||
<td class="{{ checkGroup(user, 'biomed') }}"><a ng-click="toggleGroup(user, 'biomed')"><i ng-class="{ 'icon-ok': checkGroup(user, 'biomed'), 'icon-remove': !checkGroup(user, 'biomed')}"></i></a></td>
|
||||
<td class="{{ checkGroup(user, 'ice') }}"><a ng-click="toggleGroup(user, 'ice')"><i ng-class="{ 'icon-ok': checkGroup(user, 'ice'), 'icon-remove': !checkGroup(user, 'ice')}"></i></a></td>
|
||||
<td class="{{ checkGroup(user, 'others') }}"><a ng-click="toggleGroup(user, 'others')"><i ng-class="{ 'icon-ok': checkGroup(user, 'others'), 'icon-remove': !checkGroup(user, 'others')}"></i></a></td>
|
||||
<td class="{{ checkGroup(user, 'sales') }}"><a ng-click="toggleGroup(user, 'sales')"><i ng-class="{ 'icon-ok': checkGroup(user, 'sales'), 'icon-remove': !checkGroup(user, 'sales')}"></i></a></td>
|
||||
<td class="group-start {{ checkPerm(user, 'system.login') }}"><a ng-click="togglePerm(user, 'system.login')"><i ng-class="{ 'icon-ok': checkPerm(user, 'system.login'), 'icon-remove': !checkPerm(user, 'system.login')}"></i></a></td>
|
||||
<td class="{{ checkPerm(user, 'system.tags') }}"><a ng-click="togglePerm(user, 'system.tags')"><i ng-class="{ 'icon-ok': checkPerm(user, 'system.tags'), 'icon-remove': !checkPerm(user, 'system.tags')}"></i></a></td>
|
||||
<td class="{{ checkPerm(user, 'messages.receive') }}"><a ng-click="togglePerm(user, 'messages.receive')"><i ng-class="{ 'icon-ok': checkPerm(user, 'messages.receive'), 'icon-remove': !checkPerm(user, 'messages.receive')}"></i></a></td>
|
||||
<td class="{{ checkPerm(user, 'system.admin') }}"><a ng-click="togglePerm(user, 'system.admin')"><i ng-class="{ 'icon-ok': checkPerm(user, 'system.admin'), 'icon-remove': !checkPerm(user, 'system.admin')}"></i></a></td>
|
||||
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
@ -1,10 +1,12 @@
|
||||
<ul class="breadcrumb">
|
||||
<li><a href="/clients"><i class="icon-briefcase"></i> Workorders</a><span class="divider"></span><li>
|
||||
<li ng-hide="loading" class="active">New Workorder<li>
|
||||
<li ng-hide="loading || workorderType == 'meeting'" class="active">New Workorder<li>
|
||||
<li ng-hide="loading || workorderType != 'meeting'" class="active">New Meeting</li>
|
||||
</ul>
|
||||
|
||||
<header>
|
||||
<h1>New Workorder</h1>
|
||||
<h1 ng-show="workorderType != 'meeting'">New Workorder</h1>
|
||||
<h1 ng-show="workorderType == 'meeting'">New Meeting</h1>
|
||||
</header>
|
||||
<div class="form">
|
||||
<div class="form-section">
|
||||
@ -19,6 +21,12 @@
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="control-group">
|
||||
<label class="control-label">Additional E-Mails</label>
|
||||
<div class="controls">
|
||||
<input type="text" ui-select2="emailsOptions" ng-model="model.emails" class="input-xxlarge" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -30,7 +38,7 @@
|
||||
<div class="control-group">
|
||||
<label class="control-label">Reason</label>
|
||||
<div class="controls">
|
||||
<select ng-model="model.reason" name="reason" class="input-xlarge" ng-disabled="{{workorderType == 'pm'}}">
|
||||
<select ng-model="model.reason" name="reason" class="input-xlarge" ng-disabled="{{workorderType == 'pm' || workorderType == 'meeting'}}">
|
||||
<option value="Add New Equipment">Add New Equipment</option>
|
||||
<option value="As Directed">As Directed</option>
|
||||
<option value="Autoclave Repair">Autoclave Repair</option>
|
||||
@ -38,6 +46,7 @@
|
||||
<option value="Delivery">Delivery</option>
|
||||
<option value="Diagnose Problem">Diagnose Problem</option>
|
||||
<option value="Install Parts">Install Parts</option>
|
||||
<option value="Meeting">Meeting</option>
|
||||
<option value="New Opportunity">New Opportunity</option>
|
||||
<option value="Off">Off</option>
|
||||
<option value="PM Reschedule">PM Reschedule</option>
|
||||
@ -51,18 +60,23 @@
|
||||
<label class="control-label">Maintenance Type</label>
|
||||
<div class="controls">
|
||||
<select ng-model="model.maintenanceType" name="maintenanceType" class="input-xlarge" ng-disabled="{{workorderType == 'pm'}}">
|
||||
<option value="anesthesia">anesthesia</option>
|
||||
<option value="annual">annual</option>
|
||||
<option value="ert">ert</option>
|
||||
<option value="imaging">imaging</option>
|
||||
<option value="medgas">medgas</option>
|
||||
<option value="neptune">neptune</option>
|
||||
<option value="quarterly">quarterly</option>
|
||||
<option value="rae">rae</option>
|
||||
<option value="semi">semi</option>
|
||||
<option value="sterilizer">sterilizer</option>
|
||||
<option value="tg">tg</option>
|
||||
<option value="legacy" disabled>legacy</option>
|
||||
<option value="Anesthesia">Anesthesia</option>
|
||||
<option value="Annual">Annual</option>
|
||||
<option value="DLLR">DLLR</option>
|
||||
<option value="ERT">ERT</option>
|
||||
<option value="Ice Maker">Ice Maker</option>
|
||||
<option value="Imaging">Imaging</option>
|
||||
<option value="Medical Device">Medical Device</option>
|
||||
<option value="Medical Gas Systems">Medical Gas Systems</option>
|
||||
<option value="N2O Trace Gas">N2O Trace Gas</option>
|
||||
<option value="Quarterly">Quarterly</option>
|
||||
<option value="RAE">RAE</option>
|
||||
<option value="Semi">Semi</option>
|
||||
<option value="Sterilizer -F">Sterilizer -F</option>
|
||||
<option value="Sterilizer - TT">Sterilizer - TT</option>
|
||||
<option value="Vaporizer">Vaporizer</option>
|
||||
<option value="Waste Management System">Waste Management System</option>
|
||||
<option value="legacy" disabled>legacy</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
@ -82,86 +96,161 @@
|
||||
<div class="control-group">
|
||||
<label class="control-label">Date</label>
|
||||
<div class="controls">
|
||||
<input ng-model="picker.date" datepicker type="text" class="input-small">
|
||||
<select ng-model="picker.start" name="start" class="input-small">
|
||||
<option value="05:00:00">5:00am</option>
|
||||
<option value="05:30:00">5:30am</option>
|
||||
<option value="06:00:00">6:00am</option>
|
||||
<option value="06:30:00">6:30am</option>
|
||||
<option value="07:00:00">7:00am</option>
|
||||
<option value="07:30:00">7:30am</option>
|
||||
<option value="08:00:00">8:00am</option>
|
||||
<option value="08:30:00">8:30am</option>
|
||||
<option value="09:00:00">9:00am</option>
|
||||
<option value="09:30:00">9:30am</option>
|
||||
<option value="10:00:00">10:00am</option>
|
||||
<option value="10:30:00">10:30am</option>
|
||||
<option value="11:00:00">11:00am</option>
|
||||
<option value="11:30:00">11:30am</option>
|
||||
<option value="12:00:00">12:00pm</option>
|
||||
<option value="12:30:00">12:30pm</option>
|
||||
<option value="13:00:00">1:00pm</option>
|
||||
<option value="13:30:00">1:30pm</option>
|
||||
<option value="14:00:00">2:00pm</option>
|
||||
<option value="14:30:00">2:30pm</option>
|
||||
<option value="15:00:00">3:00pm</option>
|
||||
<option value="15:30:00">3:30pm</option>
|
||||
<option value="16:00:00">4:00pm</option>
|
||||
<option value="16:30:00">4:30pm</option>
|
||||
<option value="17:00:00">5:00pm</option>
|
||||
<option value="17:30:00">5:30pm</option>
|
||||
<option value="18:00:00">6:00pm</option>
|
||||
<option value="18:30:00">6:30pm</option>
|
||||
<option value="19:00:00">7:00pm</option>
|
||||
<option value="19:30:00">7:30pm</option>
|
||||
<option value="20:00:00">8:00pm</option>
|
||||
<option value="20:30:00">8:30pm</option>
|
||||
<option value="21:00:00">9:00pm</option>
|
||||
<option value="21:30:00">9:30pm</option>
|
||||
<option value="22:00:00">10:00pm</option>
|
||||
<span><input ng-model="picker.startDate" datepicker type="text" class="input-small"></span>
|
||||
<select ng-model="picker.startTime" name="start" class="input-small">
|
||||
<option value="05:00:00">5:00am</option>
|
||||
<option value="05:15:00">5:15am</option>
|
||||
<option value="05:30:00">5:30am</option>
|
||||
<option value="05:45:00">5:45am</option>
|
||||
<option value="06:00:00">6:00am</option>
|
||||
<option value="06:15:00">6:15am</option>
|
||||
<option value="06:30:00">6:30am</option>
|
||||
<option value="06:45:00">6:45am</option>
|
||||
<option value="07:00:00">7:00am</option>
|
||||
<option value="07:15:00">7:15am</option>
|
||||
<option value="07:30:00">7:30am</option>
|
||||
<option value="07:45:00">7:45am</option>
|
||||
<option value="08:00:00">8:00am</option>
|
||||
<option value="08:15:00">8:15am</option>
|
||||
<option value="08:30:00">8:30am</option>
|
||||
<option value="08:45:00">8:45am</option>
|
||||
<option value="09:00:00">9:00am</option>
|
||||
<option value="09:15:00">9:15am</option>
|
||||
<option value="09:30:00">9:30am</option>
|
||||
<option value="09:45:00">9:45am</option>
|
||||
<option value="10:00:00">10:00am</option>
|
||||
<option value="10:15:00">10:15am</option>
|
||||
<option value="10:30:00">10:30am</option>
|
||||
<option value="10:45:00">10:45am</option>
|
||||
<option value="11:00:00">11:00am</option>
|
||||
<option value="11:15:00">11:15am</option>
|
||||
<option value="11:30:00">11:30am</option>
|
||||
<option value="11:45:00">11:45am</option>
|
||||
<option value="12:00:00">12:00pm</option>
|
||||
<option value="12:15:00">12:15pm</option>
|
||||
<option value="12:30:00">12:30pm</option>
|
||||
<option value="12:45:00">12:45pm</option>
|
||||
<option value="13:00:00">1:00pm</option>
|
||||
<option value="13:15:00">1:15pm</option>
|
||||
<option value="13:30:00">1:30pm</option>
|
||||
<option value="13:45:00">1:45pm</option>
|
||||
<option value="14:00:00">2:00pm</option>
|
||||
<option value="14:15:00">2:15pm</option>
|
||||
<option value="14:30:00">2:30pm</option>
|
||||
<option value="14:45:00">2:45pm</option>
|
||||
<option value="15:00:00">3:00pm</option>
|
||||
<option value="15:15:00">3:15pm</option>
|
||||
<option value="15:30:00">3:30pm</option>
|
||||
<option value="15:45:00">3:45pm</option>
|
||||
<option value="16:00:00">4:00pm</option>
|
||||
<option value="16:15:00">4:15pm</option>
|
||||
<option value="16:30:00">4:30pm</option>
|
||||
<option value="16:45:00">4:45pm</option>
|
||||
<option value="17:00:00">5:00pm</option>
|
||||
<option value="17:15:00">5:15pm</option>
|
||||
<option value="17:30:00">5:30pm</option>
|
||||
<option value="17:45:00">5:45pm</option>
|
||||
<option value="18:00:00">6:00pm</option>
|
||||
<option value="18:15:00">6:15pm</option>
|
||||
<option value="18:30:00">6:30pm</option>
|
||||
<option value="18:45:00">6:45pm</option>
|
||||
<option value="19:00:00">7:00pm</option>
|
||||
<option value="19:15:00">7:15pm</option>
|
||||
<option value="19:30:00">7:30pm</option>
|
||||
<option value="19:45:00">7:45pm</option>
|
||||
<option value="20:00:00">8:00pm</option>
|
||||
<option value="20:15:00">8:15pm</option>
|
||||
<option value="20:30:00">8:30pm</option>
|
||||
<option value="20:45:00">8:45pm</option>
|
||||
<option value="21:00:00">9:00pm</option>
|
||||
<option value="21:15:00">9:15pm</option>
|
||||
<option value="21:30:00">9:30pm</option>
|
||||
<option value="21:45:00">9:45pm</option>
|
||||
<option value="22:00:00">10:00pm</option>
|
||||
</select>
|
||||
<span>to</span>
|
||||
<select ng-model="picker.end" name="end" class="input-small">
|
||||
<option value="06:00:00">6:00am</option>
|
||||
<option value="06:30:00">6:30am</option>
|
||||
<option value="07:00:00">7:00am</option>
|
||||
<option value="07:30:00">7:30am</option>
|
||||
<option value="08:00:00">8:00am</option>
|
||||
<option value="08:30:00">8:30am</option>
|
||||
<option value="09:00:00">9:00am</option>
|
||||
<option value="09:30:00">9:30am</option>
|
||||
<option value="10:00:00">10:00am</option>
|
||||
<option value="10:30:00">10:30am</option>
|
||||
<option value="11:00:00">11:00am</option>
|
||||
<option value="11:30:00">11:30am</option>
|
||||
<option value="12:00:00">12:00pm</option>
|
||||
<option value="12:30:00">12:30pm</option>
|
||||
<option value="13:00:00">1:00pm</option>
|
||||
<option value="13:30:00">1:30pm</option>
|
||||
<option value="14:00:00">2:00pm</option>
|
||||
<option value="14:30:00">2:30pm</option>
|
||||
<option value="15:00:00">3:00pm</option>
|
||||
<option value="15:30:00">3:30pm</option>
|
||||
<option value="16:00:00">4:00pm</option>
|
||||
<option value="16:30:00">4:30pm</option>
|
||||
<option value="17:00:00">5:00pm</option>
|
||||
<option value="17:30:00">5:30pm</option>
|
||||
<option value="18:00:00">6:00pm</option>
|
||||
<option value="18:30:00">6:30pm</option>
|
||||
<option value="19:00:00">7:00pm</option>
|
||||
<option value="19:30:00">7:30pm</option>
|
||||
<option value="20:00:00">8:00pm</option>
|
||||
<option value="20:30:00">8:30pm</option>
|
||||
<option value="21:00:00">9:00pm</option>
|
||||
<option value="21:30:00">9:30pm</option>
|
||||
<option value="22:00:00">10:00pm</option>
|
||||
<span><input ng-model="picker.endDate" datepicker type="text" class="input-small"></span>
|
||||
<select ng-model="picker.endTime" name="end" class="input-small">
|
||||
<option value="05:15:00">5:15am</option>
|
||||
<option value="05:30:00">5:30am</option>
|
||||
<option value="05:45:00">5:45am</option>
|
||||
<option value="06:00:00">6:00am</option>
|
||||
<option value="06:15:00">6:15am</option>
|
||||
<option value="06:30:00">6:30am</option>
|
||||
<option value="06:45:00">6:45am</option>
|
||||
<option value="07:00:00">7:00am</option>
|
||||
<option value="07:15:00">7:15am</option>
|
||||
<option value="07:30:00">7:30am</option>
|
||||
<option value="07:45:00">7:45am</option>
|
||||
<option value="08:00:00">8:00am</option>
|
||||
<option value="08:15:00">8:15am</option>
|
||||
<option value="08:30:00">8:30am</option>
|
||||
<option value="08:45:00">8:45am</option>
|
||||
<option value="09:00:00">9:00am</option>
|
||||
<option value="09:15:00">9:15am</option>
|
||||
<option value="09:30:00">9:30am</option>
|
||||
<option value="09:45:00">9:45am</option>
|
||||
<option value="10:00:00">10:00am</option>
|
||||
<option value="10:15:00">10:15am</option>
|
||||
<option value="10:30:00">10:30am</option>
|
||||
<option value="10:45:00">10:45am</option>
|
||||
<option value="11:00:00">11:00am</option>
|
||||
<option value="11:15:00">11:15am</option>
|
||||
<option value="11:30:00">11:30am</option>
|
||||
<option value="11:45:00">11:45am</option>
|
||||
<option value="12:00:00">12:00pm</option>
|
||||
<option value="12:15:00">12:15pm</option>
|
||||
<option value="12:30:00">12:30pm</option>
|
||||
<option value="12:45:00">12:45pm</option>
|
||||
<option value="13:00:00">1:00pm</option>
|
||||
<option value="13:15:00">1:15pm</option>
|
||||
<option value="13:30:00">1:30pm</option>
|
||||
<option value="13:45:00">1:45pm</option>
|
||||
<option value="14:00:00">2:00pm</option>
|
||||
<option value="14:15:00">2:15pm</option>
|
||||
<option value="14:30:00">2:30pm</option>
|
||||
<option value="14:45:00">2:45pm</option>
|
||||
<option value="15:00:00">3:00pm</option>
|
||||
<option value="15:15:00">3:15pm</option>
|
||||
<option value="15:30:00">3:30pm</option>
|
||||
<option value="15:45:00">3:45pm</option>
|
||||
<option value="16:00:00">4:00pm</option>
|
||||
<option value="16:15:00">4:15pm</option>
|
||||
<option value="16:30:00">4:30pm</option>
|
||||
<option value="16:45:00">4:45pm</option>
|
||||
<option value="17:00:00">5:00pm</option>
|
||||
<option value="17:15:00">5:15pm</option>
|
||||
<option value="17:30:00">5:30pm</option>
|
||||
<option value="17:45:00">5:45pm</option>
|
||||
<option value="18:00:00">6:00pm</option>
|
||||
<option value="18:15:00">6:15pm</option>
|
||||
<option value="18:30:00">6:30pm</option>
|
||||
<option value="18:45:00">6:45pm</option>
|
||||
<option value="19:00:00">7:00pm</option>
|
||||
<option value="19:15:00">7:15pm</option>
|
||||
<option value="19:30:00">7:30pm</option>
|
||||
<option value="19:45:00">7:45pm</option>
|
||||
<option value="20:00:00">8:00pm</option>
|
||||
<option value="20:15:00">8:15pm</option>
|
||||
<option value="20:30:00">8:30pm</option>
|
||||
<option value="20:45:00">8:45pm</option>
|
||||
<option value="21:00:00">9:00pm</option>
|
||||
<option value="21:15:00">9:15pm</option>
|
||||
<option value="21:30:00">9:30pm</option>
|
||||
<option value="21:45:00">9:45pm</option>
|
||||
<option value="22:00:00">10:00pm</option>
|
||||
<option value="22:15:00">10:15pm</option>
|
||||
<option value="22:30:00">10:30pm</option>
|
||||
<option value="22:45:00">10:45pm</option>
|
||||
</select>
|
||||
<span>{{picker.duration}}</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="control-group">
|
||||
<label class="control-label">Techs</label>
|
||||
<div class="control-group">
|
||||
<label ng-show="workorderType != 'meeting'" class="control-label">Techs</label>
|
||||
<label ng-show="workorderType == 'meeting'" class="control-label">Attendees</label>
|
||||
<div class="controls">
|
||||
<select multiple ui-select2 ng-model="model.techs" data-placeholder="Choose a Tech - Check the schedule below before scheduling." class="input-xxlarge">
|
||||
<select multiple ui-select2 ng-model="model.techs" data-placeholder="Choose Employee(s) - Check the schedule below before scheduling." class="input-xxlarge">
|
||||
<option ng-repeat="tech in allUsers" value="{{tech._id}}">{{tech.name.first}} {{tech.name.last}}</option>
|
||||
</select>
|
||||
</div>
|
||||
@ -177,17 +266,17 @@
|
||||
<techpicker
|
||||
users="users"
|
||||
schedule="schedule"
|
||||
date="picker.date"
|
||||
start="picker.start"
|
||||
end="picker.end"></techpicker>
|
||||
date="picker.startDate"
|
||||
start="picker.startTime"
|
||||
end="picker.endTime"></techpicker>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-section">
|
||||
<div class="section-label"> </div>
|
||||
<div class="section-container">
|
||||
<button ng-click="save()" type="button" class="btn btn-primary">Save</button>
|
||||
|
||||
<button ng-click="save(false)" type="button" class="btn btn-primary">Save</button>
|
||||
<button ng-click="save(true)" type="button" class="btn" disabled>Save & Notify</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -6,6 +6,8 @@
|
||||
<header ng-hide="loading">
|
||||
<h1>#{{master.biomedId}} - {{master.reason}}</h1>
|
||||
<p class="lead"><a ng-href="/clients/{{master.client._id}}">{{master.client.name}} ({{master.client.identifier}})</a></p>
|
||||
<div ng-show="master.createdBy">Created By: <b>{{master.createdBy.name.first}} {{master.createdBy.name.last}}</b> On <b>{{master.createdOn | date}} {{master.createdOn | time}}</b></div>
|
||||
<div ng-show="master.modifiedBy">Last Modified By: <b>{{master.modifiedBy.name.first}} {{master.modifiedBy.name.last}}</b> On <b>{{master.modifiedOn | date}} {{master.modifiedOn | time}}</b></div>
|
||||
</header>
|
||||
<div ng-hide="loading" class="tabbable">
|
||||
<div class="tab-content">
|
||||
@ -26,16 +28,42 @@
|
||||
<option value="invoiced">Invoiced</option>
|
||||
<option value="paid">Paid</option>
|
||||
<option value="submitted">Submitted</option>
|
||||
<option value="n/a">N/A</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-actions">
|
||||
<button ng-click="status.save()" type="button" class="btn btn-primary">Save</button>
|
||||
<button ng-click="status.save(false)" type="button" class="btn btn-primary">Save</button>
|
||||
<button ng-click="status.save(true)" type="button" class="btn" disabled>Save & Notify</button>
|
||||
<button ng-click="status.reset()" type="button" class="btn">Cancel</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-section">
|
||||
<div class="section-label">Additional E-Mails</div>
|
||||
<div class="section-container">
|
||||
<div ng-hide="emails.visible" class="form-preview">
|
||||
<span ng-repeat="email in master.emails"><b>{{email}}</b><span ng-show="!$last">, </span></span>
|
||||
<a ng-click="emails.edit()" ng-class="{disabled: editing}">Edit</a>
|
||||
</div>
|
||||
<div ng-show="emails.visible" class="form-editor">
|
||||
<div class="control-group">
|
||||
<label class="control-label">E-Mails</label>
|
||||
<div class="controls">
|
||||
<input type="text" ui-select2="emailsOptions" ng-model="emails.model.emails" class="input-xxlarge" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-actions">
|
||||
<button ng-click="emails.save(false)" type="button" class="btn btn-primary">Save</button>
|
||||
<button ng-click="emails.save(true)" type="button" class="btn" disabled>Save & Notify</button>
|
||||
<button ng-click="emails.reset()" type="button" class="btn">Cancel</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-section">
|
||||
<div class="section-label">Remarks</div>
|
||||
<div class="section-container">
|
||||
@ -56,6 +84,7 @@
|
||||
<option value="Delivery">Delivery</option>
|
||||
<option value="Diagnose Problem">Diagnose Problem</option>
|
||||
<option value="Install Parts">Install Parts</option>
|
||||
<option value="Meeting">Meeting</option>
|
||||
<option value="New Opportunity">New Opportunity</option>
|
||||
<option value="Off">Off</option>
|
||||
<option value="PM Reschedule">PM Reschedule</option>
|
||||
@ -68,20 +97,25 @@
|
||||
<div class="control-group" ng-show="remarks.model.reason == 'Preventive Maintenance'">
|
||||
<label class="control-label">Maintenance Type</label>
|
||||
<div class="controls">
|
||||
<select ng-model="remarks.model.maintenanceType" name="maintenanceType" class="input-xlarge">
|
||||
<option value="anesthesia">anesthesia</option>
|
||||
<option value="annual">annual</option>
|
||||
<option value="ert">ert</option>
|
||||
<option value="imaging">imaging</option>
|
||||
<option value="medgas">medgas</option>
|
||||
<option value="neptune">neptune</option>
|
||||
<option value="quarterly">quarterly</option>
|
||||
<option value="rae">rae</option>
|
||||
<option value="semi">semi</option>
|
||||
<option value="sterilizer">sterilizer</option>
|
||||
<option value="tg">tg</option>
|
||||
<option value="legacy" disabled>legacy</option>
|
||||
</select>
|
||||
<select ng-model="remarks.model.maintenanceType" name="maintenanceType" class="input-xlarge">
|
||||
<option value="Anesthesia">Anesthesia</option>
|
||||
<option value="Annual">Annual</option>
|
||||
<option value="DLLR">DLLR</option>
|
||||
<option value="ERT">ERT</option>
|
||||
<option value="Ice Maker">Ice Maker</option>
|
||||
<option value="Imaging">Imaging</option>
|
||||
<option value="Medical Device">Medical Device</option>
|
||||
<option value="Medical Gas Systems">Medical Gas Systems</option>
|
||||
<option value="N2O Trace Gas">N2O Trace Gas</option>
|
||||
<option value="Quarterly">Quarterly</option>
|
||||
<option value="RAE">RAE</option>
|
||||
<option value="Semi">Semi</option>
|
||||
<option value="Sterilizer -F">Sterilizer -F</option>
|
||||
<option value="Sterilizer - TT">Sterilizer - TT</option>
|
||||
<option value="Vaporizer">Vaporizer</option>
|
||||
<option value="Waste Management System">Waste Management System</option>
|
||||
<option value="legacy" disabled>legacy</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@ -92,7 +126,8 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-actions">
|
||||
<button ng-click="remarks.save()" type="button" class="btn btn-primary">Save</button>
|
||||
<button ng-click="remarks.save(false)" type="button" class="btn btn-primary">Save</button>
|
||||
<button ng-click="remarks.save(true)" type="button" class="btn" disabled>Save & Notify</button>
|
||||
<button ng-click="remarks.reset()" type="button" class="btn">Cancel</button>
|
||||
</div>
|
||||
</div>
|
||||
@ -102,95 +137,169 @@
|
||||
<div class="section-label">Scheduling</div>
|
||||
<div class="section-container">
|
||||
<div ng-hide="scheduling.visible" class="form-preview">
|
||||
<strong>{{master.scheduling.start | date}}</strong><br>
|
||||
From <strong>{{master.scheduling.start | time}}</strong> to <strong>{{master.scheduling.end | time}}</strong><br>
|
||||
Techs: <strong>{{ master.techs | techs }}</strong><br>
|
||||
From <strong>{{master.scheduling.start | date}} {{master.scheduling.start | time}}</strong> to <strong>{{master.scheduling.end | date}} {{master.scheduling.end | time}}</strong><br>
|
||||
<span ng-show="workorderType != 'meeting'">Techs</span><span ng-show="workorderType == 'meeting'">Attendees</span>: <strong>{{ master.techs | techs }}</strong><br>
|
||||
<a ng-click="scheduling.edit()">Edit</a>
|
||||
</div>
|
||||
<div ng-show="scheduling.visible" class="form-editor">
|
||||
<div class="control-group">
|
||||
<label class="control-label">Date</label>
|
||||
<div class="controls">
|
||||
<input ng-model="scheduling.date" datepicker type="text" class="input-small">
|
||||
<select ng-model="scheduling.start" name="start" class="input-small">
|
||||
<option value="05:00:00">5:00am</option>
|
||||
<option value="05:30:00">5:30am</option>
|
||||
<option value="06:00:00">6:00am</option>
|
||||
<option value="06:30:00">6:30am</option>
|
||||
<option value="07:00:00">7:00am</option>
|
||||
<option value="07:30:00">7:30am</option>
|
||||
<option value="08:00:00">8:00am</option>
|
||||
<option value="08:30:00">8:30am</option>
|
||||
<option value="09:00:00">9:00am</option>
|
||||
<option value="09:30:00">9:30am</option>
|
||||
<option value="10:00:00">10:00am</option>
|
||||
<option value="10:30:00">10:30am</option>
|
||||
<option value="11:00:00">11:00am</option>
|
||||
<option value="11:30:00">11:30am</option>
|
||||
<option value="12:00:00">12:00pm</option>
|
||||
<option value="12:30:00">12:30pm</option>
|
||||
<option value="13:00:00">1:00pm</option>
|
||||
<option value="13:30:00">1:30pm</option>
|
||||
<option value="14:00:00">2:00pm</option>
|
||||
<option value="14:30:00">2:30pm</option>
|
||||
<option value="15:00:00">3:00pm</option>
|
||||
<option value="15:30:00">3:30pm</option>
|
||||
<option value="16:00:00">4:00pm</option>
|
||||
<option value="16:30:00">4:30pm</option>
|
||||
<option value="17:00:00">5:00pm</option>
|
||||
<option value="17:30:00">5:30pm</option>
|
||||
<option value="18:00:00">6:00pm</option>
|
||||
<option value="18:30:00">6:30pm</option>
|
||||
<option value="19:00:00">7:00pm</option>
|
||||
<option value="19:30:00">7:30pm</option>
|
||||
<option value="20:00:00">8:00pm</option>
|
||||
<option value="20:30:00">8:30pm</option>
|
||||
<option value="21:00:00">9:00pm</option>
|
||||
<option value="21:30:00">9:30pm</option>
|
||||
<option value="22:00:00">10:00pm</option>
|
||||
<span><input ng-model="scheduling.startDate" datepicker type="text" class="input-small"></span>
|
||||
<select ng-model="scheduling.startTime" name="start" class="input-small">
|
||||
<option value="05:00:00">5:00am</option>
|
||||
<option value="05:15:00">5:15am</option>
|
||||
<option value="05:30:00">5:30am</option>
|
||||
<option value="05:45:00">5:45am</option>
|
||||
<option value="06:00:00">6:00am</option>
|
||||
<option value="06:15:00">6:15am</option>
|
||||
<option value="06:30:00">6:30am</option>
|
||||
<option value="06:45:00">6:45am</option>
|
||||
<option value="07:00:00">7:00am</option>
|
||||
<option value="07:15:00">7:15am</option>
|
||||
<option value="07:30:00">7:30am</option>
|
||||
<option value="07:45:00">7:45am</option>
|
||||
<option value="08:00:00">8:00am</option>
|
||||
<option value="08:15:00">8:15am</option>
|
||||
<option value="08:30:00">8:30am</option>
|
||||
<option value="08:45:00">8:45am</option>
|
||||
<option value="09:00:00">9:00am</option>
|
||||
<option value="09:15:00">9:15am</option>
|
||||
<option value="09:30:00">9:30am</option>
|
||||
<option value="09:45:00">9:45am</option>
|
||||
<option value="10:00:00">10:00am</option>
|
||||
<option value="10:15:00">10:15am</option>
|
||||
<option value="10:30:00">10:30am</option>
|
||||
<option value="10:45:00">10:45am</option>
|
||||
<option value="11:00:00">11:00am</option>
|
||||
<option value="11:15:00">11:15am</option>
|
||||
<option value="11:30:00">11:30am</option>
|
||||
<option value="11:45:00">11:45am</option>
|
||||
<option value="12:00:00">12:00pm</option>
|
||||
<option value="12:15:00">12:15pm</option>
|
||||
<option value="12:30:00">12:30pm</option>
|
||||
<option value="12:45:00">12:45pm</option>
|
||||
<option value="13:00:00">1:00pm</option>
|
||||
<option value="13:15:00">1:15pm</option>
|
||||
<option value="13:30:00">1:30pm</option>
|
||||
<option value="13:45:00">1:45pm</option>
|
||||
<option value="14:00:00">2:00pm</option>
|
||||
<option value="14:15:00">2:15pm</option>
|
||||
<option value="14:30:00">2:30pm</option>
|
||||
<option value="14:45:00">2:45pm</option>
|
||||
<option value="15:00:00">3:00pm</option>
|
||||
<option value="15:15:00">3:15pm</option>
|
||||
<option value="15:30:00">3:30pm</option>
|
||||
<option value="15:45:00">3:45pm</option>
|
||||
<option value="16:00:00">4:00pm</option>
|
||||
<option value="16:15:00">4:15pm</option>
|
||||
<option value="16:30:00">4:30pm</option>
|
||||
<option value="16:45:00">4:45pm</option>
|
||||
<option value="17:00:00">5:00pm</option>
|
||||
<option value="17:15:00">5:15pm</option>
|
||||
<option value="17:30:00">5:30pm</option>
|
||||
<option value="17:45:00">5:45pm</option>
|
||||
<option value="18:00:00">6:00pm</option>
|
||||
<option value="18:15:00">6:15pm</option>
|
||||
<option value="18:30:00">6:30pm</option>
|
||||
<option value="18:45:00">6:45pm</option>
|
||||
<option value="19:00:00">7:00pm</option>
|
||||
<option value="19:15:00">7:15pm</option>
|
||||
<option value="19:30:00">7:30pm</option>
|
||||
<option value="19:45:00">7:45pm</option>
|
||||
<option value="20:00:00">8:00pm</option>
|
||||
<option value="20:15:00">8:15pm</option>
|
||||
<option value="20:30:00">8:30pm</option>
|
||||
<option value="20:45:00">8:45pm</option>
|
||||
<option value="21:00:00">9:00pm</option>
|
||||
<option value="21:15:00">9:15pm</option>
|
||||
<option value="21:30:00">9:30pm</option>
|
||||
<option value="21:45:00">9:45pm</option>
|
||||
<option value="22:00:00">10:00pm</option>
|
||||
</select>
|
||||
<span>to</span>
|
||||
<select ng-model="scheduling.end" name="end" class="input-small">
|
||||
<option value="06:00:00">6:00am</option>
|
||||
<option value="06:30:00">6:30am</option>
|
||||
<option value="07:00:00">7:00am</option>
|
||||
<option value="07:30:00">7:30am</option>
|
||||
<option value="08:00:00">8:00am</option>
|
||||
<option value="08:30:00">8:30am</option>
|
||||
<option value="09:00:00">9:00am</option>
|
||||
<option value="09:30:00">9:30am</option>
|
||||
<option value="10:00:00">10:00am</option>
|
||||
<option value="10:30:00">10:30am</option>
|
||||
<option value="11:00:00">11:00am</option>
|
||||
<option value="11:30:00">11:30am</option>
|
||||
<option value="12:00:00">12:00pm</option>
|
||||
<option value="12:30:00">12:30pm</option>
|
||||
<option value="13:00:00">1:00pm</option>
|
||||
<option value="13:30:00">1:30pm</option>
|
||||
<option value="14:00:00">2:00pm</option>
|
||||
<option value="14:30:00">2:30pm</option>
|
||||
<option value="15:00:00">3:00pm</option>
|
||||
<option value="15:30:00">3:30pm</option>
|
||||
<option value="16:00:00">4:00pm</option>
|
||||
<option value="16:30:00">4:30pm</option>
|
||||
<option value="17:00:00">5:00pm</option>
|
||||
<option value="17:30:00">5:30pm</option>
|
||||
<option value="18:00:00">6:00pm</option>
|
||||
<option value="18:30:00">6:30pm</option>
|
||||
<option value="19:00:00">7:00pm</option>
|
||||
<option value="19:30:00">7:30pm</option>
|
||||
<option value="20:00:00">8:00pm</option>
|
||||
<option value="20:30:00">8:30pm</option>
|
||||
<option value="21:00:00">9:00pm</option>
|
||||
<option value="21:30:00">9:30pm</option>
|
||||
<option value="22:00:00">10:00pm</option>
|
||||
<span><input ng-model="scheduling.endDate" datepicker type="text" class="input-small"></span>
|
||||
<select ng-model="scheduling.endTime" name="end" class="input-small">
|
||||
<option value="05:15:00">5:15am</option>
|
||||
<option value="05:30:00">5:30am</option>
|
||||
<option value="05:45:00">5:45am</option>
|
||||
<option value="06:00:00">6:00am</option>
|
||||
<option value="06:15:00">6:15am</option>
|
||||
<option value="06:30:00">6:30am</option>
|
||||
<option value="06:45:00">6:45am</option>
|
||||
<option value="07:00:00">7:00am</option>
|
||||
<option value="07:15:00">7:15am</option>
|
||||
<option value="07:30:00">7:30am</option>
|
||||
<option value="07:45:00">7:45am</option>
|
||||
<option value="08:00:00">8:00am</option>
|
||||
<option value="08:15:00">8:15am</option>
|
||||
<option value="08:30:00">8:30am</option>
|
||||
<option value="08:45:00">8:45am</option>
|
||||
<option value="09:00:00">9:00am</option>
|
||||
<option value="09:15:00">9:15am</option>
|
||||
<option value="09:30:00">9:30am</option>
|
||||
<option value="09:45:00">9:45am</option>
|
||||
<option value="10:00:00">10:00am</option>
|
||||
<option value="10:15:00">10:15am</option>
|
||||
<option value="10:30:00">10:30am</option>
|
||||
<option value="10:45:00">10:45am</option>
|
||||
<option value="11:00:00">11:00am</option>
|
||||
<option value="11:15:00">11:15am</option>
|
||||
<option value="11:30:00">11:30am</option>
|
||||
<option value="11:45:00">11:45am</option>
|
||||
<option value="12:00:00">12:00pm</option>
|
||||
<option value="12:15:00">12:15pm</option>
|
||||
<option value="12:30:00">12:30pm</option>
|
||||
<option value="12:45:00">12:45pm</option>
|
||||
<option value="13:00:00">1:00pm</option>
|
||||
<option value="13:15:00">1:15pm</option>
|
||||
<option value="13:30:00">1:30pm</option>
|
||||
<option value="13:45:00">1:45pm</option>
|
||||
<option value="14:00:00">2:00pm</option>
|
||||
<option value="14:15:00">2:15pm</option>
|
||||
<option value="14:30:00">2:30pm</option>
|
||||
<option value="14:45:00">2:45pm</option>
|
||||
<option value="15:00:00">3:00pm</option>
|
||||
<option value="15:15:00">3:15pm</option>
|
||||
<option value="15:30:00">3:30pm</option>
|
||||
<option value="15:45:00">3:45pm</option>
|
||||
<option value="16:00:00">4:00pm</option>
|
||||
<option value="16:15:00">4:15pm</option>
|
||||
<option value="16:30:00">4:30pm</option>
|
||||
<option value="16:45:00">4:45pm</option>
|
||||
<option value="17:00:00">5:00pm</option>
|
||||
<option value="17:15:00">5:15pm</option>
|
||||
<option value="17:30:00">5:30pm</option>
|
||||
<option value="17:45:00">5:45pm</option>
|
||||
<option value="18:00:00">6:00pm</option>
|
||||
<option value="18:15:00">6:15pm</option>
|
||||
<option value="18:30:00">6:30pm</option>
|
||||
<option value="18:45:00">6:45pm</option>
|
||||
<option value="19:00:00">7:00pm</option>
|
||||
<option value="19:15:00">7:15pm</option>
|
||||
<option value="19:30:00">7:30pm</option>
|
||||
<option value="19:45:00">7:45pm</option>
|
||||
<option value="20:00:00">8:00pm</option>
|
||||
<option value="20:15:00">8:15pm</option>
|
||||
<option value="20:30:00">8:30pm</option>
|
||||
<option value="20:45:00">8:45pm</option>
|
||||
<option value="21:00:00">9:00pm</option>
|
||||
<option value="21:15:00">9:15pm</option>
|
||||
<option value="21:30:00">9:30pm</option>
|
||||
<option value="21:45:00">9:45pm</option>
|
||||
<option value="22:00:00">10:00pm</option>
|
||||
<option value="22:15:00">10:15pm</option>
|
||||
<option value="22:30:00">10:30pm</option>
|
||||
<option value="22:45:00">10:45pm</option>
|
||||
</select>
|
||||
<span>{{scheduling.duration}}</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="control-group">
|
||||
<label class="control-label">Techs</label>
|
||||
<label class="control-label"><span ng-show="workorderType != 'meeting'">Techs</span><span ng-show="workorderType == 'meeting'">Attendees</span></label>
|
||||
<div class="controls">
|
||||
<select multiple ui-select2 ng-model="scheduling.techs" data-placeholder="Choose a Tech- Check the schedule below before scheduling" class="input-xxlarge">
|
||||
<select multiple ui-select2 ng-model="scheduling.techs" data-placeholder="Choose Employee(s) - Check the schedule below before scheduling" class="input-xxlarge">
|
||||
<option ng-repeat="tech in allUsers" value="{{tech._id}}">{{tech.name.first}} {{tech.name.last}}</option>
|
||||
</select>
|
||||
</div>
|
||||
@ -206,11 +315,12 @@
|
||||
<techpicker
|
||||
users="users"
|
||||
schedule="scheduling.schedule"
|
||||
date="scheduling.date"
|
||||
start="scheduling.start"
|
||||
end="scheduling.end"></techpicker>
|
||||
date="scheduling.startDate"
|
||||
start="scheduling.startTime"
|
||||
end="scheduling.endTime"></techpicker>
|
||||
<div class="form-actions">
|
||||
<button ng-click="scheduling.save()" type="button" class="btn btn-primary">Save</button>
|
||||
<button ng-click="scheduling.save(false)" type="button" class="btn btn-primary">Save</button>
|
||||
<button ng-click="scheduling.save(true)" type="button" class="btn" disabled>Save & Notify</button>
|
||||
<button ng-click="scheduling.reset()" type="button" class="btn">Cancel</button>
|
||||
</div>
|
||||
</div>
|
||||
@ -219,12 +329,9 @@
|
||||
<div class="form-section">
|
||||
<div class="section-label">Other</div>
|
||||
<div class="section-container">
|
||||
<button ng-click="destroy()" type="button" class="btn btn-danger">Remove workorder</button>
|
||||
<button ng-click="destroy()" type="button" class="btn btn-danger">Remove <span ng-show="workorderType != 'meeting'">workorder</span><span ng-show="workorderType == 'meeting'">meeting</span></button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="tab-pane form" title="History">
|
||||
No history is currently available.
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -6,7 +6,8 @@
|
||||
<div class="row-fluid">
|
||||
<div class="span12">
|
||||
<div class="toolbelt">
|
||||
<a href="/workorders/add" class="btn btn-primary">Create new workorder</a>
|
||||
<a href="/workorders/add" class="btn btn-primary">Create new workorder</a>
|
||||
<a href="/workorders/add?workorderType=meeting" class="btn">Create new meeting</a>
|
||||
<div class="pull-right">
|
||||
<div class="input-append">
|
||||
<input type="text" ng-model="query" class="input-large" placeholder="Search">
|
||||
@ -42,7 +43,7 @@
|
||||
<strong>Techs:</strong> {{ workorder.techs | techs }}<br>
|
||||
{{workorder.remarks}}
|
||||
</td>
|
||||
<td>{{workorder.client.name}} ({{workorder.client.identifier}})</td>
|
||||
<td><a ng-href="/clients/{{workorder.client._id}}">{{workorder.client.name}} ({{workorder.client.identifier}})</a></td>
|
||||
<td>{{workorder.scheduling.start | date}}</td>
|
||||
<td>{{workorder.status}}</td>
|
||||
</tr>
|
||||
|
@ -1,5 +1,18 @@
|
||||
var tags = {}
|
||||
|
||||
var fields = [
|
||||
{ field: 'device', label: 'Device' },
|
||||
{ field: 'make', label: 'Manufacture' },
|
||||
{ field: 'model', label: 'Model' },
|
||||
{ field: 'serialNumber', label: 'Serial Number' },
|
||||
{ field: 'purchaseDate', label: 'Purchase Date' },
|
||||
{ field: 'deviceWarrantyExpiration', label: 'Warranty Expiration' },
|
||||
{ field: 'test', label: 'PM Test' },
|
||||
{ field: 'roomNumber', label: 'Room #' },
|
||||
{ field: 'poNumber', label: 'PO Number' },
|
||||
{ field: 'MoveTo', label: 'Move To' }
|
||||
];
|
||||
|
||||
angular.module('tags', ['ngResource', 'biomed.directives'])
|
||||
.factory("Tag", function($resource) {
|
||||
return $resource('/api/tags');
|
||||
@ -11,6 +24,7 @@ angular.module('tags', ['ngResource', 'biomed.directives'])
|
||||
index: { method: 'GET', params: {}, isArray: true },
|
||||
});
|
||||
})
|
||||
|
||||
tags.PageCtrl = function($scope, $window, Tag, Clients) {
|
||||
console.log($window.payload)
|
||||
|
||||
@ -38,4 +52,15 @@ tags.PageCtrl = function($scope, $window, Tag, Clients) {
|
||||
alert('Your changes have been saved.');
|
||||
});
|
||||
}
|
||||
|
||||
$scope.fields = [];
|
||||
|
||||
if ($scope.tag) {
|
||||
for (var i = 0; i < fields.length; i++) {
|
||||
fields[i].value = $scope.tag[fields[i].field];
|
||||
$scope.fields.push(fields[i]);
|
||||
}
|
||||
}
|
||||
|
||||
console.log($scope.fields);
|
||||
}
|
||||
|
Reference in New Issue
Block a user