Miisiiks

From ICO wiki
Revision as of 08:02, 2 June 2018 by Hmalkov (talk | contribs)
Jump to navigationJump to search

Meeskond

  • Christo Aruste
  • Heleriin Malkov
  • Tõnis Prants

Analüüs

Idee

Juhutööde pakkumise ja otsimise veebiteenus ja veebikeskkond

Kirjeldus

Loome veebiteenuse ning veebikeskkonna, mille kaudu inimesed saavad vaadata ja lisada juhutöö otsimise ning pakkumise kuulutusi. Kuulutustel on võimalik ära märkida piirkond, kus otsitakse tööd/töötajat. Veebilehel on võimalik hinnata kasutajakontosid ja lisada kommentaare. Kuulutuse vastuvõtmisel saadetakse kuulutuse loojale teade kontaktandmetega. Kuulutuse lisamisel on võimalik märkida ära, kas antud töö eest pakutakse tasu või mitte.

Funktsionaalsus

Must have:

  • Kuulutuste vaatamine
  • Kuulutuste lisamine
  • Kuulutuste kustutamine
  • Kuulutuste otsimine
  • Kasutajate haldamine
  • Kasutajatele teadete saatmine
  • Teadete vaatamine

Nice to have:

  • Kasutajakontode hindamine
  • Kuulutuse aegumine
  • Kuulutuse sulgemine
  • Kasutajate kommenteerimine
  • Kuulutuse aadress
  • Kuulutuse asukoha kaugus sinu asukohast
  • Anonüümselt kuulutustele vastamine
  • Mitme kontaktandme valikuline sidumine kuulutusega

Veebiteenus

https://www.dropbox.com/s/e2vu3ukgckyc2x5/MiisiiksWS.zip?dl=0

Klientrakendus

https://www.dropbox.com/s/iwtheohp5mn0lek/MiisiiksC.zip?dl=0

XML

<?xml version="1.0" encoding="utf-8" ?>

<ApplicationUsers>
	<ApplicationUserDTO>
		<UserId> 296a7683-be8d-45e1-9b9d-6b7e1aa4657d </UserId>
		<UserName><![CDATA[workers@hotmail.com]]></UserName>
		<Advertisements>
			<AdvertisementDTO>
				<AdId>1</AdId>
				<AdName><![CDATA[Looking for a truck driver]]></AdName>
				<AdDescription><![CDATA[I am looking for a truck driver to help me move to another town. For more information send a message.]]></AdDescription>
				<UserName><![CDATA[workers@hotmail.com]]></UserName>
				<Location><![CDATA[Tallinn, Mustamäe]]></Location>
				<JobCategory> Driving </JobCategory>
				<CreationDate> 01.06.2018 </CreationDate>
				<AdvertisementPictureDTO> 
					<PictureId>1</PictureId>
					<Location><![CDATA[https://i1.wp.com/movingtips.wpengine.com/wp-content/uploads/2017/10/large-moving-truck.jpg?fit=1024%2C683&ssl=1]]></Location>
					<AdvertisentId> 1 </AdvertisentId>
				</AdvertisementPictureDTO>
		
				<AdvertisementPictureDTO> 
					<PictureId>2</PictureId>
					<Location><![CDATA[https://www.southernoak.com/v2/wp-content/uploads/2016/05/Moving-Day.jpg]]></Location>
					<AdvertisentId> 1 </AdvertisentId>
				</AdvertisementPictureDTO>
			</AdvertisementDTO>
		</Advertisements>
		<Contacts>
			<ContactDTO>
				<Id> 1 </Id>
				<ContactValue><![CDATA[Miisiks]]></ContactValue>
				<UserName><![CDATA[workers@hotmail.com]]></UserName>
				<ContactTypeName> Skype </ContactTypeName>
			</ContactDTO>
        </Contacts>
	</ApplicationUserDTO>	
	
	<ApplicationUserDTO>
		<UserId> 2460d33a-3505-4844-b8c8-2b7e0ece6a70 </UserId>
		<UserName><![CDATA[homeforyou@gmail.com]]></UserName>
		<Advertisements>
			<AdvertisementDTO>
				<AdId>3</AdId>
				<AdName><![CDATA[Need a home assistant]]></AdName>
				<AdDescription><![CDATA[Need help with a big spring cleaning at countryside house. There’s a lot to clean from inside the house to the garden. Please message for more information]]></AdDescription>
				<UserName><![CDATA[homeforyou@gmail.com]]></UserName>
				<Location><![CDATA[Pärnumaa, Sauga]]></Location>
				<JobCategory> Cleaning</JobCategory>
				<CreationDate> 12.02.2018 </CreationDate>
				<AdvertisementPictureDTO> 
					<PictureId>3</PictureId>
					<Location><![CDATA[imgurl.com/InsideTheHouse]]></Location>
					<AdvertisentId> 3 </AdvertisentId>
				</AdvertisementPictureDTO>
		
				<AdvertisementPictureDTO> 
					<PictureId>4</PictureId>
					<Location><![CDATA[imgurl.com/InsideTheHouse1]]></Location>
					<AdvertisentId> 3 </AdvertisentId>
				</AdvertisementPictureDTO>

				<AdvertisementPictureDTO> 
					<PictureId>5</PictureId>
					<Location><![CDATA[imgurl.com/OutSideTheHouse]]></Location>
					<AdvertisentId> 3 </AdvertisentId>
				</AdvertisementPictureDTO>
		
				<AdvertisementPictureDTO> 
					<PictureId>6</PictureId>
					<Location><![CDATA[imgurl.com/OutSideTheHouse1]]></Location>
					<AdvertisentId> 3 </AdvertisentId>
				</AdvertisementPictureDTO>
			</AdvertisementDTO>
			<AdvertisementDTO>
        				<AdId>4</AdId>
        				<AdName><![CDATA[Fixing a roof]]></AdName>
        				<AdDescription><![CDATA[Need help with fixing a roof. Please message for more information]]></AdDescription>
        				<UserName><![CDATA[homeforyou@gmail.com]]></UserName>
        				<Location><![CDATA[Pärnumaa, Sauga]]></Location>
        				<JobCategory>Construction</JobCategory>
        				<CreationDate> 01.06.2018 </CreationDate>
      			</AdvertisementDTO>

		</Advertisements>
		<Contacts>
			<ContactDTO>
				<Id> 2 </Id>
				<ContactValue><![CDATA[homeforyou]]></ContactValue>
				<UserName><![CDATA[homeforyou@gmail.com]]></UserName>
				<ContactTypeName> Skype </ContactTypeName>
			</ContactDTO>
		</Contacts>
	</ApplicationUserDTO>	
</ApplicationUsers>

XML skeem

<?xml version="1.0" encoding="utf-8"?>
<xs:schema attributeFormDefault="unqualified" elementFormDefault="qualified" xmlns:xs="http://www.w3.org/2001/XMLSchema">
  <xs:element name="ApplicationUsers">
    <xs:complexType>
      <xs:sequence>
        <xs:element maxOccurs="unbounded" name="ApplicationUserDTO">
          <xs:complexType>
            <xs:sequence>
              <xs:element name="UserId" type="xs:string" />
              <xs:element name="UserName" type="xs:string" />
              <xs:element name="Advertisements">
                <xs:complexType>
                  <xs:sequence>
                    <xs:element maxOccurs="unbounded" name="AdvertisementDTO">
                      <xs:complexType>
                        <xs:sequence>
                          <xs:element name="AdId" type="xs:int" />
                          <xs:element name="AdName" type="xs:string" />
                          <xs:element name="AdDescription" type="xs:string" />
                          <xs:element name="UserName" type="xs:string" />
                          <xs:element name="Location" type="xs:string" />
                          <xs:element name="JobCategory" type="xs:string" />
                          <xs:element name="CreationDate" type="xs:string" />
                          <xs:element maxOccurs="unbounded" minOccurs="0" name="AdvertisementPictureDTO">
                            <xs:complexType>
                              <xs:sequence>
                                <xs:element name="PictureId" type="xs:int" />
                                <xs:element name="Location" type="xs:string" />
                                <xs:element name="AdvertisentId" type="xs:int" />
                              </xs:sequence>
                            </xs:complexType>
                          </xs:element>
                        </xs:sequence>
                      </xs:complexType>
                    </xs:element>
                  </xs:sequence>
                </xs:complexType>
              </xs:element>
              <xs:element name="Contacts">
                <xs:complexType>
                  <xs:sequence>
                    <xs:element maxOccurs="unbounded" name="ContactDTO">
                      <xs:complexType>
                        <xs:sequence>
                          <xs:element name="Id" type="xs:int" />
                          <xs:element name="ContactValue" type="xs:string" />
                          <xs:element name="UserName" type="xs:string" />
                          <xs:element name="ContactTypeName" type="xs:string" />
                        </xs:sequence>
                      </xs:complexType>
                    </xs:element>
                  </xs:sequence>
                </xs:complexType>
              </xs:element>
            </xs:sequence>
          </xs:complexType>
        </xs:element>
      </xs:sequence>
    </xs:complexType>
  </xs:element>
</xs:schema>

XLS to HTML

<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
    xmlns:msxsl="urn:schemas-microsoft-com:xslt" exclude-result-prefixes="msxsl">
  <xsl:output method="html" indent="yes"/>
  <xsl:template match="/ApplicationUsers">
    <html>
      <head>
        <title>Miisiiks</title>
        <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.1/css/bootstrap.min.css" integrity="sha384-WskhaSGFgHYWDcbwN70/dfYBj47jz9qbsMId/iRN3ewGhXQFZCSftd1LZCfmhktB" crossorigin="anonymous"/>
      </head>
      <body>
        <h1>Advertisements</h1>
        <table border="1">
          <tr>
            <th>User</th>
            <th>Title</th>
            <th>Description</th>
            <th>Location</th>
            <th>Job Category</th>
            <th>Date Created</th>            
            <th>Pictures</th>
          </tr>
          <xsl:for-each select="ApplicationUserDTO/Advertisements/AdvertisementDTO">
            <tr>
              <td>
                <xsl:value-of select="UserName"/>
              </td>
              <td>
                <xsl:value-of select="AdName"/>
              </td>
              <td>
                <xsl:value-of select="AdDescription"/>
              </td>
              <td>
                <xsl:value-of select="Location"/>
              </td>
              <td>
                <xsl:value-of select="JobCategory"/>
              </td>
              <td>
                <xsl:value-of select="CreationDate"/>
              </td>
              <td>
                <xsl:choose>
                  <xsl:when test="0 = count(AdvertisementPictureDTO)">
                    No pictures
                  </xsl:when>
                  <xsl:otherwise>
                    <img alt="Advertisement picture" height="50" width="60">
                      <xsl:attribute name="src">
                        <xsl:value-of select="AdvertisementPictureDTO/Location"/>
                      </xsl:attribute>
                    </img>
                  </xsl:otherwise>
                </xsl:choose>
              </td>
            </tr>
          </xsl:for-each>
        </table>
      </body>
    </html>
  </xsl:template>
</xsl:stylesheet>

XLS to XML

<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
		xmlns:msxsl="urn:schemas-microsoft-com:xslt" exclude-result-prefixes="msxsl"
>
<xsl:output method="xml" indent="yes"/>

<xsl:template match="/">
    <xsl:element name="ApplicationUserDTO">
		<xsl:for-each select="/ApplicationUserDTO/ApplicationUserDTO">
			<xsl:variable name="ApplicationUser" select="."/>
			<xsl:element name="ApplicationUser">
				<xsl:attribute name="UserId">
					<xsl:value-of select="@id"/>
				</xsl:attribute>
			<xsl:element name="UserName">
				<xsl:value-of select="UserName" />
			</xsl:element>
			<xsl:element name="Advertisements">
			<xsl:for-each select="$ApplicationUser/Advertisements">
				<xsl:variable name="AdvertisementDTO" select="."/>
					<xsl:element name="Advertisement">
					<xsl:attribute name="AdId">
						<xsl:value-of select="AdId"/>
					</xsl:attribute>
					<xsl:element name="AdName">
						<xsl:value-of select="AdName"/>
					</xsl:element>
					<xsl:element name="AdDescription">
						<xsl:value-of select="AdDescription"/>
					</xsl:element>
					<xsl:element name="UserName">
						<xsl:value-of select="UserName"/>
					</xsl:element>
					<xsl:element name="Location">
						<xsl:value-of select="Location"/>
					</xsl:element>
					<xsl:element name="JobCategory">
						<xsl:value-of select="JobCategory"/>
					</xsl:element>
					<xsl:element name="CreationDate">
						<xsl:value-of select="CreationDate"/>
					</xsl:element>
						<xsl:for-each select="$ApplicationUser/Advertisements/AdvertisementPicture">
							<xsl:attribute name="PictureId">
								<xsl:value-of select="PictureId"/>
							</xsl:attribute>
							<xsl:element name="AdName">
								<xsl:value-of select="AdName"/>
							</xsl:element>
							<xsl:element name="Location">
								<xsl:value-of select="Location"/>
							</xsl:element>
							<xsl:element name="AdvertisentId">
								<xsl:value-of select="AdvertisentId"/>
							</xsl:element>
						</xsl:for-each>
					</xsl:element>
			</xsl:for-each>
			</xsl:element>
			<xsl:for-each select="$ApplicationUser/Contact">	
				<xsl:variable name="Contacts" select="."/>
					<xsl:element name="Contact">
						<xsl:attribute name="Id">
							<xsl:value-of select="Id"/>
						</xsl:attribute>
						<xsl:element name="ContactValue">
							<xsl:value-of select="ContactValue"/>
						</xsl:element>
						<xsl:element name="UserName">
							<xsl:value-of select="UserName"/>
						</xsl:element>
						<xsl:element name="ContactTypeName">
							<xsl:value-of select="ContactTypeName"/>
						</xsl:element>
					</xsl:element>
			</xsl:for-each>
			</xsl:element>
		</xsl:for-each>
    </xsl:element>
</xsl:template>
</xsl:stylesheet>