Commit fd582819 authored by Anthony Geourjon's avatar Anthony Geourjon
Browse files

Merge branch 'EDCAMPUS-57-permettre-lajout-dun-contact' into 'master'

Edcampus 57 permettre lajout dun contact

See merge request !28
parents 1b82157a 94f93f4b
......@@ -8,7 +8,8 @@ root.controller('UnivCompanyContacts' ,['$scope','$http','$stateParams', '$conta
$scope.contacts = {elements:[]};
$scope.entrepriseId = $stateParams.entrepriseId;
$scope.getUnivs();
$scope.getUnivs();
$scope.getStatus();
}
$scope.refresh = function(){
......@@ -47,8 +48,6 @@ root.controller('UnivCompanyContacts' ,['$scope','$http','$stateParams', '$conta
$scope._showAlert({status:3,message:""})
}
});
}
......
<div ng-controller="UnivCompanyContacts" ng-init="currentSection='listContacts'">
<button style="position:absolute; right: 20px; top: 35px;" ng-show="currentSection=='listContacts'" ng-click="currentSection='newContact'">{{::_labels.addContactBtn}}</button>
<button style="position:absolute; right: 20px; top: 35px;" ng-show="currentSection=='newContact'" ng-click="currentSection='listContacts'">{{::_labels.back2Contacts}}</button>
<div ng-show="currentSection=='newContact'" style="margin:10px;">
<h5>{{::_labels.addContactBtn}}</h5>
<div ng-include src="__root+'components/projects/contacts/editForm.html'" style="margin-bottom: 5px; padding-right: 15px; max-height: 400px; overflow-y: auto; overflow-x: hidden; margin-left: 10px;"></div>
<button class="pull-right" ng-click="addContact()">{{::_labels.addBtn}}</button>
<div class='simpleForm' style="overflow-y:auto;height:400px;">
<form class="" novalidate>
<h6 style='font-family: "SSPBold";text-transform: uppercase;'>{{::_labels.firstName}}*</h6>
<input type="text" value="" ng-model="newElement.firstName" required>
<h6 style='font-family: "SSPBold";text-transform: uppercase;'>{{::_labels.lastName}}*</h6>
<input type="text" value="" ng-model="newElement.lastName" required>
<h6 style='font-family: "SSPBold";text-transform: uppercase;'>{{::_labels.contactsFields.mainPhone}}</h6>
<input type="text" value="" ng-model="newElement.mainPhone">
<h6 style='font-family: "SSPBold";text-transform: uppercase;'>{{::_labels.contactsFields.mainEmail}}*</h6>
<input type="email" value="" ng-model="newElement.mainEmail" required>
<h6 style='font-family: "SSPBold";text-transform: uppercase;'>{{::_labels.contactsFields.organization}}</h6>
<input type="text" value="" ng-model="newElement.organization">
<h6 style='font-family: "SSPBold";text-transform: uppercase;'>{{::_labels.contactsFields.status}}</h6>
<select ng-model="newElement.status" style="width: 100%" required>
<option ng-repeat="option in listStatus" value="{{option.value}}">{{::_labels.contactsFields.statusValues[option.value]}}</option>
</select>
<h6 style='font-family: "SSPBold";text-transform: uppercase;'>{{::_labels.description}}</h6>
<textarea type="text" ng-model="newElement.description"></textarea>
</form>
<button class="pull-right" ng-click="addContact()">{{::_labels.addBtn}}</button>
</div>
</div>
<div ng-show="currentSection=='listContacts'">
<div class="alert alert-warning" ng-if="!contacts.elements.length">{{::_labels.noContactToDisplay}}</div>
<input type="text" ng-if="contacts.elements.length" class="searchField" style=' display: inline-block; margin-bottom: 0;margin-right: 10px;' ng-model="searchInput" placeholder="{{::_labels.searchContact}}">
<input type="text" ng-if="contacts.elements.length" class="searchField" style=' display: inline-block; margin-bottom: 0;margin-right: 10px;'
ng-model="searchInput" placeholder="{{::_labels.searchContact}}">
<div class="col-md-4 colMd-NoPadding" ng-repeat="item in contacts.elements | filter:searchInput">
<section style="min-height: 80px;">
<div class="important" title="{{item.description}}">
<a >
<span class='strong'>{{item.firstName[0]| uppercase}}{{item.firstName.substr(1)}} {{item.lastName | uppercase}}</span>
</a>
<span class='strong'>{{item.firstName[0]| uppercase}}{{item.firstName.substr(1)}}
{{item.lastName | uppercase}}</span>
</div>
<div ng-if="item.params.organization"><i class="fa fa-building"></i> {{item.params.organization}}</div>
<div>
......@@ -29,7 +54,7 @@
</div>
<div class="separator"></div>
<div style="bottom: 20px; position: absolute; right: 30px;">
<span class="label">{{::_labels.contactsFields.statusValues[item.status]}}</span>
<span class="label">{{::_labels.contactsFields.statusValues[item.contactStatus]}}</span>
</div>
<div class="clearfix"></div>
</section>
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment