-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[#74] initial refactoring of create work order
- Loading branch information
1 parent
08a0f65
commit c2fd41d
Showing
22 changed files
with
379 additions
and
85 deletions.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,129 @@ | ||
import { createWorkOrderComponent } from '../../stylesheets/CreateWorkOrderPageStyleSheet'; | ||
import { View, Text, Image, TouchableOpacity } from 'react-native'; | ||
import React from 'react'; | ||
roof = require('../../../assets/Roof.png'); | ||
kitchen = require('../../../assets/Kitchen.png'); | ||
utilities = require('../../../assets/Utilities.png'); | ||
livingRoom = require('../../../assets/Living_room.png'); | ||
bathroom = require('../../../assets/Bathroom.png'); | ||
appliances = require('../../../assets/Appliance.png'); | ||
bedroom = require('../../../assets/Bedroom.png'); | ||
balcony = require('../../../assets/Balcony.png'); | ||
garage = require('../../../assets/Garage.png'); | ||
envelope = require('../../../assets/Envelope.png'); | ||
electrical = require('../../../assets/Electrical.png'); | ||
hvac = require('../../../assets/HVAC.png'); | ||
info = require('../../../assets/Information.png'); | ||
|
||
const ChooseSector = (props) => { | ||
return ( | ||
<View style={{flex: 1, marginTop: '-5%'}}> | ||
<View style={createWorkOrderComponent.rowContainer}> | ||
<TouchableOpacity style={[createWorkOrderComponent.colContainer, props.sector == 'ROOF' | ||
? createWorkOrderComponent.selectedSectorContainer | ||
: createWorkOrderComponent.sectorContainer]} | ||
onPress={()=> props.handleSector('ROOF')}> | ||
<Image style={createWorkOrderComponent.sectorIcon} source={roof}></Image> | ||
<Text style={{alignSelf: 'center'}}>Roof</Text> | ||
</TouchableOpacity> | ||
<TouchableOpacity style={[createWorkOrderComponent.colContainer, props.sector == 'KITCHEN' | ||
? createWorkOrderComponent.selectedSectorContainer | ||
: createWorkOrderComponent.sectorContainer]} | ||
onPress={()=> props.handleSector('KITCHEN')}> | ||
<Image style={createWorkOrderComponent.sectorIcon} source={kitchen}></Image> | ||
<Text style={{alignSelf: 'center'}}>Kitchen</Text> | ||
</TouchableOpacity> | ||
<TouchableOpacity style={[createWorkOrderComponent.colContainer, props.sector == 'UTILITIES' | ||
? createWorkOrderComponent.selectedSectorContainer | ||
: createWorkOrderComponent.sectorContainer]} | ||
onPress={()=> props.handleSector('UTILITIES')}> | ||
<Image style={createWorkOrderComponent.sectorIcon} source={utilities}></Image> | ||
<Text style={{alignSelf: 'center'}}>Utilities</Text> | ||
</TouchableOpacity> | ||
</View> | ||
<View style={createWorkOrderComponent.rowContainer}> | ||
<TouchableOpacity style={[createWorkOrderComponent.colContainer, props.sector == 'LIVING_ROOM' | ||
? createWorkOrderComponent.selectedSectorContainer | ||
: createWorkOrderComponent.sectorContainer]} | ||
onPress={()=> props.handleSector('LIVING_ROOM')}> | ||
<Image style={createWorkOrderComponent.sectorIcon} source={livingRoom}></Image> | ||
<Text style={{alignSelf: 'center'}}>Living room</Text> | ||
</TouchableOpacity> | ||
<TouchableOpacity style={[createWorkOrderComponent.colContainer, props.sector == 'BATHROOM' | ||
? createWorkOrderComponent.selectedSectorContainer | ||
: createWorkOrderComponent.sectorContainer]} | ||
onPress={()=> props.handleSector('BATHROOM')}> | ||
<Image style={createWorkOrderComponent.sectorIcon} source={bathroom}></Image> | ||
<Text style={{alignSelf: 'center'}}>Bathroom</Text> | ||
</TouchableOpacity> | ||
<TouchableOpacity style={[createWorkOrderComponent.colContainer, props.sector == 'APPLIANCES' | ||
? createWorkOrderComponent.selectedSectorContainer | ||
: createWorkOrderComponent.sectorContainer]} | ||
onPress={()=> props.handleSector('APPLIANCES')}> | ||
<Image style={createWorkOrderComponent.sectorIcon} source={appliances}></Image> | ||
<Text style={{alignSelf: 'center'}}>Appliances</Text> | ||
</TouchableOpacity> | ||
</View> | ||
<View style={createWorkOrderComponent.rowContainer}> | ||
<TouchableOpacity style={[createWorkOrderComponent.colContainer, props.sector == 'BEDROOM' | ||
? createWorkOrderComponent.selectedSectorContainer | ||
: createWorkOrderComponent.sectorContainer]} | ||
onPress={()=> props.handleSector('BEDROOM')}> | ||
<Image style={createWorkOrderComponent.sectorIcon} source={bedroom}></Image> | ||
<Text style={{alignSelf: 'center'}}>Bedroom</Text> | ||
</TouchableOpacity> | ||
<TouchableOpacity style={[createWorkOrderComponent.colContainer, props.sector == 'BALCONY' | ||
? createWorkOrderComponent.selectedSectorContainer | ||
: createWorkOrderComponent.sectorContainer]} | ||
onPress={()=> props.handleSector('BALCONY')}> | ||
<Image style={createWorkOrderComponent.sectorIcon} source={balcony}></Image> | ||
<Text style={{alignSelf: 'center'}}>Balcony</Text> | ||
</TouchableOpacity> | ||
<TouchableOpacity style={[createWorkOrderComponent.colContainer, props.sector == 'GARAGE' | ||
? createWorkOrderComponent.selectedSectorContainer | ||
: createWorkOrderComponent.sectorContainer]} | ||
onPress={()=> props.handleSector('GARAGE')}> | ||
<Image style={createWorkOrderComponent.sectorIcon} source={garage}></Image> | ||
<Text style={{alignSelf: 'center'}}>Garage</Text> | ||
</TouchableOpacity> | ||
</View> | ||
<View style={createWorkOrderComponent.rowContainer}> | ||
<TouchableOpacity style={[createWorkOrderComponent.colContainer, props.sector == 'ENVELOPE' | ||
? createWorkOrderComponent.selectedSectorContainer | ||
: createWorkOrderComponent.sectorContainer]} | ||
onPress={()=> props.handleSector('ENVELOPE')}> | ||
<Image style={createWorkOrderComponent.sectorIcon} source={envelope}></Image> | ||
<Text style={{alignSelf: 'center'}}>Envelope</Text> | ||
</TouchableOpacity> | ||
<TouchableOpacity style={[createWorkOrderComponent.colContainer, props.sector == 'ELECTRICAL' | ||
? createWorkOrderComponent.selectedSectorContainer | ||
: createWorkOrderComponent.sectorContainer]} | ||
onPress={()=> props.handleSector('ELECTRICAL')}> | ||
<Image style={createWorkOrderComponent.sectorIcon} source={electrical}></Image> | ||
<Text style={{alignSelf: 'center'}}>Electrical</Text> | ||
</TouchableOpacity> | ||
<TouchableOpacity style={[createWorkOrderComponent.colContainer, props.sector == 'HVAC' | ||
? createWorkOrderComponent.selectedSectorContainer | ||
: createWorkOrderComponent.sectorContainer]} | ||
onPress={()=> props.handleSector('HVAC')}> | ||
<Image style={createWorkOrderComponent.sectorIcon} source={hvac}></Image> | ||
<Text style={{alignSelf: 'center'}}>HVAC</Text> | ||
</TouchableOpacity> | ||
</View> | ||
<View style={createWorkOrderComponent.rowContainer}> | ||
<View style={createWorkOrderComponent.colContainer}> | ||
<TouchableOpacity style={{alignSelf:'flex-start'}}> | ||
<Image style={{width: 30, height: 30}} source={info}></Image> | ||
</TouchableOpacity> | ||
</View> | ||
<View style={createWorkOrderComponent.colContainer}> | ||
<TouchableOpacity style={{alignSelf:'flex-end'}} onPress={() => props.nextStep()}> | ||
<Text>Next</Text> | ||
</TouchableOpacity> | ||
</View> | ||
</View> | ||
</View> | ||
); | ||
}; | ||
|
||
export default ChooseSector; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
import { createWorkOrderComponent } from '../../stylesheets/CreateWorkOrderPageStyleSheet'; | ||
import { View, Text, TextInput, TouchableOpacity } from 'react-native'; | ||
import React from 'react'; | ||
|
||
const GeneralInfo = (props) => { | ||
return ( | ||
<View style={{flex: 1, marginTop: '-5%'}}> | ||
<View style={createWorkOrderComponent.typesContainer}> | ||
<TouchableOpacity | ||
style = {props.type == 'CM' ? createWorkOrderComponent.selectedGray : createWorkOrderComponent.unselectedGray} | ||
onPress={() => props.handleType('CM')}> | ||
<Text style={createWorkOrderComponent.typeText}> | ||
Corrective | ||
</Text> | ||
</TouchableOpacity> | ||
<TouchableOpacity | ||
style = {props.type == 'PM' ? createWorkOrderComponent.selectedGray : createWorkOrderComponent.unselectedGray} | ||
onPress={() => props.handleType('PM')}> | ||
<Text style={createWorkOrderComponent.typeText}> | ||
Preventive | ||
</Text> | ||
</TouchableOpacity> | ||
<TouchableOpacity | ||
style = {props.type == 'IMP' ? createWorkOrderComponent.selectedGray : createWorkOrderComponent.unselectedGray} | ||
onPress={() => props.handleType('IMP')}> | ||
<Text style={createWorkOrderComponent.typeText}> | ||
Improvement | ||
</Text> | ||
</TouchableOpacity> | ||
</View> | ||
<View style={createWorkOrderComponent.rowContainer}> | ||
<TouchableOpacity disabled={true} style={[createWorkOrderComponent.textBackground, createWorkOrderComponent.colContainer]}> | ||
<Text style={createWorkOrderComponent.infoHeader}>Title</Text> | ||
</TouchableOpacity> | ||
<View style={createWorkOrderComponent.colContainer}> | ||
<TextInput style = {createWorkOrderComponent.generalTextInput} | ||
onChangeText = {(value) => props.handleTitle(value)}/> | ||
</View> | ||
</View> | ||
<View style={createWorkOrderComponent.rowContainer}> | ||
<TouchableOpacity disabled={true} style={[createWorkOrderComponent.textBackground, createWorkOrderComponent.colContainer]}> | ||
<Text style={createWorkOrderComponent.infoHeader}>Cause</Text> | ||
</TouchableOpacity> | ||
<View style={createWorkOrderComponent.colContainer}> | ||
<TextInput style={createWorkOrderComponent.generalTextInput} | ||
onChangeText = {(value) => props.handleCause(value)}/> | ||
</View> | ||
</View> | ||
<View style={createWorkOrderComponent.rowContainer}> | ||
<View style={createWorkOrderComponent.colContainer}> | ||
<TouchableOpacity style={{alignSelf:'flex-start'}} onPress={() => props.prevStep()}> | ||
<Text>Previous</Text> | ||
</TouchableOpacity> | ||
</View> | ||
<View style={createWorkOrderComponent.colContainer}> | ||
<TouchableOpacity style={{alignSelf:'flex-end'}} onPress={() => props.nextStep()}> | ||
<Text>Next</Text> | ||
</TouchableOpacity> | ||
</View> | ||
</View> | ||
</View> | ||
); | ||
}; | ||
|
||
export default GeneralInfo; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
import { createWorkOrderComponent } from '../../stylesheets/CreateWorkOrderPageStyleSheet'; | ||
import { View, Text, Image, TouchableOpacity, SafeAreaView, Platform, StatusBar } from 'react-native'; | ||
import React from 'react'; | ||
x = require('../../../assets/X.png'); | ||
|
||
const Header = (props) => { | ||
return ( | ||
<SafeAreaView style={{paddingTop: (Platform.OS === "android" || Platform.OS === "ios") ? StatusBar.currentHeight : 0 }}> | ||
<View> | ||
<View style={createWorkOrderComponent.colContainer}> | ||
<Text style={createWorkOrderComponent.headerStyle}>{props.headerText}</Text> | ||
<Text style={createWorkOrderComponent.subHeaderStyle}>{props.property.name} ({props.property.address})</Text> | ||
</View> | ||
<View style={createWorkOrderComponent.closeButton}> | ||
<TouchableOpacity style={createWorkOrderComponent.closeButton} onPress={() => props.navigation.goBack(null)}> | ||
<Image style={createWorkOrderComponent.closeButtonImage} source={x}></Image> | ||
</TouchableOpacity> | ||
</View> | ||
</View> | ||
</SafeAreaView> | ||
); | ||
}; | ||
|
||
export default Header; |
Oops, something went wrong.