Rev 24162 | Rev 26210 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | RSS feed
<style>.bold-details {text-transform:capitalize;font-weight:600;color:#212121;}.normal-details{font-weight:400;text-transform:capitalize;color:#797979;}</style><script type="text/javascript">stateNames = [];#foreach($stateName in $stateNames)//console.log("$stateName");stateNames.push("$stateName");#end$(".addlocationbutton").click(function(){$("#addLocationModal").modal({backdrop: false});});$(".createUser").click(function(){$("#addUserModal").modal({backdrop: false});});</script><section class="wrapper"><div class="row" style="background:white;font-size:14px;"><form id="update-retailer-details-form"><div class="col-lg-4" style="border-left:1px solid #f0f0f0;"><h4>USER DETAILS</h4><div class="row"><div class="col-lg-4 form-group"><p class="bold-details">ID</p></div><div class="col-lg-6 form-group">#if($user)<p class="normal-details" id ="userId" >$user.getId()</p>#else<p class="normal-details" id ="userId">0</p>#end</div></div><div class="row"><div class="col-lg-4 form-group"><p class="bold-details">FIRST NAME</p></div><div class="col-lg-6 form-group">#if($user && $user.getFirstName())<input placeholder="First Name" id="firstName" name="firstName" type="text" value="$user.getFirstName()" class="form-control input-sm">#else<input placeholder="First Name" id="firstName" name="firstName" type="text" value="" class="form-control input-sm">#end</div></div><div class="row"><div class="col-lg-4 form-group"><p class="bold-details">LAST NAME</p></div><div class="col-lg-6 form-group">#if($user && $user.getLastName())<input placeholder="Last Name" id="lastName" name="lastName" type="text" value="$user.getLastName()" class="form-control input-sm">#else<input placeholder="Last Name" id="lastName" name="lastName" type="text" value="" class="form-control input-sm">#end</div></div><div class="row"><div class="col-lg-4 form-group"><p class="bold-details">EMAIL ID</p></div><div class="col-lg-6 form-group">#if($user && $user.getEmailId())<input placeholder="Email Id" id="emailId" name="emailId" type="text" value="$user.getEmailId()" class="form-control input-sm">#else<input placeholder="Email Id" id="emailId" name="emailId" type="text" value="" class="form-control input-sm">#end</div></div><div class="row"><div class="col-lg-4 form-group"><p class="bold-details">MOBILE NUMBER</p></div><div class="col-lg-6 form-group">#if($user && $user.getMobileNumber())<input placeholder="Mobile Number" id="mobileNumber" name="mobileNumber" type="text" value="$user.getMobileNumber()" class="form-control input-sm">#else<input placeholder="Mobile Number" id="mobileNumber" name="mobileNumber" type="text" value="" class="form-control input-sm">#end</div></div><div class="row" ><div class="col-lg-5 form-group"><p class="bold-details">Location</p></div><div class="col-lg-4 form-group">#if($locationdetail)<input placeholder = "location" id="location" name="location" type="checkbox" value="true" checked>#else<input placeholder = "location" id="location" name="location" type="checkbox" value="false" >#end</div></div><div class="row" style="display: none" id ="divLocation" ><div class="col-lg-4 form-group"><p class="bold-details">Attendence Location</p></div><div class="col-lg-6 form-group">#if($locationdetail)<button class="btn btn-primary changelocation" id="change-location-button" data-target="#addLocationModal" data-toggle="modal" type="button">Change</button>#else<button class="btn btn-primary addlocation" id="add-location-button" data-target="#addLocationModal" data-toggle="modal" type="button">Add</button>#end</div></div><div class="row">#if($userRoleNames)<div class="col-lg-4 form-group"><p class="bold-details">ROLES</p></div><div class="col-lg-6 form-group"><p class="normal-details">$userRoleNames</p></div>#end</div></div><div class="col-lg-4" style="border-left:1px solid #f0f0f0;"><h4>RETAILER DETAILS</h4><h4>RETAILER</h4><div class="row"><div class="col-lg-4 form-group"><p class="bold-details">ID</p></div><div class="col-lg-6 form-group">#if($retailer)<p class="normal-details" id="retailerId">$retailer.getId()</p>#else<p class="normal-details" id="retailerId">0</p>#end</div></div><div class="row"><div class="col-lg-4 form-group"><label class="bold-details">NAME</label></div><div class="col-lg-6 form-group">#if($retailer && $retailer.getName())<input placeholder="Name" id="retailerName" name="retailerName" type="text" value="$retailer.getName()" class="form-control input-sm">#else<input placeholder="Name" id="retailerName" name="retailerName" type="text" value="" class="form-control input-sm">#end</div></div><div class="row"><div class="col-lg-4 form-group"><p class="bold-details">NUMBER</p></div><div class="col-lg-6 form-group">#if($retailer && $retailer.getNumber())<input placeholder="Number" id="retailerNumber" name="retailerNumber" type="text" value="$retailer.getNumber()" class="form-control input-sm">#else<input placeholder="Number" id="retailerNumber" name="retailerNumber" type="text" value="" class="form-control input-sm">#end</div></div><div class="row"><div class="col-lg-4 form-group"><p class="bold-details">DOCUMENT</p></div><div class="col-lg-3 form-group"><label class="btn btn-file">#set($retailerDocumentId = 0)#if($retailer && $retailer.getDocumentId())#set($retailerDocumentId = $retailer.getDocumentId())#endBrowse<input type="file" id="retailerDocument" name="retailerDocument" documentId="$retailerDocumentId" style="display:none"></label></div>#if($retailer && $retailer.getDocumentId())<div class="col-lg-2 form-group"><label class="btn btn-file-download"><button type="button" class="btn btn-default btn-sm" onclick="downloadRetailerDocument($retailer.getDocumentId(), $retailer.getId())"> View </button></label></div>#end</div><h4>ADDRESS</h4><div class="row"><div class="col-lg-4 form-group"><p class="bold-details">NAME</p></div><div class="col-lg-6 form-group">#if($retailerAddress && $retailerAddress.getName())<input placeholder="Name" id="retailerAddressName" name="retailerAddressName" type="text" value="$retailerAddress.getName()" class="form-control input-sm">#else<input placeholder="Name" id="retailerAddressName" name="retailerAddressName" type="text" value="" class="form-control input-sm">#end</div></div><div class="row"><div class="col-lg-4 form-group"><p class="bold-details">LINE1</p></div><div class="col-lg-6 form-group">#if($retailerAddress && $retailerAddress.getLine1())<input placeholder="Line 1" id="retailerAddressLine1" name="retailerAddressLine1" type="text" value="$retailerAddress.getLine1()" class="form-control input-sm">#else<input placeholder="Line 1" id="retailerAddressLine1" name="retailerAddressLine1" type="text" value="" class="form-control input-sm">#end</div></div><div class="row"><div class="col-lg-4 form-group"><p class="bold-details">LINE2</p></div><div class="col-lg-6 form-group">#if($retailerAddress && $retailerAddress.getLine2())<input placeholder="Line2" id="retailerAddressLine2" name="retailerAddressLine2" type="text" value="$retailerAddress.getLine2()" class="form-control input-sm">#else<input placeholder="Line2" id="retailerAddressLine2" name="retailerAddressLine2" type="text" value="" class="form-control input-sm">#end</div></div><div class="row"><div class="col-lg-4 form-group"><p class="bold-details">CITY</p></div><div class="col-lg-6 form-group">#if($retailerAddress && $retailerAddress.getCity())<input placeholder="City" id="retailerAddressCity" name="retailerAddressCity" type="text" value="$retailerAddress.getCity()" class="form-control input-sm">#else<input placeholder="City" id="retailerAddressCity" name="retailerAddressCity" type="text" value="" class="form-control input-sm">#end</div></div><div class="row"><div class="col-lg-4 form-group"><p class="bold-details">PIN CODE</p></div><div class="col-lg-6 form-group">#if($retailerAddress && $retailerAddress.getPinCode())<input placeholder="Pin Code" id="retailerAddressPinCode" name="retailerAddressPinCode" type="text" value="$retailerAddress.getPinCode()" class="form-control input-sm">#else<input placeholder="Pin Code" id="retailerAddressPinCode" name="retailerAddressPinCode" type="text" value="" class="form-control input-sm">#end</div></div><div class="row"><div class="col-lg-4 form-group"><p class="bold-details">STATE</p></div><div class="col-lg-6 form-group">#if($fofoStore)<select class="form-control input-sm" id = "retailerAddressState" name = "retailerAddressState" placeholder="State" disabled>#foreach($stateName in $stateNames)#if($retailerAddress.getState() == $stateName)<option value="$stateName" selected >$stateName</option>#end#end</select>#else<select class="form-control input-sm" id = "retailerAddressState" name = "retailerAddressState" placeholder="State"><option value="" disabled selected>State</option>#foreach($stateName in $stateNames)<option value="$stateName">$stateName</option>#end</select>#end</div></div><div class="row"><div class="col-lg-4 form-group"><p class="bold-details">FOFO STORE CODE</p></div><div class="col-lg-6 form-group">#if($fofoStore)<input placeholder="fofostorecode" id="minInvestment" name="fofostorecode" type="text" value="$fofoStore.getCode()" class="form-control input-sm" style="font-weight:bold;" disabled>#else<input placeholder="fofostorecode" id="minInvestment" name="fofostorecode" type="text" value="" class="form-control input-sm" disabled>#end</div></div>#if(!$fofoStore)<div class="row" ><div id="district-name-container"><div class="col-lg-4 form-group"><p class="bold-details">DISTRICT NAME</p></div><div class="col-lg-6 form-group"><select class="form-control input-sm" id = "districtName" name = "districtName" placeholder="District Name"><option value="" disabled selected>District Name</option>#foreach($districtMaster in $districtMasters)<option value="$districtMaster.getName()">$districtMaster.getName()</option>#end</select></div></div></div>#end<div class="row"><div class="col-lg-4 form-group"><p class="bold-details">CounterSize</p></div><div class="col-lg-6 form-group"><select class="form-control input-sm" id = "counterSize" name = "counterSize" placeholder="counterSize"><option value="" disabled selected>counterSize</option>#foreach($counterSize in $counterSizes)#if($counterSize == $fofoStore.getCounterSize())<option value="$counterSize" selected>$counterSize</option>#else<option value="$counterSize">$counterSize</option>#end#end</select></div></div><div class="row"><div class="col-lg-4 form-group"><p class="bold-details">MinInvestment</p></div><div class="col-lg-6 form-group">#if($fofoStore)<input placeholder="minInvestment" id="minInvestment" name="minInvestment" type="text" value="$fofoStore.getMinimumInvestment()" class="form-control input-sm">#else<input placeholder="minInvestment" id="minInvestment" name="minInvestment" type="text" value="" class="form-control input-sm">#end</div></div><div class="row"><div class="col-lg-5 form-group"><p class="bold-details">FOFO PARTNER</p></div><div class="col-lg-4 form-group">#if($fofoRole)<input placeholder = "Fofo Partner" id="fofoPartner" name="fofoPartner" type="checkbox" value="true" checked>#else<input placeholder = "Fofo Partner" id="fofoPartner" name="fofoPartner" type="checkbox" value="false">#end</div></div><div class="row"><div class="col-lg-4 form-group"><p class="bold-details">GST NUMBER</p></div><div class="col-lg-6 form-group">#if($gstNumber)<input placeholder="GST Number" id="gstNumber" name="gstNumber" type="text" value="$gstNumber" class="form-control input-sm">#else<input placeholder="GST Number" id="gstNumber" name="gstNumber" type="text" value="" class="form-control input-sm">#end</div></div><div class="row"><div class="col-lg-5 form-group"><p class="bold-details">ACTIVE</p></div><div class="col-lg-4 form-group">#if($retailer && $retailer.isActive())<input placeholder = "Active" id="active" name="active" type="checkbox" value="true" checked>#else<input placeholder = "Active" id="active" name="active" type="checkbox" value="false">#end</div></div></div><div class="col-lg-4" style="border-left:1px solid #f0f0f0;" id="shops"><h4>SHOP DETAILS</h4>#set($a = 0)#if(!$shops || $shops.isEmpty())<div id="new-shops"><h4>SHOP</h4><div class="row"><div class="col-lg-4 form-group"><p class="bold-details">ID</p></div><div class="col-lg-6 form-group" id="0"><p class="normal-details">0</p></div></div><div class="row"><div class="col-lg-4 form-group"><p class="bold-details">NAME</p></div><div class="col-lg-6 form-group"><input placeholder="Name" id="shopName${a}" name="shopName${a}" shopId ="0" type="text" value="" class="form-control input-sm"></div></div><div class="row"><div class="col-lg-4 form-group"><p class="bold-details">DOCUMENT</p></div><div class="col-lg-3 form-group"><label class="btn btn-file">Browse<input type="file" shopId = "0" class="retailerShopDocument" id="retailerShopDocument${a}" name="retailerShopDocument${a}" documentId="0" style="display:none"></label></div></div><h4>ADDRESS</h4><div class="row"><div class="col-lg-8 form-group"><p class="bold-details">SAME AS RETAILER ADDRESS</p></div><div class="col-lg-2 form-group"><input placeholder = "Same as Retailer Address" id="sameAsRetailerAddress${a}" name="sameAsRetailerAddress${a}" type="checkbox" value="false"></div></div><div id="new-shops-address"><div class="row"><div class="col-lg-4 form-group"><p class="bold-details">NAME</p></div><div class="col-lg-6 form-group"><input placeholder="Name" id="shopAddressName${a}" name="shopAddressName${a}" type="text" value="" class="form-control input-sm"></div></div><div class="row"><div class="col-lg-4 form-group"><p class="bold-details">LINE1</p></div><div class="col-lg-6 form-group"><input placeholder="Line1" id="shopAddressLine1${a}" name="shopAddressLine1${a}" type="text" value="" class="form-control input-sm"></div></div><div class="row"><div class="col-lg-4 form-group"><p class="bold-details">LINE2</p></div><div class="col-lg-6 form-group"><input placeholder="Line2" id="shopAddressLine2${a}" name="shopAddressLine2${a}" type="text" value="" class="form-control input-sm"></div></div><div class="row"><div class="col-lg-4 form-group"><p class="bold-details">CITY</p></div><div class="col-lg-6 form-group"><input placeholder="City" id="shopAddressCity${a}" name="shopAddressCity${a}" type="text" value="" class="form-control input-sm"></div></div><div class="row"><div class="col-lg-4 form-group"><p class="bold-details">PIN CODE</p></div><div class="col-lg-6 form-group"><input placeholder="Pin Code" id="shopAddressPinCode${a}" name="shopAddressPinCode${a}" type="text" value="" class="form-control input-sm"></div></div><div class="row"><div class="col-lg-4 form-group"><p class="bold-details">STATE</p></div><div class="col-lg-6 form-group"><select class="form-control input-sm" id="shopAddressState${a}" name="shopAddressState${a}" placeholder="State"><option value="" disabled selected>State</option>#foreach($stateName in $stateNames)<option value="$stateName">$stateName</option>#end</select></div></div></div>#set($a = $a + 1)</div>#else<div id="existing-shops">#foreach($shop in $shops)<h4>SHOP</h4><div class="row"><div class="col-lg-4 form-group"><p class="bold-details">ID</p></div><div class="col-lg-6 form-group" id="$shop.getId()"><p class="normal-details">$shop.getId()</p></div></div><div class="row"><div class="col-lg-4 form-group"><p class="bold-details">NAME</p></div><div class="col-lg-6 form-group">#if($shop.getName())<input placeholder="Name" id="shopName${a}" name="shopName${a}" shopId ="$shop.getId()" type="text" value="$shop.getName()" class="form-control input-sm">#else<input placeholder="Name" id="shopName${a}" name="shopName${a}" shopId ="$shop.getId()" type="text" value="" class="form-control input-sm">#end</div></div><div class="row"><div class="col-lg-4 form-group"><p class="bold-details">DOCUMENT</p></div><div class="col-lg-3 form-group"><label class="btn btn-file">#if(!$shop.getDocumentId())Browse<input type="file" shopId = "$shop.getId()" class="retailerShopDocument" id="retailerShopDocument${a}" name="retailerShopDocument${a}" documentId = "0" style="display:none">#elseBrowse<input type="file" shopId = "$shop.getId()" class="retailerShopDocument" id="retailerShopDocument${a}" name="retailerShopDocument${a}" documentId = "$shop.getDocumentId()" style="display:none">#end</label></div>#if($shop.getDocumentId())<div class="col-lg-2 form-group"><label class="btn btn-file-download"><button type="button" class="btn btn-default btn-sm" onclick="downloadRetailerShopDocument($shop.getId(), $shop.getRetailerId())"> View </button></label></div>#end</div><h4>ADDRESS</h4><div class="row"><div class="col-lg-6 form-group"><p class="bold-details">Same as Retailer Address</p></div><div class="col-lg-4 form-group"><input placeholder = "Same as Retailer Address" id="sameAsRetailerAddress${a}" name="sameAsRetailerAddress${a}" type="checkbox" value="false" ></div></div><div class="row"><div class="col-lg-4 form-group"><p class="bold-details">NAME</p></div><div class="col-lg-6 form-group">#if($shop.getAddress().getName())<input placeholder="Name" id="shopAddressName${a}" name="shopAddressName${a}" type="text" value="$shop.getAddress().getName()" class="form-control input-sm">#else<input placeholder="Name" id="shopAddressName${a}" name="shopAddressName${a}" type="text" value="" class="form-control input-sm">#end</div></div><div class="row"><div class="col-lg-4 form-group"><p class="bold-details">LINE1</p></div><div class="col-lg-6 form-group">#if($shop.getAddress().getLine1())<input placeholder="Line1" id="shopAddressLine1${a}" name="shopAddressLine1${a}" type="text" value="$shop.getAddress().getLine1()" class="form-control input-sm">#else<input placeholder="Line1" id="shopAddressLine1${a}" name="shopAddressLine1${a}" type="text" value="" class="form-control input-sm">#end</div></div><div class="row"><div class="col-lg-4 form-group"><p class="bold-details">LINE2</p></div><div class="col-lg-6 form-group">#if($shop.getAddress().getLine2())<input placeholder="Line2" id="shopAddressLine2${a}" name="shopAddressLine2${a}" type="text" value="$shop.getAddress().getLine2()" class="form-control input-sm">#else<input placeholder="Line2" id="shopAddressLine2${a}" name="shopAddressLine2${a}" type="text" value="" class="form-control input-sm">#end</div></div><div class="row"><div class="col-lg-4 form-group"><p class="bold-details">CITY</p></div><div class="col-lg-6 form-group">#if($shop.getAddress().getCity())<input placeholder="City" id="shopAddressCity${a}" name="shopAddressCity${a}" type="text" value="$shop.getAddress().getCity()" class="form-control input-sm">#else<input placeholder="City" id="shopAddressCity${a}" name="shopAddressCity${a}" type="text" value="" class="form-control input-sm">#end</div></div><div class="row"><div class="col-lg-4 form-group"><p class="bold-details">PIN CODE</p></div><div class="col-lg-6 form-group">#if($shop.getAddress().getPinCode())<input placeholder="Pin Code" id="shopAddressPinCode${a}" name="shopAddressPinCode${a}" type="text" value="$shop.getAddress().getPinCode()" class="form-control input-sm">#else<input placeholder="Pin Code" id="shopAddressPinCode${a}" name="shopAddressPinCode${a}" type="text" value="" class="form-control input-sm">#end</div></div><div class="row"><div class="col-lg-4 form-group"><p class="bold-details">STATE</p></div><div class="col-lg-6 form-group"><select class="form-control input-sm" id="shopAddressState${a}" name="shopAddressState${a}" placeholder="State"><option value="" disabled selected>State</option>#foreach($stateName in $stateNames)#if($shop.getAddress().getState() && $shop.getAddress().getState() == $stateName)<option value="$stateName" selected>$stateName</option>#else<option value="$stateName">$stateName</option>#end#end</select></div></div>#set($a = $a + 1)#end</div>#end<div id="shopDetailsSize" size="$a"></div></div><div class="row"><div class="col-md-2 col-md-offset-5"><button id="updateDetails" class="btn btn-primary" type="submit">Update Details</button></div></div></form></div></section><div id="addLocationModal" class="modal fade" role="dialog"><div class="modal-dialog"><!-- Modal content--><div class="modal-content"><div class="modal-header"><button type="button" class="close" data-dismiss="modal">×</button><h4 class="modal-title">Add Location</h4></div><div class="modal-body">#if($locationdetail)<form id="add-location-modal"><div class = "col-log-6"><div class = "row"><div class="col-lg-3 form-group"><input placeholder="Name" id="personName" name="personName" type="text" value="$locationdetail.getName()" class="form-control input-sm"></div><div class="col-lg-3 form-group"><input placeholder="Address Line 1" id="line1" name="line1" type="text" size="50" value="$locationdetail.getLine1()" class="form-control input-sm"></div><div class="col-lg-3 form-group"><input placeholder="Address Line 2" id="line2" name="line2" type="text" value="$locationdetail.getLine2()" class="form-control input-sm"></div></div><div class = "row"><div class="col-lg-3 form-group"><input placeholder="City" id="city" name="city" type="text" value="$locationdetail.getCity()" class="form-control input-sm"></div><div class="col-lg-3 form-group"><select class="form-control input-sm" id = "state" name = "state" placeholder="State"><option value="" disabled selected>State</option>#foreach($stateName in $stateNames)#if($locationdetail.getState() == $stateName)<option value="$stateName" selected>$stateName</option>#else<option value="$stateName">$stateName</option>#end#end</select></div><div class="col-lg-3 form-group"><input placeholder="Pin Code" id="pinCode" name="pinCode" type="number" value="$locationdetail.getPin()" class="form-control input-sm"></div><div class="col-lg-2"><button class="btn btn-primary" id="" onclick="updateLocationButton($locationdetail.getId())" type="button">Update</button></div></div></div></form>#else<form id="add-location-modal"><div class = "col-log-6"><div class = "row"><div class="col-lg-3 form-group"><input placeholder="Name" id="personName" name="personName" type="text" value="" class="form-control input-sm"></div><div class="col-lg-3 form-group"><input placeholder="Address Line 1" id="line1" name="line1" type="text" size="50" value="" class="form-control input-sm"></div><div class="col-lg-3 form-group"><input placeholder="Address Line 2" id="line2" name="line2" type="text" value="" class="form-control input-sm"></div></div><div class = "row"><div class="col-lg-3 form-group"><input placeholder="City" id="city" name="city" type="text" value="" class="form-control input-sm"></div><div class="col-lg-3 form-group"><select class="form-control input-sm" id = "state" name = "state" placeholder="State"><option value="" disabled selected>State</option>#foreach($stateName in $stateNames)#if($retailerStateName == $stateName)<option value="$stateName" selected>$stateName</option>#else<option value="$stateName">$stateName</option>#end#end</select></div><div class="col-lg-3 form-group"><input placeholder="Pin Code" id="pinCode" name="pinCode" type="number" value="" class="form-control input-sm"></div><div class="col-lg-2"><input class="btn btn-primary addlocationbutton" type="button" value="Add"></div></div></div></form>#end</div></div></div></div></div><script type="text/javascript" src="resources/js/update-retailer-details.js?v=${version}"></script>