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.tsx 3.7KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117
  1. /*
  2. * Copyright (c) 2019 - 2020 Arnaud Vergnet.
  3. *
  4. * This file is part of Campus INSAT.
  5. *
  6. * Campus INSAT is free software: you can redistribute it and/or modify
  7. * it under the terms of the GNU General Public License as published by
  8. * the Free Software Foundation, either version 3 of the License, or
  9. * (at your option) any later version.
  10. *
  11. * Campus INSAT is distributed in the hope that it will be useful,
  12. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  14. * GNU General Public License for more details.
  15. *
  16. * You should have received a copy of the GNU General Public License
  17. * along with Campus INSAT. If not, see <https://www.gnu.org/licenses/>.
  18. */
  19. import * as React from 'react';
  20. import {Image, View} from 'react-native';
  21. import i18n from 'i18n-js';
  22. import {Card, Avatar, Paragraph, Title} from 'react-native-paper';
  23. import CollapsibleScrollView from '../../components/Collapsible/CollapsibleScrollView';
  24. import ProxiwashConstants from '../../constants/ProxiwashConstants';
  25. const LOGO = 'https://etud.insa-toulouse.fr/~amicale_app/images/Proxiwash.png';
  26. export type LaundromatType = {
  27. id: string;
  28. title: string;
  29. subtitle: string;
  30. description: string;
  31. tarif: string;
  32. paymentMethods: string;
  33. icon: string;
  34. url: string;
  35. };
  36. function getCardItem(item: LaundromatType) {
  37. return (
  38. <Card style={{margin: 5}}>
  39. <Card.Title
  40. title={i18n.t(item.title)}
  41. subtitle={i18n.t(item.subtitle)}
  42. left={(iconProps) => (
  43. <Avatar.Icon size={iconProps.size} icon={item.icon} />
  44. )}
  45. />
  46. <Card.Content>
  47. <Paragraph>{i18n.t(item.description)}</Paragraph>
  48. <Title>{i18n.t('screens.proxiwash.tariffs')}</Title>
  49. <Paragraph>{i18n.t(item.tarif)}</Paragraph>
  50. <Title>{i18n.t('screens.proxiwash.paymentMethods')}</Title>
  51. <Paragraph>{i18n.t(item.paymentMethods)}</Paragraph>
  52. </Card.Content>
  53. </Card>
  54. );
  55. }
  56. /**
  57. * Class defining the proxiwash about screen.
  58. */
  59. export default function ProxiwashAboutScreen() {
  60. return (
  61. <CollapsibleScrollView style={{padding: 5}} hasTab>
  62. <View
  63. style={{
  64. width: '100%',
  65. height: 100,
  66. marginTop: 20,
  67. marginBottom: 20,
  68. justifyContent: 'center',
  69. alignItems: 'center',
  70. }}>
  71. <Image
  72. source={{uri: LOGO}}
  73. style={{height: '100%', width: '100%', resizeMode: 'contain'}}
  74. />
  75. </View>
  76. {getCardItem(ProxiwashConstants.washinsa)}
  77. {getCardItem(ProxiwashConstants.tripodeB)}
  78. <Card style={{margin: 5}}>
  79. <Card.Title
  80. title={i18n.t('screens.proxiwash.dryer')}
  81. left={(iconProps) => (
  82. <Avatar.Icon size={iconProps.size} icon="tumble-dryer" />
  83. )}
  84. />
  85. <Card.Content>
  86. <Title>{i18n.t('screens.proxiwash.procedure')}</Title>
  87. <Paragraph>{i18n.t('screens.proxiwash.dryerProcedure')}</Paragraph>
  88. <Title>{i18n.t('screens.proxiwash.tips')}</Title>
  89. <Paragraph>{i18n.t('screens.proxiwash.dryerTips')}</Paragraph>
  90. </Card.Content>
  91. </Card>
  92. <Card style={{margin: 5}}>
  93. <Card.Title
  94. title={i18n.t('screens.proxiwash.washer')}
  95. left={(iconProps) => (
  96. <Avatar.Icon size={iconProps.size} icon="washing-machine" />
  97. )}
  98. />
  99. <Card.Content>
  100. <Title>{i18n.t('screens.proxiwash.procedure')}</Title>
  101. <Paragraph>{i18n.t('screens.proxiwash.washerProcedure')}</Paragraph>
  102. <Title>{i18n.t('screens.proxiwash.tips')}</Title>
  103. <Paragraph>{i18n.t('screens.proxiwash.washerTips')}</Paragraph>
  104. </Card.Content>
  105. </Card>
  106. </CollapsibleScrollView>
  107. );
  108. }