ProfilView.mxml 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <mx:VBox
  3. xmlns:mx="http://www.adobe.com/2006/mxml"
  4. xmlns:helpers="com.imt.intimamedia.helpers.*"
  5. xmlns:components="com.hillelcoren.components.*"
  6. horizontalAlign="center" verticalAlign="top"
  7. verticalScrollPolicy="auto" horizontalScrollPolicy="auto"
  8. creationComplete="initListeners()"
  9. show="showView()"
  10. paddingTop="10" paddingLeft="50" paddingRight="10">
  11. <mx:Script>
  12. <![CDATA[
  13. import com.imt.intimamedia.helpers.ComboBoxHelper;
  14. ]]>
  15. </mx:Script>
  16. <mx:Script source="../../../scripts/physician/profil/profilView.as" />
  17. <mx:StringValidator id="hospitalValidator" source="{hospitalTextInput}" maxLength="49" property="text" trigger="{hospitalTextInput}" triggerEvent="focusOut" requiredFieldError="{resourceManager.getString('labels', 'required')}" />
  18. <mx:StringValidator id="invoiceAddressValidator" source="{invoiceAddressTextInput}" maxLength="99" property="text" trigger="{invoiceAddressTextInput}" triggerEvent="focusOut" requiredFieldError="{resourceManager.getString('labels', 'required')}" />
  19. <mx:StringValidator id="shippingAddressValidator" source="{shippingAddressTextInput}" maxLength="99" property="text" trigger="{shippingAddressTextInput}" triggerEvent="focusOut" requiredFieldError="{resourceManager.getString('labels', 'required')}" />
  20. <mx:StringValidator id="cityValidator" source="{cityTextInput}" property="text" maxLength="29" trigger="{cityTextInput}" triggerEvent="focusOut" requiredFieldError="{resourceManager.getString('labels', 'required')}" />
  21. <mx:StringValidator id="zipCodeValidator" source="{zipCodeTextInput}" property="text" maxLength="9" trigger="{zipCodeTextInput}" triggerEvent="focusOut" requiredFieldError="{resourceManager.getString('labels', 'required')}" />
  22. <mx:NumberValidator id="countryValidator" source="{countryComboBox}" property="selectedIndex" minValue="0" lowerThanMinError="{resourceManager.getString('labels', 'required')}" trigger="{countryComboBox}" triggerEvent="close" />
  23. <mx:StringValidator id="phoneCenterValidator" source="{phoneCenterTextInput}" maxLength="14" property="text" trigger="{phoneCenterTextInput}" triggerEvent="focusOut" requiredFieldError="{resourceManager.getString('labels', 'required')}" />
  24. <mx:StringValidator id="lastNameValidator" source="{lastNameTextInput}" maxLength="49" property="text" trigger="{lastNameTextInput}" triggerEvent="focusOut" requiredFieldError="{resourceManager.getString('labels', 'required')}" />
  25. <mx:StringValidator id="firstNameValidator" source="{firstNameTextInput}" maxLength="49" property="text" trigger="{firstNameTextInput}" triggerEvent="focusOut" requiredFieldError="{resourceManager.getString('labels', 'required')}" />
  26. <mx:StringValidator id="phoneValidator" source="{phoneTextInput}" maxLength="14" property="text" trigger="{phoneTextInput}" triggerEvent="focusOut" requiredFieldError="{resourceManager.getString('labels', 'required')}" />
  27. <mx:NumberValidator id="activityValidator" source="{activityComboBox}" property="selectedIndex" minValue="0" lowerThanMinError="{resourceManager.getString('labels', 'required')}" trigger="{activityComboBox}" triggerEvent="close" requiredFieldError="{resourceManager.getString('labels', 'required')}" />
  28. <mx:StringValidator id="otherActivityValidator" source="{otherActivityTextInput}" property="text" trigger="{otherActivityTextInput}" triggerEvent="focusOut" requiredFieldError="{resourceManager.getString('labels', 'required')}" />
  29. <mx:StringValidator id="brandValidator" source="{brandTextInput}" maxLength="100" property="text" trigger="{brandTextInput}" triggerEvent="focusOut" requiredFieldError="{resourceManager.getString('labels', 'required')}" />
  30. <mx:NumberValidator id="frequencyValidator" source="{frequencyNumericStepper}" property="value" trigger="{frequencyNumericStepper}" triggerEvent="focusOut" requiredFieldError="{resourceManager.getString('labels', 'required')}" />
  31. <mx:VBox width="100%" styleName="containerZoneWithTitleAndBackground">
  32. <mx:HBox height="100%">
  33. <mx:Canvas>
  34. <mx:Image source="@Embed('images/general/leftTitle.png')" />
  35. <mx:Label text="{resourceManager.getString('labels', 'label.myinformation')}" styleName="titlePanel" />
  36. </mx:Canvas>
  37. <mx:HBox>
  38. <mx:Label text="ID : " />
  39. <mx:Label fontWeight="bold" text="{_model.connectedUser.uid.substring(0, 8)}" />
  40. <mx:Label text="{resourceManager.getString('labels', 'email')} : " />
  41. <mx:Label fontWeight="bold" text="{_model.connectedUser.login}" />
  42. <mx:Label text="{resourceManager.getString('labels', 'versionLabel')}" />
  43. <mx:Label fontWeight="bold" text="{resourceManager.getString('labels', 'version')}" />
  44. </mx:HBox>
  45. </mx:HBox>
  46. <mx:VBox width="100%" height="100%" verticalAlign="top" horizontalAlign="center"
  47. verticalGap="2" paddingLeft="2" paddingRight="2" paddingBottom="2" horizontalScrollPolicy="off" verticalScrollPolicy="off">
  48. <mx:HBox width="100%" horizontalScrollPolicy="off" verticalScrollPolicy="off">
  49. <mx:VBox width="30" height="100%" styleName="containerZone" click="actionOnZones(event, 'ZoneTwo')">
  50. <mx:LinkButton id="partTwo" visible="{_partTwoValid}" styleName="statusIcon" click="actionOnZonesFromErrors(event, 'ZoneTwo')" />
  51. </mx:VBox>
  52. <mx:HBox width="100%" horizontalScrollPolicy="off" verticalScrollPolicy="off">
  53. <helpers:WindowShade id="organization" label="{resourceManager.getString('labels', 'titleOrganization')}" width="100%" opened="true" styleName="titlePanelDynamic" click="actionOnZones(event, 'ZoneTwo')">
  54. <mx:Canvas styleName="containerRedCompact" height="305" width="100%" horizontalScrollPolicy="off" verticalScrollPolicy="off">
  55. <mx:VBox height="300" width="100%" verticalScrollPolicy="off" horizontalScrollPolicy="off" styleName="containerRedContentSync">
  56. <mx:FormItem id="hospitalLabel" required="true" label="{resourceManager.getString('labels', 'hospitalName')}" width="100%" labelWidth="90">
  57. <helpers:TextInputWithSkin id="hospitalTextInput" maxChars="49" text="{_model.connectedUser.hospital.name}" tabIndex="8" width="100%" styleName="textInput" />
  58. </mx:FormItem>
  59. <mx:FormItem id="countryLabel" required="true" label="{resourceManager.getString('labels', 'country')}" width="100%" labelWidth="90" >
  60. <mx:ComboBox id="countryComboBox" selectedIndex="{ComboBoxHelper.findIndex( _model.connectedUser.hospital.country, _model.countries )}" tabIndex="9" prompt="{resourceManager.getString('labels', 'chooseCountry')}" dataProvider="{_model.countries}" width="100%" />
  61. </mx:FormItem>
  62. <mx:FormItem id="zipCodeLabel" required="true" label="{resourceManager.getString('labels', 'zipCode')}" width="100%" labelWidth="90">
  63. <mx:HBox width="100%" verticalAlign="middle">
  64. <helpers:TextInputWithSkin id="zipCodeTextInput" text="{_model.connectedUser.hospital.zipCode}" maxChars="9" tabIndex="10" width="100%" styleName="textInput" />
  65. <!--mx:LinkButton icon="@Embed('images/general/search.png')" width="16" click="searchCityWithZipCode()" toolTip="{resourceManager.getString('labels', 'search.country')}" /-->
  66. </mx:HBox>
  67. </mx:FormItem>
  68. <mx:FormItem id="cityLabel" required="true" label="{resourceManager.getString('labels', 'city')}" width="100%" labelWidth="90">
  69. <mx:HBox width="100%" verticalAlign="middle">
  70. <helpers:TextInputWithSkin id="cityTextInput" text="{_model.connectedUser.hospital.city}" maxChars="29" tabIndex="11" width="100%" styleName="textInput" />
  71. <!--mx:LinkButton icon="@Embed('images/general/search.png')" width="16" click="searchZipCodeWithCity()" toolTip="{resourceManager.getString('labels', 'search.zipcode')}" /-->
  72. </mx:HBox>
  73. </mx:FormItem>
  74. <mx:FormItem id="invoiceAddressLabel" required="true" label="{resourceManager.getString('labels', 'addressInvoicing')}" width="100%" labelWidth="90">
  75. <helpers:TextAreaWithSkin id="invoiceAddressTextInput" text="{_model.connectedUser.hospital.addressInvoicing}" maxChars="99" tabIndex="12" width="100%" height="60" styleName="textInput" focusOut="copyAddress(invoiceAddressTextInput.text)" />
  76. </mx:FormItem>
  77. <mx:HBox width="100%" verticalAlign="middle">
  78. <mx:Spacer width="100%" />
  79. <mx:CheckBox id="different" labelPlacement="left" label="{resourceManager.getString('labels', 'addressDifferent')}" styleName="checkBoxForm" width="100%" click="displayShippingAddress(different.selected)" selected="{_model.connectedUser.hospital.addressInvoicing != _model.connectedUser.hospital.addressShipping ? true : false}" />
  80. </mx:HBox>
  81. <mx:FormItem id="shippingAddressLabel" required="true" label="{resourceManager.getString('labels', 'addressShipping')}" includeInLayout="false" visible="false" width="100%" labelWidth="90" moveEffect="Move" hideEffect="Fade" showEffect="Fade">
  82. <helpers:TextAreaWithSkin id="shippingAddressTextInput" text="{_model.connectedUser.hospital.addressShipping}" maxChars="99" tabIndex="13" width="100%" height="60" styleName="textInput" visible="{different.selected}" />
  83. </mx:FormItem>
  84. <mx:FormItem id="phoneCenterLabel" required="true" label="{resourceManager.getString('labels', 'phone')}" width="100%" labelWidth="90" moveEffect="Move">
  85. <helpers:TextInputWithSkin id="phoneCenterTextInput" text="{_model.connectedUser.hospital.phone}" maxChars="14" tabIndex="14" width="100%" styleName="textInput" />
  86. </mx:FormItem>
  87. <mx:FormItem label="{resourceManager.getString('labels', 'fax')}" width="100%" labelWidth="90" moveEffect="Move">
  88. <mx:TextInput id="faxCenterTextInput" tabIndex="20" text="{_model.connectedUser.hospital.fax}" maxChars="14" width="100%" />
  89. </mx:FormItem>
  90. </mx:VBox>
  91. </mx:Canvas>
  92. </helpers:WindowShade>
  93. <helpers:WindowShade id="user" label="{resourceManager.getString('labels', 'titleUser')}" width="100%" opened="true" styleName="titlePanelDynamic" click="actionOnZones(event, 'ZoneTwo')">
  94. <mx:Canvas styleName="containerRedCompact" height="305" width="100%" horizontalScrollPolicy="off" verticalScrollPolicy="off">
  95. <mx:VBox height="300" width="100%" styleName="containerRedContentSync">
  96. <mx:FormItem id="lastNameLabel" required="true" label="{resourceManager.getString('labels', 'lastName')}:" width="100%" labelWidth="80">
  97. <helpers:TextInputWithSkin id="lastNameTextInput" text="{_model.connectedUser.person.lastName}" maxChars="49" tabIndex="16" width="100%" styleName="textInput" />
  98. </mx:FormItem>
  99. <mx:FormItem id="firstNameLabel" required="true" label="{resourceManager.getString('labels', 'firstName')}" width="100%" labelWidth="80">
  100. <helpers:TextInputWithSkin id="firstNameTextInput" text="{_model.connectedUser.person.firstName}" maxChars="49" tabIndex="17" width="100%" styleName="textInput" />
  101. </mx:FormItem>
  102. <mx:FormItem id="phoneLabel" required="true" label="{resourceManager.getString('labels', 'phone')}" width="100%" labelWidth="80">
  103. <helpers:TextInputWithSkin id="phoneTextInput" text="{_model.connectedUser.person.phone}" maxChars="14" tabIndex="18" width="100%" styleName="textInput" />
  104. </mx:FormItem>
  105. <mx:FormItem label="{resourceManager.getString('labels', 'fax')}" width="100%" labelWidth="80">
  106. <mx:TextInput id="faxTextInput" text="{_model.connectedUser.person.fax}" tabIndex="19" maxChars="14" width="100%" />
  107. </mx:FormItem>
  108. <mx:FormItem id="activityLabel" required="true" label="{resourceManager.getString('labels', 'activity')}" width="100%" labelWidth="80">
  109. <mx:ComboBox id="activityComboBox" selectedIndex="{ComboBoxHelper.findIndexFromLabel( _model.connectedUser.person.activity, _model.specialities )}" tabIndex="20" dataProvider="{_model.specialities}" prompt="{resourceManager.getString('labels', 'chooseActivity')}" width="100%" change="onChangeActivity(event)" />
  110. </mx:FormItem>
  111. <mx:FormItem id="otherActivityLabel" required="true" label="{resourceManager.getString('labels', 'activity.other')}" width="100%" labelWidth="80" visible="{_otherActivityActive}" includeInLayout="{_otherActivityActive}" hideEffect="Fade" showEffect="Fade">
  112. <helpers:TextInputWithSkin id="otherActivityTextInput" text="{_model.connectedUser.person.activity}" tabIndex="21" width="100%" styleName="textInput" />
  113. </mx:FormItem>
  114. <mx:HBox width="100%" verticalAlign="middle">
  115. <mx:Spacer width="100%" />
  116. <mx:CheckBox id="buyer" labelPlacement="left" label="{resourceManager.getString('labels', 'buyer')}" styleName="checkBoxForm" width="100%" click="displayShippingAddress(different.selected)" selected="{_model.connectedUser.buyer}" />
  117. </mx:HBox>
  118. </mx:VBox>
  119. </mx:Canvas>
  120. </helpers:WindowShade>
  121. <helpers:WindowShade id="scanner" label="{resourceManager.getString('labels', 'titleScanner')}" width="100%" opened="true" styleName="titlePanelDynamic" click="actionOnZones(event, 'ZoneTwo')">
  122. <mx:Canvas styleName="containerRedCompact" height="305" width="100%" horizontalScrollPolicy="off" verticalScrollPolicy="off">
  123. <mx:VBox height="300" width="100%" styleName="containerRedContentSync" horizontalScrollPolicy="off" verticalScrollPolicy="off">
  124. <mx:FormItem label="{resourceManager.getString('labels', 'nameScanner')}" width="100%" labelWidth="130">
  125. <helpers:TextInputWithSkin id="nameTextInput" text="{_model.connectedUser.ultraSoundScanner.name}" maxChars="99" tabIndex="23" width="100%" styleName="textInput" />
  126. </mx:FormItem>
  127. <mx:FormItem id="brandLabel" required="true" label="{resourceManager.getString('labels', 'brand')}" width="100%" labelWidth="130">
  128. <helpers:TextInputWithSkin id="brandTextInput" text="{_model.connectedUser.ultraSoundScanner.brand}" maxChars="99" tabIndex="24" width="100%" styleName="textInput" />
  129. </mx:FormItem>
  130. <mx:FormItem label="{resourceManager.getString('labels', 'type')}" width="100%" labelWidth="130" >
  131. <mx:TextInput id="typeTextInput" text="{_model.connectedUser.ultraSoundScanner.type}" maxChars="99" tabIndex="25" width="100%" />
  132. </mx:FormItem>
  133. <mx:FormItem label="{resourceManager.getString('labels', 'age')}" width="100%" labelWidth="130">
  134. <mx:NumericStepper id="ageNumericStepper" tabIndex="26" width="100" minimum="1980" maximum="{_maxYear}" stepSize="1" />
  135. </mx:FormItem>
  136. <mx:FormItem required="true" label="{resourceManager.getString('labels', 'frequency')}" width="100%" labelWidth="130">
  137. <mx:NumericStepper id="frequencyNumericStepper" tabIndex="27" width="100" minimum="0" maximum="15" stepSize="1" />
  138. </mx:FormItem>
  139. <mx:Spacer height="100%" />
  140. <mx:VBox>
  141. <mx:Button width="200" height="30" visible="false" label="{resourceManager.getString('labels', 'label.addScanner')}" alpha="30" toolTip="{resourceManager.getString('labels', 'label.feature.available.later')}" />
  142. <mx:Spacer height="15" />
  143. <mx:Button width="200" height="30" visible="false" label="{resourceManager.getString('labels', 'label.defaultScanner')}" alpha="30" toolTip="{resourceManager.getString('labels', 'label.feature.available.later')}" />
  144. </mx:VBox>
  145. <!--mx:Text width="100%" selectable="false" text="{resourceManager.getString('labels', 'textScanner')}" /-->
  146. </mx:VBox>
  147. </mx:Canvas>
  148. </helpers:WindowShade>
  149. </mx:HBox>
  150. </mx:HBox>
  151. <mx:HBox width="100%" visible="false" includeInLayout="false" horizontalScrollPolicy="off" verticalScrollPolicy="off">
  152. <mx:VBox width="30" height="100%" styleName="containerZone" click="actionOnZones(event, 'ZoneThree')">
  153. <mx:LinkButton id="partThree" visible="{_partThreeValid}" styleName="statusIcon" />
  154. </mx:VBox>
  155. <mx:HBox width="100%" horizontalScrollPolicy="off" verticalScrollPolicy="off">
  156. <helpers:WindowShade id="mathContainer" label="{resourceManager.getString('labels', 'titleMath')}" width="100%" opened="true" styleName="titlePanelDynamic" click="actionOnZones(event, 'ZoneThree')">
  157. <mx:Canvas styleName="containerRedCompact" height="45" width="100%">
  158. <mx:VBox height="25" width="100%" styleName="containerRedContentSync">
  159. <mx:FormItem required="{_model.clinicalStudies}" label="{resourceManager.getString('labels', 'math')}" width="100%" labelWidth="130">
  160. <mx:TextInput id="math" width="100%" />
  161. </mx:FormItem>
  162. </mx:VBox>
  163. </mx:Canvas>
  164. </helpers:WindowShade>
  165. <helpers:WindowShade id="vatContainer" label="{resourceManager.getString('labels', 'titleVAT')}" width="100%" opened="true" styleName="titlePanelDynamic" click="actionOnZones(event, 'ZoneThree')">
  166. <mx:Canvas styleName="containerRedCompact" height="45" width="100%">
  167. <mx:VBox height="25" width="100%" styleName="containerRedContentSync">
  168. <mx:FormItem required="true" label="{resourceManager.getString('labels', 'vat')}" width="100%">
  169. <mx:CheckBox id="vatCheckBox" />
  170. </mx:FormItem>
  171. </mx:VBox>
  172. </mx:Canvas>
  173. </helpers:WindowShade>
  174. </mx:HBox>
  175. </mx:HBox>
  176. <mx:HBox paddingBottom="10" paddingTop="10" width="100%" horizontalAlign="center">
  177. <mx:Button id="registerButton" tabIndex="28" label="{resourceManager.getString('labels', 'update')}" width="120" click="update(event)" buttonMode="true" useHandCursor="true"/>
  178. </mx:HBox>
  179. </mx:VBox>
  180. </mx:VBox>
  181. <mx:HBox width="100%" height="100%">
  182. <mx:VBox width="70%" height="100%" styleName="containerZoneWithTitleAndBackground">
  183. <mx:Canvas>
  184. <mx:Image source="@Embed('images/general/leftTitle.png')" />
  185. <mx:Label text="{resourceManager.getString('labels', 'label.history')}" styleName="titlePanel" />
  186. </mx:Canvas>
  187. <mx:VBox width="100%" height="100%" verticalAlign="top" horizontalAlign="center"
  188. verticalGap="0" horizontalScrollPolicy="off" verticalScrollPolicy="off">
  189. <mx:DataGrid id="dg" width="95%" height="95%" rowCount="15">
  190. <mx:columns>
  191. <mx:DataGridColumn dataField="date" headerText="Date" />
  192. <mx:DataGridColumn dataField="type" headerText="Type" />
  193. <mx:DataGridColumn dataField="number" headerText="{resourceManager.getString('labels', 'label.profile.number')}" />
  194. <mx:DataGridColumn dataField="amount" headerText="{resourceManager.getString('labels', 'label.profile.amount')}" />
  195. </mx:columns>
  196. </mx:DataGrid>
  197. </mx:VBox>
  198. </mx:VBox>
  199. <mx:VBox width="30%" height="100%" styleName="containerZoneWithTitleAndBackground">
  200. <mx:Canvas>
  201. <mx:Image source="@Embed('images/general/leftTitle.png')" />
  202. <mx:Label text="{resourceManager.getString('labels', 'label.settings')}" styleName="titlePanel" />
  203. </mx:Canvas>
  204. <mx:VBox width="100%" height="100%" verticalAlign="top" horizontalAlign="center"
  205. verticalGap="20" paddingBottom="2" horizontalScrollPolicy="off" verticalScrollPolicy="off">
  206. <!--mx:Button width="150" height="30" label="{resourceManager.getString('labels', 'label.conditions')}" click="onDisplayConditions()" toolTip="{resourceManager.getString('labels', 'label.conditions.tooltip')}" /-->
  207. <mx:Button width="150" height="30" label="{resourceManager.getString('labels', 'label.data.export')}" click="exportData()" toolTip="{resourceManager.getString('labels', 'label.data.export.tooltip')}" />
  208. <mx:Button width="150" height="30" label="{resourceManager.getString('labels', 'label.recommend')}" toolTip="{resourceManager.getString('labels', 'label.feature.available.later')}" />
  209. <mx:Button width="150" height="30" label="{resourceManager.getString('labels', 'label.parameters')}" toolTip="{resourceManager.getString('labels', 'label.feature.available.later')}" />
  210. </mx:VBox>
  211. </mx:VBox>
  212. </mx:HBox>
  213. <mx:Spacer height="20" />
  214. </mx:VBox>