Application Android et IOS pour l'amicale des élèves
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

ProxiwashAboutScreen.js 3.4KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103
  1. // @flow
  2. import * as React from 'react';
  3. import {Image, View} from 'react-native';
  4. import i18n from 'i18n-js';
  5. import {Card, Avatar, Paragraph, Title} from 'react-native-paper';
  6. import CollapsibleScrollView from '../../components/Collapsible/CollapsibleScrollView';
  7. import type {CardTitleIconPropsType} from '../../constants/PaperStyles';
  8. import ProxiwashConstants from '../../constants/ProxiwashConstants';
  9. const LOGO = 'https://etud.insa-toulouse.fr/~amicale_app/images/Proxiwash.png';
  10. export type LaundromatType = {
  11. id: string,
  12. title: string,
  13. subtitle: string,
  14. description: string,
  15. tarif: string,
  16. paymentMethods: string,
  17. icon: string,
  18. url: string,
  19. };
  20. /**
  21. * Class defining the proxiwash about screen.
  22. */
  23. export default class ProxiwashAboutScreen extends React.Component<null> {
  24. static getCardItem(item: LaundromatType): React.Node {
  25. return (
  26. <Card style={{margin: 5}}>
  27. <Card.Title
  28. title={i18n.t(item.title)}
  29. subtitle={i18n.t(item.subtitle)}
  30. left={(iconProps: CardTitleIconPropsType): React.Node => (
  31. <Avatar.Icon size={iconProps.size} icon={item.icon} />
  32. )}
  33. />
  34. <Card.Content>
  35. <Paragraph>{i18n.t(item.description)}</Paragraph>
  36. <Title>{i18n.t('screens.proxiwash.tariffs')}</Title>
  37. <Paragraph>{i18n.t(item.tarif)}</Paragraph>
  38. <Title>{i18n.t('screens.proxiwash.paymentMethods')}</Title>
  39. <Paragraph>{i18n.t(item.paymentMethods)}</Paragraph>
  40. </Card.Content>
  41. </Card>
  42. );
  43. }
  44. render(): React.Node {
  45. return (
  46. <CollapsibleScrollView style={{padding: 5}} hasTab>
  47. <View
  48. style={{
  49. width: '100%',
  50. height: 100,
  51. marginTop: 20,
  52. marginBottom: 20,
  53. justifyContent: 'center',
  54. alignItems: 'center',
  55. }}>
  56. <Image
  57. source={{uri: LOGO}}
  58. style={{height: '100%', width: '100%', resizeMode: 'contain'}}
  59. />
  60. </View>
  61. {ProxiwashAboutScreen.getCardItem(ProxiwashConstants.washinsa)}
  62. {ProxiwashAboutScreen.getCardItem(ProxiwashConstants.tripodeB)}
  63. <Card style={{margin: 5}}>
  64. <Card.Title
  65. title={i18n.t('screens.proxiwash.dryer')}
  66. left={(iconProps: CardTitleIconPropsType): React.Node => (
  67. <Avatar.Icon size={iconProps.size} icon="tumble-dryer" />
  68. )}
  69. />
  70. <Card.Content>
  71. <Title>{i18n.t('screens.proxiwash.procedure')}</Title>
  72. <Paragraph>{i18n.t('screens.proxiwash.dryerProcedure')}</Paragraph>
  73. <Title>{i18n.t('screens.proxiwash.tips')}</Title>
  74. <Paragraph>{i18n.t('screens.proxiwash.dryerTips')}</Paragraph>
  75. </Card.Content>
  76. </Card>
  77. <Card style={{margin: 5}}>
  78. <Card.Title
  79. title={i18n.t('screens.proxiwash.washer')}
  80. left={(iconProps: CardTitleIconPropsType): React.Node => (
  81. <Avatar.Icon size={iconProps.size} icon="washing-machine" />
  82. )}
  83. />
  84. <Card.Content>
  85. <Title>{i18n.t('screens.proxiwash.procedure')}</Title>
  86. <Paragraph>{i18n.t('screens.proxiwash.washerProcedure')}</Paragraph>
  87. <Title>{i18n.t('screens.proxiwash.tips')}</Title>
  88. <Paragraph>{i18n.t('screens.proxiwash.washerTips')}</Paragraph>
  89. </Card.Content>
  90. </Card>
  91. </CollapsibleScrollView>
  92. );
  93. }
  94. }