sort
This commit is contained in:
parent
3f90f6cad9
commit
358290e24a
1 changed files with 1 additions and 2 deletions
|
|
@ -1494,14 +1494,13 @@ export class ProfileSalaryTempController extends Controller {
|
|||
*
|
||||
*/
|
||||
@Put("change/sort/{profileId}")
|
||||
async Sort(@Path() profileId: string, @Body() requestBody: { id: string[] }) {
|
||||
public async changeSortEditAll(@Path() profileId: string, @Body() requestBody: { id: string[] }) {
|
||||
const salary = await this.salaryRepo.find({
|
||||
where: { profileId: profileId },
|
||||
});
|
||||
|
||||
const sortLevel = salary.map((data) => ({
|
||||
...data,
|
||||
id: data.id,
|
||||
order: requestBody.id.indexOf(data.id) + 1,
|
||||
}));
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue