0% found this document useful (0 votes)
6 views11 pages

Add Inventory Management Form

The document describes an Angular modal popup for adding inventory items. It includes the HTML markup for the modal containing fields like device, company name, serial number, dates, price and configurations. It also describes the controller code to open the modal, handle selection of devices, save the inventory object by making a service call, and close the modal. The modal is used to add new inventory items or edit existing ones.

Uploaded by

shubham yadav
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
6 views11 pages

Add Inventory Management Form

The document describes an Angular modal popup for adding inventory items. It includes the HTML markup for the modal containing fields like device, company name, serial number, dates, price and configurations. It also describes the controller code to open the modal, handle selection of devices, save the inventory object by making a service call, and close the modal. The modal is used to add new inventory items or edit existing ones.

Uploaded by

shubham yadav
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd

------------------------------ADD inventory (using

pc)-------------------------------------------------------
<!-- <script type="text/ng-template" id="[Link]">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-
label="Close" ng-click="[Link]()"><span
aria-hidden="true">&times;</span></button>
<h3 class="modal-title" id="modal-title">Inventory</h3>
</div>
<div class="modal-body immigrantModalBody" id="modal-body">
<div class="row">
<div class="col-sm-12">
<form name = "addInventory" >
<div class="form-group required">
<label for="device" class="col-sm-12 col-xs-12 plr0">Select
Device</label>
<ui-select ng-model="[Link]"
class="col-sm-12 col-xs-12 plr0" theme="select2"
style="min-width: 300px;" on-select
="[Link]($item)" ng-disabled = "[Link]">
<ui-select-match placeholder="Select Device">
{{[Link]}}</ui-select-match>
<ui-select-choices repeat="option in devices |
filter : $[Link]">
<div class="signupTeamDropdown" ng-bind-
html="[Link] | highlight: $[Link]">
</div>
</ui-select-choices>
</ui-select>
<div class="clearfix"></div>
</div>
<div class="form-group required">
<label for="companyName">Company Name</label>
<input type="text" class="form-control" name="companyName"
placeholder="Company Name" maxlength="100" ng-
model="[Link]" required>
</div>
<div class="form-group required">
<label for="SerialNo.">Serial No.</label>
<input type="text" class="form-control" name="serialNo"
placeholder="Inventory Serial No." maxlength="50" ng-
model="[Link]">

</div>
<div class="form-group">
<label for="purchasedDate" class="col-sm-12 col-xs-12
plr0">Purchased Date</label>
<p class="input-group">
<input type="text" class="form-control" uib-datepicker-
popup="{{[Link]}}" ng-model="[Link]"
is-open="[Link]"
datepicker-options="[Link]" ng-required="true" placeholder="Purchased Date"
/>
<span class="input-group-btn">
<button type="button" class="btn btn-default
signupCalendarBtn" ng-click="[Link]($event, 'purchasedDate')">
<i class="glyphicon
glyphicon-calendar"></i></button>
</span>
</p>
</div>
<div class="form-group">
<label for="purchasedDate" class="col-sm-12 col-xs-12
plr0">Warranty End Date</label>
<p class="input-group">
<input type="text" class="form-control" disable-key
uib-datepicker-popup="{{[Link]}}" ng-model="[Link]" is-
open="[Link]" datepicker-
options="[Link]" ng-required="true" placeholder="Warranty End Date" />
<span class="input-group-btn">
<button type="button" class="btn btn-default
signupCalendarBtn" ng-click="[Link]($event, 'warrantyDate')"><i
class="glyphicon glyphicon-calendar"></i></button>
</span>
</p>
</div>
<div class="form-group">
<label for="price">Price</label>
<input type="text" class="form-control" ng-
model="[Link]" placeholder="Price" valid-decimal-number max-
length="1000" maxlength="10">
</div>
<div class="form-group" ng-if="[Link] ==
'System' || [Link] == 'Internal System'">
<div>
<label for="config">Configurations : </label>
</div>
<div class="form-group required col-sm-6 col-xs-12 pl0
plr0Small" ng-if="[Link] == 'System' ||
[Link] == 'Internal System'">
<label for="[Link]" ng-if ="[Link]
== 'RAM' || [Link] == 'System'">Ram</label>
<input type="text" class="form-control" ng-
model="[Link]" placeholder="Ram"
ng-if ="[Link] == 'RAM' ||
[Link] == 'System'"><br>
<label for="[Link]" ng-if ="[Link]
== 'HDD' || [Link] == 'System'">Hard Disk</label>
<input type="text" class="form-control" ng-
model="[Link]" placeholder="Hard Disk"
ng-if ="[Link] == 'HDD' ||
[Link] == 'System'"><br>
</div>
<div class="form-group required col-sm-6 col-xs-12 pl0
plr0Small" ng-if="[Link] == 'System'">
<label for="[Link]">Model No.</label>
<input type="text" class="form-control" ng-
model="[Link]" placeholder="Model Number"><br>
<label for="[Link]">Processor</label>
<input type="text" class="form-control" ng-
model="[Link]" placeholder="Processor"><br>
</div>
</div>
</form>
</div>
</div>
</div>
<div class="modal-footer">
<button class="btn btn-primary" type="button"
ng-click="[Link]()">Save</button>
<button class="btn btn-warning" type="button" ng-
click="[Link]()">Cancel</button>
</div>
</script> -->

-------------------------------------------add Inventory(using pc) controller


side----------------------------------------
// $[Link] = function () {
// var modalInstance = $[Link]({
// animation: true,
// ariaLabelledBy: "modal-title",
// ariaDescribedBy: "modal-body",
// templateUrl: "[Link]",
// backdrop: 'static',
// keyboard: false,
// controller: function ($scope, $uibModalInstance,
InventoryFactory, notificationService) {
// var pc =this;
// [Link] = {};
// [Link] = false;
// [Link] = false;
// [Link] = function (item) {
// [Link]("item", item);
// [Link] = item._id;
// [Link] = [Link];
// [Link] = [Link];
// }
// [Link] = {
// formatYear: 'yy',
// showWeeks: false,
// startingDay: 0
// };
// [Link] = ['dd/MM/yyyy', 'DD/MM/YYYY'];
// [Link] = [Link][0];
// [Link] = {
// warrantyDate: {
// value: false
// },
// purchasedDate: {
// value: false
// }
// };
// [Link] = function ($event, val) {
// [Link][val].value = true;
// };
// [Link] = function () {
// $[Link]();
// };
// [Link] = function () {
// [Link] = true;
// if (
// [Link] == undefined ||
// [Link] == undefined ||
[Link] == undefined
// ) {
// [Link]("Please fill all the
required fields");
// } else {
// let reqObject = {};
// [Link] = [Link];
// [Link] =
[Link];
// [Link] =
[Link];
// [Link] =
moment([Link]).format("YYYY-MM-DD");
// [Link] =
moment([Link]).format("YYYY-MM-DD");
// [Link] = [Link];
// [Link] = [Link];
// [Link]();
// [Link](reqObject);
// [Link](reqObject, function
(data) {
// if (data) {
// [Link](data);
// [Link]();
// [Link]("Saved
successfully!");
// [Link]();
// }
// }, function (err) {
// [Link]();
// [Link]("Error occurred!")
// })
// }
// }
// },
// controllerAs: 'pc',
// size: 'md',
// scope: $scope,
// });
// [Link](function (result) {
// [Link]();
// });
// }

----------------------------------edit Inventory(using pc) controller


side-------------------------
// $[Link] = function (row) {
// var modalInstance = $[Link]({
// animation: true,
// ariaLabelledBy: "modal-title",
// ariaDescribedBy: "modal-body",
// templateUrl: "[Link]",
// backdrop: 'static',
// keyboard: false,
// controller: function ($scope, $uibModalInstance,
InventoryFactory, notificationService) {
// var pc =this;
// [Link] = true;
// if ([Link] == 'System') {
// [Link] = true;
// }

// [Link] = {
// formatYear: 'yy',
// showWeeks: false,
// startingDay: 0
// };

// [Link] = ['dd/MM/yyyy', 'DD/MM/YYYY'];


// [Link] = [Link][0];

// [Link] = {
// warrantyDate: {
// value: false
// },
// purchasedDate: {
// value: false
// }
// };
// [Link] = function ($event, val) {
// [Link][val].value = true;
// };

// [Link] = function () {
// $[Link]();
// };
// [Link] = {};
// [Link] = row;
// [Link]([Link], "row . configs");
// [Link] = function (item) {
// [Link] = [Link];
// [Link] = [Link];
// }
// // $[Link] = {};
// [Link] = moment([Link],
"DD/MM/YYYY").format("DD-MMM-YYYY");
// [Link] = moment([Link],
"DD/MM/YYYY").format("DD-MMM-YYYY");
// [Link] = moment([Link],
$[Link]).toDate();
// [Link] =
moment([Link],
$[Link]).toDate();
// [Link] = function () {
// if (
// [Link] == undefined ||
// [Link] == undefined ||
[Link] == undefined
// ) {
// [Link]("Please fill the required
fields");
// } else {

// // $[Link] = row._id;
// let reqObject = {};
// [Link] = row._id;
// let obj = {};
// // [Link] = $[Link];
// // [Link] = $[Link];
// // [Link] =
$[Link];
// // [Link] =
$[Link];
// // [Link] =
moment($[Link]).format("YYYY-MM-DD");
// // [Link] =
moment($[Link]).format("YYYY-MM-DD");
// // [Link] = $[Link];
// // [Link] = $[Link];

// // if ($[Link] == true) {
// // let configs = {};
// // [Link] =
$[Link];
// // [Link] =
$[Link];
// // [Link] =
$[Link];
// // [Link] =
$[Link];
// // [Link] = configs
// // } else if ([Link] == "Internal System")
{
// // let configs = {};
// // [Link] =
$[Link];
// // [Link] = configs;
// // }

// [Link] = [Link];
// [Link]("edit object", obj);
// //
[Link]($[Link], function (data) {
// [Link](reqObject, function
(data) {
// if (data) {
// [Link]("Updated
successfully!")
// [Link]();
// }
// }, function (err) {
// [Link]("Error occurred!")
// })
// }
// }
// },
// controllerAs: 'pc',
// size: 'md',
// scope: $scope,
// });
// [Link](function (result) {
// [Link]();
// });
// }

----------------------------------assignInventory(in
ManageInvrequestCTrl)------------------------------
// $[Link] = function (row) {
// var modalInstance = $[Link]({
// animation: true,
// ariaLabelledBy: "modal-title",
// ariaDescribedBy: "modal-body",
// templateUrl: "[Link]",
// backdrop: 'static',
// keyboard: false,
// controller: function ($scope, $uibModalInstance, InventoryFactory,
notificationService, EmployeeFactory) {
// $[Link] = false;

// $[Link] = {
// formatYear: 'yy',
// showWeeks: false,
// startingDay: 0
// };

// $[Link] = ['dd/MM/yyyy', 'DD/MM/YYYY'];


// $[Link] = $[Link][0];

// $[Link] = {
// warrantyDate: {
// value: false
// },
// purchasedDate: {
// value: false
// }
// };
// $[Link] = function ($event, val) {
// $[Link][val].value = true;
// };

// $[Link] = function () {
// $[Link]();
// };

// $[Link] = [];
// [Link]({ employeeId: 0 },
function (data) {
// if (data && [Link] && [Link] > 0) {
// $[Link] = [Link];
// }
// });
// function getassignDetails() {
// $[Link] = [];
// let obj = {}
// [Link] = row._id
// [Link](obj, function
(data) {
// $[Link] = [];
// [Link](element => {
// [Link] =
moment([Link]).format($[Link][1]);
// [Link] =
moment([Link]).format($[Link][1]);
// $[Link](element);
// });
// }, function (err) {
// [Link]("Error Occurred!")
// })
// }
// getassignDetails();
// let object = {}
// [Link] = row._id;
// [Link](object, function
(data) {
// if ([Link] == 0 || data[0].returnDate != null) {
// $[Link] = true;
// let assignObj = {}
// [Link](assignObj, function (data) {
// [Link]("Assigned successfully!")
// getassignDetails();
// }, function (err) {
// [Link]("Error in assigning!")
// })
// }
// }, function (err) {
// [Link]("Error occurred!")
// })
// },
// controllerAs: 'pc',
// size: 'md',
// scope: $scope,
// });
// [Link](function (result) {
// // [Link]();
// });
// }

// [Link] = [];

------------------------- viewInventoryAssignee (in


[Link])--------------------------------------

<!--<script type="text/ng-template" id="[Link]">


<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-
label="Close" ng-click="close()"><span aria-hidden="true">&times;</span></button>
<h3 class="modal-title" id="modal-title">{{[Link]
== null ? 'Assign Inventory' : 'Return Inventory'}}</h3>
</div>
<div class="modal-body" id="modal-body">
<div class="row">
<div class="col-sm-12">
<form>
<div class="form-group">
<label for="inventoryName">Inventory Name</label>
<input type="text" class="form-control" disabled
placeholder="Inventory Name" maxlength="100" ng-model="[Link]">
</div>
<div class="form-group">
<label for="inventoryCode">Serial No.</label>
<input type="text" class="form-control" disabled
placeholder="Inventory Serial No." maxlength="50" ng-
model="[Link]">
</div>
<div class="form-group" ng-if="[Link] !
= null">
<label for="inventoryCode">Assigned Member</label>
<input type="text" class="form-control" disabled
maxlength="50" ng-model="[Link]">
</div>
<div class="form-group required" ng-
if="[Link] == null">
<label for="relation" class="col-sm-12 col-xs-12 plr0">
Select Employee</label>
<ui-select ng-model="[Link]"
class="col-sm-12 col-xs-12 plr0" theme="select2">
<ui-select-match placeholder="Select
Employee">{{$[Link] || $[Link]}}</ui-select-match>
<ui-select-choices repeat="employee in employees |
filter : $[Link]">
<div class="signupTeamDropdown" ng-bind-
html="[Link] | highlight: $[Link]"></div>
<small>
email: {{[Link]}}
</small>
<br/>
</ui-select-choices>
</ui-select>
<div class="clearfix"></div>
</div>
</form>
</div>
</div>
</div>
<div class="modal-footer">
<button class="btn btn-primary" type="button" ng-click="returnInventory()"
ng-if="[Link] != null">Return Inventory</button>
<button class="btn btn-primary" type="button" ng-click="assignInventory()"
ng-if="[Link] == null">Assign Inventory</button>
<button class="btn btn-warning" type="button"
ng-click="close()">Cancel</button>
</div>
</script>
<script type="text/ng-template" id="[Link]">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-
label="Close" ng-click="close()"><span aria-hidden="true">&times;</span></button>
<h3 class="modal-title" id="modal-title">Delete Inventory</h3>
</div>
<div class="modal-body" id="modal-body">
<div class="row">
<div class="col-sm-12">
<form>
<div class="form-group">
<label for="inventoryName">Inventory Name</label>
<input type="text" disabled class="form-control" disabled
placeholder="Inventory Name" maxlength="100" ng-model="[Link]">
</div>
<div class="form-group">
<label for="inventoryCode">Serial No.</label>
<input type="text" disabled class="form-control" disabled
placeholder="Inventory Serial No." maxlength="50" ng-model="[Link]">
</div>
<div class="form-group required">
<label for="relation" class="col-sm-12 col-xs-12 plr0">
Delete Reason</label>
<ui-select ng-model="[Link]" class="col-sm-12
col-xs-12 plr0" theme="select2">
<ui-select-match placeholder="Select
Reason">{{$[Link] || $[Link]}}</ui-select-match>
<ui-select-choices repeat="reason in deleteReasons |
filter : $[Link]">
<div class="signupTeamDropdown" ng-bind-
html="[Link] | highlight: $[Link]"></div>
</ui-select-choices>
</ui-select>
<div class="clearfix"></div>
</div>
<div class="form-group required" ng-if="[Link]
== 'Other'">
<label for="reason">Specify Reason</label>
<input type="text" class="form-control"
placeholder="Reason" maxlength="50" ng-model="[Link]"/>
</div>
</form>
</div>
</div>
</div>
<div class="modal-footer">
<button class="btn btn-primary" type="button" ng-
click="deleteItem()">Delete</button>
<button class="btn btn-warning" type="button"
ng-click="close()">Cancel</button>
</div>
</script> -->

-----------------------------Add inventoryconfiguration (HTMl


side)-----------------
<div class="form-group" ng-if="[Link] == 'Configurable' ||
[Link] == 'Memory'">
<div>
<label for="config">Configurations : </label>
</div>
<div class="form-group required col-sm-6 col-xs-12 pl0
plr0Small" ng-if="[Link] == 'Configurable' || [Link] ==
'Memory'">
<label for="[Link]" ng-if ="[Link] ==
'ram' || [Link] == 'r.a.m' ||
[Link] == 'random access memory' ||
[Link] == 'Configurable'">Ram</label>
<input type="text" class="form-control" ng-
model="[Link]" placeholder="Ram"
ng-if ="[Link] == 'ram' ||
[Link] == 'r.a.m' ||
[Link] == 'random access memory' ||
[Link] == 'Configurable'"><br>
<label for="[Link]" ng-if ="([Link] ==
'hdd' || [Link] =='hard disk'
|| [Link] =='hd'|| [Link]
=='harddisk' || [Link] == 'h.d' )
|| [Link] == 'Configurable'">Hard
Disk</label>
<input type="text" class="form-control" ng-
model="[Link]" placeholder="Hard Disk"
ng-if ="([Link] == 'hdd'||
[Link] == 'hard disk'|| [Link] == 'hd'
|| [Link] =='harddisk' ||
[Link] == 'h.d') || [Link] == 'Configurable'"><br>
</div>
<div class="form-group required col-sm-6 col-xs-12 pl0
plr0Small" ng-if="[Link] == 'Configurable'">
<label for="[Link]">Model No.</label>
<input type="text" class="form-control" ng-
model="[Link]" placeholder="Model Number"><br>
<label for="[Link]">Processor</label>
<input type="text" class="form-control" ng-
model="[Link]" placeholder="Processor"><br>
</div>
</div>

You might also like