This file contains 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
<!doctype html> | |
<html lang="en" ng-app="itspInvoiceFormApp"> | |
<head> | |
<meta name="viewport" content="width=device-width, initial-scale=1"> | |
<title>iThink SharePoint Invoice System</title> | |
<link rel="stylesheet" type="text/css" href="/bower_components/bootstrap/dist/css/bootstrap.css" /> | |
<link rel="stylesheet" type="text/css" href="/app/css/invoiceformapp.css" /> | |
</head> | |
<body> | |
<div> |
This file contains 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
'use strict'; | |
var invoiceFormApp = angular.module('itspInvoiceFormApp', | |
[ | |
'ngRoute', 'invoiceControllersModule', 'dataModelService' | |
]); |
This file contains 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
invoiceControllersModule.controller('addInvoiceController', ['$scope', 'dataModelService', '$location', function($scope, dataModelService, $location){ | |
$scope.invoice=new dataModelService.Invoice(); | |
$scope.addInvoiceLine = function addInvoiceLine() { | |
var newInvoiceLine=new dataModelService.InvoiceLine(); | |
$scope.invoice.invoiceLines.push(newInvoiceLine); | |
} | |
$scope.cancel = function cancelStub(){ | |
$location.path('/'); |
This file contains 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
'use strict' | |
var dataModelService = angular.module('dataModelService', []); | |
dataModelService.service('dataModelService', [dataModelServiceFactory]); | |
dataModelService.provider('dataModelService', function dataModelServiceProvider(){ | |
this.$get = [function initDataModelService(){ | |
var service=new dataModelServiceFactory(); | |
return service; | |
}]; | |
}); |
This file contains 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 configurationService = angular.module('configurationServiceModule', []); | |
configurationService.constant('applicationConstants', { | |
'clientId':'7c27b6a6-1bb8-43c0-9b92-2eee2264cc71', | |
'tenantName':'ithinksharepoint.com', | |
'instance':'https://login.microsoftonline.com/', | |
'endPoints': {} | |
}); | |
This file contains 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
'use strict' | |
var invoiceControllersModule = angular.module('invoiceControllersModule', []); | |
invoiceControllersModule.controller('listInvoicesController', ['$scope', '$location', 'adalAuthenticationService', function ($scope, $location, adalService) { | |
$scope.invoices = []; | |
$scope.error=""; | |
$scope.showInvoiceList=function(){ | |
return true; |
This file contains 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
<div class="container"> | |
<div class="row"> | |
<div ng-show="loggedIn && showInvoiceList" class="col-md-10 col-sd-3"> | |
<div class="table-responsive"> | |
<table class="table table-striped"> | |
<thead> | |
<th>Date</th> | |
<th>Invoice Reference</th> |
This file contains 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
'use strict'; | |
var invoiceFormApp = angular.module('itspInvoiceFormApp', | |
[ | |
'ngRoute', 'invoiceControllersModule', 'dataModelService', 'AdalAngular', 'configurationServiceModule' | |
]); | |
var appStart = function($routeProvider, $httpProvider, adalProvider, applicationConstants) { | |
$routeProvider.when('/invoices/add', { |
This file contains 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
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Net; | |
using System.Net.Http; | |
using System.Web.Http; | |
namespace Itsp365.InvoiceFormApp.Api.Api.Controllers | |
{ | |
public class ConfigurationController : ApiController |
This file contains 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
<section> | |
<h1> Settings </h1> | |
<h2> Login Information </h2> | |
<p class="form-control"> | |
Username: {{userInfo.userName}} | |
</p> | |
<p class="form-control"> | |
Profile: <br/> | |
<ul> |