Исправлен контроллер, создана одна страница для создателя, без скрипта
This commit is contained in:
parent
254ddf6f54
commit
ef720bbc01
BIN
data.mv.db
BIN
data.mv.db
Binary file not shown.
@ -13,36 +13,60 @@
|
||||
<body>
|
||||
<div id="root-div">
|
||||
<header>
|
||||
Calculator
|
||||
</header>
|
||||
<div class="content-div">
|
||||
<div>
|
||||
<a href="catalog.html" class="text-white">Creator</a>
|
||||
<a href="search.html" class="text-white">Manga</a>
|
||||
<a href="search.html" class="text-white">Reader</a>
|
||||
</div>
|
||||
</header>
|
||||
<div class="content">
|
||||
<h1>Creator</h1>
|
||||
<form id="calculator-form">
|
||||
<label for="first" class="form-label">num1</label>
|
||||
<input type="number" class="form-control" value="0" id="first" />
|
||||
<label for="second" class="form-label">num2</label>
|
||||
<input type="number" class="form-control" value="0" id="second" />
|
||||
<select class="form-select" id="type">
|
||||
<option value="int">Integer</option>
|
||||
<option value="string">String</option>
|
||||
</select>
|
||||
<label for="operation" class="form-label">Operation</label>
|
||||
<select class="form-select" id="operation">
|
||||
<option value="sum">+</option>
|
||||
<option value="difference">-</option>
|
||||
<option value="multiplication">*</option>
|
||||
<option value="cont">/</option>
|
||||
</select>
|
||||
<button type="button" class="btn btn-primary" id="calculate-button">Calculate</button>
|
||||
<button type="button" class="btn btn-primary" id="binary-button">Binary</button>
|
||||
<div>
|
||||
<label for="result" class="form-label">Result</label>
|
||||
<input type="text" readonly class="form-control" id="result" />
|
||||
<div class="d-flex justify-content-evenly mt-3">
|
||||
<div class="col-sm-2">
|
||||
<label for="creatorId" class="form-label">creatorId</label>
|
||||
<input type="number" class="form-control" value="0" id="creatorId" />
|
||||
</div>
|
||||
<div class="col-sm-2">
|
||||
<label for="mangaId" class="form-label">mangaId</label>
|
||||
<input type="number" class="form-control" value="0" id="mangaId" />
|
||||
</div>
|
||||
<div class="col-sm-2">
|
||||
<label for="creatorName" class="form-label">creatorName</label>
|
||||
<input type="text" class="form-control" value="0" id="creatorName" />
|
||||
</div>
|
||||
<div class="col-sm-2">
|
||||
<label for="password" class="form-label">password</label>
|
||||
<input type="text" readonly class="form-control" id="password" />
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="ms-5 me-5">
|
||||
<label for="operation" class="form-label">Operation</label>
|
||||
<select class="form-select" id="operation">
|
||||
<option value="getCreator">find</option>
|
||||
<option value="string">dinfAll</option>
|
||||
<option value="int">create</option>
|
||||
<option value="string">update</option>
|
||||
<option value="int">delete</option>
|
||||
</select>
|
||||
<button type="button" class="mt-3 btn btn-primary" id="apply-button">APPLY</button>
|
||||
</div>
|
||||
</form>
|
||||
<div class="row table-responsive">
|
||||
<table class="table mt-3">
|
||||
<thead>
|
||||
<tr>
|
||||
<th scope="col">#</th>
|
||||
<th scope="col">creatorName</th>
|
||||
<th scope="col">password</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody id="tbody">
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<footer>
|
||||
Footer
|
||||
</footer>
|
||||
</div>
|
||||
<script src="script.js"></script>
|
||||
</body>
|
||||
|
10
frontend/package-lock.json
generated
10
frontend/package-lock.json
generated
@ -24,6 +24,16 @@
|
||||
"node": ">=6"
|
||||
}
|
||||
},
|
||||
"node_modules/@popperjs/core": {
|
||||
"version": "2.11.7",
|
||||
"resolved": "https://registry.npmjs.org/@popperjs/core/-/core-2.11.7.tgz",
|
||||
"integrity": "sha512-Cr4OjIkipTtcXKjAsm8agyleBuDHvxzeBoa1v543lbv1YaIwQjESsVcmjiWiPEbC1FIeHOG/Op9kdCmAmiS3Kw==",
|
||||
"peer": true,
|
||||
"funding": {
|
||||
"type": "opencollective",
|
||||
"url": "https://opencollective.com/popperjs"
|
||||
}
|
||||
},
|
||||
"node_modules/ansi-styles": {
|
||||
"version": "4.3.0",
|
||||
"resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz",
|
||||
|
@ -30,6 +30,9 @@ header {
|
||||
color: white;
|
||||
font-weight: 700;
|
||||
}
|
||||
a {
|
||||
color: white;
|
||||
}
|
||||
|
||||
footer {
|
||||
padding: 1em;
|
||||
|
@ -1,7 +1,6 @@
|
||||
/*
|
||||
package com.LabWork.app.MangaStore.controller;
|
||||
|
||||
import com.LabWork.app.MangaStore.Dto.CreatorDto;
|
||||
import com.LabWork.app.MangaStore.model.Dto.CreatorDto;
|
||||
import com.LabWork.app.MangaStore.service.CreatorService;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
@ -45,4 +44,4 @@ public class CreatorController {
|
||||
public CreatorDto deleteCreator(@PathVariable Long id) {
|
||||
return new CreatorDto(creatorService.deleteCreator(id));
|
||||
}
|
||||
}*/
|
||||
}
|
||||
|
@ -1,8 +1,8 @@
|
||||
/*
|
||||
package com.LabWork.app.MangaStore.controller;
|
||||
|
||||
import com.LabWork.app.MangaStore.Dto.MangaDto;
|
||||
|
||||
import com.LabWork.app.MangaStore.model.Default.Creator;
|
||||
import com.LabWork.app.MangaStore.model.Dto.MangaDto;
|
||||
import com.LabWork.app.MangaStore.service.MangaService;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
@ -46,4 +46,4 @@ public class MangaController {
|
||||
public MangaDto deleteManga(@PathVariable Long id) {
|
||||
return new MangaDto(mangaService.deleteManga(id));
|
||||
}
|
||||
}*/
|
||||
}
|
||||
|
@ -1,7 +1,7 @@
|
||||
/*
|
||||
package com.LabWork.app.MangaStore.controller;
|
||||
|
||||
import com.LabWork.app.MangaStore.Dto.ReaderDto;
|
||||
|
||||
import com.LabWork.app.MangaStore.model.Dto.ReaderDto;
|
||||
import com.LabWork.app.MangaStore.service.ReaderService;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
@ -41,15 +41,15 @@ public class ReaderController {
|
||||
return new ReaderDto(readerService.updateReader(id, readerName, password));
|
||||
}
|
||||
|
||||
@PutMapping("/{id}")
|
||||
@PostMapping("/{id}/manga/{manga_id}")
|
||||
public ReaderDto addManga(@PathVariable Long id,
|
||||
@RequestParam("mangaId") Long mangaId) {
|
||||
@PathVariable Long mangaId) {
|
||||
return new ReaderDto(readerService.addManga(mangaId, id));
|
||||
}
|
||||
|
||||
@PutMapping("/{id}")
|
||||
@PutMapping("/{id}/manga/{manga_id}")
|
||||
public ReaderDto removeManga(@PathVariable Long id,
|
||||
@RequestParam("mangaId") Long mangaId) {
|
||||
@PathVariable Long mangaId) {
|
||||
return new ReaderDto(readerService.removeManga(mangaId, id));
|
||||
}
|
||||
|
||||
@ -57,4 +57,4 @@ public class ReaderController {
|
||||
public ReaderDto deleteReader(@PathVariable Long id) {
|
||||
return new ReaderDto(readerService.deleteReader(id));
|
||||
}
|
||||
}*/
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user