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
package com.example.backend.controller; | |
import org.springframework.web.bind.annotation.*; | |
@RestController | |
@RequestMapping("/api") | |
public class InvitationController { | |
@PostMapping("/invite/{name}") | |
public String getConfirmationMessage(@PathVariable String name){ |
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
import React from "react"; | |
import GuestInvitation from './component/GuestInvitation' | |
import { BrowserRouter as Router, Route, Switch } from "react-router-dom"; | |
const App = () => ( | |
<Router> | |
<Switch> | |
<Route exact path="/invite"> | |
<GuestInvitation /> | |
</Route> |
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
import React from "react"; | |
export default class GuestInvitation extends React.Component { | |
constructor(props){ | |
super(props); | |
this.state = { | |
name: '', | |
message: '' |
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
node { | |
version = '12.12.0' | |
yarnVersion = '1.15.2' | |
download = false | |
yarnWorkDir = file("${project.buildDir}/yarn") | |
nodeModulesDir = file("${project.projectDir}/../frontend") |
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
<template> | |
<Child1 v-model:firstDropdownValue="firstDropdownValue" | |
v-model:secondDropdownValue="secondDropdownValue"/> | |
<Child2 /> | |
<Child3 /> | |
</template> | |
<script> | |
export default { | |
data() { |
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
<template> | |
<!-- Dropdown 1--> | |
<div class="dropdown-container"> | |
<div class="dropdown-title-container"> | |
<label data-test="dropdown-title">Fruits</label> | |
</div> | |
<DropdownContainer :model-value="this.firstDropdownValue" | |
:options="this.firstDropdownOptions" | |
placeholder="Please select a fruit" @update:model-value="(event) => | |
updateFirstDropdownValueAndLoadSecondDropdownOptions(event)"> |
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
<template> | |
<Child v-model="this.fruits" /> | |
</template> | |
<script> | |
export default { | |
data() { | |
return { | |
fruits1: [] | |
} |
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
<template> | |
<Child v-model="this.fruits" /> | |
</template> | |
<script> | |
export default { | |
data() { | |
return { | |
fruits: [] | |
} |
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
<template> | |
<div>{{this.modelValue}}</div> | |
</template> | |
<script> | |
export default { | |
props: { | |
modelValue: Array | |
} | |
} |
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
methods: { | |
loadSecondDropdownOptions() { | |
this.secondDropdownValue = ""; | |
this.secondDropdownOptions = this.response.fruits.find(fruit => fruit.name === this.firstDropdownValue)?.weights; | |
} | |
} |
OlderNewer