Skip to content

Commit

Permalink
Added About Us page (#122)
Browse files Browse the repository at this point in the history
  • Loading branch information
ankit01ojha authored and botraunak committed Oct 2, 2018
1 parent 86c0e6d commit d34b820
Show file tree
Hide file tree
Showing 8 changed files with 93 additions and 5 deletions.
4 changes: 2 additions & 2 deletions app/app.routes.js
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,8 @@
})
.state('app.aboutus', {
url: '/about',
templateUrl: 'src/common/coming-soon.html',
controller: 'ClientCtrl',
templateUrl: 'src/aboutUs/aboutUs.html',
controller: 'AboutUsCtrl',
controllerAs: 'vm',
data: {
title: 'About Us',
Expand Down
17 changes: 17 additions & 0 deletions app/assets/stylesheets/_custom.scss
Original file line number Diff line number Diff line change
Expand Up @@ -221,6 +221,23 @@ md-toolbar .md-menu {
margin-top: 5vh;
}

.org-logo-height{
height: 300px;
}

.org-name{
padding-top: 80px;
padding-left: 10px;
}

.org-descripion{
padding-top: 20px;
}
.org-description-contents{
padding-left: 10px;
padding-right: 10px;
}

@media (min-width: 960px) {
.login-container{
box-shadow: 1px 1px 80px black;
Expand Down
1 change: 1 addition & 0 deletions app/global-translations/locale-en.json
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@
"label.heading.transactionhistoryGraph": "Graph for transaction history",
"label.heading.category": "Category",
"label.headping.reports": "Reports",
"label.heading.aboutUs": "About Us",

"label.msg.loadingCharges": "Loading Charges",
"label.msg.loadingRecentTransactions": "Loading Recent Transactions",
Expand Down
19 changes: 19 additions & 0 deletions app/src/aboutUs/aboutUs.component.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
(function () {
'use strict';

angular.module('selfService')
.controller('AboutUsCtrl', ['$scope', '$rootScope', '$state', '$stateParams', 'AboutUsService', AboutUsCtrl]);

function AboutUsCtrl ($scope, $rootScope, $state, $stateParams, AboutUsService) {

var vm=this;
vm.org = null; // it is an array, when data is available then vm.org = {JSON data};
vm.getDetails = getDetails;

function getDetails() {
AboutUsService.getOrgDetails.get().$promise.then(function (data){
vm.org =data;
})
}
}
})();
39 changes: 39 additions & 0 deletions app/src/aboutUs/aboutUs.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
<div>
<md-content>
<div ng-if="!vm.org">
<md-card>
<md-card-title>
<md-card-title-text>
<span class="md-title">No details to show</span>
</md-card-title-text>
</md-card-title>
</md-card>
</div>
<div layout="column" ng-if="vm.org">
<div layout="row" layout-xs="column">
<div flex="40">
<md-card>
<md-whiteframe class="md-whiteframe-7dp" layout layout-align="center center">
<img ng-src="vm.org.logo" class="md-media-sm org-logo-height">
</md-whiteframe>
</md-card>
</div>
<div class="org-name" flex>
<md-card>
<md-whiteframe class="md-whiteframe-7dp" layout layout-align="center center" flex>
<h2>{{vm.org.name}}</h2>
</md-whiteframe>
</md-card>
</div>
</div>
<div class="org-descripion" flex>
<md-card>
<md-whiteframe class="md-whiteframe-7dp" layout="column" layout-align="center center">
<h2>{{'label.heading.aboutUs' | translate}}</h2>
<p class="org-description-contents">{{vm.org.description}}</p>
</md-whiteframe>
</md-card>
</div>
</div>
</md-content>
</div>
13 changes: 13 additions & 0 deletions app/src/aboutUs/aboutUs.service.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
(function (){
'use strict';

angular.module('selfService')
.service('AboutUsService', ['$q', '$http', '$rootScope', '$state', '$resource', AboutUsService]);

function AboutUsService($q,$http,$rootScope,$state,$resource){

this.getOrgDetails = function () {
return $resource(''); // enter the URL of the organisations details.
};
}
})();
2 changes: 1 addition & 1 deletion app/src/common/main.html
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ <h1 class="sidenav-title md-title">{{'nav.msg.welcome' | translate}} {{vm.profil
</md-button>
<md-divider></md-divider>
<md-button ng-click="vm.selectItem('Reports')" ui-sref-active="md-warn" ui-sref=".reports"
style="text-align: left;display: block;">
class="sidenav-icon">
<div class="md-tile-content">
<i hide-sm hide-md class="material-icons md-18">ballot</i> {{ 'nav.label.reports' | translate }}
</div>
Expand Down
3 changes: 1 addition & 2 deletions app/src/reports/run_reports/run_reports.component.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
RunReportService.reports().get({reportName: vm.reportName, id: vm.id}).$promise.then(function(data) {
vm.reportData = data;
vm.reportData.columnHeaders = data.columnHeaders;
console.log(vm.reportData.data[0].row);
});

function isDecimal (index) {
Expand All @@ -31,7 +30,7 @@
}
}
return false;
};
}

}

Expand Down

0 comments on commit d34b820

Please sign in to comment.