user-page.html 9.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218
  1. <div class="user-page" ng-controller="UserPageController">
  2. <div class="user-page-wrapper">
  3. <div class="navigation">
  4. <div class="navigation-profile">
  5. <div class="profile-img">
  6. <img ng-if="userAvatarUrl" ng-src="{{userAvatarUrl}}">
  7. <img ng-if="!userAvatarUrl" ng-src="content\images\user-page\male-user-silhouette_318-35708.jpg">
  8. </div>
  9. <div class="profile-name">
  10. {{userObject.name}} {{userObject.surname}}
  11. </div>
  12. <div class="profile-change-img-btn">
  13. <label>
  14. Change Image
  15. <input type="file" id="select-file" custom-on-change="changeImg">
  16. </label>
  17. </div>
  18. </div>
  19. <div class="navigation-btns">
  20. <div ng-class="{'navigation-btn-active': activeBtn == 'personal info'}" ng-click="activeBtn = 'personal info'" class="navigation-btn">
  21. <span class="fa fa-user"></span>
  22. personal info
  23. </div>
  24. <div ng-class="{'navigation-btn-active': activeBtn == 'your diets'}" ng-click="activeBtn = 'your diets'" class="navigation-btn">
  25. <span class="fa fa-cutlery"></span>
  26. your diets
  27. </div>
  28. <div ng-class="{'navigation-btn-active': activeBtn == 'write us'}" ng-click="activeBtn = 'write us'" class="navigation-btn">
  29. <span class="fa fa-edit"></span>
  30. write us
  31. </div>
  32. </div>
  33. </div>
  34. <div class="content">
  35. <div ng-if="activeBtn == 'personal info'" class="personal-info">
  36. <div class="personl-info-wrapper">
  37. <h2>Personal Information</h2>
  38. <div class="personal-info-items-wrapper" ng-class="{'edit-active': isShowInputs}">
  39. <div class="personal-info-item">
  40. <div class="personal-info-item-title">
  41. Name
  42. </div>
  43. <div class="personal-info-item-value">
  44. <span ng-if="!isShowInputs">{{userObject.name || '-'}}</span>
  45. <input ng-if="isShowInputs" type="text" value="{{userObject.name}}" ng-model="newUserObject.name">
  46. </div>
  47. </div>
  48. <div class="personal-info-item">
  49. <div class="personal-info-item-title">
  50. Surname
  51. </div>
  52. <div class="personal-info-item-value">
  53. <span ng-if="!isShowInputs">{{userObject.surname || '-'}}</span>
  54. <input ng-if="isShowInputs" type="text" value="{{userObject.surname}}" ng-model="newUserObject.surname">
  55. </div>
  56. </div>
  57. <div class="personal-info-item">
  58. <div class="personal-info-item-title">
  59. Telefone
  60. </div>
  61. <div class="personal-info-item-value">
  62. <span ng-if="!isShowInputs">{{userObject.phoneNumber || '-'}}</span>
  63. <input ng-if="isShowInputs" type="text" value="{{userObject.phoneNumber}}" ng-model="newUserObject.phoneNumber">
  64. </div>
  65. </div>
  66. <div class="personal-info-item">
  67. <div class="personal-info-item-title">
  68. Date of birth
  69. </div>
  70. <div class="personal-info-item-value">
  71. <span ng-if="!isShowInputs && userObject.dayOfBirth && userObject.monthOfBirth && userObject.yearOfBirth">{{userObject.dayOfBirth}} - {{userObject.monthOfBirth}} - {{userObject.yearOfBirth}}</span>
  72. <span ng-if="!isShowInputs && !(userObject.dayOfBirth && userObject.monthOfBirth && userObject.yearOfBirth)">-</span>
  73. <input ng-if="isShowInputs" type="text" value="{{userObject.dayOfBirth}}" ng-model="newUserObject.dayOfBirth" placeholder="day">
  74. <select ng-if="isShowInputs" value="{{userObject.monthOfBirth}}" ng-model="newUserObject.monthOfBirth">
  75. <option>-</option>
  76. <option value="01">january</option>
  77. <option value="02">february</option>
  78. <option value="03">march</option>
  79. <option value="04">april</option>
  80. <option value="05">may</option>
  81. <option value="06">june</option>
  82. <option value="07">july</option>
  83. <option value="08">august</option>
  84. <option value="09">september</option>
  85. <option value="10">october</option>
  86. <option value="11">november</option>
  87. <option value="12">december</option>
  88. </select>
  89. <input ng-if="isShowInputs" type="text" value="{{userObject.yearOfBirth}}" ng-model="newUserObject.yearOfBirth" placeholder="year">
  90. </div>
  91. </div>
  92. <div class="personal-info-item">
  93. <div class="personal-info-item-title">
  94. Gender
  95. </div>
  96. <div class="personal-info-item-value">
  97. <span ng-if="!isShowInputs">{{userObject.gender || '-'}}</span>
  98. <select ng-if="isShowInputs" value="{{userObject.gender}}" ng-model="newUserObject.gender">
  99. <option selected>-</option>
  100. <option>Male</option>
  101. <option>Female</option>
  102. </select>
  103. </div>
  104. </div>
  105. <div class="personal-info-item">
  106. <div class="personal-info-item-title">
  107. Country
  108. </div>
  109. <div class="personal-info-item-value">
  110. <span ng-if="!isShowInputs">{{userObject.country}}</span>
  111. <select ng-if="isShowInputs" value="{{userObject.country}}" ng-model="newUserObject.country">
  112. <option ng-selected="true">-</option>
  113. <option ng-repeat="(key,country) in countriesObject track by $index" value="{{key}}">{{key}}</option>
  114. </select>
  115. </div>
  116. </div>
  117. <div class="personal-info-item">
  118. <div class="personal-info-item-title">
  119. City
  120. </div>
  121. <div class="personal-info-item-value">
  122. <span ng-if="!isShowInputs">{{userObject.city || '-'}}</span>
  123. <select ng-if="isShowInputs" value="{{userObject.city}}" ng-model="newUserObject.city">
  124. <option ng-selected="true">-</option>
  125. <option ng-repeat="city in countriesObject[newUserObject.country] track by $index" value="{{city}}">{{city}}</option>
  126. </select>
  127. </div>
  128. </div>
  129. </div>
  130. <div class="personal-info-adit-btn">
  131. <span ng-if="!isShowInputs" ng-click="toggleIsShowInputs()">Edit Profile</span>
  132. <span ng-if="isShowInputs" ng-click="toggleIsShowInputs()">Save</span>
  133. </div>
  134. </div>
  135. </div>
  136. <div ng-if="activeBtn == 'your diets'" class="your-diets">
  137. <div class="header">
  138. <div class="product">
  139. Product
  140. </div>
  141. <div class="duration">
  142. Duration
  143. </div>
  144. <div class="days-left">
  145. Days left
  146. </div>
  147. <div class="price">
  148. Price
  149. </div>
  150. </div>
  151. <div class="no-diets-user-page" ng-if="!userDiets">
  152. no diets selected
  153. </div>
  154. <div class="items-wrapper">
  155. <div class="item" ng-repeat="diet in userDiets">
  156. <div class="item-product">
  157. <div class="item-product-name">
  158. {{diet.title}}
  159. </div>
  160. <!-- <div class="item-product-img">
  161. <img ng-src="{{diet.imageUrl}}">
  162. </div> -->
  163. </div>
  164. <div class="item-duration">
  165. {{diet.weekCount > 1 ? diet.weekCount + ' weeks' : diet.weekCount + ' week'}}
  166. </div>
  167. <div class="item-days-left">
  168. {{diet.weekCount * 7}} days
  169. </div>
  170. <div class="item-price">
  171. {{diet.price}} USD
  172. </div>
  173. </div>
  174. </div>
  175. </div>
  176. <div ng-if="activeBtn == 'write us'" class="write-us">
  177. <div class="chat">
  178. <div ng-class="message.uid == 'uRkqD9GmNxUsdgF1XtmPicDJwAz1'?'admin-message':'user-message'" ng-repeat="message in messages">
  179. <div class="message-info">
  180. <div class="message-img">
  181. <img ng-if="(message.uid != 'uRkqD9GmNxUsdgF1XtmPicDJwAz1') && userAvatarUrl" ng-src="{{userAvatarUrl}}">
  182. <img ng-if="(message.uid != 'uRkqD9GmNxUsdgF1XtmPicDJwAz1') && !userAvatarUrl" src="content\images\user-page\male-user-silhouette_318-35708.jpg">
  183. <img ng-if="message.uid == 'uRkqD9GmNxUsdgF1XtmPicDJwAz1'" src="content\images\user-page\admin.png">
  184. </div>
  185. <div class="message-date">
  186. {{message.date}}
  187. </div>
  188. </div>
  189. <div class="message-text-wrapper">
  190. <div class="message-name">
  191. <div ng-if="message.uid != 'uRkqD9GmNxUsdgF1XtmPicDJwAz1'">
  192. {{userObject.name}} {{userObject.surname}}
  193. </div>
  194. <div ng-if="message.uid == 'uRkqD9GmNxUsdgF1XtmPicDJwAz1'">
  195. Admin
  196. </div>
  197. </div>
  198. <div class="message-text">
  199. {{message.userMessage}}
  200. </div>
  201. </div>
  202. </div>
  203. </div>
  204. <div class="write-message">
  205. <div class="write-input">
  206. <input type="text" placeholder="Type your message..." ng-model="messageObject.userMessage">
  207. </div>
  208. <div class="write-btn">
  209. <div class="write-btn-wrapper" ng-click="sendMessage()">
  210. <span class="fa fa-paper-plane"></span>
  211. </div>
  212. </div>
  213. </div>
  214. </div>
  215. </div>
  216. </div>
  217. </div>